From d5cf00e0278950f87f42b49e1874350a5c6bb61f Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Thu, 5 Nov 2026 15:48:56 -0500 Subject: [PATCH] feat(SaasPlatformSaasServiceMgmt): add google/cloud/saasplatform/saasservicemgmt/v1 --- .repo-metadata-full.json | 8 + SaasPlatformSaasServiceMgmt/.gitattributes | 7 + SaasPlatformSaasServiceMgmt/CONTRIBUTING.md | 10 + SaasPlatformSaasServiceMgmt/LICENSE | 202 ++ SaasPlatformSaasServiceMgmt/README.md | 50 + SaasPlatformSaasServiceMgmt/SECURITY.md | 7 + SaasPlatformSaasServiceMgmt/VERSION | 1 + SaasPlatformSaasServiceMgmt/composer.json | 30 + .../metadata/V1/Common.php | 28 + .../metadata/V1/DeploymentsResources.php | 30 + .../metadata/V1/DeploymentsService.php | 31 + .../metadata/V1/RolloutsResources.php | 30 + .../metadata/V1/RolloutsService.php | 31 + SaasPlatformSaasServiceMgmt/owlbot.py | 47 + SaasPlatformSaasServiceMgmt/phpunit.xml.dist | 16 + .../SaasDeploymentsClient/create_release.php | 88 + .../V1/SaasDeploymentsClient/create_saas.php | 76 + .../SaasDeploymentsClient/create_tenant.php | 85 + .../V1/SaasDeploymentsClient/create_unit.php | 76 + .../create_unit_kind.php | 86 + .../create_unit_operation.php | 83 + .../SaasDeploymentsClient/delete_release.php | 69 + .../V1/SaasDeploymentsClient/delete_saas.php | 69 + .../SaasDeploymentsClient/delete_tenant.php | 69 + .../V1/SaasDeploymentsClient/delete_unit.php | 69 + .../delete_unit_kind.php | 69 + .../delete_unit_operation.php | 73 + .../V1/SaasDeploymentsClient/get_location.php | 57 + .../V1/SaasDeploymentsClient/get_release.php | 71 + .../V1/SaasDeploymentsClient/get_saas.php | 71 + .../V1/SaasDeploymentsClient/get_tenant.php | 71 + .../V1/SaasDeploymentsClient/get_unit.php | 71 + .../SaasDeploymentsClient/get_unit_kind.php | 71 + .../get_unit_operation.php | 75 + .../SaasDeploymentsClient/list_locations.php | 77 + .../SaasDeploymentsClient/list_releases.php | 76 + .../V1/SaasDeploymentsClient/list_saas.php | 76 + .../V1/SaasDeploymentsClient/list_tenants.php | 76 + .../SaasDeploymentsClient/list_unit_kinds.php | 76 + .../list_unit_operations.php | 76 + .../V1/SaasDeploymentsClient/list_units.php | 76 + .../SaasDeploymentsClient/update_release.php | 78 + .../V1/SaasDeploymentsClient/update_saas.php | 59 + .../SaasDeploymentsClient/update_tenant.php | 75 + .../V1/SaasDeploymentsClient/update_unit.php | 59 + .../update_unit_kind.php | 76 + .../update_unit_operation.php | 73 + .../V1/SaasRolloutsClient/create_rollout.php | 88 + .../create_rollout_kind.php | 76 + .../V1/SaasRolloutsClient/delete_rollout.php | 69 + .../delete_rollout_kind.php | 73 + .../V1/SaasRolloutsClient/get_location.php | 57 + .../V1/SaasRolloutsClient/get_rollout.php | 71 + .../SaasRolloutsClient/get_rollout_kind.php | 75 + .../V1/SaasRolloutsClient/list_locations.php | 77 + .../SaasRolloutsClient/list_rollout_kinds.php | 76 + .../V1/SaasRolloutsClient/list_rollouts.php | 76 + .../V1/SaasRolloutsClient/update_rollout.php | 78 + .../update_rollout_kind.php | 59 + .../src/V1/Aggregate.php | 103 + .../src/V1/AppParams.php | 131 + .../src/V1/AppParams/Scope.php | 67 + .../src/V1/AppParams/Scope/Type.php | 61 + .../src/V1/Blueprint.php | 147 + .../src/V1/Client/SaasDeploymentsClient.php | 1404 +++++++++ .../src/V1/Client/SaasRolloutsClient.php | 661 +++++ .../src/V1/ComponentRef.php | 153 + .../src/V1/CompositeRef.php | 151 + .../src/V1/CreateReleaseRequest.php | 275 ++ .../src/V1/CreateRolloutKindRequest.php | 275 ++ .../src/V1/CreateRolloutRequest.php | 275 ++ .../src/V1/CreateSaasRequest.php | 275 ++ .../src/V1/CreateTenantRequest.php | 275 ++ .../src/V1/CreateUnitKindRequest.php | 275 ++ .../src/V1/CreateUnitOperationRequest.php | 275 ++ .../src/V1/CreateUnitRequest.php | 275 ++ .../src/V1/DeleteReleaseRequest.php | 251 ++ .../src/V1/DeleteRolloutKindRequest.php | 251 ++ .../src/V1/DeleteRolloutRequest.php | 251 ++ .../src/V1/DeleteSaasRequest.php | 251 ++ .../src/V1/DeleteTenantRequest.php | 251 ++ .../src/V1/DeleteUnitKindRequest.php | 251 ++ .../src/V1/DeleteUnitOperationRequest.php | 251 ++ .../src/V1/DeleteUnitRequest.php | 251 ++ .../src/V1/Dependency.php | 101 + .../src/V1/Deprovision.php | 35 + .../src/V1/DurationLimits.php | 112 + .../src/V1/ErrorBudget.php | 130 + .../src/V1/FromMapping.php | 105 + .../src/V1/GetReleaseRequest.php | 81 + .../src/V1/GetRolloutKindRequest.php | 81 + .../src/V1/GetRolloutRequest.php | 81 + .../src/V1/GetSaasRequest.php | 81 + .../src/V1/GetTenantRequest.php | 81 + .../src/V1/GetUnitKindRequest.php | 81 + .../src/V1/GetUnitOperationRequest.php | 81 + .../src/V1/GetUnitRequest.php | 81 + .../src/V1/ListReleasesRequest.php | 221 ++ .../src/V1/ListReleasesResponse.php | 143 + .../src/V1/ListRolloutKindsRequest.php | 221 ++ .../src/V1/ListRolloutKindsResponse.php | 143 + .../src/V1/ListRolloutsRequest.php | 221 ++ .../src/V1/ListRolloutsResponse.php | 143 + .../src/V1/ListSaasRequest.php | 221 ++ .../src/V1/ListSaasResponse.php | 143 + .../src/V1/ListTenantsRequest.php | 221 ++ .../src/V1/ListTenantsResponse.php | 143 + .../src/V1/ListUnitKindsRequest.php | 221 ++ .../src/V1/ListUnitKindsResponse.php | 143 + .../src/V1/ListUnitOperationsRequest.php | 221 ++ .../src/V1/ListUnitOperationsResponse.php | 143 + .../src/V1/ListUnitsRequest.php | 221 ++ .../src/V1/ListUnitsResponse.php | 143 + .../src/V1/Location.php | 67 + .../src/V1/Provision.php | 103 + .../src/V1/Release.php | 644 ++++ .../src/V1/Release/ReleaseRequirements.php | 79 + .../src/V1/Rollout.php | 1073 +++++++ .../src/V1/Rollout/RolloutState.php | 110 + .../src/V1/RolloutAction.php | 73 + .../src/V1/RolloutControl.php | 124 + .../RolloutControl/RunRolloutActionParams.php | 76 + .../src/V1/RolloutKind.php | 644 ++++ .../V1/RolloutKind/UpdateUnitKindStrategy.php | 59 + .../src/V1/RolloutStats.php | 159 + SaasPlatformSaasServiceMgmt/src/V1/Saas.php | 615 ++++ .../src/V1/Saas/State.php | 78 + .../src/V1/SaasCondition.php | 217 ++ .../src/V1/SaasCondition/Status.php | 68 + .../src/V1/SaasCondition/Type.php | 61 + .../src/V1/Schedule.php | 81 + SaasPlatformSaasServiceMgmt/src/V1/Tenant.php | 450 +++ .../src/V1/ToMapping.php | 143 + SaasPlatformSaasServiceMgmt/src/V1/Unit.php | 1103 +++++++ .../src/V1/Unit/MaintenanceSettings.php | 92 + .../src/V1/Unit/ManagementMode.php | 62 + .../src/V1/Unit/SystemManagedState.php | 68 + .../src/V1/Unit/UnitState.php | 92 + .../src/V1/UnitCondition.php | 218 ++ .../src/V1/UnitCondition/Status.php | 68 + .../src/V1/UnitCondition/Type.php | 99 + .../src/V1/UnitDependency.php | 101 + .../src/V1/UnitKind.php | 825 ++++++ .../src/V1/UnitKind/BoundaryType.php | 61 + .../src/V1/UnitOperation.php | 943 ++++++ .../V1/UnitOperation/UnitOperationState.php | 89 + .../src/V1/UnitOperationCondition.php | 219 ++ .../src/V1/UnitOperationCondition/Status.php | 68 + .../src/V1/UnitOperationCondition/Type.php | 100 + .../src/V1/UnitOperationErrorCategory.php | 84 + .../src/V1/UnitUpdatePacing.php | 138 + .../src/V1/UnitVariable.php | 139 + .../src/V1/UnitVariable/Type.php | 87 + .../src/V1/UpdateReleaseRequest.php | 275 ++ .../src/V1/UpdateRolloutKindRequest.php | 275 ++ .../src/V1/UpdateRolloutRequest.php | 275 ++ .../src/V1/UpdateSaasRequest.php | 275 ++ .../src/V1/UpdateTenantRequest.php | 275 ++ .../src/V1/UpdateUnitKindRequest.php | 275 ++ .../src/V1/UpdateUnitOperationRequest.php | 275 ++ .../src/V1/UpdateUnitRequest.php | 275 ++ .../src/V1/Upgrade.php | 103 + .../src/V1/VariableMapping.php | 143 + .../src/V1/gapic_metadata.json | 247 ++ .../saas_deployments_client_config.json | 226 ++ .../saas_deployments_descriptor_config.php | 491 ++++ .../saas_deployments_rest_client_config.php | 419 +++ .../saas_rollouts_client_config.json | 116 + .../saas_rollouts_descriptor_config.php | 207 ++ .../saas_rollouts_rest_client_config.php | 175 ++ .../V1/Client/SaasDeploymentsClientTest.php | 2591 +++++++++++++++++ .../Unit/V1/Client/SaasRolloutsClientTest.php | 1062 +++++++ composer.json | 3 + librarian.yaml | 10 + 174 files changed, 32457 insertions(+) create mode 100644 SaasPlatformSaasServiceMgmt/.gitattributes create mode 100644 SaasPlatformSaasServiceMgmt/CONTRIBUTING.md create mode 100644 SaasPlatformSaasServiceMgmt/LICENSE create mode 100644 SaasPlatformSaasServiceMgmt/README.md create mode 100644 SaasPlatformSaasServiceMgmt/SECURITY.md create mode 100644 SaasPlatformSaasServiceMgmt/VERSION create mode 100644 SaasPlatformSaasServiceMgmt/composer.json create mode 100644 SaasPlatformSaasServiceMgmt/metadata/V1/Common.php create mode 100644 SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsResources.php create mode 100644 SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsService.php create mode 100644 SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsResources.php create mode 100644 SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsService.php create mode 100644 SaasPlatformSaasServiceMgmt/owlbot.py create mode 100644 SaasPlatformSaasServiceMgmt/phpunit.xml.dist create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_release.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_saas.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_tenant.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_operation.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_release.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_saas.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_tenant.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_operation.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_location.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_release.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_saas.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_tenant.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_operation.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_locations.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_releases.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_saas.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_tenants.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_kinds.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_operations.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_units.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_release.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_saas.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_tenant.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_operation.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_location.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_locations.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollout_kinds.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollouts.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout.php create mode 100644 SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout_kind.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Aggregate.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/AppParams.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope/Type.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Blueprint.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Client/SaasDeploymentsClient.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Client/SaasRolloutsClient.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ComponentRef.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CompositeRef.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateReleaseRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateSaasRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateTenantRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateUnitKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateUnitOperationRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/CreateUnitRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteReleaseRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteSaasRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteTenantRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitOperationRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Dependency.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Deprovision.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/DurationLimits.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ErrorBudget.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/FromMapping.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetReleaseRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetRolloutKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetRolloutRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetSaasRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetTenantRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetUnitKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetUnitOperationRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/GetUnitRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListReleasesRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListReleasesResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListSaasRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListSaasResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListTenantsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListTenantsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitsRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ListUnitsResponse.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Location.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Provision.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Release.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Release/ReleaseRequirements.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Rollout.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Rollout/RolloutState.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutAction.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutControl.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutControl/RunRolloutActionParams.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutKind.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutKind/UpdateUnitKindStrategy.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/RolloutStats.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Saas.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Saas/State.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/SaasCondition.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Status.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Type.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Schedule.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Tenant.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/ToMapping.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Unit.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Unit/MaintenanceSettings.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Unit/ManagementMode.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Unit/SystemManagedState.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Unit/UnitState.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitCondition.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Status.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Type.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitDependency.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitKind.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitKind/BoundaryType.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperation.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperation/UnitOperationState.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Status.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Type.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitOperationErrorCategory.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitUpdatePacing.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitVariable.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UnitVariable/Type.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateReleaseRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateSaasRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateTenantRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitKindRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitOperationRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitRequest.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/Upgrade.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/VariableMapping.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/gapic_metadata.json create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_client_config.json create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_descriptor_config.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_rest_client_config.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_client_config.json create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_descriptor_config.php create mode 100644 SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_rest_client_config.php create mode 100644 SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasDeploymentsClientTest.php create mode 100644 SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasRolloutsClientTest.php diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json index 7f3fefebc54d..d1a9a618879f 100644 --- a/.repo-metadata-full.json +++ b/.repo-metadata-full.json @@ -1424,6 +1424,14 @@ "library_type": "GAPIC_AUTO", "api_shortname": "run" }, + "SaasPlatformSaasServiceMgmt": { + "language": "php", + "distribution_name": "google/cloud-saasplatform-saasservicemgmt", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-saasplatform-saasservicemgmt/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "saasservicemgmt" + }, "Scheduler": { "language": "php", "distribution_name": "google/cloud-scheduler", diff --git a/SaasPlatformSaasServiceMgmt/.gitattributes b/SaasPlatformSaasServiceMgmt/.gitattributes new file mode 100644 index 000000000000..4bf0fe6f415b --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/.gitattributes @@ -0,0 +1,7 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/SaasPlatformSaasServiceMgmt/CONTRIBUTING.md b/SaasPlatformSaasServiceMgmt/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/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/SaasPlatformSaasServiceMgmt/LICENSE b/SaasPlatformSaasServiceMgmt/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/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/SaasPlatformSaasServiceMgmt/README.md b/SaasPlatformSaasServiceMgmt/README.md new file mode 100644 index 000000000000..81648cb1b4bd --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/README.md @@ -0,0 +1,50 @@ +# Google Cloud Saas Platform Saas Service Mgmt for PHP + +> Idiomatic PHP client for [Google Cloud Saas Platform Saas Service Mgmt](https://docs.cloud.google.com/app-lifecycle-manager). + +[![Latest Stable Version](https://poser.pugx.org/google/cloud-saasplatform-saasservicemgmt/v/stable)](https://packagist.org/packages/google/cloud-saasplatform-saasservicemgmt) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-saasplatform-saasservicemgmt.svg)](https://packagist.org/packages/google/cloud-saasplatform-saasservicemgmt) + +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-saasplatform-saasservicemgmt/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-saasplatform-saasservicemgmt +``` + +> 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-saasplatform-saasservicemgmt/tree/main/samples) for a canonical list of samples. + +### Debugging + +Please see our [Debugging guide](https://github.com/googleapis/google-cloud-php/blob/main/DEBUG.md) +for more information about the debugging tools. + +### 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://docs.cloud.google.com/app-lifecycle-manager). diff --git a/SaasPlatformSaasServiceMgmt/SECURITY.md b/SaasPlatformSaasServiceMgmt/SECURITY.md new file mode 100644 index 000000000000..8b58ae9c01ae --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/SaasPlatformSaasServiceMgmt/VERSION b/SaasPlatformSaasServiceMgmt/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/SaasPlatformSaasServiceMgmt/composer.json b/SaasPlatformSaasServiceMgmt/composer.json new file mode 100644 index 000000000000..72035a2ed1fc --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/composer.json @@ -0,0 +1,30 @@ +{ + "name": "google/cloud-saasplatform-saasservicemgmt", + "description": "Google Cloud Saas Platform Saas Service Mgmt Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\": "src", + "GPBMetadata\\Google\\Cloud\\Saasplatform\\Saasservicemgmt\\": "metadata" + } + }, + "extra": { + "component": { + "id": "cloud-saasplatform-saasservicemgmt", + "path": "SaasPlatformSaasServiceMgmt", + "target": "googleapis/google-cloud-php-saasplatform-saasservicemgmt" + } + }, + "require": { + "php": "^8.2", + "google/gax": "^1.51.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/SaasPlatformSaasServiceMgmt/metadata/V1/Common.php b/SaasPlatformSaasServiceMgmt/metadata/V1/Common.php new file mode 100644 index 000000000000..d510080d4d49 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/metadata/V1/Common.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xF8\x15\x0A9google/cloud/saasplatform/saasservicemgmt/v1/common.proto\x12,google.cloud.saasplatform.saasservicemgmt.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"P\x0A\x09Blueprint\x12\x16\x0A\x07package\x18\x01 \x01(\x09B\x05\xE2A\x02\x01\x05\x12\x14\x0A\x06engine\x18\x02 \x01(\x09B\x04\xE2A\x01\x03\x12\x15\x0A\x07version\x18\x03 \x01(\x09B\x04\xE2A\x01\x03\"\xE5\x01\x0A\x0CUnitVariable\x12\x17\x0A\x08variable\x18\x01 \x01(\x09B\x05\xE2A\x02\x02\x05\x12T\x0A\x04type\x18\x02 \x01(\x0E2?.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable.TypeB\x05\xE2A\x02\x01\x05\x12\x13\x0A\x05value\x18\x03 \x01(\x09B\x04\xE2A\x01\x01\"Q\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06STRING\x10\x01\x12\x07\x0A\x03INT\x10\x02\x12\x08\x0A\x04BOOL\x10\x03\x12\x0A\x0A\x06STRUCT\x10\x04\x12\x08\x0A\x04LIST\x10\x05\"\xE6\x04\x0A\x0DUnitCondition\x12X\x0A\x06status\x18\x01 \x01(\x0E2B.google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.StatusB\x04\xE2A\x01\x02\x12T\x0A\x04type\x18\x02 \x01(\x0E2@.google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.TypeB\x04\xE2A\x01\x02\x12>\x0A\x14last_transition_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x02\x12\x15\x0A\x07message\x18\x04 \x01(\x09B\x04\xE2A\x01\x02\x12\x14\x0A\x06reason\x18\x05 \x01(\x09B\x04\xE2A\x01\x02\"W\x0A\x06Status\x12\x16\x0A\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ESTATUS_UNKNOWN\x10\x01\x12\x0F\x0A\x0BSTATUS_TRUE\x10\x02\x12\x10\x0A\x0CSTATUS_FALSE\x10\x03\"\xDE\x01\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ATYPE_READY\x10\x01\x12\x11\x0A\x0DTYPE_UPDATING\x10\x02\x12\x14\x0A\x10TYPE_PROVISIONED\x10\x03\x12\x18\x0A\x14TYPE_OPERATION_ERROR\x10\x04\x12!\x0A\x1DTYPE_FLAGS_CONFIG_INITIALIZED\x10\x05\x12&\x0A\"TYPE_APP_CREATED_OR_ALREADY_EXISTS\x10\x06\x12\"\x0A\x1ETYPE_APP_COMPONENTS_REGISTERED\x10\x07\"\xE4\x04\x0A\x16UnitOperationCondition\x12a\x0A\x06status\x18\x01 \x01(\x0E2K.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.StatusB\x04\xE2A\x01\x02\x12]\x0A\x04type\x18\x02 \x01(\x0E2I.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.TypeB\x04\xE2A\x01\x02\x12>\x0A\x14last_transition_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x02\x12\x15\x0A\x07message\x18\x04 \x01(\x09B\x04\xE2A\x01\x02\x12\x14\x0A\x06reason\x18\x05 \x01(\x09B\x04\xE2A\x01\x02\"W\x0A\x06Status\x12\x16\x0A\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ESTATUS_UNKNOWN\x10\x01\x12\x0F\x0A\x0BSTATUS_TRUE\x10\x02\x12\x10\x0A\x0CSTATUS_FALSE\x10\x03\"\xC1\x01\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ETYPE_SCHEDULED\x10\x02\x12\x10\x0A\x0CTYPE_RUNNING\x10\x03\x12\x12\x0A\x0ETYPE_SUCCEEDED\x10\x04\x12\x12\x0A\x0ETYPE_CANCELLED\x10\x05\x12\x14\x0A\x10TYPE_APP_CREATED\x10\x06\x12\"\x0A\x1ETYPE_APP_COMPONENTS_REGISTERED\x10\x07\x12\x1B\x0A\x17TYPE_WORKLOAD_SUCCEEDED\x10\x08\"\xCA\x03\x0A\x0DSaasCondition\x12X\x0A\x06status\x18\x01 \x01(\x0E2B.google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.StatusB\x04\xE2A\x01\x02\x12T\x0A\x04type\x18\x06 \x01(\x0E2@.google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.TypeB\x04\xE2A\x01\x02\x12>\x0A\x14last_transition_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x02\x12\x15\x0A\x07message\x18\x04 \x01(\x09B\x04\xE2A\x01\x02\x12\x14\x0A\x06reason\x18\x05 \x01(\x09B\x04\xE2A\x01\x02\"W\x0A\x06Status\x12\x16\x0A\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ESTATUS_UNKNOWN\x10\x01\x12\x0F\x0A\x0BSTATUS_TRUE\x10\x02\x12\x10\x0A\x0CSTATUS_FALSE\x10\x03\"C\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ATYPE_READY\x10\x01\x12\x15\x0A\x11TYPE_SYNCHRONIZED\x10\x02\"5\x0A\x09Aggregate\x12\x13\x0A\x05group\x18\x01 \x01(\x09B\x04\xE2A\x01\x02\x12\x13\x0A\x05count\x18\x02 \x01(\x05B\x04\xE2A\x01\x02\"Q\x0A\x0EDurationLimits\x12?\x0A\x16unit_operation_timeout\x18\x01 \x01(\x0B2\x19.google.protobuf.DurationB\x04\xE2A\x01\x01*\x96\x01\x0A\x1AUnitOperationErrorCategory\x12-\x0A)UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ENOT_APPLICABLE\x10\x01\x12\x09\x0A\x05FATAL\x10\x02\x12\x0D\x0A\x09RETRIABLE\x10\x03\x12\x0D\x0A\x09IGNORABLE\x10\x04\x12\x0C\x0A\x08STANDARD\x10\x05B\xAE\x02\x0A0com.google.cloud.saasplatform.saasservicemgmt.v1B\x0BCommonProtoP\x01ZZcloud.google.com/go/saasplatform/saasservicemgmt/apiv1/saasservicemgmtpb;saasservicemgmtpb\xAA\x02,Google.Cloud.SaasPlatform.SaasServiceMgmt.V1\xCA\x02,Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1\xEA\x020Google::Cloud::SaasPlatform::SaasServiceMgmt::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsResources.php b/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsResources.php new file mode 100644 index 000000000000..0458207f32c6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsResources.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xF2_\x0AHgoogle/cloud/saasplatform/saasservicemgmt/v1/deployments_resources.proto\x12,google.cloud.saasplatform.saasservicemgmt.v1\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A9google/cloud/saasplatform/saasservicemgmt/v1/common.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\x1E\x0A\x08Location\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x01\"\xDA\x08\x0A\x04Saas\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12O\x0A\x09locations\x18\x04 \x03(\x0B26.google.cloud.saasplatform.saasservicemgmt.v1.LocationB\x04\xE2A\x01\x01\x12^\x0A\x14application_template\x18\x05 \x01(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.CompositeRefB\x04\xE2A\x01\x01\x12\x1C\x0A\x0Eblueprint_repo\x18\x06 \x01(\x09B\x04\xE2A\x01\x03\x12M\x0A\x05state\x18\x07 \x01(\x0E28.google.cloud.saasplatform.saasservicemgmt.v1.Saas.StateB\x04\xE2A\x01\x03\x12U\x0A\x0Aconditions\x18\x08 \x03(\x0B2;.google.cloud.saasplatform.saasservicemgmt.v1.SaasConditionB\x04\xE2A\x01\x03\x12'\x0A\x05error\x18\x09 \x01(\x0B2\x12.google.rpc.StatusB\x04\xE2A\x01\x03\x12U\x0A\x06labels\x18\xA1Q \x03(\x0B2>.google.cloud.saasplatform.saasservicemgmt.v1.Saas.LabelsEntryB\x04\xE2A\x01\x01\x12_\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2C.google.cloud.saasplatform.saasservicemgmt.v1.Saas.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"y\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x16STATE_TYPE_UNSPECIFIED\x10\x00\x1A\x02\x08\x01\x12\x10\x0A\x0CSTATE_ACTIVE\x10\x01\x12\x11\x0A\x0DSTATE_RUNNING\x10\x02\x12\x10\x0A\x0CSTATE_FAILED\x10\x03\x1A\x02\x10\x01:i\xEAAf\x0A#saasservicemgmt.googleapis.com/Saas\x123projects/{project}/locations/{location}/saas/{saas}*\x04saas2\x04saas\"\xB2\x05\x0A\x06Tenant\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12 \x0A\x11consumer_resource\x18\x02 \x01(\x09B\x05\xE2A\x02\x01\x05\x12;\x0A\x04saas\x18\x03 \x01(\x09B-\xE2A\x02\x02\x05\xFAA%\x0A#saasservicemgmt.googleapis.com/Saas\x12W\x0A\x06labels\x18\xA1Q \x03(\x0B2@.google.cloud.saasplatform.saasservicemgmt.v1.Tenant.LabelsEntryB\x04\xE2A\x01\x01\x12a\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2E.google.cloud.saasplatform.saasservicemgmt.v1.Tenant.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:u\xEAAr\x0A%saasservicemgmt.googleapis.com/Tenant\x128projects/{project}/locations/{location}/tenants/{tenant}*\x07tenants2\x06tenant\"\xB9\x0C\x0A\x08UnitKind\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12H\x0A\x0Fdefault_release\x18\x02 \x01(\x09B/\xE2A\x01\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x12U\x0A\x0Cdependencies\x18\x04 \x03(\x0B28.google.cloud.saasplatform.saasservicemgmt.v1.DependencyB\x05\xE2A\x02\x01\x05\x12d\x0A\x17input_variable_mappings\x18\x05 \x03(\x0B2=.google.cloud.saasplatform.saasservicemgmt.v1.VariableMappingB\x04\xE2A\x01\x01\x12e\x0A\x18output_variable_mappings\x18\x06 \x03(\x0B2=.google.cloud.saasplatform.saasservicemgmt.v1.VariableMappingB\x04\xE2A\x01\x01\x12;\x0A\x04saas\x18\x08 \x01(\x09B-\xE2A\x02\x02\x05\xFAA%\x0A#saasservicemgmt.googleapis.com/Saas\x12h\x0A\x1Eapplication_template_component\x18\x0A \x01(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.ComponentRefB\x04\xE2A\x01\x01\x12Q\x0A\x0Aapp_params\x18\x0B \x01(\x0B27.google.cloud.saasplatform.saasservicemgmt.v1.AppParamsB\x04\xE2A\x01\x01\x12a\x0A\x0Dboundary_type\x18\x0C \x01(\x0E2C.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.BoundaryTypeB\x05\xE2A\x02\x01\x03\x12[\x0A\x0Fduration_limits\x18\x09 \x01(\x0B2<.google.cloud.saasplatform.saasservicemgmt.v1.DurationLimitsB\x04\xE2A\x01\x01\x12Y\x0A\x06labels\x18\xA1Q \x03(\x0B2B.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.LabelsEntryB\x04\xE2A\x01\x01\x12c\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2G.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bdelete_time\x18\xC2P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"r\x0A\x0CBoundaryType\x12\x1D\x0A\x19BOUNDARY_TYPE_UNSPECIFIED\x10\x00\x12 \x0A\x1CBOUNDARY_TYPE_TENANT_PROJECT\x10\x01\x12!\x0A\x1DBOUNDARY_TYPE_MANAGED_PROJECT\x10\x02:\x80\x01\xEAA}\x0A'saasservicemgmt.googleapis.com/UnitKind\x12=projects/{project}/locations/{location}/unitKinds/{unit_kind}*\x09unitKinds2\x08unitKind\"\xC1\x14\x0A\x04Unit\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12C\x0A\x09unit_kind\x18\x02 \x01(\x09B0\xE2A\x01\x01\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\x12A\x0A\x07release\x18\x0D \x01(\x09B0\xE2A\x02\x01\x03\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x12>\x0A\x06tenant\x18\x04 \x01(\x09B.\xE2A\x01\x01\xFAA'\x0A%saasservicemgmt.googleapis.com/Tenant\x12R\x0A\x12ongoing_operations\x18\x05 \x03(\x09B6\xE2A\x02\x01\x03\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12R\x0A\x12pending_operations\x18\x06 \x03(\x09B6\xE2A\x02\x01\x03\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12T\x0A\x14scheduled_operations\x18\x18 \x03(\x09B6\xE2A\x02\x01\x03\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12W\x0A\x0Adependents\x18\x07 \x03(\x0B2<.google.cloud.saasplatform.saasservicemgmt.v1.UnitDependencyB\x05\xE2A\x02\x01\x03\x12Y\x0A\x0Cdependencies\x18\x08 \x03(\x0B2<.google.cloud.saasplatform.saasservicemgmt.v1.UnitDependencyB\x05\xE2A\x02\x01\x03\x12Z\x0A\x0Finput_variables\x18\x09 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x05\xE2A\x02\x01\x03\x12[\x0A\x10output_variables\x18\x0A \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x05\xE2A\x02\x01\x03\x12a\x0A\x0Bmaintenance\x18\x0E \x01(\x0B2F.google.cloud.saasplatform.saasservicemgmt.v1.Unit.MaintenanceSettingsB\x04\xE2A\x01\x01\x12R\x0A\x05state\x18\x10 \x01(\x0E2<.google.cloud.saasplatform.saasservicemgmt.v1.Unit.UnitStateB\x05\xE2A\x02\x01\x03\x12V\x0A\x0Aconditions\x18\x14 \x03(\x0B2;.google.cloud.saasplatform.saasservicemgmt.v1.UnitConditionB\x05\xE2A\x02\x01\x03\x12a\x0A\x0Fmanagement_mode\x18\x16 \x01(\x0E2A.google.cloud.saasplatform.saasservicemgmt.v1.Unit.ManagementModeB\x05\xE2A\x02\x01\x05\x12j\x0A\x14system_managed_state\x18\x19 \x01(\x0E2E.google.cloud.saasplatform.saasservicemgmt.v1.Unit.SystemManagedStateB\x05\xE2A\x02\x01\x03\x12<\x0A\x11system_cleanup_at\x18\x1A \x01(\x0B2\x1A.google.protobuf.TimestampB\x05\xE2A\x02\x01\x03\x12?\x0A\x0Bapplication\x18\x1D \x01(\x09B*\xE2A\x01\x01\xFAA#\x0A!apphub.googleapis.com/Application\x12U\x0A\x06labels\x18\xA1Q \x03(\x0B2>.google.cloud.saasplatform.saasservicemgmt.v1.Unit.LabelsEntryB\x04\xE2A\x01\x01\x12_\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2C.google.cloud.saasplatform.saasservicemgmt.v1.Unit.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x12\x1C\x0A\x0Dsatisfies_pzs\x18\xC1P \x01(\x08B\x04\xE2A\x01\x03\x12\x1C\x0A\x0Dsatisfies_pzi\x18\xC2P \x01(\x08B\x04\xE2A\x01\x03\x1AR\x0A\x13MaintenanceSettings\x12;\x0A\x11pinned_until_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xC8\x01\x0A\x09UnitState\x12\x1A\x0A\x16UNIT_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1AUNIT_STATE_NOT_PROVISIONED\x10\x01\x12\x1B\x0A\x17UNIT_STATE_PROVISIONING\x10\x02\x12\x17\x0A\x13UNIT_STATE_UPDATING\x10\x03\x12\x1D\x0A\x19UNIT_STATE_DEPROVISIONING\x10\x04\x12\x14\x0A\x10UNIT_STATE_READY\x10\x05\x12\x14\x0A\x10UNIT_STATE_ERROR\x10\x06\"g\x0A\x0EManagementMode\x12\x1F\x0A\x1BMANAGEMENT_MODE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14MANAGEMENT_MODE_USER\x10\x01\x12\x1A\x0A\x16MANAGEMENT_MODE_SYSTEM\x10\x02\"\xA7\x01\x0A\x12SystemManagedState\x12\$\x0A SYSTEM_MANAGED_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BSYSTEM_MANAGED_STATE_ACTIVE\x10\x01\x12!\x0A\x1DSYSTEM_MANAGED_STATE_INACTIVE\x10\x02\x12'\x0A#SYSTEM_MANAGED_STATE_DECOMMISSIONED\x10\x03:k\xEAAh\x0A#saasservicemgmt.googleapis.com/Unit\x124projects/{project}/locations/{location}/units/{unit}*\x05units2\x04unit\"a\x0A\x0EUnitDependency\x12\x13\x0A\x05alias\x18\x01 \x01(\x09B\x04\xE2A\x01\x03\x12:\x0A\x04unit\x18\x02 \x01(\x09B,\xE2A\x01\x03\xFAA%\x0A#saasservicemgmt.googleapis.com/Unit\"\xC8\x0F\x0A\x0DUnitOperation\x12R\x0A\x09provision\x18\x08 \x01(\x0B27.google.cloud.saasplatform.saasservicemgmt.v1.ProvisionB\x04\xE2A\x01\x01H\x00\x12N\x0A\x07upgrade\x18\x09 \x01(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.UpgradeB\x04\xE2A\x01\x01H\x00\x12V\x0A\x0Bdeprovision\x18\x0A \x01(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.DeprovisionB\x04\xE2A\x01\x01H\x00\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12;\x0A\x04unit\x18\x02 \x01(\x09B-\xE2A\x02\x02\x05\xFAA%\x0A#saasservicemgmt.googleapis.com/Unit\x12T\x0A\x15parent_unit_operation\x18\x03 \x01(\x09B5\xE2A\x01\x01\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12@\x0A\x07rollout\x18\x04 \x01(\x09B/\xE2A\x01\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Rollout\x12\x14\x0A\x06cancel\x18\x05 \x01(\x08B\x04\xE2A\x01\x01\x12d\x0A\x05state\x18\x06 \x01(\x0E2N.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.UnitOperationStateB\x05\xE2A\x02\x01\x03\x12_\x0A\x0Aconditions\x18\x07 \x03(\x0B2D.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationConditionB\x05\xE2A\x02\x01\x03\x12N\x0A\x08schedule\x18\x0C \x01(\x0B26.google.cloud.saasplatform.saasservicemgmt.v1.ScheduleB\x04\xE2A\x01\x01\x12\x1B\x0A\x0Cengine_state\x18\x0E \x01(\x09B\x05\xE2A\x02\x01\x03\x12g\x0A\x0Eerror_category\x18\x0F \x01(\x0E2H.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationErrorCategoryB\x05\xE2A\x02\x01\x03\x12[\x0A\x0Fduration_limits\x18\x15 \x01(\x0B2<.google.cloud.saasplatform.saasservicemgmt.v1.DurationLimitsB\x04\xE2A\x01\x01\x12^\x0A\x06labels\x18\xA1Q \x03(\x0B2G.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.LabelsEntryB\x04\xE2A\x01\x01\x12h\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2L.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bdelete_time\x18\xC1P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x87\x02\x0A\x12UnitOperationState\x12 \x0A\x1CUNIT_OPERATION_STATE_UNKNOWN\x10\x00\x12 \x0A\x1CUNIT_OPERATION_STATE_PENDING\x10\x01\x12\"\x0A\x1EUNIT_OPERATION_STATE_SCHEDULED\x10\x02\x12 \x0A\x1CUNIT_OPERATION_STATE_RUNNING\x10\x04\x12\"\x0A\x1EUNIT_OPERATION_STATE_SUCCEEDED\x10\x05\x12\x1F\x0A\x1BUNIT_OPERATION_STATE_FAILED\x10\x06\x12\"\x0A\x1EUNIT_OPERATION_STATE_CANCELLED\x10\x07:\x9A\x01\xEAA\x96\x01\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12Gprojects/{project}/locations/{location}/unitOperations/{unit_operation}*\x0EunitOperations2\x0DunitOperationB\x15\x0A\x13unit_operation_type\"\xA8\x01\x0A\x09Provision\x12@\x0A\x07release\x18\x01 \x01(\x09B/\xE2A\x01\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x12Y\x0A\x0Finput_variables\x18\x03 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x04\xE2A\x01\x01\"\x0D\x0A\x0BDeprovision\"\xA6\x01\x0A\x07Upgrade\x12@\x0A\x07release\x18\x01 \x01(\x09B/\xE2A\x01\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x12Y\x0A\x0Finput_variables\x18\x02 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x04\xE2A\x01\x01\"@\x0A\x08Schedule\x124\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x01\"\xD3\x0A\x0A\x07Release\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12D\x0A\x09unit_kind\x18\x02 \x01(\x09B1\xE2A\x02\x02\x05\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\x12P\x0A\x09blueprint\x18\x03 \x01(\x0B27.google.cloud.saasplatform.saasservicemgmt.v1.BlueprintB\x04\xE2A\x01\x01\x12m\x0A\x14release_requirements\x18\x04 \x01(\x0B2I.google.cloud.saasplatform.saasservicemgmt.v1.Release.ReleaseRequirementsB\x04\xE2A\x01\x01\x12Z\x0A\x0Finput_variables\x18\x05 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x05\xE2A\x02\x01\x03\x12[\x0A\x10output_variables\x18\x06 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x05\xE2A\x02\x01\x03\x12a\x0A\x17input_variable_defaults\x18\x07 \x03(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.UnitVariableB\x04\xE2A\x01\x01\x12h\x0A\x1Eapplication_template_component\x18\x09 \x01(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.ComponentRefB\x04\xE2A\x01\x03\x12X\x0A\x06labels\x18\xA1Q \x03(\x0B2A.google.cloud.saasplatform.saasservicemgmt.v1.Release.LabelsEntryB\x04\xE2A\x01\x01\x12b\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2F.google.cloud.saasplatform.saasservicemgmt.v1.Release.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1Ai\x0A\x13ReleaseRequirements\x12R\x0A\x19upgradeable_from_releases\x18\x01 \x03(\x09B/\xE2A\x01\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:z\xEAAw\x0A&saasservicemgmt.googleapis.com/Release\x12:projects/{project}/locations/{location}/releases/{release}*\x08releases2\x07release\"\xD7\x01\x0A\x0FVariableMapping\x12O\x0A\x04from\x18\x02 \x01(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.FromMappingB\x04\xE2A\x01\x01H\x00\x12K\x0A\x02to\x18\x03 \x01(\x0B27.google.cloud.saasplatform.saasservicemgmt.v1.ToMappingB\x04\xE2A\x01\x01H\x00\x12\x16\x0A\x08variable\x18\x01 \x01(\x09B\x04\xE2A\x01\x02B\x0E\x0A\x0Cmapping_type\"F\x0A\x0BFromMapping\x12\x18\x0A\x0Adependency\x18\x01 \x01(\x09B\x04\xE2A\x01\x02\x12\x1D\x0A\x0Foutput_variable\x18\x02 \x01(\x09B\x04\xE2A\x01\x02\"d\x0A\x09ToMapping\x12\x18\x0A\x0Adependency\x18\x01 \x01(\x09B\x04\xE2A\x01\x02\x12\x1C\x0A\x0Einput_variable\x18\x02 \x01(\x09B\x04\xE2A\x01\x02\x12\x1F\x0A\x11ignore_for_lookup\x18\x03 \x01(\x08B\x04\xE2A\x01\x01\"g\x0A\x0ADependency\x12D\x0A\x09unit_kind\x18\x01 \x01(\x09B1\xE2A\x02\x02\x05\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\x12\x13\x0A\x05alias\x18\x02 \x01(\x09B\x04\xE2A\x01\x02\"\xD8\x01\x0A\x0CCompositeRef\x12V\x0A\x14application_template\x18\x01 \x01(\x09B8\xE2A\x01\x02\xFAA1\x0A/designcenter.googleapis.com/ApplicationTemplate\x12R\x0A\x08revision\x18\x02 \x01(\x09B@\xE2A\x01\x01\xFAA9\x0A7designcenter.googleapis.com/ApplicationTemplateRevision\x12\x1C\x0A\x0Esync_operation\x18\x03 \x01(\x09B\x04\xE2A\x01\x03\"\x98\x01\x0A\x0CComponentRef\x12W\x0A\x0Dcomposite_ref\x18\x01 \x01(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.CompositeRefB\x04\xE2A\x01\x01\x12\x17\x0A\x09component\x18\x02 \x01(\x09B\x04\xE2A\x01\x01\x12\x16\x0A\x08revision\x18\x03 \x01(\x09B\x04\xE2A\x01\x01\"\x98\x02\x0A\x09AppParams\x12\x13\x0A\x05group\x18\x01 \x01(\x09B\x04\xE2A\x01\x01\x12R\x0A\x05scope\x18\x02 \x01(\x0B2=.google.cloud.saasplatform.saasservicemgmt.v1.AppParams.ScopeB\x04\xE2A\x01\x01\x1A\xA1\x01\x0A\x05Scope\x12V\x0A\x04type\x18\x01 \x01(\x0E2B.google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope.TypeB\x04\xE2A\x01\x02\"@\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DTYPE_REGIONAL\x10\x01\x12\x0F\x0A\x0BTYPE_GLOBAL\x10\x02B\xE5\x06\x0A0com.google.cloud.saasplatform.saasservicemgmt.v1B\x1DSaasDeploymentsResourcesProtoP\x01ZZcloud.google.com/go/saasplatform/saasservicemgmt/apiv1/saasservicemgmtpb;saasservicemgmtpb\xAA\x02,Google.Cloud.SaasPlatform.SaasServiceMgmt.V1\xCA\x02,Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1\xEA\x020Google::Cloud::SaasPlatform::SaasServiceMgmt::V1\xEAAg\x0A!apphub.googleapis.com/Application\x12Bprojects/{project}/locations/{location}/applications/{application}\xEAA\x81\x02\x0A/designcenter.googleapis.com/ApplicationTemplate\x12bprojects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}\x12jprojects/{project}/locations/{location}/workspaces/{workspace}/applicationTemplates/{application_template}\xEAA\xB2\x01\x0A7designcenter.googleapis.com/ApplicationTemplateRevision\x12wprojects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/revisions/{revision}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsService.php b/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsService.php new file mode 100644 index 000000000000..5958286b4b1e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/metadata/V1/DeploymentsService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xC2f\x0AFgoogle/cloud/saasplatform/saasservicemgmt/v1/deployments_service.proto\x12,google.cloud.saasplatform.saasservicemgmt.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1AHgoogle/cloud/saasplatform/saasservicemgmt/v1/deployments_resources.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\x9D\x01\x0A\x0FListSaasRequest\x12=\x0A\x06parent\x18\x96N \x01(\x09B,\xE2A\x01\x02\xFAA%\x12#saasservicemgmt.googleapis.com/Saas\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x85\x01\x0A\x10ListSaasResponse\x12A\x0A\x04saas\x18\x8DR \x03(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.Saas\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"M\x0A\x0EGetSaasRequest\x12;\x0A\x04name\x18\x91N \x01(\x09B,\xE2A\x01\x02\xFAA%\x0A#saasservicemgmt.googleapis.com/Saas\"\xE0\x01\x0A\x11CreateSaasRequest\x12=\x0A\x06parent\x18\x96N \x01(\x09B,\xE2A\x01\x02\xFAA%\x12#saasservicemgmt.googleapis.com/Saas\x12\x16\x0A\x07saas_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12G\x0A\x04saas\x18\x88R \x01(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.SaasB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xBB\x01\x0A\x11UpdateSaasRequest\x12G\x0A\x04saas\x18\x88R \x01(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.SaasB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x8C\x01\x0A\x11DeleteSaasRequest\x12;\x0A\x04name\x18\x91N \x01(\x09B,\xE2A\x01\x02\xFAA%\x0A#saasservicemgmt.googleapis.com/Saas\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xA2\x01\x0A\x12ListTenantsRequest\x12?\x0A\x06parent\x18\x96N \x01(\x09B.\xE2A\x01\x02\xFAA'\x12%saasservicemgmt.googleapis.com/Tenant\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x8D\x01\x0A\x13ListTenantsResponse\x12F\x0A\x07tenants\x18\x8DR \x03(\x0B24.google.cloud.saasplatform.saasservicemgmt.v1.Tenant\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"Q\x0A\x10GetTenantRequest\x12=\x0A\x04name\x18\x91N \x01(\x09B.\xE2A\x01\x02\xFAA'\x0A%saasservicemgmt.googleapis.com/Tenant\"\xEA\x01\x0A\x13CreateTenantRequest\x12?\x0A\x06parent\x18\x96N \x01(\x09B.\xE2A\x01\x02\xFAA'\x12%saasservicemgmt.googleapis.com/Tenant\x12\x18\x0A\x09tenant_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12K\x0A\x06tenant\x18\x88R \x01(\x0B24.google.cloud.saasplatform.saasservicemgmt.v1.TenantB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xC1\x01\x0A\x13UpdateTenantRequest\x12K\x0A\x06tenant\x18\x88R \x01(\x0B24.google.cloud.saasplatform.saasservicemgmt.v1.TenantB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x90\x01\x0A\x13DeleteTenantRequest\x12=\x0A\x04name\x18\x91N \x01(\x09B.\xE2A\x01\x02\xFAA'\x0A%saasservicemgmt.googleapis.com/Tenant\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xA6\x01\x0A\x14ListUnitKindsRequest\x12A\x0A\x06parent\x18\x96N \x01(\x09B0\xE2A\x01\x02\xFAA)\x12'saasservicemgmt.googleapis.com/UnitKind\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x94\x01\x0A\x15ListUnitKindsResponse\x12K\x0A\x0Aunit_kinds\x18\x8DR \x03(\x0B26.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"U\x0A\x12GetUnitKindRequest\x12?\x0A\x04name\x18\x91N \x01(\x09B0\xE2A\x01\x02\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\"\xF6\x01\x0A\x15CreateUnitKindRequest\x12A\x0A\x06parent\x18\x96N \x01(\x09B0\xE2A\x01\x02\xFAA)\x12'saasservicemgmt.googleapis.com/UnitKind\x12\x1B\x0A\x0Cunit_kind_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12P\x0A\x09unit_kind\x18\x88R \x01(\x0B26.google.cloud.saasplatform.saasservicemgmt.v1.UnitKindB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xC8\x01\x0A\x15UpdateUnitKindRequest\x12P\x0A\x09unit_kind\x18\x88R \x01(\x0B26.google.cloud.saasplatform.saasservicemgmt.v1.UnitKindB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x94\x01\x0A\x15DeleteUnitKindRequest\x12?\x0A\x04name\x18\x91N \x01(\x09B0\xE2A\x01\x02\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\x9E\x01\x0A\x10ListUnitsRequest\x12=\x0A\x06parent\x18\x96N \x01(\x09B,\xE2A\x01\x02\xFAA%\x12#saasservicemgmt.googleapis.com/Unit\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x87\x01\x0A\x11ListUnitsResponse\x12B\x0A\x05units\x18\x8DR \x03(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.Unit\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"M\x0A\x0EGetUnitRequest\x12;\x0A\x04name\x18\x91N \x01(\x09B,\xE2A\x01\x02\xFAA%\x0A#saasservicemgmt.googleapis.com/Unit\"\xE0\x01\x0A\x11CreateUnitRequest\x12=\x0A\x06parent\x18\x96N \x01(\x09B,\xE2A\x01\x02\xFAA%\x12#saasservicemgmt.googleapis.com/Unit\x12\x16\x0A\x07unit_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12G\x0A\x04unit\x18\x88R \x01(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.UnitB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xBB\x01\x0A\x11UpdateUnitRequest\x12G\x0A\x04unit\x18\x88R \x01(\x0B22.google.cloud.saasplatform.saasservicemgmt.v1.UnitB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x8C\x01\x0A\x11DeleteUnitRequest\x12;\x0A\x04name\x18\x91N \x01(\x09B,\xE2A\x01\x02\xFAA%\x0A#saasservicemgmt.googleapis.com/Unit\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xB0\x01\x0A\x19ListUnitOperationsRequest\x12F\x0A\x06parent\x18\x96N \x01(\x09B5\xE2A\x01\x02\xFAA.\x12,saasservicemgmt.googleapis.com/UnitOperation\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\xA3\x01\x0A\x1AListUnitOperationsResponse\x12U\x0A\x0Funit_operations\x18\x8DR \x03(\x0B2;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"_\x0A\x17GetUnitOperationRequest\x12D\x0A\x04name\x18\x91N \x01(\x09B5\xE2A\x01\x02\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\"\x8F\x02\x0A\x1ACreateUnitOperationRequest\x12F\x0A\x06parent\x18\x96N \x01(\x09B5\xE2A\x01\x02\xFAA.\x12,saasservicemgmt.googleapis.com/UnitOperation\x12 \x0A\x11unit_operation_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12Z\x0A\x0Eunit_operation\x18\x88R \x01(\x0B2;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xD7\x01\x0A\x1AUpdateUnitOperationRequest\x12Z\x0A\x0Eunit_operation\x18\x88R \x01(\x0B2;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x9E\x01\x0A\x1ADeleteUnitOperationRequest\x12D\x0A\x04name\x18\x91N \x01(\x09B5\xE2A\x01\x02\xFAA.\x0A,saasservicemgmt.googleapis.com/UnitOperation\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xA4\x01\x0A\x13ListReleasesRequest\x12@\x0A\x06parent\x18\x96N \x01(\x09B/\xE2A\x01\x02\xFAA(\x12&saasservicemgmt.googleapis.com/Release\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x90\x01\x0A\x14ListReleasesResponse\x12H\x0A\x08releases\x18\x8DR \x03(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.Release\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"S\x0A\x11GetReleaseRequest\x12>\x0A\x04name\x18\x91N \x01(\x09B/\xE2A\x01\x02\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\"\xEF\x01\x0A\x14CreateReleaseRequest\x12@\x0A\x06parent\x18\x96N \x01(\x09B/\xE2A\x01\x02\xFAA(\x12&saasservicemgmt.googleapis.com/Release\x12\x19\x0A\x0Arelease_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12M\x0A\x07release\x18\x88R \x01(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.ReleaseB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xC4\x01\x0A\x14UpdateReleaseRequest\x12M\x0A\x07release\x18\x88R \x01(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.ReleaseB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x92\x01\x0A\x14DeleteReleaseRequest\x12>\x0A\x04name\x18\x91N \x01(\x09B/\xE2A\x01\x02\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x092\xEF2\x0A\x0FSaasDeployments\x12\xC4\x01\x0A\x08ListSaas\x12=.google.cloud.saasplatform.saasservicemgmt.v1.ListSaasRequest\x1A>.google.cloud.saasplatform.saasservicemgmt.v1.ListSaasResponse\"9\xDAA\x06parent\x82\xD3\xE4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/saas\x12\xB4\x01\x0A\x07GetSaas\x12<.google.cloud.saasplatform.saasservicemgmt.v1.GetSaasRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Saas\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v1/{name=projects/*/locations/*/saas/*}\x12\xCF\x01\x0A\x0ACreateSaas\x12?.google.cloud.saasplatform.saasservicemgmt.v1.CreateSaasRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Saas\"L\xDAA\x13parent,saas,saas_id\x82\xD3\xE4\x93\x020\"(/v1/{parent=projects/*/locations/*}/saas:\x04saas\x12\xD1\x01\x0A\x0AUpdateSaas\x12?.google.cloud.saasplatform.saasservicemgmt.v1.UpdateSaasRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Saas\"N\xDAA\x10saas,update_mask\x82\xD3\xE4\x93\x0252-/v1/{saas.name=projects/*/locations/*/saas/*}:\x04saas\x12\x9E\x01\x0A\x0ADeleteSaas\x12?.google.cloud.saasplatform.saasservicemgmt.v1.DeleteSaasRequest\x1A\x16.google.protobuf.Empty\"7\xDAA\x04name\x82\xD3\xE4\x93\x02**(/v1/{name=projects/*/locations/*/saas/*}\x12\xD0\x01\x0A\x0BListTenants\x12@.google.cloud.saasplatform.saasservicemgmt.v1.ListTenantsRequest\x1AA.google.cloud.saasplatform.saasservicemgmt.v1.ListTenantsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/tenants\x12\xBD\x01\x0A\x09GetTenant\x12>.google.cloud.saasplatform.saasservicemgmt.v1.GetTenantRequest\x1A4.google.cloud.saasplatform.saasservicemgmt.v1.Tenant\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/tenants/*}\x12\xDE\x01\x0A\x0CCreateTenant\x12A.google.cloud.saasplatform.saasservicemgmt.v1.CreateTenantRequest\x1A4.google.cloud.saasplatform.saasservicemgmt.v1.Tenant\"U\xDAA\x17parent,tenant,tenant_id\x82\xD3\xE4\x93\x025\"+/v1/{parent=projects/*/locations/*}/tenants:\x06tenant\x12\xE0\x01\x0A\x0CUpdateTenant\x12A.google.cloud.saasplatform.saasservicemgmt.v1.UpdateTenantRequest\x1A4.google.cloud.saasplatform.saasservicemgmt.v1.Tenant\"W\xDAA\x12tenant,update_mask\x82\xD3\xE4\x93\x02<22/v1/{tenant.name=projects/*/locations/*/tenants/*}:\x06tenant\x12\xA5\x01\x0A\x0CDeleteTenant\x12A.google.cloud.saasplatform.saasservicemgmt.v1.DeleteTenantRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/tenants/*}\x12\xD8\x01\x0A\x0DListUnitKinds\x12B.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitKindsRequest\x1AC.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitKindsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/unitKinds\x12\xC5\x01\x0A\x0BGetUnitKind\x12@.google.cloud.saasplatform.saasservicemgmt.v1.GetUnitKindRequest\x1A6.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/unitKinds/*}\x12\xEF\x01\x0A\x0ECreateUnitKind\x12C.google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitKindRequest\x1A6.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind\"`\xDAA\x1Dparent,unit_kind,unit_kind_id\x82\xD3\xE4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/unitKinds:\x09unit_kind\x12\xF1\x01\x0A\x0EUpdateUnitKind\x12C.google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitKindRequest\x1A6.google.cloud.saasplatform.saasservicemgmt.v1.UnitKind\"b\xDAA\x15unit_kind,update_mask\x82\xD3\xE4\x93\x02D27/v1/{unit_kind.name=projects/*/locations/*/unitKinds/*}:\x09unit_kind\x12\xAB\x01\x0A\x0EDeleteUnitKind\x12C.google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitKindRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/unitKinds/*}\x12\xC8\x01\x0A\x09ListUnits\x12>.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitsRequest\x1A?.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitsResponse\":\xDAA\x06parent\x82\xD3\xE4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/units\x12\xB5\x01\x0A\x07GetUnit\x12<.google.cloud.saasplatform.saasservicemgmt.v1.GetUnitRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Unit\"8\xDAA\x04name\x82\xD3\xE4\x93\x02+\x12)/v1/{name=projects/*/locations/*/units/*}\x12\xD0\x01\x0A\x0ACreateUnit\x12?.google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Unit\"M\xDAA\x13parent,unit,unit_id\x82\xD3\xE4\x93\x021\")/v1/{parent=projects/*/locations/*}/units:\x04unit\x12\xD2\x01\x0A\x0AUpdateUnit\x12?.google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitRequest\x1A2.google.cloud.saasplatform.saasservicemgmt.v1.Unit\"O\xDAA\x10unit,update_mask\x82\xD3\xE4\x93\x0262./v1/{unit.name=projects/*/locations/*/units/*}:\x04unit\x12\x9F\x01\x0A\x0ADeleteUnit\x12?.google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitRequest\x1A\x16.google.protobuf.Empty\"8\xDAA\x04name\x82\xD3\xE4\x93\x02+*)/v1/{name=projects/*/locations/*/units/*}\x12\xEC\x01\x0A\x12ListUnitOperations\x12G.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitOperationsRequest\x1AH.google.cloud.saasplatform.saasservicemgmt.v1.ListUnitOperationsResponse\"C\xDAA\x06parent\x82\xD3\xE4\x93\x024\x122/v1/{parent=projects/*/locations/*}/unitOperations\x12\xD9\x01\x0A\x10GetUnitOperation\x12E.google.cloud.saasplatform.saasservicemgmt.v1.GetUnitOperationRequest\x1A;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation\"A\xDAA\x04name\x82\xD3\xE4\x93\x024\x122/v1/{name=projects/*/locations/*/unitOperations/*}\x12\x92\x02\x0A\x13CreateUnitOperation\x12H.google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitOperationRequest\x1A;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation\"t\xDAA'parent,unit_operation,unit_operation_id\x82\xD3\xE4\x93\x02D\"2/v1/{parent=projects/*/locations/*}/unitOperations:\x0Eunit_operation\x12\x94\x02\x0A\x13UpdateUnitOperation\x12H.google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitOperationRequest\x1A;.google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation\"v\xDAA\x1Aunit_operation,update_mask\x82\xD3\xE4\x93\x02S2A/v1/{unit_operation.name=projects/*/locations/*/unitOperations/*}:\x0Eunit_operation\x12\xBA\x01\x0A\x13DeleteUnitOperation\x12H.google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitOperationRequest\x1A\x16.google.protobuf.Empty\"A\xDAA\x04name\x82\xD3\xE4\x93\x024*2/v1/{name=projects/*/locations/*/unitOperations/*}\x12\xD4\x01\x0A\x0CListReleases\x12A.google.cloud.saasplatform.saasservicemgmt.v1.ListReleasesRequest\x1AB.google.cloud.saasplatform.saasservicemgmt.v1.ListReleasesResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/releases\x12\xC1\x01\x0A\x0AGetRelease\x12?.google.cloud.saasplatform.saasservicemgmt.v1.GetReleaseRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Release\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/releases/*}\x12\xE5\x01\x0A\x0DCreateRelease\x12B.google.cloud.saasplatform.saasservicemgmt.v1.CreateReleaseRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Release\"Y\xDAA\x19parent,release,release_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/releases:\x07release\x12\xE7\x01\x0A\x0DUpdateRelease\x12B.google.cloud.saasplatform.saasservicemgmt.v1.UpdateReleaseRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Release\"[\xDAA\x13release,update_mask\x82\xD3\xE4\x93\x02?24/v1/{release.name=projects/*/locations/*/releases/*}:\x07release\x12\xA8\x01\x0A\x0DDeleteRelease\x12B.google.cloud.saasplatform.saasservicemgmt.v1.DeleteReleaseRequest\x1A\x16.google.protobuf.Empty\";\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/releases/*}\x1A\xC7\x01\xCAA\x1Esaasservicemgmt.googleapis.com\xD2A\xA2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/saasservicemgmt.read-write,https://www.googleapis.com/auth/saasservicemgmt.readonlyB\xBE\x02\x0A0com.google.cloud.saasplatform.saasservicemgmt.v1B\x1BSaasDeploymentsServiceProtoP\x01ZZcloud.google.com/go/saasplatform/saasservicemgmt/apiv1/saasservicemgmtpb;saasservicemgmtpb\xAA\x02,Google.Cloud.SaasPlatform.SaasServiceMgmt.V1\xCA\x02,Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1\xEA\x020Google::Cloud::SaasPlatform::SaasServiceMgmt::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsResources.php b/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsResources.php new file mode 100644 index 000000000000..510a2d7432f0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsResources.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xDA\$\x0AEgoogle/cloud/saasplatform/saasservicemgmt/v1/rollouts_resources.proto\x12,google.cloud.saasplatform.saasservicemgmt.v1\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A9google/cloud/saasplatform/saasservicemgmt/v1/common.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x19google/type/decimal.proto\"\x9A\x0E\x0A\x07Rollout\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12A\x0A\x07release\x18\x03 \x01(\x09B0\xE2A\x02\x01\x05\xFAA(\x0A&saasservicemgmt.googleapis.com/Release\x125\x0A\x0Astart_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x05\xE2A\x02\x01\x03\x123\x0A\x08end_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x05\xE2A\x02\x01\x03\x12W\x0A\x05state\x18\x0A \x01(\x0E2B.google.cloud.saasplatform.saasservicemgmt.v1.Rollout.RolloutStateB\x04\xE2A\x01\x03\x12\x1B\x0A\x0Dstate_message\x18\x0B \x01(\x09B\x04\xE2A\x01\x03\x12@\x0A\x15state_transition_time\x18\x0C \x01(\x0B2\x1A.google.protobuf.TimestampB\x05\xE2A\x02\x01\x03\x12F\x0A\x0Croot_rollout\x18\x10 \x01(\x09B0\xE2A\x02\x03\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Rollout\x12H\x0A\x0Eparent_rollout\x18\x11 \x01(\x09B0\xE2A\x02\x03\x01\xFAA(\x0A&saasservicemgmt.googleapis.com/Rollout\x12,\x0A\x1Erollout_orchestration_strategy\x18\x13 \x01(\x09B\x04\xE2A\x01\x01\x12\x19\x0A\x0Bunit_filter\x18\x15 \x01(\x09B\x04\xE2A\x01\x01\x12J\x0A\x0Crollout_kind\x18\x16 \x01(\x09B4\xE2A\x02\x02\x05\xFAA,\x0A*saasservicemgmt.googleapis.com/RolloutKind\x12P\x0A\x05stats\x18\x18 \x01(\x0B2:.google.cloud.saasplatform.saasservicemgmt.v1.RolloutStatsB\x05\xE2A\x02\x03\x01\x12S\x0A\x07control\x18\x19 \x01(\x0B2<.google.cloud.saasplatform.saasservicemgmt.v1.RolloutControlB\x04\xE2A\x01\x01\x12\$\x0A\x15effective_unit_filter\x18\x1A \x01(\x09B\x05\xE2A\x02\x01\x03\x12X\x0A\x06labels\x18\xA1Q \x03(\x0B2A.google.cloud.saasplatform.saasservicemgmt.v1.Rollout.LabelsEntryB\x04\xE2A\x01\x01\x12b\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2F.google.cloud.saasplatform.saasservicemgmt.v1.Rollout.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bdelete_time\x18\xC1P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA6\x02\x0A\x0CRolloutState\x12\x1D\x0A\x19ROLLOUT_STATE_UNSPECIFIED\x10\x00\x12\x19\x0A\x15ROLLOUT_STATE_RUNNING\x10\x01\x12\x18\x0A\x14ROLLOUT_STATE_PAUSED\x10\x02\x12\x1B\x0A\x17ROLLOUT_STATE_SUCCEEDED\x10\x03\x12\x18\x0A\x14ROLLOUT_STATE_FAILED\x10\x04\x12\x1B\x0A\x17ROLLOUT_STATE_CANCELLED\x10\x05\x12\x19\x0A\x15ROLLOUT_STATE_WAITING\x10\x06\x12\x1C\x0A\x18ROLLOUT_STATE_CANCELLING\x10\x07\x12\x1A\x0A\x16ROLLOUT_STATE_RESUMING\x10\x08\x12\x19\x0A\x15ROLLOUT_STATE_PAUSING\x10\x09:}\xEAAz\x0A&saasservicemgmt.googleapis.com/Rollout\x12=projects/{project}/locations/{location}/rollouts/{rollout_id}*\x08rollouts2\x07rollout\"\x89\x0A\x0A\x0BRolloutKind\x12\x12\x0A\x04name\x18\x01 \x01(\x09B\x04\xE2A\x01\x08\x12D\x0A\x09unit_kind\x18\x02 \x01(\x09B1\xE2A\x02\x01\x05\xFAA)\x0A'saasservicemgmt.googleapis.com/UnitKind\x12,\x0A\x1Erollout_orchestration_strategy\x18\x03 \x01(\x09B\x04\xE2A\x01\x01\x12\x19\x0A\x0Bunit_filter\x18\x05 \x01(\x09B\x04\xE2A\x01\x01\x12y\x0A\x19update_unit_kind_strategy\x18\x06 \x01(\x0E2P.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.UpdateUnitKindStrategyB\x04\xE2A\x01\x01\x12Z\x0A\x0Cerror_budget\x18\x07 \x01(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.ErrorBudgetB\x04\xE2A\x01\x01H\x00\x88\x01\x01\x12e\x0A\x12unit_update_pacing\x18\x09 \x01(\x0B2>.google.cloud.saasplatform.saasservicemgmt.v1.UnitUpdatePacingB\x04\xE2A\x01\x01H\x01\x88\x01\x01\x12\\\x0A\x06labels\x18\xA1Q \x03(\x0B2E.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.LabelsEntryB\x04\xE2A\x01\x01\x12f\x0A\x0Bannotations\x18\xA2Q \x03(\x0B2J.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.AnnotationsEntryB\x04\xE2A\x01\x01\x12\x1A\x0A\x03uid\x18\xD9O \x01(\x09B\x0C\xE2A\x01\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x13\x0A\x04etag\x18\xDAO \x01(\x09B\x04\xE2A\x01\x03\x126\x0A\x0Bcreate_time\x18\xBFP \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x126\x0A\x0Bupdate_time\x18\xC0P \x01(\x0B2\x1A.google.protobuf.TimestampB\x04\xE2A\x01\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x90\x01\x0A\x16UpdateUnitKindStrategy\x12)\x0A%UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED\x10\x00\x12&\x0A\"UPDATE_UNIT_KIND_STRATEGY_ON_START\x10\x01\x12#\x0A\x1FUPDATE_UNIT_KIND_STRATEGY_NEVER\x10\x02:\x93\x01\xEAA\x8F\x01\x0A*saasservicemgmt.googleapis.com/RolloutKind\x12Fprojects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}*\x0CrolloutKinds2\x0BrolloutKindB\x0F\x0A\x0D_error_budgetB\x15\x0A\x13_unit_update_pacing\"\x7F\x0A\x0BErrorBudget\x12 \x0A\x0Dallowed_count\x18\x01 \x01(\x05B\x04\xE2A\x01\x01H\x00\x88\x01\x01\x12%\x0A\x12allowed_percentage\x18\x02 \x01(\x05B\x04\xE2A\x01\x01H\x01\x88\x01\x01B\x10\x0A\x0E_allowed_countB\x15\x0A\x13_allowed_percentage\"\xDC\x01\x0A\x10UnitUpdatePacing\x12J\x0A!max_concurrent_operations_percent\x18\x01 \x01(\x0B2\x14.google.type.DecimalB\x04\xE2A\x01\x01H\x00\x88\x01\x01\x122\x0A\x1Fmax_concurrent_operations_count\x18\x02 \x01(\x05B\x04\xE2A\x01\x01H\x01\x88\x01\x01B\$\x0A\"_max_concurrent_operations_percentB\"\x0A _max_concurrent_operations_count\"\xBB\x01\x0A\x0CRolloutStats\x12\\\x0A\x13operations_by_state\x18\x02 \x03(\x0B27.google.cloud.saasplatform.saasservicemgmt.v1.AggregateB\x06\xE2A\x03\x03\x01\x06\x12.\x0A\x1Aestimated_total_unit_count\x18\x03 \x01(\x03B\x05\xE2A\x02\x03\x01H\x00\x88\x01\x01B\x1D\x0A\x1B_estimated_total_unit_count\"\xA6\x02\x0A\x0ERolloutControl\x12o\x0A\x0Arun_params\x18\x02 \x01(\x0B2S.google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl.RunRolloutActionParamsB\x04\xE2A\x01\x01H\x00\x12Q\x0A\x06action\x18\x01 \x01(\x0E2;.google.cloud.saasplatform.saasservicemgmt.v1.RolloutActionB\x04\xE2A\x01\x02\x1A?\x0A\x16RunRolloutActionParams\x12%\x0A\x17retry_failed_operations\x18\x01 \x01(\x08B\x04\xE2A\x01\x02B\x0F\x0A\x0Daction_params*|\x0A\x0DRolloutAction\x12\x1E\x0A\x1AROLLOUT_ACTION_UNSPECIFIED\x10\x00\x12\x16\x0A\x12ROLLOUT_ACTION_RUN\x10\x01\x12\x18\x0A\x14ROLLOUT_ACTION_PAUSE\x10\x02\x12\x19\x0A\x15ROLLOUT_ACTION_CANCEL\x10\x03B\xBD\x02\x0A0com.google.cloud.saasplatform.saasservicemgmt.v1B\x1ASaasRolloutsResourcesProtoP\x01ZZcloud.google.com/go/saasplatform/saasservicemgmt/apiv1/saasservicemgmtpb;saasservicemgmtpb\xAA\x02,Google.Cloud.SaasPlatform.SaasServiceMgmt.V1\xCA\x02,Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1\xEA\x020Google::Cloud::SaasPlatform::SaasServiceMgmt::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsService.php b/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsService.php new file mode 100644 index 000000000000..e338af756181 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/metadata/V1/RolloutsService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x8B(\x0ACgoogle/cloud/saasplatform/saasservicemgmt/v1/rollouts_service.proto\x12,google.cloud.saasplatform.saasservicemgmt.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1AEgoogle/cloud/saasplatform/saasservicemgmt/v1/rollouts_resources.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xA4\x01\x0A\x13ListRolloutsRequest\x12@\x0A\x06parent\x18\x96N \x01(\x09B/\xE2A\x01\x02\xFAA(\x12&saasservicemgmt.googleapis.com/Rollout\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x90\x01\x0A\x14ListRolloutsResponse\x12H\x0A\x08rollouts\x18\x8DR \x03(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.Rollout\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"S\x0A\x11GetRolloutRequest\x12>\x0A\x04name\x18\x91N \x01(\x09B/\xE2A\x01\x02\xFAA(\x0A&saasservicemgmt.googleapis.com/Rollout\"\xEF\x01\x0A\x14CreateRolloutRequest\x12@\x0A\x06parent\x18\x96N \x01(\x09B/\xE2A\x01\x02\xFAA(\x12&saasservicemgmt.googleapis.com/Rollout\x12\x19\x0A\x0Arollout_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12M\x0A\x07rollout\x18\x88R \x01(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.RolloutB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xC4\x01\x0A\x14UpdateRolloutRequest\x12M\x0A\x07rollout\x18\x88R \x01(\x0B25.google.cloud.saasplatform.saasservicemgmt.v1.RolloutB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x92\x01\x0A\x14DeleteRolloutRequest\x12>\x0A\x04name\x18\x91N \x01(\x09B/\xE2A\x01\x02\xFAA(\x0A&saasservicemgmt.googleapis.com/Rollout\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xAC\x01\x0A\x17ListRolloutKindsRequest\x12D\x0A\x06parent\x18\x96N \x01(\x09B3\xE2A\x01\x02\xFAA,\x12*saasservicemgmt.googleapis.com/RolloutKind\x12\x12\x0A\x09page_size\x18\x89R \x01(\x05\x12\x13\x0A\x0Apage_token\x18\x8AR \x01(\x09\x12\x0F\x0A\x06filter\x18\x8BR \x01(\x09\x12\x11\x0A\x08order_by\x18\x8CR \x01(\x09\"\x9D\x01\x0A\x18ListRolloutKindsResponse\x12Q\x0A\x0Drollout_kinds\x18\x8DR \x03(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind\x12\x18\x0A\x0Fnext_page_token\x18\x8ER \x01(\x09\x12\x14\x0A\x0Bunreachable\x18\x8FR \x03(\x09\"[\x0A\x15GetRolloutKindRequest\x12B\x0A\x04name\x18\x91N \x01(\x09B3\xE2A\x01\x02\xFAA,\x0A*saasservicemgmt.googleapis.com/RolloutKind\"\x85\x02\x0A\x18CreateRolloutKindRequest\x12D\x0A\x06parent\x18\x96N \x01(\x09B3\xE2A\x01\x02\xFAA,\x12*saasservicemgmt.googleapis.com/RolloutKind\x12\x1E\x0A\x0Frollout_kind_id\x18\x87R \x01(\x09B\x04\xE2A\x01\x02\x12V\x0A\x0Crollout_kind\x18\x88R \x01(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKindB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\"\xD1\x01\x0A\x18UpdateRolloutKindRequest\x12V\x0A\x0Crollout_kind\x18\x88R \x01(\x0B29.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKindB\x04\xE2A\x01\x02\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x09\x120\x0A\x0Bupdate_mask\x18\x90R \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x9A\x01\x0A\x18DeleteRolloutKindRequest\x12B\x0A\x04name\x18\x91N \x01(\x09B3\xE2A\x01\x02\xFAA,\x0A*saasservicemgmt.googleapis.com/RolloutKind\x12\x0D\x0A\x04etag\x18\xDAO \x01(\x09\x12\x16\x0A\x0Dvalidate_only\x18\x85R \x01(\x08\x12\x13\x0A\x0Arequest_id\x18\x86R \x01(\x092\xF2\x12\x0A\x0CSaasRollouts\x12\xD4\x01\x0A\x0CListRollouts\x12A.google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutsRequest\x1AB.google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutsResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/rollouts\x12\xC1\x01\x0A\x0AGetRollout\x12?.google.cloud.saasplatform.saasservicemgmt.v1.GetRolloutRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Rollout\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/rollouts/*}\x12\xE5\x01\x0A\x0DCreateRollout\x12B.google.cloud.saasplatform.saasservicemgmt.v1.CreateRolloutRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Rollout\"Y\xDAA\x19parent,rollout,rollout_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/rollouts:\x07rollout\x12\xE7\x01\x0A\x0DUpdateRollout\x12B.google.cloud.saasplatform.saasservicemgmt.v1.UpdateRolloutRequest\x1A5.google.cloud.saasplatform.saasservicemgmt.v1.Rollout\"[\xDAA\x13rollout,update_mask\x82\xD3\xE4\x93\x02?24/v1/{rollout.name=projects/*/locations/*/rollouts/*}:\x07rollout\x12\xA8\x01\x0A\x0DDeleteRollout\x12B.google.cloud.saasplatform.saasservicemgmt.v1.DeleteRolloutRequest\x1A\x16.google.protobuf.Empty\";\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/rollouts/*}\x12\xE4\x01\x0A\x10ListRolloutKinds\x12E.google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutKindsRequest\x1AF.google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutKindsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/rolloutKinds\x12\xD1\x01\x0A\x0EGetRolloutKind\x12C.google.cloud.saasplatform.saasservicemgmt.v1.GetRolloutKindRequest\x1A9.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/rolloutKinds/*}\x12\x84\x02\x0A\x11CreateRolloutKind\x12F.google.cloud.saasplatform.saasservicemgmt.v1.CreateRolloutKindRequest\x1A9.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind\"l\xDAA#parent,rollout_kind,rollout_kind_id\x82\xD3\xE4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/rolloutKinds:\x0Crollout_kind\x12\x86\x02\x0A\x11UpdateRolloutKind\x12F.google.cloud.saasplatform.saasservicemgmt.v1.UpdateRolloutKindRequest\x1A9.google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind\"n\xDAA\x18rollout_kind,update_mask\x82\xD3\xE4\x93\x02M2=/v1/{rollout_kind.name=projects/*/locations/*/rolloutKinds/*}:\x0Crollout_kind\x12\xB4\x01\x0A\x11DeleteRolloutKind\x12F.google.cloud.saasplatform.saasservicemgmt.v1.DeleteRolloutKindRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/rolloutKinds/*}\x1A\xC7\x01\xCAA\x1Esaasservicemgmt.googleapis.com\xD2A\xA2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/saasservicemgmt.read-write,https://www.googleapis.com/auth/saasservicemgmt.readonlyB\xBB\x02\x0A0com.google.cloud.saasplatform.saasservicemgmt.v1B\x18SaasRolloutsServiceProtoP\x01ZZcloud.google.com/go/saasplatform/saasservicemgmt/apiv1/saasservicemgmtpb;saasservicemgmtpb\xAA\x02,Google.Cloud.SaasPlatform.SaasServiceMgmt.V1\xCA\x02,Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1\xEA\x020Google::Cloud::SaasPlatform::SaasServiceMgmt::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/SaasPlatformSaasServiceMgmt/owlbot.py b/SaasPlatformSaasServiceMgmt/owlbot.py new file mode 100644 index 000000000000..f865aafd5841 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/owlbot.py @@ -0,0 +1,47 @@ +# Copyright 2024 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}/SaasPlatformSaasServiceMgmt").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) + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.19', + '--', + 'prettier', + '**/Client/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=120']) diff --git a/SaasPlatformSaasServiceMgmt/phpunit.xml.dist b/SaasPlatformSaasServiceMgmt/phpunit.xml.dist new file mode 100644 index 000000000000..d7b6cbb95795 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_release.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_release.php new file mode 100644 index 000000000000..73c16772e2ff --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_release.php @@ -0,0 +1,88 @@ +setUnitKind($formattedReleaseUnitKind); + $request = (new CreateReleaseRequest()) + ->setParent($formattedParent) + ->setReleaseId($releaseId) + ->setRelease($release); + + // Call the API and handle any network failures. + try { + /** @var Release $response */ + $response = $saasDeploymentsClient->createRelease($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $releaseId = '[RELEASE_ID]'; + $formattedReleaseUnitKind = SaasDeploymentsClient::unitKindName( + '[PROJECT]', + '[LOCATION]', + '[UNIT_KIND]' + ); + + create_release_sample($formattedParent, $releaseId, $formattedReleaseUnitKind); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateRelease_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_saas.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_saas.php new file mode 100644 index 000000000000..9c71fe362087 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_saas.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setSaasId($saasId) + ->setSaas($saas); + + // Call the API and handle any network failures. + try { + /** @var Saas $response */ + $response = $saasDeploymentsClient->createSaas($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $saasId = '[SAAS_ID]'; + + create_saas_sample($formattedParent, $saasId); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateSaas_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_tenant.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_tenant.php new file mode 100644 index 000000000000..70dff44110b9 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_tenant.php @@ -0,0 +1,85 @@ +setSaas($formattedTenantSaas); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenantId($tenantId) + ->setTenant($tenant); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $saasDeploymentsClient->createTenant($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $tenantId = '[TENANT_ID]'; + $formattedTenantSaas = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + create_tenant_sample($formattedParent, $tenantId, $formattedTenantSaas); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateTenant_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit.php new file mode 100644 index 000000000000..d0d14b78a70a --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setUnitId($unitId) + ->setUnit($unit); + + // Call the API and handle any network failures. + try { + /** @var Unit $response */ + $response = $saasDeploymentsClient->createUnit($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $unitId = '[UNIT_ID]'; + + create_unit_sample($formattedParent, $unitId); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateUnit_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_kind.php new file mode 100644 index 000000000000..75b83e9c9062 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_kind.php @@ -0,0 +1,86 @@ +setSaas($formattedUnitKindSaas); + $request = (new CreateUnitKindRequest()) + ->setParent($formattedParent) + ->setUnitKindId($unitKindId) + ->setUnitKind($unitKind); + + // Call the API and handle any network failures. + try { + /** @var UnitKind $response */ + $response = $saasDeploymentsClient->createUnitKind($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $unitKindId = '[UNIT_KIND_ID]'; + $formattedUnitKindSaas = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + create_unit_kind_sample($formattedParent, $unitKindId, $formattedUnitKindSaas); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateUnitKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_operation.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_operation.php new file mode 100644 index 000000000000..4476b243bf48 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/create_unit_operation.php @@ -0,0 +1,83 @@ +setUnit($formattedUnitOperationUnit); + $request = (new CreateUnitOperationRequest()) + ->setParent($formattedParent) + ->setUnitOperationId($unitOperationId) + ->setUnitOperation($unitOperation); + + // Call the API and handle any network failures. + try { + /** @var UnitOperation $response */ + $response = $saasDeploymentsClient->createUnitOperation($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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + $unitOperationId = '[UNIT_OPERATION_ID]'; + $formattedUnitOperationUnit = SaasDeploymentsClient::unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + + create_unit_operation_sample($formattedParent, $unitOperationId, $formattedUnitOperationUnit); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_CreateUnitOperation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_release.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_release.php new file mode 100644 index 000000000000..0281f9090a70 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_release.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteRelease($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 = SaasDeploymentsClient::releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + + delete_release_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteRelease_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_saas.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_saas.php new file mode 100644 index 000000000000..457af18a5107 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_saas.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteSaas($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 = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + delete_saas_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteSaas_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_tenant.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_tenant.php new file mode 100644 index 000000000000..0f95afbe9e23 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_tenant.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteTenant($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 = SaasDeploymentsClient::tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + + delete_tenant_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteTenant_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit.php new file mode 100644 index 000000000000..5ca97e3eba1e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteUnit($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 = SaasDeploymentsClient::unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + + delete_unit_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteUnit_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_kind.php new file mode 100644 index 000000000000..e7c32e288980 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_kind.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteUnitKind($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 = SaasDeploymentsClient::unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + + delete_unit_kind_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteUnitKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_operation.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_operation.php new file mode 100644 index 000000000000..fe22351a4191 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/delete_unit_operation.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasDeploymentsClient->deleteUnitOperation($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 = SaasDeploymentsClient::unitOperationName( + '[PROJECT]', + '[LOCATION]', + '[UNIT_OPERATION]' + ); + + delete_unit_operation_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_DeleteUnitOperation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_location.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_location.php new file mode 100644 index 000000000000..0b5a05710ebf --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/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 saasservicemgmt_v1_generated_SaasDeployments_GetLocation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_release.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_release.php new file mode 100644 index 000000000000..b0966eefb505 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_release.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Release $response */ + $response = $saasDeploymentsClient->getRelease($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 = SaasDeploymentsClient::releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + + get_release_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetRelease_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_saas.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_saas.php new file mode 100644 index 000000000000..cde682640d1c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_saas.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Saas $response */ + $response = $saasDeploymentsClient->getSaas($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 = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + get_saas_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetSaas_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_tenant.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_tenant.php new file mode 100644 index 000000000000..4f8ca05d048f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_tenant.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $saasDeploymentsClient->getTenant($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 = SaasDeploymentsClient::tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + + get_tenant_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetTenant_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit.php new file mode 100644 index 000000000000..46a4fc32b734 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Unit $response */ + $response = $saasDeploymentsClient->getUnit($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 = SaasDeploymentsClient::unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + + get_unit_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetUnit_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_kind.php new file mode 100644 index 000000000000..ed3955cc23c9 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_kind.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UnitKind $response */ + $response = $saasDeploymentsClient->getUnitKind($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 = SaasDeploymentsClient::unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + + get_unit_kind_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetUnitKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_operation.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_operation.php new file mode 100644 index 000000000000..ddbfe65febac --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/get_unit_operation.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UnitOperation $response */ + $response = $saasDeploymentsClient->getUnitOperation($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 = SaasDeploymentsClient::unitOperationName( + '[PROJECT]', + '[LOCATION]', + '[UNIT_OPERATION]' + ); + + get_unit_operation_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_GetUnitOperation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_locations.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_locations.php new file mode 100644 index 000000000000..92da11c0f22d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_locations.php @@ -0,0 +1,77 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListLocations_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_releases.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_releases.php new file mode 100644 index 000000000000..12d13af36cfa --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_releases.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listReleases($request); + + /** @var Release $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_releases_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListReleases_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_saas.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_saas.php new file mode 100644 index 000000000000..d426f55196a9 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_saas.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listSaas($request); + + /** @var Saas $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_saas_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListSaas_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_tenants.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_tenants.php new file mode 100644 index 000000000000..098a7f2e1e63 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_tenants.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listTenants($request); + + /** @var Tenant $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_tenants_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListTenants_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_kinds.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_kinds.php new file mode 100644 index 000000000000..d50186d6b921 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_kinds.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listUnitKinds($request); + + /** @var UnitKind $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_unit_kinds_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListUnitKinds_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_operations.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_operations.php new file mode 100644 index 000000000000..f9088898e1b0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_unit_operations.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listUnitOperations($request); + + /** @var UnitOperation $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_unit_operations_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListUnitOperations_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_units.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_units.php new file mode 100644 index 000000000000..8b839363cd21 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/list_units.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasDeploymentsClient->listUnits($request); + + /** @var Unit $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 = SaasDeploymentsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_units_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_ListUnits_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_release.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_release.php new file mode 100644 index 000000000000..794254471b3d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_release.php @@ -0,0 +1,78 @@ +setUnitKind($formattedReleaseUnitKind); + $request = (new UpdateReleaseRequest()) + ->setRelease($release); + + // Call the API and handle any network failures. + try { + /** @var Release $response */ + $response = $saasDeploymentsClient->updateRelease($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 +{ + $formattedReleaseUnitKind = SaasDeploymentsClient::unitKindName( + '[PROJECT]', + '[LOCATION]', + '[UNIT_KIND]' + ); + + update_release_sample($formattedReleaseUnitKind); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateRelease_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_saas.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_saas.php new file mode 100644 index 000000000000..55588e1b55fc --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_saas.php @@ -0,0 +1,59 @@ +setSaas($saas); + + // Call the API and handle any network failures. + try { + /** @var Saas $response */ + $response = $saasDeploymentsClient->updateSaas($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateSaas_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_tenant.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_tenant.php new file mode 100644 index 000000000000..a955ae8d0470 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_tenant.php @@ -0,0 +1,75 @@ +setSaas($formattedTenantSaas); + $request = (new UpdateTenantRequest()) + ->setTenant($tenant); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $saasDeploymentsClient->updateTenant($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 +{ + $formattedTenantSaas = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + update_tenant_sample($formattedTenantSaas); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateTenant_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit.php new file mode 100644 index 000000000000..eb6462747a48 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit.php @@ -0,0 +1,59 @@ +setUnit($unit); + + // Call the API and handle any network failures. + try { + /** @var Unit $response */ + $response = $saasDeploymentsClient->updateUnit($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateUnit_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_kind.php new file mode 100644 index 000000000000..34a07433193a --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_kind.php @@ -0,0 +1,76 @@ +setSaas($formattedUnitKindSaas); + $request = (new UpdateUnitKindRequest()) + ->setUnitKind($unitKind); + + // Call the API and handle any network failures. + try { + /** @var UnitKind $response */ + $response = $saasDeploymentsClient->updateUnitKind($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 +{ + $formattedUnitKindSaas = SaasDeploymentsClient::saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + + update_unit_kind_sample($formattedUnitKindSaas); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateUnitKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_operation.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_operation.php new file mode 100644 index 000000000000..a57087d4daeb --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasDeploymentsClient/update_unit_operation.php @@ -0,0 +1,73 @@ +setUnit($formattedUnitOperationUnit); + $request = (new UpdateUnitOperationRequest()) + ->setUnitOperation($unitOperation); + + // Call the API and handle any network failures. + try { + /** @var UnitOperation $response */ + $response = $saasDeploymentsClient->updateUnitOperation($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 +{ + $formattedUnitOperationUnit = SaasDeploymentsClient::unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + + update_unit_operation_sample($formattedUnitOperationUnit); +} +// [END saasservicemgmt_v1_generated_SaasDeployments_UpdateUnitOperation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout.php new file mode 100644 index 000000000000..a05d930c2c8f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout.php @@ -0,0 +1,88 @@ +setRolloutKind($formattedRolloutRolloutKind); + $request = (new CreateRolloutRequest()) + ->setParent($formattedParent) + ->setRolloutId($rolloutId) + ->setRollout($rollout); + + // Call the API and handle any network failures. + try { + /** @var Rollout $response */ + $response = $saasRolloutsClient->createRollout($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 = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]'); + $rolloutId = '[ROLLOUT_ID]'; + $formattedRolloutRolloutKind = SaasRolloutsClient::rolloutKindName( + '[PROJECT]', + '[LOCATION]', + '[ROLLOUT_KIND_ID]' + ); + + create_rollout_sample($formattedParent, $rolloutId, $formattedRolloutRolloutKind); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_CreateRollout_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout_kind.php new file mode 100644 index 000000000000..d2d9d9d285ac --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/create_rollout_kind.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setRolloutKindId($rolloutKindId) + ->setRolloutKind($rolloutKind); + + // Call the API and handle any network failures. + try { + /** @var RolloutKind $response */ + $response = $saasRolloutsClient->createRolloutKind($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 = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]'); + $rolloutKindId = '[ROLLOUT_KIND_ID]'; + + create_rollout_kind_sample($formattedParent, $rolloutKindId); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_CreateRolloutKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout.php new file mode 100644 index 000000000000..aa79877fd0f2 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasRolloutsClient->deleteRollout($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 = SaasRolloutsClient::rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + + delete_rollout_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_DeleteRollout_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout_kind.php new file mode 100644 index 000000000000..796542cf4eca --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/delete_rollout_kind.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $saasRolloutsClient->deleteRolloutKind($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 = SaasRolloutsClient::rolloutKindName( + '[PROJECT]', + '[LOCATION]', + '[ROLLOUT_KIND_ID]' + ); + + delete_rollout_kind_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_DeleteRolloutKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_location.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_location.php new file mode 100644 index 000000000000..5ff5384215c7 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/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 saasservicemgmt_v1_generated_SaasRollouts_GetLocation_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout.php new file mode 100644 index 000000000000..cde8f7e44482 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Rollout $response */ + $response = $saasRolloutsClient->getRollout($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 = SaasRolloutsClient::rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + + get_rollout_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_GetRollout_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout_kind.php new file mode 100644 index 000000000000..b548b66e48da --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/get_rollout_kind.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RolloutKind $response */ + $response = $saasRolloutsClient->getRolloutKind($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 = SaasRolloutsClient::rolloutKindName( + '[PROJECT]', + '[LOCATION]', + '[ROLLOUT_KIND_ID]' + ); + + get_rollout_kind_sample($formattedName); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_GetRolloutKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_locations.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_locations.php new file mode 100644 index 000000000000..c71f7d1f4652 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_locations.php @@ -0,0 +1,77 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END saasservicemgmt_v1_generated_SaasRollouts_ListLocations_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollout_kinds.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollout_kinds.php new file mode 100644 index 000000000000..dfe12b250c76 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollout_kinds.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasRolloutsClient->listRolloutKinds($request); + + /** @var RolloutKind $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 = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_rollout_kinds_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_ListRolloutKinds_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollouts.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollouts.php new file mode 100644 index 000000000000..7fbfed21a76c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/list_rollouts.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $saasRolloutsClient->listRollouts($request); + + /** @var Rollout $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 = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_rollouts_sample($formattedParent); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_ListRollouts_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout.php new file mode 100644 index 000000000000..4fcb194f3af4 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout.php @@ -0,0 +1,78 @@ +setRolloutKind($formattedRolloutRolloutKind); + $request = (new UpdateRolloutRequest()) + ->setRollout($rollout); + + // Call the API and handle any network failures. + try { + /** @var Rollout $response */ + $response = $saasRolloutsClient->updateRollout($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 +{ + $formattedRolloutRolloutKind = SaasRolloutsClient::rolloutKindName( + '[PROJECT]', + '[LOCATION]', + '[ROLLOUT_KIND_ID]' + ); + + update_rollout_sample($formattedRolloutRolloutKind); +} +// [END saasservicemgmt_v1_generated_SaasRollouts_UpdateRollout_sync] diff --git a/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout_kind.php b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout_kind.php new file mode 100644 index 000000000000..e21ed1a0497d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/samples/V1/SaasRolloutsClient/update_rollout_kind.php @@ -0,0 +1,59 @@ +setRolloutKind($rolloutKind); + + // Call the API and handle any network failures. + try { + /** @var RolloutKind $response */ + $response = $saasRolloutsClient->updateRolloutKind($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END saasservicemgmt_v1_generated_SaasRollouts_UpdateRolloutKind_sync] diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Aggregate.php b/SaasPlatformSaasServiceMgmt/src/V1/Aggregate.php new file mode 100644 index 000000000000..09a3338fee40 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Aggregate.php @@ -0,0 +1,103 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Aggregate + */ +class Aggregate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Group by which to aggregate. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = ''; + /** + * Required. Number of records in the group. + * + * Generated from protobuf field int32 count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. Group by which to aggregate. + * @type int $count + * Required. Number of records in the group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Group by which to aggregate. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. Group by which to aggregate. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Required. Number of records in the group. + * + * Generated from protobuf field int32 count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Required. Number of records in the group. + * + * Generated from protobuf field int32 count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/AppParams.php b/SaasPlatformSaasServiceMgmt/src/V1/AppParams.php new file mode 100644 index 000000000000..40f16425fe9e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/AppParams.php @@ -0,0 +1,131 @@ +google.cloud.saasplatform.saasservicemgmt.v1.AppParams + */ +class AppParams extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Grouping used to construct the name of the AppHub Application. + * Multiple UnitKinds can specify the same group to use the same Application + * across their respective units. + * Corresponds to the app_boundary_id in the ADC composite + * ApplicationTemplate. Defaults to UnitKind.name + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $group = ''; + /** + * Optional. Corresponds to the scope in the ADC composite + * ApplicationTemplate. Defaults to TYPE_REGIONAL. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope scope = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Optional. Grouping used to construct the name of the AppHub Application. + * Multiple UnitKinds can specify the same group to use the same Application + * across their respective units. + * Corresponds to the app_boundary_id in the ADC composite + * ApplicationTemplate. Defaults to UnitKind.name + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams\Scope $scope + * Optional. Corresponds to the scope in the ADC composite + * ApplicationTemplate. Defaults to TYPE_REGIONAL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Grouping used to construct the name of the AppHub Application. + * Multiple UnitKinds can specify the same group to use the same Application + * across their respective units. + * Corresponds to the app_boundary_id in the ADC composite + * ApplicationTemplate. Defaults to UnitKind.name + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Optional. Grouping used to construct the name of the AppHub Application. + * Multiple UnitKinds can specify the same group to use the same Application + * across their respective units. + * Corresponds to the app_boundary_id in the ADC composite + * ApplicationTemplate. Defaults to UnitKind.name + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Optional. Corresponds to the scope in the ADC composite + * ApplicationTemplate. Defaults to TYPE_REGIONAL. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope scope = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams\Scope|null + */ + public function getScope() + { + return $this->scope; + } + + public function hasScope() + { + return isset($this->scope); + } + + public function clearScope() + { + unset($this->scope); + } + + /** + * Optional. Corresponds to the scope in the ADC composite + * ApplicationTemplate. Defaults to TYPE_REGIONAL. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope scope = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams\Scope $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams\Scope::class); + $this->scope = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope.php b/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope.php new file mode 100644 index 000000000000..7c00a80b87c6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope.php @@ -0,0 +1,67 @@ +google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope + */ +class Scope extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Scope Type. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. Scope Type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Scope Type. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Scope Type. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams\Scope\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope/Type.php b/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope/Type.php new file mode 100644 index 000000000000..db7c692ecd4c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/AppParams/Scope/Type.php @@ -0,0 +1,61 @@ +google.cloud.saasplatform.saasservicemgmt.v1.AppParams.Scope.Type + */ +class Type +{ + /** + * Unspecified type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Regional type. + * + * Generated from protobuf enum TYPE_REGIONAL = 1; + */ + const TYPE_REGIONAL = 1; + /** + * Global type. + * + * Generated from protobuf enum TYPE_GLOBAL = 2; + */ + const TYPE_GLOBAL = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TYPE_REGIONAL => 'TYPE_REGIONAL', + self::TYPE_GLOBAL => 'TYPE_GLOBAL', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/Blueprint.php b/SaasPlatformSaasServiceMgmt/src/V1/Blueprint.php new file mode 100644 index 000000000000..5b4167c2aea0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Blueprint.php @@ -0,0 +1,147 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Blueprint + */ +class Blueprint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Immutable. URI to a blueprint used by the Unit (required unless + * unitKind or release is set). + * + * Generated from protobuf field string package = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $package = ''; + /** + * Output only. Type of the engine used to actuate the blueprint. (Terraform, + * for example) + * + * Generated from protobuf field string engine = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $engine = ''; + /** + * Output only. Version metadata if present on the blueprint. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $package + * Optional. Immutable. URI to a blueprint used by the Unit (required unless + * unitKind or release is set). + * @type string $engine + * Output only. Type of the engine used to actuate the blueprint. (Terraform, + * for example) + * @type string $version + * Output only. Version metadata if present on the blueprint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Immutable. URI to a blueprint used by the Unit (required unless + * unitKind or release is set). + * + * Generated from protobuf field string package = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getPackage() + { + return $this->package; + } + + /** + * Optional. Immutable. URI to a blueprint used by the Unit (required unless + * unitKind or release is set). + * + * Generated from protobuf field string package = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setPackage($var) + { + GPBUtil::checkString($var, True); + $this->package = $var; + + return $this; + } + + /** + * Output only. Type of the engine used to actuate the blueprint. (Terraform, + * for example) + * + * Generated from protobuf field string engine = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Output only. Type of the engine used to actuate the blueprint. (Terraform, + * for example) + * + * Generated from protobuf field string engine = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEngine($var) + { + GPBUtil::checkString($var, True); + $this->engine = $var; + + return $this; + } + + /** + * Output only. Version metadata if present on the blueprint. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Output only. Version metadata if present on the blueprint. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasDeploymentsClient.php b/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasDeploymentsClient.php new file mode 100644 index 000000000000..7fc81b824d68 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasDeploymentsClient.php @@ -0,0 +1,1404 @@ + createReleaseAsync(CreateReleaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSaasAsync(CreateSaasRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTenantAsync(CreateTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUnitAsync(CreateUnitRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUnitKindAsync(CreateUnitKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUnitOperationAsync(CreateUnitOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReleaseAsync(DeleteReleaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSaasAsync(DeleteSaasRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTenantAsync(DeleteTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUnitAsync(DeleteUnitRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUnitKindAsync(DeleteUnitKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUnitOperationAsync(DeleteUnitOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReleaseAsync(GetReleaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSaasAsync(GetSaasRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTenantAsync(GetTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUnitAsync(GetUnitRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUnitKindAsync(GetUnitKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUnitOperationAsync(GetUnitOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReleasesAsync(ListReleasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSaasAsync(ListSaasRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTenantsAsync(ListTenantsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUnitKindsAsync(ListUnitKindsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUnitOperationsAsync(ListUnitOperationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUnitsAsync(ListUnitsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReleaseAsync(UpdateReleaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSaasAsync(UpdateSaasRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTenantAsync(UpdateTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUnitAsync(UpdateUnitRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUnitKindAsync(UpdateUnitKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUnitOperationAsync(UpdateUnitOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SaasDeploymentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'saasservicemgmt.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'saasservicemgmt.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/saasservicemgmt.read-write', + 'https://www.googleapis.com/auth/saasservicemgmt.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/saas_deployments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/saas_deployments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/saas_deployments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/saas_deployments_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a application + * resource. + * + * @param string $project + * @param string $location + * @param string $application + * + * @return string The formatted application resource. + */ + public static function applicationName(string $project, string $location, string $application): string + { + return self::getPathTemplate('application')->render([ + 'project' => $project, + 'location' => $location, + 'application' => $application, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * application_template resource. + * + * @param string $project + * @param string $location + * @param string $space + * @param string $applicationTemplate + * + * @return string The formatted application_template resource. + */ + public static function applicationTemplateName( + string $project, + string $location, + string $space, + string $applicationTemplate + ): string { + return self::getPathTemplate('applicationTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'space' => $space, + 'application_template' => $applicationTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * application_template_revision resource. + * + * @param string $project + * @param string $location + * @param string $space + * @param string $applicationTemplate + * @param string $revision + * + * @return string The formatted application_template_revision resource. + */ + public static function applicationTemplateRevisionName( + string $project, + string $location, + string $space, + string $applicationTemplate, + string $revision + ): string { + return self::getPathTemplate('applicationTemplateRevision')->render([ + 'project' => $project, + 'location' => $location, + 'space' => $space, + 'application_template' => $applicationTemplate, + 'revision' => $revision, + ]); + } + + /** + * 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 + * project_location_space_application_template resource. + * + * @param string $project + * @param string $location + * @param string $space + * @param string $applicationTemplate + * + * @return string The formatted project_location_space_application_template resource. + */ + public static function projectLocationSpaceApplicationTemplateName( + string $project, + string $location, + string $space, + string $applicationTemplate + ): string { + return self::getPathTemplate('projectLocationSpaceApplicationTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'space' => $space, + 'application_template' => $applicationTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_workspace_application_template resource. + * + * @param string $project + * @param string $location + * @param string $workspace + * @param string $applicationTemplate + * + * @return string The formatted project_location_workspace_application_template resource. + */ + public static function projectLocationWorkspaceApplicationTemplateName( + string $project, + string $location, + string $workspace, + string $applicationTemplate + ): string { + return self::getPathTemplate('projectLocationWorkspaceApplicationTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'workspace' => $workspace, + 'application_template' => $applicationTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a release + * resource. + * + * @param string $project + * @param string $location + * @param string $release + * + * @return string The formatted release resource. + */ + public static function releaseName(string $project, string $location, string $release): string + { + return self::getPathTemplate('release')->render([ + 'project' => $project, + 'location' => $location, + 'release' => $release, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rollout + * resource. + * + * @param string $project + * @param string $location + * @param string $rolloutId + * + * @return string The formatted rollout resource. + */ + public static function rolloutName(string $project, string $location, string $rolloutId): string + { + return self::getPathTemplate('rollout')->render([ + 'project' => $project, + 'location' => $location, + 'rollout_id' => $rolloutId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a saas + * resource. + * + * @param string $project + * @param string $location + * @param string $saas + * + * @return string The formatted saas resource. + */ + public static function saasName(string $project, string $location, string $saas): string + { + return self::getPathTemplate('saas')->render([ + 'project' => $project, + 'location' => $location, + 'saas' => $saas, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tenant + * resource. + * + * @param string $project + * @param string $location + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $location, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'location' => $location, + 'tenant' => $tenant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a unit + * resource. + * + * @param string $project + * @param string $location + * @param string $unit + * + * @return string The formatted unit resource. + */ + public static function unitName(string $project, string $location, string $unit): string + { + return self::getPathTemplate('unit')->render([ + 'project' => $project, + 'location' => $location, + 'unit' => $unit, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a unit_kind + * resource. + * + * @param string $project + * @param string $location + * @param string $unitKind + * + * @return string The formatted unit_kind resource. + */ + public static function unitKindName(string $project, string $location, string $unitKind): string + { + return self::getPathTemplate('unitKind')->render([ + 'project' => $project, + 'location' => $location, + 'unit_kind' => $unitKind, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * unit_operation resource. + * + * @param string $project + * @param string $location + * @param string $unitOperation + * + * @return string The formatted unit_operation resource. + */ + public static function unitOperationName(string $project, string $location, string $unitOperation): string + { + return self::getPathTemplate('unitOperation')->render([ + 'project' => $project, + 'location' => $location, + 'unit_operation' => $unitOperation, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - application: projects/{project}/locations/{location}/applications/{application} + * - applicationTemplate: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template} + * - applicationTemplateRevision: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/revisions/{revision} + * - location: projects/{project}/locations/{location} + * - projectLocationSpaceApplicationTemplate: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template} + * - projectLocationWorkspaceApplicationTemplate: projects/{project}/locations/{location}/workspaces/{workspace}/applicationTemplates/{application_template} + * - release: projects/{project}/locations/{location}/releases/{release} + * - rollout: projects/{project}/locations/{location}/rollouts/{rollout_id} + * - saas: projects/{project}/locations/{location}/saas/{saas} + * - tenant: projects/{project}/locations/{location}/tenants/{tenant} + * - unit: projects/{project}/locations/{location}/units/{unit} + * - unitKind: projects/{project}/locations/{location}/unitKinds/{unit_kind} + * - unitOperation: projects/{project}/locations/{location}/unitOperations/{unit_operation} + * + * 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|ClientOptions $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 'saasservicemgmt.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasDeploymentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SaasDeploymentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a new release. + * + * The async variant is {@see SaasDeploymentsClient::createReleaseAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_release.php + * + * @param CreateReleaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Release + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRelease(CreateReleaseRequest $request, array $callOptions = []): Release + { + return $this->startApiCall('CreateRelease', $request, $callOptions)->wait(); + } + + /** + * Create a new saas. + * + * The async variant is {@see SaasDeploymentsClient::createSaasAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_saas.php + * + * @param CreateSaasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Saas + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSaas(CreateSaasRequest $request, array $callOptions = []): Saas + { + return $this->startApiCall('CreateSaas', $request, $callOptions)->wait(); + } + + /** + * Create a new tenant. + * + * The async variant is {@see SaasDeploymentsClient::createTenantAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_tenant.php + * + * @param CreateTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTenant(CreateTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('CreateTenant', $request, $callOptions)->wait(); + } + + /** + * Create a new unit. + * + * The async variant is {@see SaasDeploymentsClient::createUnitAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_unit.php + * + * @param CreateUnitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Unit + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUnit(CreateUnitRequest $request, array $callOptions = []): Unit + { + return $this->startApiCall('CreateUnit', $request, $callOptions)->wait(); + } + + /** + * Create a new unit kind. + * + * The async variant is {@see SaasDeploymentsClient::createUnitKindAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_unit_kind.php + * + * @param CreateUnitKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUnitKind(CreateUnitKindRequest $request, array $callOptions = []): UnitKind + { + return $this->startApiCall('CreateUnitKind', $request, $callOptions)->wait(); + } + + /** + * Create a new unit operation. + * + * The async variant is {@see SaasDeploymentsClient::createUnitOperationAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/create_unit_operation.php + * + * @param CreateUnitOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitOperation + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUnitOperation(CreateUnitOperationRequest $request, array $callOptions = []): UnitOperation + { + return $this->startApiCall('CreateUnitOperation', $request, $callOptions)->wait(); + } + + /** + * Delete a single release. + * + * The async variant is {@see SaasDeploymentsClient::deleteReleaseAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_release.php + * + * @param DeleteReleaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteRelease(DeleteReleaseRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteRelease', $request, $callOptions)->wait(); + } + + /** + * Delete a single saas. + * + * The async variant is {@see SaasDeploymentsClient::deleteSaasAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_saas.php + * + * @param DeleteSaasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSaas(DeleteSaasRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSaas', $request, $callOptions)->wait(); + } + + /** + * Delete a single tenant. + * + * The async variant is {@see SaasDeploymentsClient::deleteTenantAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_tenant.php + * + * @param DeleteTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTenant(DeleteTenantRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTenant', $request, $callOptions)->wait(); + } + + /** + * Delete a single unit. + * + * The async variant is {@see SaasDeploymentsClient::deleteUnitAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_unit.php + * + * @param DeleteUnitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteUnit(DeleteUnitRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUnit', $request, $callOptions)->wait(); + } + + /** + * Delete a single unit kind. + * + * The async variant is {@see SaasDeploymentsClient::deleteUnitKindAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_unit_kind.php + * + * @param DeleteUnitKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteUnitKind(DeleteUnitKindRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUnitKind', $request, $callOptions)->wait(); + } + + /** + * Delete a single unit operation. + * + * The async variant is {@see SaasDeploymentsClient::deleteUnitOperationAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/delete_unit_operation.php + * + * @param DeleteUnitOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteUnitOperation(DeleteUnitOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUnitOperation', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single release. + * + * The async variant is {@see SaasDeploymentsClient::getReleaseAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_release.php + * + * @param GetReleaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Release + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRelease(GetReleaseRequest $request, array $callOptions = []): Release + { + return $this->startApiCall('GetRelease', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single saas. + * + * The async variant is {@see SaasDeploymentsClient::getSaasAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_saas.php + * + * @param GetSaasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Saas + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSaas(GetSaasRequest $request, array $callOptions = []): Saas + { + return $this->startApiCall('GetSaas', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single tenant. + * + * The async variant is {@see SaasDeploymentsClient::getTenantAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_tenant.php + * + * @param GetTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTenant(GetTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('GetTenant', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single unit. + * + * The async variant is {@see SaasDeploymentsClient::getUnitAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_unit.php + * + * @param GetUnitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Unit + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUnit(GetUnitRequest $request, array $callOptions = []): Unit + { + return $this->startApiCall('GetUnit', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single unit kind. + * + * The async variant is {@see SaasDeploymentsClient::getUnitKindAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_unit_kind.php + * + * @param GetUnitKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUnitKind(GetUnitKindRequest $request, array $callOptions = []): UnitKind + { + return $this->startApiCall('GetUnitKind', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single unit operation. + * + * The async variant is {@see SaasDeploymentsClient::getUnitOperationAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/get_unit_operation.php + * + * @param GetUnitOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitOperation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUnitOperation(GetUnitOperationRequest $request, array $callOptions = []): UnitOperation + { + return $this->startApiCall('GetUnitOperation', $request, $callOptions)->wait(); + } + + /** + * Retrieve a collection of releases. + * + * The async variant is {@see SaasDeploymentsClient::listReleasesAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_releases.php + * + * @param ListReleasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReleases(ListReleasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReleases', $request, $callOptions); + } + + /** + * Retrieve a collection of saas. + * + * The async variant is {@see SaasDeploymentsClient::listSaasAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_saas.php + * + * @param ListSaasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSaas(ListSaasRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSaas', $request, $callOptions); + } + + /** + * Retrieve a collection of tenants. + * + * The async variant is {@see SaasDeploymentsClient::listTenantsAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_tenants.php + * + * @param ListTenantsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTenants(ListTenantsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTenants', $request, $callOptions); + } + + /** + * Retrieve a collection of unit kinds. + * + * The async variant is {@see SaasDeploymentsClient::listUnitKindsAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_unit_kinds.php + * + * @param ListUnitKindsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listUnitKinds(ListUnitKindsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUnitKinds', $request, $callOptions); + } + + /** + * Retrieve a collection of unit operations. + * + * The async variant is {@see SaasDeploymentsClient::listUnitOperationsAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_unit_operations.php + * + * @param ListUnitOperationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listUnitOperations(ListUnitOperationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUnitOperations', $request, $callOptions); + } + + /** + * Retrieve a collection of units. + * + * The async variant is {@see SaasDeploymentsClient::listUnitsAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/list_units.php + * + * @param ListUnitsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listUnits(ListUnitsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUnits', $request, $callOptions); + } + + /** + * Update a single release. + * + * The async variant is {@see SaasDeploymentsClient::updateReleaseAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_release.php + * + * @param UpdateReleaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Release + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRelease(UpdateReleaseRequest $request, array $callOptions = []): Release + { + return $this->startApiCall('UpdateRelease', $request, $callOptions)->wait(); + } + + /** + * Update a single saas. + * + * The async variant is {@see SaasDeploymentsClient::updateSaasAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_saas.php + * + * @param UpdateSaasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Saas + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSaas(UpdateSaasRequest $request, array $callOptions = []): Saas + { + return $this->startApiCall('UpdateSaas', $request, $callOptions)->wait(); + } + + /** + * Update a single tenant. + * + * The async variant is {@see SaasDeploymentsClient::updateTenantAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_tenant.php + * + * @param UpdateTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTenant(UpdateTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('UpdateTenant', $request, $callOptions)->wait(); + } + + /** + * Update a single unit. + * + * The async variant is {@see SaasDeploymentsClient::updateUnitAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_unit.php + * + * @param UpdateUnitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Unit + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUnit(UpdateUnitRequest $request, array $callOptions = []): Unit + { + return $this->startApiCall('UpdateUnit', $request, $callOptions)->wait(); + } + + /** + * Update a single unit kind. + * + * The async variant is {@see SaasDeploymentsClient::updateUnitKindAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_unit_kind.php + * + * @param UpdateUnitKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUnitKind(UpdateUnitKindRequest $request, array $callOptions = []): UnitKind + { + return $this->startApiCall('UpdateUnitKind', $request, $callOptions)->wait(); + } + + /** + * Update a single unit operation. + * + * The async variant is {@see SaasDeploymentsClient::updateUnitOperationAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/update_unit_operation.php + * + * @param UpdateUnitOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnitOperation + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUnitOperation(UpdateUnitOperationRequest $request, array $callOptions = []): UnitOperation + { + return $this->startApiCall('UpdateUnitOperation', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SaasDeploymentsClient::getLocationAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/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. + * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * + * The async variant is {@see SaasDeploymentsClient::listLocationsAsync()} . + * + * @example samples/V1/SaasDeploymentsClient/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/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasRolloutsClient.php b/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasRolloutsClient.php new file mode 100644 index 000000000000..81b08aadf9cd --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Client/SaasRolloutsClient.php @@ -0,0 +1,661 @@ + createRolloutAsync(CreateRolloutRequest $request, array $optionalArgs = []) + * @method PromiseInterface createRolloutKindAsync(CreateRolloutKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRolloutAsync(DeleteRolloutRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRolloutKindAsync(DeleteRolloutKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRolloutAsync(GetRolloutRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRolloutKindAsync(GetRolloutKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRolloutKindsAsync(ListRolloutKindsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRolloutsAsync(ListRolloutsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRolloutAsync(UpdateRolloutRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRolloutKindAsync(UpdateRolloutKindRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SaasRolloutsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'saasservicemgmt.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'saasservicemgmt.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/saasservicemgmt.read-write', + 'https://www.googleapis.com/auth/saasservicemgmt.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/saas_rollouts_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/saas_rollouts_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/saas_rollouts_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/saas_rollouts_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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 release + * resource. + * + * @param string $project + * @param string $location + * @param string $release + * + * @return string The formatted release resource. + */ + public static function releaseName(string $project, string $location, string $release): string + { + return self::getPathTemplate('release')->render([ + 'project' => $project, + 'location' => $location, + 'release' => $release, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rollout + * resource. + * + * @param string $project + * @param string $location + * @param string $rolloutId + * + * @return string The formatted rollout resource. + */ + public static function rolloutName(string $project, string $location, string $rolloutId): string + { + return self::getPathTemplate('rollout')->render([ + 'project' => $project, + 'location' => $location, + 'rollout_id' => $rolloutId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rollout_kind + * resource. + * + * @param string $project + * @param string $location + * @param string $rolloutKindId + * + * @return string The formatted rollout_kind resource. + */ + public static function rolloutKindName(string $project, string $location, string $rolloutKindId): string + { + return self::getPathTemplate('rolloutKind')->render([ + 'project' => $project, + 'location' => $location, + 'rollout_kind_id' => $rolloutKindId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a unit_kind + * resource. + * + * @param string $project + * @param string $location + * @param string $unitKind + * + * @return string The formatted unit_kind resource. + */ + public static function unitKindName(string $project, string $location, string $unitKind): string + { + return self::getPathTemplate('unitKind')->render([ + 'project' => $project, + 'location' => $location, + 'unit_kind' => $unitKind, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - release: projects/{project}/locations/{location}/releases/{release} + * - rollout: projects/{project}/locations/{location}/rollouts/{rollout_id} + * - rolloutKind: projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id} + * - unitKind: projects/{project}/locations/{location}/unitKinds/{unit_kind} + * + * 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|ClientOptions $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 'saasservicemgmt.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasRolloutsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SaasRolloutsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a new rollout. + * + * The async variant is {@see SaasRolloutsClient::createRolloutAsync()} . + * + * @example samples/V1/SaasRolloutsClient/create_rollout.php + * + * @param CreateRolloutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Rollout + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRollout(CreateRolloutRequest $request, array $callOptions = []): Rollout + { + return $this->startApiCall('CreateRollout', $request, $callOptions)->wait(); + } + + /** + * Create a new rollout kind. + * + * The async variant is {@see SaasRolloutsClient::createRolloutKindAsync()} . + * + * @example samples/V1/SaasRolloutsClient/create_rollout_kind.php + * + * @param CreateRolloutKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RolloutKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRolloutKind(CreateRolloutKindRequest $request, array $callOptions = []): RolloutKind + { + return $this->startApiCall('CreateRolloutKind', $request, $callOptions)->wait(); + } + + /** + * Delete a single rollout. + * + * The async variant is {@see SaasRolloutsClient::deleteRolloutAsync()} . + * + * @example samples/V1/SaasRolloutsClient/delete_rollout.php + * + * @param DeleteRolloutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteRollout(DeleteRolloutRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteRollout', $request, $callOptions)->wait(); + } + + /** + * Delete a single rollout kind. + * + * The async variant is {@see SaasRolloutsClient::deleteRolloutKindAsync()} . + * + * @example samples/V1/SaasRolloutsClient/delete_rollout_kind.php + * + * @param DeleteRolloutKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteRolloutKind(DeleteRolloutKindRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteRolloutKind', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single rollout. + * + * The async variant is {@see SaasRolloutsClient::getRolloutAsync()} . + * + * @example samples/V1/SaasRolloutsClient/get_rollout.php + * + * @param GetRolloutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Rollout + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRollout(GetRolloutRequest $request, array $callOptions = []): Rollout + { + return $this->startApiCall('GetRollout', $request, $callOptions)->wait(); + } + + /** + * Retrieve a single rollout kind. + * + * The async variant is {@see SaasRolloutsClient::getRolloutKindAsync()} . + * + * @example samples/V1/SaasRolloutsClient/get_rollout_kind.php + * + * @param GetRolloutKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RolloutKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRolloutKind(GetRolloutKindRequest $request, array $callOptions = []): RolloutKind + { + return $this->startApiCall('GetRolloutKind', $request, $callOptions)->wait(); + } + + /** + * Retrieve a collection of rollout kinds. + * + * The async variant is {@see SaasRolloutsClient::listRolloutKindsAsync()} . + * + * @example samples/V1/SaasRolloutsClient/list_rollout_kinds.php + * + * @param ListRolloutKindsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRolloutKinds(ListRolloutKindsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRolloutKinds', $request, $callOptions); + } + + /** + * Retrieve a collection of rollouts. + * + * The async variant is {@see SaasRolloutsClient::listRolloutsAsync()} . + * + * @example samples/V1/SaasRolloutsClient/list_rollouts.php + * + * @param ListRolloutsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRollouts(ListRolloutsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRollouts', $request, $callOptions); + } + + /** + * Update a single rollout. + * + * The async variant is {@see SaasRolloutsClient::updateRolloutAsync()} . + * + * @example samples/V1/SaasRolloutsClient/update_rollout.php + * + * @param UpdateRolloutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Rollout + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRollout(UpdateRolloutRequest $request, array $callOptions = []): Rollout + { + return $this->startApiCall('UpdateRollout', $request, $callOptions)->wait(); + } + + /** + * Update a single rollout kind. + * + * The async variant is {@see SaasRolloutsClient::updateRolloutKindAsync()} . + * + * @example samples/V1/SaasRolloutsClient/update_rollout_kind.php + * + * @param UpdateRolloutKindRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RolloutKind + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRolloutKind(UpdateRolloutKindRequest $request, array $callOptions = []): RolloutKind + { + return $this->startApiCall('UpdateRolloutKind', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SaasRolloutsClient::getLocationAsync()} . + * + * @example samples/V1/SaasRolloutsClient/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. + * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * + * The async variant is {@see SaasRolloutsClient::listLocationsAsync()} . + * + * @example samples/V1/SaasRolloutsClient/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/SaasPlatformSaasServiceMgmt/src/V1/ComponentRef.php b/SaasPlatformSaasServiceMgmt/src/V1/ComponentRef.php new file mode 100644 index 000000000000..655bf685f48c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ComponentRef.php @@ -0,0 +1,153 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef + */ +class ComponentRef extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Reference to the Composite ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef composite_ref = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $composite_ref = null; + /** + * Optional. Name of the component in composite.Components + * + * Generated from protobuf field string component = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $component = ''; + /** + * Optional. Revision of the component. + * If the component does not have a revision, this field will be explicitly + * set to the revision of the composite ApplicationTemplate. + * + * Generated from protobuf field string revision = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $revision = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef $composite_ref + * Optional. Reference to the Composite ApplicationTemplate. + * @type string $component + * Optional. Name of the component in composite.Components + * @type string $revision + * Optional. Revision of the component. + * If the component does not have a revision, this field will be explicitly + * set to the revision of the composite ApplicationTemplate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Reference to the Composite ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef composite_ref = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef|null + */ + public function getCompositeRef() + { + return $this->composite_ref; + } + + public function hasCompositeRef() + { + return isset($this->composite_ref); + } + + public function clearCompositeRef() + { + unset($this->composite_ref); + } + + /** + * Optional. Reference to the Composite ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef composite_ref = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef $var + * @return $this + */ + public function setCompositeRef($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef::class); + $this->composite_ref = $var; + + return $this; + } + + /** + * Optional. Name of the component in composite.Components + * + * Generated from protobuf field string component = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComponent() + { + return $this->component; + } + + /** + * Optional. Name of the component in composite.Components + * + * Generated from protobuf field string component = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComponent($var) + { + GPBUtil::checkString($var, True); + $this->component = $var; + + return $this; + } + + /** + * Optional. Revision of the component. + * If the component does not have a revision, this field will be explicitly + * set to the revision of the composite ApplicationTemplate. + * + * Generated from protobuf field string revision = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Optional. Revision of the component. + * If the component does not have a revision, this field will be explicitly + * set to the revision of the composite ApplicationTemplate. + * + * Generated from protobuf field string revision = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CompositeRef.php b/SaasPlatformSaasServiceMgmt/src/V1/CompositeRef.php new file mode 100644 index 000000000000..cce03b2f821f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CompositeRef.php @@ -0,0 +1,151 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef + */ +class CompositeRef extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Reference to the ApplicationTemplate resource. + * + * Generated from protobuf field string application_template = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $application_template = ''; + /** + * Optional. Revision of the ApplicationTemplate to use. + * Changes to revision will trigger manual resynchronization. + * If empty, ApplicationTemplate will be ignored. + * + * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Output only. Reference to on-going AppTemplate import and replication + * operation (i.e. the operation_id for the long-running operation). This + * field is opaque for external usage. + * + * Generated from protobuf field string sync_operation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sync_operation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $application_template + * Required. Reference to the ApplicationTemplate resource. + * @type string $revision + * Optional. Revision of the ApplicationTemplate to use. + * Changes to revision will trigger manual resynchronization. + * If empty, ApplicationTemplate will be ignored. + * @type string $sync_operation + * Output only. Reference to on-going AppTemplate import and replication + * operation (i.e. the operation_id for the long-running operation). This + * field is opaque for external usage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Reference to the ApplicationTemplate resource. + * + * Generated from protobuf field string application_template = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getApplicationTemplate() + { + return $this->application_template; + } + + /** + * Required. Reference to the ApplicationTemplate resource. + * + * Generated from protobuf field string application_template = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setApplicationTemplate($var) + { + GPBUtil::checkString($var, True); + $this->application_template = $var; + + return $this; + } + + /** + * Optional. Revision of the ApplicationTemplate to use. + * Changes to revision will trigger manual resynchronization. + * If empty, ApplicationTemplate will be ignored. + * + * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Optional. Revision of the ApplicationTemplate to use. + * Changes to revision will trigger manual resynchronization. + * If empty, ApplicationTemplate will be ignored. + * + * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Output only. Reference to on-going AppTemplate import and replication + * operation (i.e. the operation_id for the long-running operation). This + * field is opaque for external usage. + * + * Generated from protobuf field string sync_operation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSyncOperation() + { + return $this->sync_operation; + } + + /** + * Output only. Reference to on-going AppTemplate import and replication + * operation (i.e. the operation_id for the long-running operation). This + * field is opaque for external usage. + * + * Generated from protobuf field string sync_operation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSyncOperation($var) + { + GPBUtil::checkString($var, True); + $this->sync_operation = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateReleaseRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateReleaseRequest.php new file mode 100644 index 000000000000..af4b3b3f4ceb --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateReleaseRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateReleaseRequest + */ +class CreateReleaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new release. + * + * Generated from protobuf field string release_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $release_id = ''; + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $release = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the release. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release Required. The desired state for the release. + * @param string $releaseId Required. The ID value for the new release. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateReleaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release, string $releaseId): self + { + return (new self()) + ->setParent($parent) + ->setRelease($release) + ->setReleaseId($releaseId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the release. + * @type string $release_id + * Required. The ID value for the new release. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release + * Required. The desired state for the release. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new release. + * + * Generated from protobuf field string release_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReleaseId() + { + return $this->release_id; + } + + /** + * Required. The ID value for the new release. + * + * Generated from protobuf field string release_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReleaseId($var) + { + GPBUtil::checkString($var, True); + $this->release_id = $var; + + return $this; + } + + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release|null + */ + public function getRelease() + { + return $this->release; + } + + public function hasRelease() + { + return isset($this->release); + } + + public function clearRelease() + { + unset($this->release); + } + + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release::class); + $this->release = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutKindRequest.php new file mode 100644 index 000000000000..742f3258a123 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutKindRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateRolloutKindRequest + */ +class CreateRolloutKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new rollout kind. + * + * Generated from protobuf field string rollout_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout_kind_id = ''; + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout_kind = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the rollout kind. Please see + * {@see SaasRolloutsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rolloutKind Required. The desired state for the rollout kind. + * @param string $rolloutKindId Required. The ID value for the new rollout kind. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutKindRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rolloutKind, string $rolloutKindId): self + { + return (new self()) + ->setParent($parent) + ->setRolloutKind($rolloutKind) + ->setRolloutKindId($rolloutKindId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the rollout kind. + * @type string $rollout_kind_id + * Required. The ID value for the new rollout kind. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rollout_kind + * Required. The desired state for the rollout kind. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new rollout kind. + * + * Generated from protobuf field string rollout_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRolloutKindId() + { + return $this->rollout_kind_id; + } + + /** + * Required. The ID value for the new rollout kind. + * + * Generated from protobuf field string rollout_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRolloutKindId($var) + { + GPBUtil::checkString($var, True); + $this->rollout_kind_id = $var; + + return $this; + } + + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind|null + */ + public function getRolloutKind() + { + return $this->rollout_kind; + } + + public function hasRolloutKind() + { + return isset($this->rollout_kind); + } + + public function clearRolloutKind() + { + unset($this->rollout_kind); + } + + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $var + * @return $this + */ + public function setRolloutKind($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind::class); + $this->rollout_kind = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutRequest.php new file mode 100644 index 000000000000..ed3ea19c75b1 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateRolloutRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateRolloutRequest + */ +class CreateRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new rollout. + * + * Generated from protobuf field string rollout_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout_id = ''; + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the rollout. Please see + * {@see SaasRolloutsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout Required. The desired state for the rollout. + * @param string $rolloutId Required. The ID value for the new rollout. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout, string $rolloutId): self + { + return (new self()) + ->setParent($parent) + ->setRollout($rollout) + ->setRolloutId($rolloutId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the rollout. + * @type string $rollout_id + * Required. The ID value for the new rollout. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout + * Required. The desired state for the rollout. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new rollout. + * + * Generated from protobuf field string rollout_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRolloutId() + { + return $this->rollout_id; + } + + /** + * Required. The ID value for the new rollout. + * + * Generated from protobuf field string rollout_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRolloutId($var) + { + GPBUtil::checkString($var, True); + $this->rollout_id = $var; + + return $this; + } + + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateSaasRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateSaasRequest.php new file mode 100644 index 000000000000..35a294c1b6dd --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateSaasRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateSaasRequest + */ +class CreateSaasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new saas. + * + * Generated from protobuf field string saas_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $saas_id = ''; + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $saas = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the saas. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas Required. The desired state for the saas. + * @param string $saasId Required. The ID value for the new saas. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateSaasRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas, string $saasId): self + { + return (new self()) + ->setParent($parent) + ->setSaas($saas) + ->setSaasId($saasId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the saas. + * @type string $saas_id + * Required. The ID value for the new saas. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas + * Required. The desired state for the saas. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new saas. + * + * Generated from protobuf field string saas_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSaasId() + { + return $this->saas_id; + } + + /** + * Required. The ID value for the new saas. + * + * Generated from protobuf field string saas_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSaasId($var) + { + GPBUtil::checkString($var, True); + $this->saas_id = $var; + + return $this; + } + + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas|null + */ + public function getSaas() + { + return $this->saas; + } + + public function hasSaas() + { + return isset($this->saas); + } + + public function clearSaas() + { + unset($this->saas); + } + + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $var + * @return $this + */ + public function setSaas($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas::class); + $this->saas = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateTenantRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateTenantRequest.php new file mode 100644 index 000000000000..d8b782bd9116 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateTenantRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateTenantRequest + */ +class CreateTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new tenant. + * + * Generated from protobuf field string tenant_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant_id = ''; + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the tenant. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant Required. The desired state for the tenant. + * @param string $tenantId Required. The ID value for the new tenant. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateTenantRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant, string $tenantId): self + { + return (new self()) + ->setParent($parent) + ->setTenant($tenant) + ->setTenantId($tenantId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the tenant. + * @type string $tenant_id + * Required. The ID value for the new tenant. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant + * Required. The desired state for the tenant. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new tenant. + * + * Generated from protobuf field string tenant_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * Required. The ID value for the new tenant. + * + * Generated from protobuf field string tenant_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant|null + */ + public function getTenant() + { + return $this->tenant; + } + + public function hasTenant() + { + return isset($this->tenant); + } + + public function clearTenant() + { + unset($this->tenant); + } + + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant::class); + $this->tenant = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitKindRequest.php new file mode 100644 index 000000000000..73026aaf70ba --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitKindRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitKindRequest + */ +class CreateUnitKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new unit kind. + * + * Generated from protobuf field string unit_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_kind_id = ''; + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_kind = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the unit kind. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unitKind Required. The desired state for the unit kind. + * @param string $unitKindId Required. The ID value for the new unit kind. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateUnitKindRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unitKind, string $unitKindId): self + { + return (new self()) + ->setParent($parent) + ->setUnitKind($unitKind) + ->setUnitKindId($unitKindId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit kind. + * @type string $unit_kind_id + * Required. The ID value for the new unit kind. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unit_kind + * Required. The desired state for the unit kind. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new unit kind. + * + * Generated from protobuf field string unit_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUnitKindId() + { + return $this->unit_kind_id; + } + + /** + * Required. The ID value for the new unit kind. + * + * Generated from protobuf field string unit_kind_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUnitKindId($var) + { + GPBUtil::checkString($var, True); + $this->unit_kind_id = $var; + + return $this; + } + + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind|null + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + public function hasUnitKind() + { + return isset($this->unit_kind); + } + + public function clearUnitKind() + { + unset($this->unit_kind); + } + + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind::class); + $this->unit_kind = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitOperationRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitOperationRequest.php new file mode 100644 index 000000000000..f580a1b67922 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitOperationRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitOperationRequest + */ +class CreateUnitOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new unit operation. + * + * Generated from protobuf field string unit_operation_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_operation_id = ''; + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_operation = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the unit operation. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unitOperation Required. The desired state for the unit operation. + * @param string $unitOperationId Required. The ID value for the new unit operation. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateUnitOperationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unitOperation, string $unitOperationId): self + { + return (new self()) + ->setParent($parent) + ->setUnitOperation($unitOperation) + ->setUnitOperationId($unitOperationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit operation. + * @type string $unit_operation_id + * Required. The ID value for the new unit operation. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unit_operation + * Required. The desired state for the unit operation. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new unit operation. + * + * Generated from protobuf field string unit_operation_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUnitOperationId() + { + return $this->unit_operation_id; + } + + /** + * Required. The ID value for the new unit operation. + * + * Generated from protobuf field string unit_operation_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUnitOperationId($var) + { + GPBUtil::checkString($var, True); + $this->unit_operation_id = $var; + + return $this; + } + + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation|null + */ + public function getUnitOperation() + { + return $this->unit_operation; + } + + public function hasUnitOperation() + { + return isset($this->unit_operation); + } + + public function clearUnitOperation() + { + unset($this->unit_operation); + } + + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $var + * @return $this + */ + public function setUnitOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation::class); + $this->unit_operation = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitRequest.php new file mode 100644 index 000000000000..d79e1730e0e8 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/CreateUnitRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.CreateUnitRequest + */ +class CreateUnitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID value for the new unit. + * + * Generated from protobuf field string unit_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_id = ''; + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent of the unit. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit Required. The desired state for the unit. + * @param string $unitId Required. The ID value for the new unit. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateUnitRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit, string $unitId): self + { + return (new self()) + ->setParent($parent) + ->setUnit($unit) + ->setUnitId($unitId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit. + * @type string $unit_id + * Required. The ID value for the new unit. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit + * Required. The desired state for the unit. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID value for the new unit. + * + * Generated from protobuf field string unit_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUnitId() + { + return $this->unit_id; + } + + /** + * Required. The ID value for the new unit. + * + * Generated from protobuf field string unit_id = 10503 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUnitId($var) + { + GPBUtil::checkString($var, True); + $this->unit_id = $var; + + return $this; + } + + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit|null + */ + public function getUnit() + { + return $this->unit; + } + + public function hasUnit() + { + return isset($this->unit); + } + + public function clearUnit() + { + unset($this->unit); + } + + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit::class); + $this->unit = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteReleaseRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteReleaseRequest.php new file mode 100644 index 000000000000..fef87cd28234 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteReleaseRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteReleaseRequest + */ +class DeleteReleaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the release. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the release. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::releaseName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteReleaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the release. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the release. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the release. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the release. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the release. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the release. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutKindRequest.php new file mode 100644 index 000000000000..ad6a5d40b6c6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutKindRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteRolloutKindRequest + */ +class DeleteRolloutKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the rollout kind. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutKindRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the rollout kind. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the rollout kind. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the rollout kind. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutRequest.php new file mode 100644 index 000000000000..e97d58a7097c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteRolloutRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteRolloutRequest + */ +class DeleteRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the rollout. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasRolloutsClient::rolloutName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the rollout. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the rollout. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the rollout. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the rollout. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteSaasRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteSaasRequest.php new file mode 100644 index 000000000000..59a44dd7ce1e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteSaasRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteSaasRequest + */ +class DeleteSaasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the saas. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the saas. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::saasName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteSaasRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the saas. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the saas. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the saas. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the saas. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the saas. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the saas. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteTenantRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteTenantRequest.php new file mode 100644 index 000000000000..5cf337d2146d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteTenantRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteTenantRequest + */ +class DeleteTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the tenant. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the tenant. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::tenantName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteTenantRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the tenant. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the tenant. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the tenant. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the tenant. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the tenant. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the tenant. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitKindRequest.php new file mode 100644 index 000000000000..3553d7797eb2 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitKindRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitKindRequest + */ +class DeleteUnitKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the unit kind. This + * is used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitKindName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteUnitKindRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the unit kind. This + * is used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the unit kind. This + * is used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the unit kind. This + * is used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit kind. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitOperationRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitOperationRequest.php new file mode 100644 index 000000000000..11260599536a --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitOperationRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitOperationRequest + */ +class DeleteUnitOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the unit operation. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit operation. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitOperationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteUnitOperationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the unit operation. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit operation. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the unit operation. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit operation. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the unit operation. + * This is used with state-changing methods to prevent accidental overwrites + * when multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit operation. The Any wildcard (`*`) requires that the + * resource must already exists, and the Not Any wildcard (`!*`) requires that + * it must not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitRequest.php new file mode 100644 index 000000000000..3ba457a9ee9e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DeleteUnitRequest.php @@ -0,0 +1,251 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DeleteUnitRequest + */ +class DeleteUnitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag known to the client for the expected state of the unit. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + */ + protected $etag = ''; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteUnitRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * @type string $etag + * The etag known to the client for the expected state of the unit. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The etag known to the client for the expected state of the unit. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag known to the client for the expected state of the unit. This is + * used with state-changing methods to prevent accidental overwrites when + * multiple user agents might be acting in parallel on the same resource. + * An etag wildcard provide optimistic concurrency based on the expected + * existence of the unit. The Any wildcard (`*`) requires that the resource + * must already exists, and the Not Any wildcard (`!*`) requires that it must + * not. + * + * Generated from protobuf field string etag = 10202; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Dependency.php b/SaasPlatformSaasServiceMgmt/src/V1/Dependency.php new file mode 100644 index 000000000000..a6a9e6b42956 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Dependency.php @@ -0,0 +1,101 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Dependency + */ +class Dependency extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The unit kind of the dependency. + * + * Generated from protobuf field string unit_kind = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $unit_kind = ''; + /** + * Required. An alias for the dependency. Used for input variable mapping. + * + * Generated from protobuf field string alias = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $alias = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $unit_kind + * Required. Immutable. The unit kind of the dependency. + * @type string $alias + * Required. An alias for the dependency. Used for input variable mapping. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The unit kind of the dependency. + * + * Generated from protobuf field string unit_kind = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + /** + * Required. Immutable. The unit kind of the dependency. + * + * Generated from protobuf field string unit_kind = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkString($var, True); + $this->unit_kind = $var; + + return $this; + } + + /** + * Required. An alias for the dependency. Used for input variable mapping. + * + * Generated from protobuf field string alias = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Required. An alias for the dependency. Used for input variable mapping. + * + * Generated from protobuf field string alias = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Deprovision.php b/SaasPlatformSaasServiceMgmt/src/V1/Deprovision.php new file mode 100644 index 000000000000..6aee9bfe2656 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Deprovision.php @@ -0,0 +1,35 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Deprovision + */ +class Deprovision extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/DurationLimits.php b/SaasPlatformSaasServiceMgmt/src/V1/DurationLimits.php new file mode 100644 index 000000000000..fe67120f1d9c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/DurationLimits.php @@ -0,0 +1,112 @@ +google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits + */ +class DurationLimits extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum duration a UnitOperation is allowed to execute in the + * RUNNING state. + * - Minimum value: 60 seconds (1 minute) + * - Maximum value: 604800 seconds (7 days) + * If this field is not set, or if the provided value falls outside the + * allowed range, the system will use a default timeout of 10800 seconds (3 + * hours). + * Upon exceeding this time limit, the UnitOperation will be best-effort + * cancelled, and its state will be set to FAILED. + * + * Generated from protobuf field .google.protobuf.Duration unit_operation_timeout = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unit_operation_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $unit_operation_timeout + * Optional. The maximum duration a UnitOperation is allowed to execute in the + * RUNNING state. + * - Minimum value: 60 seconds (1 minute) + * - Maximum value: 604800 seconds (7 days) + * If this field is not set, or if the provided value falls outside the + * allowed range, the system will use a default timeout of 10800 seconds (3 + * hours). + * Upon exceeding this time limit, the UnitOperation will be best-effort + * cancelled, and its state will be set to FAILED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum duration a UnitOperation is allowed to execute in the + * RUNNING state. + * - Minimum value: 60 seconds (1 minute) + * - Maximum value: 604800 seconds (7 days) + * If this field is not set, or if the provided value falls outside the + * allowed range, the system will use a default timeout of 10800 seconds (3 + * hours). + * Upon exceeding this time limit, the UnitOperation will be best-effort + * cancelled, and its state will be set to FAILED. + * + * Generated from protobuf field .google.protobuf.Duration unit_operation_timeout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getUnitOperationTimeout() + { + return $this->unit_operation_timeout; + } + + public function hasUnitOperationTimeout() + { + return isset($this->unit_operation_timeout); + } + + public function clearUnitOperationTimeout() + { + unset($this->unit_operation_timeout); + } + + /** + * Optional. The maximum duration a UnitOperation is allowed to execute in the + * RUNNING state. + * - Minimum value: 60 seconds (1 minute) + * - Maximum value: 604800 seconds (7 days) + * If this field is not set, or if the provided value falls outside the + * allowed range, the system will use a default timeout of 10800 seconds (3 + * hours). + * Upon exceeding this time limit, the UnitOperation will be best-effort + * cancelled, and its state will be set to FAILED. + * + * Generated from protobuf field .google.protobuf.Duration unit_operation_timeout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUnitOperationTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->unit_operation_timeout = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ErrorBudget.php b/SaasPlatformSaasServiceMgmt/src/V1/ErrorBudget.php new file mode 100644 index 000000000000..81fc2e7c50bb --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ErrorBudget.php @@ -0,0 +1,130 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ErrorBudget + */ +class ErrorBudget extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of failed units allowed in a location without + * pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allowed_count = null; + /** + * Optional. The maximum percentage of units allowed to fail (0, 100] within a + * location without pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_percentage = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allowed_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $allowed_count + * Optional. The maximum number of failed units allowed in a location without + * pausing the rollout. + * @type int $allowed_percentage + * Optional. The maximum percentage of units allowed to fail (0, 100] within a + * location without pausing the rollout. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of failed units allowed in a location without + * pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAllowedCount() + { + return isset($this->allowed_count) ? $this->allowed_count : 0; + } + + public function hasAllowedCount() + { + return isset($this->allowed_count); + } + + public function clearAllowedCount() + { + unset($this->allowed_count); + } + + /** + * Optional. The maximum number of failed units allowed in a location without + * pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAllowedCount($var) + { + GPBUtil::checkInt32($var); + $this->allowed_count = $var; + + return $this; + } + + /** + * Optional. The maximum percentage of units allowed to fail (0, 100] within a + * location without pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_percentage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAllowedPercentage() + { + return isset($this->allowed_percentage) ? $this->allowed_percentage : 0; + } + + public function hasAllowedPercentage() + { + return isset($this->allowed_percentage); + } + + public function clearAllowedPercentage() + { + unset($this->allowed_percentage); + } + + /** + * Optional. The maximum percentage of units allowed to fail (0, 100] within a + * location without pausing the rollout. + * + * Generated from protobuf field optional int32 allowed_percentage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAllowedPercentage($var) + { + GPBUtil::checkInt32($var); + $this->allowed_percentage = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/FromMapping.php b/SaasPlatformSaasServiceMgmt/src/V1/FromMapping.php new file mode 100644 index 000000000000..2313af8d0660 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/FromMapping.php @@ -0,0 +1,105 @@ +google.cloud.saasplatform.saasservicemgmt.v1.FromMapping + */ +class FromMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Alias of the dependency that the outputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dependency = ''; + /** + * Required. Name of the outputVariable on the dependency + * + * Generated from protobuf field string output_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_variable = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dependency + * Required. Alias of the dependency that the outputVariable will pass its + * value to + * @type string $output_variable + * Required. Name of the outputVariable on the dependency + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Alias of the dependency that the outputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDependency() + { + return $this->dependency; + } + + /** + * Required. Alias of the dependency that the outputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDependency($var) + { + GPBUtil::checkString($var, True); + $this->dependency = $var; + + return $this; + } + + /** + * Required. Name of the outputVariable on the dependency + * + * Generated from protobuf field string output_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputVariable() + { + return $this->output_variable; + } + + /** + * Required. Name of the outputVariable on the dependency + * + * Generated from protobuf field string output_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOutputVariable($var) + { + GPBUtil::checkString($var, True); + $this->output_variable = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/GetReleaseRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetReleaseRequest.php new file mode 100644 index 000000000000..11c3361f3849 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetReleaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetReleaseRequest + */ +class GetReleaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::releaseName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetReleaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutKindRequest.php new file mode 100644 index 000000000000..558332e6c239 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutKindRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetRolloutKindRequest + */ +class GetRolloutKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutKindRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutRequest.php new file mode 100644 index 000000000000..f6494fbaf2a6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetRolloutRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetRolloutRequest + */ +class GetRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasRolloutsClient::rolloutName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetSaasRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetSaasRequest.php new file mode 100644 index 000000000000..fa9f497289f0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetSaasRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetSaasRequest + */ +class GetSaasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::saasName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetSaasRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetTenantRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetTenantRequest.php new file mode 100644 index 000000000000..10713a9f6aff --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetTenantRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetTenantRequest + */ +class GetTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::tenantName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetTenantRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetUnitKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitKindRequest.php new file mode 100644 index 000000000000..c3081c97155b --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitKindRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetUnitKindRequest + */ +class GetUnitKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitKindName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetUnitKindRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetUnitOperationRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitOperationRequest.php new file mode 100644 index 000000000000..dbbbcf565911 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitOperationRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetUnitOperationRequest + */ +class GetUnitOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitOperationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetUnitOperationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/GetUnitRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitRequest.php new file mode 100644 index 000000000000..16101819ee11 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/GetUnitRequest.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.GetUnitRequest + */ +class GetUnitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the resource within a service. Please see + * {@see SaasDeploymentsClient::unitName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetUnitRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the resource within a service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the resource within a service. + * + * Generated from protobuf field string name = 10001 [(.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/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesRequest.php new file mode 100644 index 000000000000..142535911b2c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListReleasesRequest + */ +class ListReleasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of releases to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the release. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListReleasesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the release. + * @type int $page_size + * The maximum number of releases to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the release. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of releases to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of releases to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesResponse.php new file mode 100644 index 000000000000..e2edeb03add0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListReleasesResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListReleasesResponse + */ +class ListReleasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting releases. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Release releases = 10509; + */ + private $releases; + /** + * If present, the next page token can be provided to a subsequent + * ListReleases call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release[] $releases + * The resulting releases. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListReleases call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting releases. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Release releases = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release> + */ + public function getReleases() + { + return $this->releases; + } + + /** + * The resulting releases. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Release releases = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release[] $var + * @return $this + */ + public function setReleases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release::class); + $this->releases = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListReleases call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListReleases call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsRequest.php new file mode 100644 index 000000000000..5550d27b277d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutKindsRequest + */ +class ListRolloutKindsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of rollout kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the rollout kind. Please see + * {@see SaasRolloutsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutKindsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the rollout kind. + * @type int $page_size + * The maximum number of rollout kinds to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the rollout kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of rollout kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of rollout kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsResponse.php new file mode 100644 index 000000000000..642aad2c3349 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutKindsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutKindsResponse + */ +class ListRolloutKindsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting rollout kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kinds = 10509; + */ + private $rollout_kinds; + /** + * If present, the next page token can be provided to a subsequent + * ListRolloutKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind[] $rollout_kinds + * The resulting rollout kinds. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListRolloutKinds call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting rollout kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kinds = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind> + */ + public function getRolloutKinds() + { + return $this->rollout_kinds; + } + + /** + * The resulting rollout kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kinds = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind[] $var + * @return $this + */ + public function setRolloutKinds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind::class); + $this->rollout_kinds = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListRolloutKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListRolloutKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsRequest.php new file mode 100644 index 000000000000..b366f170dd70 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutsRequest + */ +class ListRolloutsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of rollouts to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the rollout. Please see + * {@see SaasRolloutsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the rollout. + * @type int $page_size + * The maximum number of rollouts to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the rollout. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of rollouts to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of rollouts to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsResponse.php new file mode 100644 index 000000000000..d10169066e08 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListRolloutsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListRolloutsResponse + */ +class ListRolloutsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting rollouts. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollouts = 10509; + */ + private $rollouts; + /** + * If present, the next page token can be provided to a subsequent + * ListRollouts call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout[] $rollouts + * The resulting rollouts. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListRollouts call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting rollouts. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollouts = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout> + */ + public function getRollouts() + { + return $this->rollouts; + } + + /** + * The resulting rollouts. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollouts = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout[] $var + * @return $this + */ + public function setRollouts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout::class); + $this->rollouts = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListRollouts call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListRollouts call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListSaasRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListSaasRequest.php new file mode 100644 index 000000000000..60ea2a9babd3 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListSaasRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListSaasRequest + */ +class ListSaasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of saas to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the saas. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListSaasRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the saas. + * @type int $page_size + * The maximum number of saas to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the saas. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of saas to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of saas to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListSaasResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListSaasResponse.php new file mode 100644 index 000000000000..2693a2affa32 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListSaasResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListSaasResponse + */ +class ListSaasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting saas. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10509; + */ + private $saas; + /** + * If present, the next page token can be provided to a subsequent + * ListSaas call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas[] $saas + * The resulting saas. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListSaas call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting saas. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas> + */ + public function getSaas() + { + return $this->saas; + } + + /** + * The resulting saas. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas[] $var + * @return $this + */ + public function setSaas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas::class); + $this->saas = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListSaas call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListSaas call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsRequest.php new file mode 100644 index 000000000000..a0a2f124fb34 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListTenantsRequest + */ +class ListTenantsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of tenants to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the tenant. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListTenantsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the tenant. + * @type int $page_size + * The maximum number of tenants to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the tenant. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of tenants to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of tenants to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsResponse.php new file mode 100644 index 000000000000..df2263512bae --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListTenantsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListTenantsResponse + */ +class ListTenantsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting tenants. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenants = 10509; + */ + private $tenants; + /** + * If present, the next page token can be provided to a subsequent + * ListTenants call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant[] $tenants + * The resulting tenants. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListTenants call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting tenants. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenants = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant> + */ + public function getTenants() + { + return $this->tenants; + } + + /** + * The resulting tenants. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenants = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant[] $var + * @return $this + */ + public function setTenants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant::class); + $this->tenants = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListTenants call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListTenants call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsRequest.php new file mode 100644 index 000000000000..6eb32e7ab42d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitKindsRequest + */ +class ListUnitKindsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of unit kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the unit kind. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitKindsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit kind. + * @type int $page_size + * The maximum number of unit kinds to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit kind. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of unit kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of unit kinds to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsResponse.php new file mode 100644 index 000000000000..1696a7b64f6e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitKindsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitKindsResponse + */ +class ListUnitKindsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting unit kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kinds = 10509; + */ + private $unit_kinds; + /** + * If present, the next page token can be provided to a subsequent + * ListUnitKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind[] $unit_kinds + * The resulting unit kinds. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListUnitKinds call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting unit kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kinds = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind> + */ + public function getUnitKinds() + { + return $this->unit_kinds; + } + + /** + * The resulting unit kinds. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kinds = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind[] $var + * @return $this + */ + public function setUnitKinds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind::class); + $this->unit_kinds = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnitKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnitKinds call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsRequest.php new file mode 100644 index 000000000000..f38611b6de60 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitOperationsRequest + */ +class ListUnitOperationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of unit operations to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the unit operation. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitOperationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit operation. + * @type int $page_size + * The maximum number of unit operations to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit operation. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of unit operations to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of unit operations to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsResponse.php new file mode 100644 index 000000000000..cd2b5dabe470 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitOperationsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitOperationsResponse + */ +class ListUnitOperationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting unit operations. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operations = 10509; + */ + private $unit_operations; + /** + * If present, the next page token can be provided to a subsequent + * ListUnitOperations call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation[] $unit_operations + * The resulting unit operations. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListUnitOperations call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting unit operations. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operations = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation> + */ + public function getUnitOperations() + { + return $this->unit_operations; + } + + /** + * The resulting unit operations. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operations = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation[] $var + * @return $this + */ + public function setUnitOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation::class); + $this->unit_operations = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnitOperations call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnitOperations call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsRequest.php new file mode 100644 index 000000000000..ae93a63fe028 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsRequest.php @@ -0,0 +1,221 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitsRequest + */ +class ListUnitsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of units to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + */ + protected $page_size = 0; + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + */ + protected $page_token = ''; + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + */ + protected $filter = ''; + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent of the unit. Please see + * {@see SaasDeploymentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the unit. + * @type int $page_size + * The maximum number of units to send per page. + * @type string $page_token + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * @type string $filter + * Filter the list as specified in https://google.aip.dev/160. + * @type string $order_by + * Order results as specified in https://google.aip.dev/132. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the unit. + * + * Generated from protobuf field string parent = 10006 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of units to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of units to send per page. + * + * Generated from protobuf field int32 page_size = 10505; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token: If the next_page_token from a previous response + * is provided, this request will send the subsequent page. + * + * Generated from protobuf field string page_token = 10506; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter the list as specified in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 10507; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order results as specified in https://google.aip.dev/132. + * + * Generated from protobuf field string order_by = 10508; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsResponse.php b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsResponse.php new file mode 100644 index 000000000000..8b05252991b1 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ListUnitsResponse.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ListUnitsResponse + */ +class ListUnitsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting units. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Unit units = 10509; + */ + private $units; + /** + * If present, the next page token can be provided to a subsequent + * ListUnits call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit[] $units + * The resulting units. + * @type string $next_page_token + * If present, the next page token can be provided to a subsequent + * ListUnits call to list the next page. + * If empty, there are no more pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * The resulting units. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Unit units = 10509; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit> + */ + public function getUnits() + { + return $this->units; + } + + /** + * The resulting units. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Unit units = 10509; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit[] $var + * @return $this + */ + public function setUnits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit::class); + $this->units = $arr; + + return $this; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnits call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If present, the next page token can be provided to a subsequent + * ListUnits call to list the next page. + * If empty, there are no more pages. + * + * Generated from protobuf field string next_page_token = 10510; + * @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 = 10511; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 10511; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Location.php b/SaasPlatformSaasServiceMgmt/src/V1/Location.php new file mode 100644 index 000000000000..02038cd1dcc9 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Location.php @@ -0,0 +1,67 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of location. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of location. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of location. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Provision.php b/SaasPlatformSaasServiceMgmt/src/V1/Provision.php new file mode 100644 index 000000000000..a0b6e104aaa5 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Provision.php @@ -0,0 +1,103 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Provision + */ +class Provision extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $release = ''; + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_variables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $release + * Optional. Reference to the Release object to use for the Unit. (optional). + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $input_variables + * Optional. Set of input variables. Maximum 100. (optional) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRelease() + { + return $this->release; + } + + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkString($var, True); + $this->release = $var; + + return $this; + } + + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getInputVariables() + { + return $this->input_variables; + } + + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setInputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->input_variables = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Release.php b/SaasPlatformSaasServiceMgmt/src/V1/Release.php new file mode 100644 index 000000000000..3a29933300c8 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Release.php @@ -0,0 +1,644 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Release + */ +class Release extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/releases/{release}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Immutable. Reference to the UnitKind this Release corresponds to + * (required and immutable once created). + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $unit_kind = ''; + /** + * Optional. Blueprints are OCI Images that contain all of the artifacts + * needed to provision a unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $blueprint = null; + /** + * Optional. Set of requirements to be fulfilled on the Unit when using this + * Release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release.ReleaseRequirements release_requirements = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $release_requirements = null; + /** + * Optional. Output only. List of input variables declared on the blueprint + * and can be present with their values on the unit spec + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $input_variables; + /** + * Optional. Output only. List of output variables declared on the blueprint + * and can be present with their values on the unit status + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $output_variables; + /** + * Optional. Mapping of input variables to default values. Maximum 100 + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variable_defaults = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_variable_defaults; + /** + * Output only. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $application_template_component = null; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/releases/{release}" + * @type string $unit_kind + * Required. Immutable. Reference to the UnitKind this Release corresponds to + * (required and immutable once created). + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Blueprint $blueprint + * Optional. Blueprints are OCI Images that contain all of the artifacts + * needed to provision a unit. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release\ReleaseRequirements $release_requirements + * Optional. Set of requirements to be fulfilled on the Unit when using this + * Release. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $input_variables + * Optional. Output only. List of input variables declared on the blueprint + * and can be present with their values on the unit spec + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $output_variables + * Optional. Output only. List of output variables declared on the blueprint + * and can be present with their values on the unit status + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $input_variable_defaults + * Optional. Mapping of input variables to default values. Maximum 100 + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef $application_template_component + * Output only. Reference to component and revision in a composite + * ApplicationTemplate. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/releases/{release}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/releases/{release}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. Reference to the UnitKind this Release corresponds to + * (required and immutable once created). + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + /** + * Required. Immutable. Reference to the UnitKind this Release corresponds to + * (required and immutable once created). + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkString($var, True); + $this->unit_kind = $var; + + return $this; + } + + /** + * Optional. Blueprints are OCI Images that contain all of the artifacts + * needed to provision a unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Blueprint|null + */ + public function getBlueprint() + { + return $this->blueprint; + } + + public function hasBlueprint() + { + return isset($this->blueprint); + } + + public function clearBlueprint() + { + unset($this->blueprint); + } + + /** + * Optional. Blueprints are OCI Images that contain all of the artifacts + * needed to provision a unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Blueprint $var + * @return $this + */ + public function setBlueprint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Blueprint::class); + $this->blueprint = $var; + + return $this; + } + + /** + * Optional. Set of requirements to be fulfilled on the Unit when using this + * Release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release.ReleaseRequirements release_requirements = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release\ReleaseRequirements|null + */ + public function getReleaseRequirements() + { + return $this->release_requirements; + } + + public function hasReleaseRequirements() + { + return isset($this->release_requirements); + } + + public function clearReleaseRequirements() + { + unset($this->release_requirements); + } + + /** + * Optional. Set of requirements to be fulfilled on the Unit when using this + * Release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release.ReleaseRequirements release_requirements = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release\ReleaseRequirements $var + * @return $this + */ + public function setReleaseRequirements($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release\ReleaseRequirements::class); + $this->release_requirements = $var; + + return $this; + } + + /** + * Optional. Output only. List of input variables declared on the blueprint + * and can be present with their values on the unit spec + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getInputVariables() + { + return $this->input_variables; + } + + /** + * Optional. Output only. List of input variables declared on the blueprint + * and can be present with their values on the unit spec + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setInputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->input_variables = $arr; + + return $this; + } + + /** + * Optional. Output only. List of output variables declared on the blueprint + * and can be present with their values on the unit status + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getOutputVariables() + { + return $this->output_variables; + } + + /** + * Optional. Output only. List of output variables declared on the blueprint + * and can be present with their values on the unit status + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setOutputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->output_variables = $arr; + + return $this; + } + + /** + * Optional. Mapping of input variables to default values. Maximum 100 + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variable_defaults = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getInputVariableDefaults() + { + return $this->input_variable_defaults; + } + + /** + * Optional. Mapping of input variables to default values. Maximum 100 + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variable_defaults = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setInputVariableDefaults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->input_variable_defaults = $arr; + + return $this; + } + + /** + * Output only. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef|null + */ + public function getApplicationTemplateComponent() + { + return $this->application_template_component; + } + + public function hasApplicationTemplateComponent() + { + return isset($this->application_template_component); + } + + public function clearApplicationTemplateComponent() + { + unset($this->application_template_component); + } + + /** + * Output only. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef $var + * @return $this + */ + public function setApplicationTemplateComponent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef::class); + $this->application_template_component = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Release/ReleaseRequirements.php b/SaasPlatformSaasServiceMgmt/src/V1/Release/ReleaseRequirements.php new file mode 100644 index 000000000000..ef43baed35ab --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Release/ReleaseRequirements.php @@ -0,0 +1,79 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Release.ReleaseRequirements + */ +class ReleaseRequirements extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of releases from which a unit can be upgraded to this + * one (optional). If left empty no constraints will be applied. When + * provided, unit upgrade requests to this release will check and enforce + * this constraint. + * + * Generated from protobuf field repeated string upgradeable_from_releases = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $upgradeable_from_releases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $upgradeable_from_releases + * Optional. A list of releases from which a unit can be upgraded to this + * one (optional). If left empty no constraints will be applied. When + * provided, unit upgrade requests to this release will check and enforce + * this constraint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of releases from which a unit can be upgraded to this + * one (optional). If left empty no constraints will be applied. When + * provided, unit upgrade requests to this release will check and enforce + * this constraint. + * + * Generated from protobuf field repeated string upgradeable_from_releases = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getUpgradeableFromReleases() + { + return $this->upgradeable_from_releases; + } + + /** + * Optional. A list of releases from which a unit can be upgraded to this + * one (optional). If left empty no constraints will be applied. When + * provided, unit upgrade requests to this release will check and enforce + * this constraint. + * + * Generated from protobuf field repeated string upgradeable_from_releases = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setUpgradeableFromReleases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->upgradeable_from_releases = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Rollout.php b/SaasPlatformSaasServiceMgmt/src/V1/Rollout.php new file mode 100644 index 000000000000..d26c119067ba --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Rollout.php @@ -0,0 +1,1073 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Rollout + */ +class Rollout extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollout/{rollout_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Immutable. Name of the Release that gets rolled out to target + * Units. Required if no other type of release is specified. + * + * Generated from protobuf field string release = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $release = ''; + /** + * Optional. Output only. The time when the rollout started executing. Will be + * empty if the rollout hasn't started yet. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Optional. Output only. The time when the rollout finished execution + * (regardless of success, failure, or cancellation). Will be empty if the + * rollout hasn't finished yet. Once set, the rollout is in terminal state and + * all the results are final. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Current state of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout.RolloutState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Human readable message indicating details about the last state + * transition. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Optional. Output only. The time when the rollout transitioned into its + * current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_transition_time = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_transition_time = null; + /** + * Optional. Output only. The root rollout that this rollout is stemming from. + * The resource name (full URI of the resource) following the standard naming + * scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string root_rollout = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $root_rollout = ''; + /** + * Optional. Output only. The direct parent rollout that this rollout is + * stemming from. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string parent_rollout = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $parent_rollout = ''; + /** + * Optional. The strategy used for executing this Rollout. + * This strategy will override whatever strategy is specified in the + * RolloutKind. If not specified on creation, the + * strategy from RolloutKind will be used. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the targeted UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rollout_orchestration_strategy = ''; + /** + * Optional. CEL(https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. If not provided, the unit_filter from the RolloutKind will be + * used. + * + * Generated from protobuf field string unit_filter = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unit_filter = ''; + /** + * Required. Immutable. Name of the RolloutKind this rollout is stemming from + * and adhering to. + * + * Generated from protobuf field string rollout_kind = 22 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $rollout_kind = ''; + /** + * Optional. Output only. Details about the progress of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutStats stats = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $stats = null; + /** + * Optional. Requested change to the execution of this rollout. + * Default RolloutControl.action is ROLLOUT_ACTION_RUN meaning + * the rollout will be executed to completion while progressing through + * all natural Rollout States (such as RUNNING -> SUCCEEDED or RUNNING -> + * FAILED). Requests can only be made when the Rollout is in a non-terminal + * state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl control = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $control = null; + /** + * Optional. Output only. Output only snapshot of the effective unit filter at + * Rollout start time. Contains a CEL(https://github.com/google/cel-spec) + * expression consisting of a conjunction of Rollout.unit_filter and + * RolloutKind.unit_filter. This field captures the filter applied by the + * Rollout to determine the Unit population. If the associated RolloutKind's + * unit_filter is modified after the rollout is started, it will not be + * updated here. + * + * Generated from protobuf field string effective_unit_filter = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_unit_filter = ''; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollout/{rollout_id}" + * @type string $release + * Optional. Immutable. Name of the Release that gets rolled out to target + * Units. Required if no other type of release is specified. + * @type \Google\Protobuf\Timestamp $start_time + * Optional. Output only. The time when the rollout started executing. Will be + * empty if the rollout hasn't started yet. + * @type \Google\Protobuf\Timestamp $end_time + * Optional. Output only. The time when the rollout finished execution + * (regardless of success, failure, or cancellation). Will be empty if the + * rollout hasn't finished yet. Once set, the rollout is in terminal state and + * all the results are final. + * @type int $state + * Output only. Current state of the rollout. + * @type string $state_message + * Output only. Human readable message indicating details about the last state + * transition. + * @type \Google\Protobuf\Timestamp $state_transition_time + * Optional. Output only. The time when the rollout transitioned into its + * current state. + * @type string $root_rollout + * Optional. Output only. The root rollout that this rollout is stemming from. + * The resource name (full URI of the resource) following the standard naming + * scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * @type string $parent_rollout + * Optional. Output only. The direct parent rollout that this rollout is + * stemming from. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * @type string $rollout_orchestration_strategy + * Optional. The strategy used for executing this Rollout. + * This strategy will override whatever strategy is specified in the + * RolloutKind. If not specified on creation, the + * strategy from RolloutKind will be used. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the targeted UnitKind's Saas Locations. + * @type string $unit_filter + * Optional. CEL(https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. If not provided, the unit_filter from the RolloutKind will be + * used. + * @type string $rollout_kind + * Required. Immutable. Name of the RolloutKind this rollout is stemming from + * and adhering to. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutStats $stats + * Optional. Output only. Details about the progress of the rollout. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl $control + * Optional. Requested change to the execution of this rollout. + * Default RolloutControl.action is ROLLOUT_ACTION_RUN meaning + * the rollout will be executed to completion while progressing through + * all natural Rollout States (such as RUNNING -> SUCCEEDED or RUNNING -> + * FAILED). Requests can only be made when the Rollout is in a non-terminal + * state. + * @type string $effective_unit_filter + * Optional. Output only. Output only snapshot of the effective unit filter at + * Rollout start time. Contains a CEL(https://github.com/google/cel-spec) + * expression consisting of a conjunction of Rollout.unit_filter and + * RolloutKind.unit_filter. This field captures the filter applied by the + * Rollout to determine the Unit population. If the associated RolloutKind's + * unit_filter is modified after the rollout is started, it will not be + * updated here. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollout/{rollout_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollout/{rollout_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Immutable. Name of the Release that gets rolled out to target + * Units. Required if no other type of release is specified. + * + * Generated from protobuf field string release = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getRelease() + { + return $this->release; + } + + /** + * Optional. Immutable. Name of the Release that gets rolled out to target + * Units. Required if no other type of release is specified. + * + * Generated from protobuf field string release = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkString($var, True); + $this->release = $var; + + return $this; + } + + /** + * Optional. Output only. The time when the rollout started executing. Will be + * empty if the rollout hasn't started yet. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. Output only. The time when the rollout started executing. Will be + * empty if the rollout hasn't started yet. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Optional. Output only. The time when the rollout finished execution + * (regardless of success, failure, or cancellation). Will be empty if the + * rollout hasn't finished yet. Once set, the rollout is in terminal state and + * all the results are final. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OPTIONAL, (.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); + } + + /** + * Optional. Output only. The time when the rollout finished execution + * (regardless of success, failure, or cancellation). Will be empty if the + * rollout hasn't finished yet. Once set, the rollout is in terminal state and + * all the results are final. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OPTIONAL, (.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. Current state of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout.RolloutState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout.RolloutState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout\RolloutState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Human readable message indicating details about the last state + * transition. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. Human readable message indicating details about the last state + * transition. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * Optional. Output only. The time when the rollout transitioned into its + * current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_transition_time = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTransitionTime() + { + return $this->state_transition_time; + } + + public function hasStateTransitionTime() + { + return isset($this->state_transition_time); + } + + public function clearStateTransitionTime() + { + unset($this->state_transition_time); + } + + /** + * Optional. Output only. The time when the rollout transitioned into its + * current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_transition_time = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTransitionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_transition_time = $var; + + return $this; + } + + /** + * Optional. Output only. The root rollout that this rollout is stemming from. + * The resource name (full URI of the resource) following the standard naming + * scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string root_rollout = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRootRollout() + { + return $this->root_rollout; + } + + /** + * Optional. Output only. The root rollout that this rollout is stemming from. + * The resource name (full URI of the resource) following the standard naming + * scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string root_rollout = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRootRollout($var) + { + GPBUtil::checkString($var, True); + $this->root_rollout = $var; + + return $this; + } + + /** + * Optional. Output only. The direct parent rollout that this rollout is + * stemming from. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string parent_rollout = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getParentRollout() + { + return $this->parent_rollout; + } + + /** + * Optional. Output only. The direct parent rollout that this rollout is + * stemming from. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rollouts/{rollout_id}" + * + * Generated from protobuf field string parent_rollout = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParentRollout($var) + { + GPBUtil::checkString($var, True); + $this->parent_rollout = $var; + + return $this; + } + + /** + * Optional. The strategy used for executing this Rollout. + * This strategy will override whatever strategy is specified in the + * RolloutKind. If not specified on creation, the + * strategy from RolloutKind will be used. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the targeted UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRolloutOrchestrationStrategy() + { + return $this->rollout_orchestration_strategy; + } + + /** + * Optional. The strategy used for executing this Rollout. + * This strategy will override whatever strategy is specified in the + * RolloutKind. If not specified on creation, the + * strategy from RolloutKind will be used. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the targeted UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRolloutOrchestrationStrategy($var) + { + GPBUtil::checkString($var, True); + $this->rollout_orchestration_strategy = $var; + + return $this; + } + + /** + * Optional. CEL(https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. If not provided, the unit_filter from the RolloutKind will be + * used. + * + * Generated from protobuf field string unit_filter = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUnitFilter() + { + return $this->unit_filter; + } + + /** + * Optional. CEL(https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. If not provided, the unit_filter from the RolloutKind will be + * used. + * + * Generated from protobuf field string unit_filter = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUnitFilter($var) + { + GPBUtil::checkString($var, True); + $this->unit_filter = $var; + + return $this; + } + + /** + * Required. Immutable. Name of the RolloutKind this rollout is stemming from + * and adhering to. + * + * Generated from protobuf field string rollout_kind = 22 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getRolloutKind() + { + return $this->rollout_kind; + } + + /** + * Required. Immutable. Name of the RolloutKind this rollout is stemming from + * and adhering to. + * + * Generated from protobuf field string rollout_kind = 22 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRolloutKind($var) + { + GPBUtil::checkString($var, True); + $this->rollout_kind = $var; + + return $this; + } + + /** + * Optional. Output only. Details about the progress of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutStats stats = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Optional. Output only. Details about the progress of the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutStats stats = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutStats::class); + $this->stats = $var; + + return $this; + } + + /** + * Optional. Requested change to the execution of this rollout. + * Default RolloutControl.action is ROLLOUT_ACTION_RUN meaning + * the rollout will be executed to completion while progressing through + * all natural Rollout States (such as RUNNING -> SUCCEEDED or RUNNING -> + * FAILED). Requests can only be made when the Rollout is in a non-terminal + * state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl control = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl|null + */ + public function getControl() + { + return $this->control; + } + + public function hasControl() + { + return isset($this->control); + } + + public function clearControl() + { + unset($this->control); + } + + /** + * Optional. Requested change to the execution of this rollout. + * Default RolloutControl.action is ROLLOUT_ACTION_RUN meaning + * the rollout will be executed to completion while progressing through + * all natural Rollout States (such as RUNNING -> SUCCEEDED or RUNNING -> + * FAILED). Requests can only be made when the Rollout is in a non-terminal + * state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl control = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl::class); + $this->control = $var; + + return $this; + } + + /** + * Optional. Output only. Output only snapshot of the effective unit filter at + * Rollout start time. Contains a CEL(https://github.com/google/cel-spec) + * expression consisting of a conjunction of Rollout.unit_filter and + * RolloutKind.unit_filter. This field captures the filter applied by the + * Rollout to determine the Unit population. If the associated RolloutKind's + * unit_filter is modified after the rollout is started, it will not be + * updated here. + * + * Generated from protobuf field string effective_unit_filter = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEffectiveUnitFilter() + { + return $this->effective_unit_filter; + } + + /** + * Optional. Output only. Output only snapshot of the effective unit filter at + * Rollout start time. Contains a CEL(https://github.com/google/cel-spec) + * expression consisting of a conjunction of Rollout.unit_filter and + * RolloutKind.unit_filter. This field captures the filter applied by the + * Rollout to determine the Unit population. If the associated RolloutKind's + * unit_filter is modified after the rollout is started, it will not be + * updated here. + * + * Generated from protobuf field string effective_unit_filter = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEffectiveUnitFilter($var) + { + GPBUtil::checkString($var, True); + $this->effective_unit_filter = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Rollout/RolloutState.php b/SaasPlatformSaasServiceMgmt/src/V1/Rollout/RolloutState.php new file mode 100644 index 000000000000..ad0499e2e235 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Rollout/RolloutState.php @@ -0,0 +1,110 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Rollout.RolloutState + */ +class RolloutState +{ + /** + * Unspecified state. + * + * Generated from protobuf enum ROLLOUT_STATE_UNSPECIFIED = 0; + */ + const ROLLOUT_STATE_UNSPECIFIED = 0; + /** + * Rollout is in progress. + * + * Generated from protobuf enum ROLLOUT_STATE_RUNNING = 1; + */ + const ROLLOUT_STATE_RUNNING = 1; + /** + * Rollout has been paused. + * + * Generated from protobuf enum ROLLOUT_STATE_PAUSED = 2; + */ + const ROLLOUT_STATE_PAUSED = 2; + /** + * Rollout completed successfully. + * + * Generated from protobuf enum ROLLOUT_STATE_SUCCEEDED = 3; + */ + const ROLLOUT_STATE_SUCCEEDED = 3; + /** + * Rollout has failed. + * + * Generated from protobuf enum ROLLOUT_STATE_FAILED = 4; + */ + const ROLLOUT_STATE_FAILED = 4; + /** + * Rollout has been canceled. + * + * Generated from protobuf enum ROLLOUT_STATE_CANCELLED = 5; + */ + const ROLLOUT_STATE_CANCELLED = 5; + /** + * Rollout is waiting for some condition to be met before starting. + * + * Generated from protobuf enum ROLLOUT_STATE_WAITING = 6; + */ + const ROLLOUT_STATE_WAITING = 6; + /** + * Rollout is being canceled. + * + * Generated from protobuf enum ROLLOUT_STATE_CANCELLING = 7; + */ + const ROLLOUT_STATE_CANCELLING = 7; + /** + * Rollout is being resumed. + * + * Generated from protobuf enum ROLLOUT_STATE_RESUMING = 8; + */ + const ROLLOUT_STATE_RESUMING = 8; + /** + * Rollout is being paused. + * + * Generated from protobuf enum ROLLOUT_STATE_PAUSING = 9; + */ + const ROLLOUT_STATE_PAUSING = 9; + + private static $valueToName = [ + self::ROLLOUT_STATE_UNSPECIFIED => 'ROLLOUT_STATE_UNSPECIFIED', + self::ROLLOUT_STATE_RUNNING => 'ROLLOUT_STATE_RUNNING', + self::ROLLOUT_STATE_PAUSED => 'ROLLOUT_STATE_PAUSED', + self::ROLLOUT_STATE_SUCCEEDED => 'ROLLOUT_STATE_SUCCEEDED', + self::ROLLOUT_STATE_FAILED => 'ROLLOUT_STATE_FAILED', + self::ROLLOUT_STATE_CANCELLED => 'ROLLOUT_STATE_CANCELLED', + self::ROLLOUT_STATE_WAITING => 'ROLLOUT_STATE_WAITING', + self::ROLLOUT_STATE_CANCELLING => 'ROLLOUT_STATE_CANCELLING', + self::ROLLOUT_STATE_RESUMING => 'ROLLOUT_STATE_RESUMING', + self::ROLLOUT_STATE_PAUSING => 'ROLLOUT_STATE_PAUSING', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/RolloutAction.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutAction.php new file mode 100644 index 000000000000..b1c746fc17ca --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutAction.php @@ -0,0 +1,73 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutAction + */ +class RolloutAction +{ + /** + * Unspecified action, will be treated as RUN by default. + * + * Generated from protobuf enum ROLLOUT_ACTION_UNSPECIFIED = 0; + */ + const ROLLOUT_ACTION_UNSPECIFIED = 0; + /** + * Run the Rollout until it naturally reaches a terminal state. + * A rollout requested to run will progress through all natural Rollout + * States (such as RUNNING -> SUCCEEDED or RUNNING -> FAILED). + * If retriable errors are encountered during the rollout, the rollout + * will paused by default and can be resumed by re-requesting this RUN + * action. + * + * Generated from protobuf enum ROLLOUT_ACTION_RUN = 1; + */ + const ROLLOUT_ACTION_RUN = 1; + /** + * Pause the Rollout until it is resumed (i.e. RUN is requested). + * + * Generated from protobuf enum ROLLOUT_ACTION_PAUSE = 2; + */ + const ROLLOUT_ACTION_PAUSE = 2; + /** + * Cancel the Rollout permanently. + * + * Generated from protobuf enum ROLLOUT_ACTION_CANCEL = 3; + */ + const ROLLOUT_ACTION_CANCEL = 3; + + private static $valueToName = [ + self::ROLLOUT_ACTION_UNSPECIFIED => 'ROLLOUT_ACTION_UNSPECIFIED', + self::ROLLOUT_ACTION_RUN => 'ROLLOUT_ACTION_RUN', + self::ROLLOUT_ACTION_PAUSE => 'ROLLOUT_ACTION_PAUSE', + self::ROLLOUT_ACTION_CANCEL => 'ROLLOUT_ACTION_CANCEL', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl.php new file mode 100644 index 000000000000..a4e68cc0818c --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl.php @@ -0,0 +1,124 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl + */ +class RolloutControl extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Action to be performed on the Rollout. + * The default behavior is to run the rollout until it naturally reaches a + * terminal state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutAction action = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + protected $action_params; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl\RunRolloutActionParams $run_params + * Optional. Parameters for the RUN action. It is an error to specify this + * if the RolloutAction is not set to RUN. By default, the rollout will + * retry failed operations when resumed. + * @type int $action + * Required. Action to be performed on the Rollout. + * The default behavior is to run the rollout until it naturally reaches a + * terminal state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Parameters for the RUN action. It is an error to specify this + * if the RolloutAction is not set to RUN. By default, the rollout will + * retry failed operations when resumed. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl.RunRolloutActionParams run_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl\RunRolloutActionParams|null + */ + public function getRunParams() + { + return $this->readOneof(2); + } + + public function hasRunParams() + { + return $this->hasOneof(2); + } + + /** + * Optional. Parameters for the RUN action. It is an error to specify this + * if the RolloutAction is not set to RUN. By default, the rollout will + * retry failed operations when resumed. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl.RunRolloutActionParams run_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl\RunRolloutActionParams $var + * @return $this + */ + public function setRunParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutControl\RunRolloutActionParams::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Action to be performed on the Rollout. + * The default behavior is to run the rollout until it naturally reaches a + * terminal state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutAction action = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. Action to be performed on the Rollout. + * The default behavior is to run the rollout until it naturally reaches a + * terminal state. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutAction action = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutAction::class); + $this->action = $var; + + return $this; + } + + /** + * @return string + */ + public function getActionParams() + { + return $this->whichOneof("action_params"); + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl/RunRolloutActionParams.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl/RunRolloutActionParams.php new file mode 100644 index 000000000000..9e0026fdc1de --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutControl/RunRolloutActionParams.php @@ -0,0 +1,76 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutControl.RunRolloutActionParams + */ +class RunRolloutActionParams extends \Google\Protobuf\Internal\Message +{ + /** + * Required. If true, the rollout will retry failed operations when resumed. + * This is applicable only the current state of the Rollout is PAUSED and + * the requested action is RUN. + * + * Generated from protobuf field bool retry_failed_operations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $retry_failed_operations = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $retry_failed_operations + * Required. If true, the rollout will retry failed operations when resumed. + * This is applicable only the current state of the Rollout is PAUSED and + * the requested action is RUN. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. If true, the rollout will retry failed operations when resumed. + * This is applicable only the current state of the Rollout is PAUSED and + * the requested action is RUN. + * + * Generated from protobuf field bool retry_failed_operations = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getRetryFailedOperations() + { + return $this->retry_failed_operations; + } + + /** + * Required. If true, the rollout will retry failed operations when resumed. + * This is applicable only the current state of the Rollout is PAUSED and + * the requested action is RUN. + * + * Generated from protobuf field bool retry_failed_operations = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setRetryFailedOperations($var) + { + GPBUtil::checkBool($var); + $this->retry_failed_operations = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind.php new file mode 100644 index 000000000000..6cd33eb8ac1a --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind.php @@ -0,0 +1,644 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind + */ +class RolloutKind extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Immutable. UnitKind that this rollout kind corresponds to. + * Rollouts stemming from this rollout kind will target the units of this unit + * kind. In other words, this defines the population of target units to be + * upgraded by rollouts. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $unit_kind = ''; + /** + * Optional. The strategy used for executing a Rollout. This is a required + * field. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the associated UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rollout_orchestration_strategy = ''; + /** + * Optional. [CEL](https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. + * + * Generated from protobuf field string unit_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unit_filter = ''; + /** + * Optional. The config for updating the unit kind. By default, the unit kind + * will be updated on the rollout start. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.UpdateUnitKindStrategy update_unit_kind_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_unit_kind_strategy = 0; + /** + * Optional. The configuration for error budget. If the number of failed units + * exceeds max(allowed_count, allowed_ratio * total_units), the rollout will + * be paused. If not set, all units will be attempted to be updated regardless + * of the number of failures encountered. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.ErrorBudget error_budget = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $error_budget = null; + /** + * Optional. Settings for controlling the pacing of rollouts i.e. the number + * of units to be rolled out in parallel in a region. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.UnitUpdatePacing unit_update_pacing = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unit_update_pacing = null; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" + * @type string $unit_kind + * Optional. Immutable. UnitKind that this rollout kind corresponds to. + * Rollouts stemming from this rollout kind will target the units of this unit + * kind. In other words, this defines the population of target units to be + * upgraded by rollouts. + * @type string $rollout_orchestration_strategy + * Optional. The strategy used for executing a Rollout. This is a required + * field. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the associated UnitKind's Saas Locations. + * @type string $unit_filter + * Optional. [CEL](https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. + * @type int $update_unit_kind_strategy + * Optional. The config for updating the unit kind. By default, the unit kind + * will be updated on the rollout start. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ErrorBudget $error_budget + * Optional. The configuration for error budget. If the number of failed units + * exceeds max(allowed_count, allowed_ratio * total_units), the rollout will + * be paused. If not set, all units will be attempted to be updated regardless + * of the number of failures encountered. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitUpdatePacing $unit_update_pacing + * Optional. Settings for controlling the pacing of rollouts i.e. the number + * of units to be rolled out in parallel in a region. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Immutable. UnitKind that this rollout kind corresponds to. + * Rollouts stemming from this rollout kind will target the units of this unit + * kind. In other words, this defines the population of target units to be + * upgraded by rollouts. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + /** + * Optional. Immutable. UnitKind that this rollout kind corresponds to. + * Rollouts stemming from this rollout kind will target the units of this unit + * kind. In other words, this defines the population of target units to be + * upgraded by rollouts. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkString($var, True); + $this->unit_kind = $var; + + return $this; + } + + /** + * Optional. The strategy used for executing a Rollout. This is a required + * field. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the associated UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRolloutOrchestrationStrategy() + { + return $this->rollout_orchestration_strategy; + } + + /** + * Optional. The strategy used for executing a Rollout. This is a required + * field. + * There are two supported values strategies which are used to control + * - "Google.Cloud.Simple.AllAtOnce" + * - "Google.Cloud.Simple.OneLocationAtATime" + * A rollout with one of these simple strategies will rollout across + * all locations defined in the associated UnitKind's Saas Locations. + * + * Generated from protobuf field string rollout_orchestration_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRolloutOrchestrationStrategy($var) + { + GPBUtil::checkString($var, True); + $this->rollout_orchestration_strategy = $var; + + return $this; + } + + /** + * Optional. [CEL](https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. + * + * Generated from protobuf field string unit_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUnitFilter() + { + return $this->unit_filter; + } + + /** + * Optional. [CEL](https://github.com/google/cel-spec) formatted filter string + * against Unit. The filter will be applied to determine the eligible unit + * population. This filter can only reduce, but not expand the scope of the + * rollout. + * + * Generated from protobuf field string unit_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUnitFilter($var) + { + GPBUtil::checkString($var, True); + $this->unit_filter = $var; + + return $this; + } + + /** + * Optional. The config for updating the unit kind. By default, the unit kind + * will be updated on the rollout start. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.UpdateUnitKindStrategy update_unit_kind_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getUpdateUnitKindStrategy() + { + return $this->update_unit_kind_strategy; + } + + /** + * Optional. The config for updating the unit kind. By default, the unit kind + * will be updated on the rollout start. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.UpdateUnitKindStrategy update_unit_kind_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setUpdateUnitKindStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind\UpdateUnitKindStrategy::class); + $this->update_unit_kind_strategy = $var; + + return $this; + } + + /** + * Optional. The configuration for error budget. If the number of failed units + * exceeds max(allowed_count, allowed_ratio * total_units), the rollout will + * be paused. If not set, all units will be attempted to be updated regardless + * of the number of failures encountered. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.ErrorBudget error_budget = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ErrorBudget|null + */ + public function getErrorBudget() + { + return $this->error_budget; + } + + public function hasErrorBudget() + { + return isset($this->error_budget); + } + + public function clearErrorBudget() + { + unset($this->error_budget); + } + + /** + * Optional. The configuration for error budget. If the number of failed units + * exceeds max(allowed_count, allowed_ratio * total_units), the rollout will + * be paused. If not set, all units will be attempted to be updated regardless + * of the number of failures encountered. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.ErrorBudget error_budget = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ErrorBudget $var + * @return $this + */ + public function setErrorBudget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ErrorBudget::class); + $this->error_budget = $var; + + return $this; + } + + /** + * Optional. Settings for controlling the pacing of rollouts i.e. the number + * of units to be rolled out in parallel in a region. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.UnitUpdatePacing unit_update_pacing = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitUpdatePacing|null + */ + public function getUnitUpdatePacing() + { + return $this->unit_update_pacing; + } + + public function hasUnitUpdatePacing() + { + return isset($this->unit_update_pacing); + } + + public function clearUnitUpdatePacing() + { + unset($this->unit_update_pacing); + } + + /** + * Optional. Settings for controlling the pacing of rollouts i.e. the number + * of units to be rolled out in parallel in a region. + * + * Generated from protobuf field optional .google.cloud.saasplatform.saasservicemgmt.v1.UnitUpdatePacing unit_update_pacing = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitUpdatePacing $var + * @return $this + */ + public function setUnitUpdatePacing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitUpdatePacing::class); + $this->unit_update_pacing = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind/UpdateUnitKindStrategy.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind/UpdateUnitKindStrategy.php new file mode 100644 index 000000000000..21413a6bfcf5 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutKind/UpdateUnitKindStrategy.php @@ -0,0 +1,59 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind.UpdateUnitKindStrategy + */ +class UpdateUnitKindStrategy +{ + /** + * Strategy unspecified. + * + * Generated from protobuf enum UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED = 0; + */ + const UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED = 0; + /** + * Update the unit kind strategy on the rollout start. + * + * Generated from protobuf enum UPDATE_UNIT_KIND_STRATEGY_ON_START = 1; + */ + const UPDATE_UNIT_KIND_STRATEGY_ON_START = 1; + /** + * Never update the unit kind. + * + * Generated from protobuf enum UPDATE_UNIT_KIND_STRATEGY_NEVER = 2; + */ + const UPDATE_UNIT_KIND_STRATEGY_NEVER = 2; + + private static $valueToName = [ + self::UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED => 'UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED', + self::UPDATE_UNIT_KIND_STRATEGY_ON_START => 'UPDATE_UNIT_KIND_STRATEGY_ON_START', + self::UPDATE_UNIT_KIND_STRATEGY_NEVER => 'UPDATE_UNIT_KIND_STRATEGY_NEVER', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/RolloutStats.php b/SaasPlatformSaasServiceMgmt/src/V1/RolloutStats.php new file mode 100644 index 000000000000..595b7ca0f84e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/RolloutStats.php @@ -0,0 +1,159 @@ +google.cloud.saasplatform.saasservicemgmt.v1.RolloutStats + */ +class RolloutStats extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Output only. Unordered list. A breakdown of the progress of + * operations triggered by the rollout. Provides a count of Operations by + * their state. This can be used to determine the number of units which have + * been updated, or are scheduled to be updated. + * There will be at most one entry per group. + * Possible values for operation groups are: + * - "SCHEDULED" + * - "PENDING" + * - "RUNNING" + * - "SUCCEEDED" + * - "FAILED" + * - "CANCELLED" + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Aggregate operations_by_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $operations_by_state; + /** + * Optional. Output only. Estimated number of units based. The estimation is + * computed upon creation of the rollout. + * + * Generated from protobuf field optional int64 estimated_total_unit_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $estimated_total_unit_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Aggregate[] $operations_by_state + * Optional. Output only. Unordered list. A breakdown of the progress of + * operations triggered by the rollout. Provides a count of Operations by + * their state. This can be used to determine the number of units which have + * been updated, or are scheduled to be updated. + * There will be at most one entry per group. + * Possible values for operation groups are: + * - "SCHEDULED" + * - "PENDING" + * - "RUNNING" + * - "SUCCEEDED" + * - "FAILED" + * - "CANCELLED" + * @type int|string $estimated_total_unit_count + * Optional. Output only. Estimated number of units based. The estimation is + * computed upon creation of the rollout. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Output only. Unordered list. A breakdown of the progress of + * operations triggered by the rollout. Provides a count of Operations by + * their state. This can be used to determine the number of units which have + * been updated, or are scheduled to be updated. + * There will be at most one entry per group. + * Possible values for operation groups are: + * - "SCHEDULED" + * - "PENDING" + * - "RUNNING" + * - "SUCCEEDED" + * - "FAILED" + * - "CANCELLED" + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Aggregate operations_by_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Aggregate> + */ + public function getOperationsByState() + { + return $this->operations_by_state; + } + + /** + * Optional. Output only. Unordered list. A breakdown of the progress of + * operations triggered by the rollout. Provides a count of Operations by + * their state. This can be used to determine the number of units which have + * been updated, or are scheduled to be updated. + * There will be at most one entry per group. + * Possible values for operation groups are: + * - "SCHEDULED" + * - "PENDING" + * - "RUNNING" + * - "SUCCEEDED" + * - "FAILED" + * - "CANCELLED" + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Aggregate operations_by_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Aggregate[] $var + * @return $this + */ + public function setOperationsByState($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Aggregate::class); + $this->operations_by_state = $arr; + + return $this; + } + + /** + * Optional. Output only. Estimated number of units based. The estimation is + * computed upon creation of the rollout. + * + * Generated from protobuf field optional int64 estimated_total_unit_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getEstimatedTotalUnitCount() + { + return isset($this->estimated_total_unit_count) ? $this->estimated_total_unit_count : 0; + } + + public function hasEstimatedTotalUnitCount() + { + return isset($this->estimated_total_unit_count); + } + + public function clearEstimatedTotalUnitCount() + { + unset($this->estimated_total_unit_count); + } + + /** + * Optional. Output only. Estimated number of units based. The estimation is + * computed upon creation of the rollout. + * + * Generated from protobuf field optional int64 estimated_total_unit_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setEstimatedTotalUnitCount($var) + { + GPBUtil::checkInt64($var); + $this->estimated_total_unit_count = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Saas.php b/SaasPlatformSaasServiceMgmt/src/V1/Saas.php new file mode 100644 index 000000000000..7af7abd2a0cc --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Saas.php @@ -0,0 +1,615 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Saas + */ +class Saas extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/saas/{saas}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. List of locations that the service is available in. Rollout + * refers to the list to generate a rollout plan. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Location locations = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $locations; + /** + * Optional. Reference to composite ApplicationTemplate. + * When specified, the template components will be imported into their + * equivalent UnitKind, Release and Blueprint resources. + * Deleted references will not delete imported resources. + * Should only be specified on source regions, and be unspecified on replica + * regions. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef application_template = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $application_template = null; + /** + * Output only. Name of repository in Artifact Registry for system-generated + * Blueprints, eg. Blueprints of imported ApplicationTemplates. + * + * Generated from protobuf field string blueprint_repo = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $blueprint_repo = ''; + /** + * Output only. State of the Saas. + * It is always in STATE_ACTIVE state if the application_template is empty. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A set of conditions which indicate the various conditions this + * resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition conditions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. If the state is FAILED, the corresponding error code and + * message. Defaults to code=OK for all other states. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/saas/{saas}" + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Location[] $locations + * Optional. List of locations that the service is available in. Rollout + * refers to the list to generate a rollout plan. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef $application_template + * Optional. Reference to composite ApplicationTemplate. + * When specified, the template components will be imported into their + * equivalent UnitKind, Release and Blueprint resources. + * Deleted references will not delete imported resources. + * Should only be specified on source regions, and be unspecified on replica + * regions. + * @type string $blueprint_repo + * Output only. Name of repository in Artifact Registry for system-generated + * Blueprints, eg. Blueprints of imported ApplicationTemplates. + * @type int $state + * Output only. State of the Saas. + * It is always in STATE_ACTIVE state if the application_template is empty. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition[] $conditions + * Output only. A set of conditions which indicate the various conditions this + * resource can have. + * @type \Google\Rpc\Status $error + * Output only. If the state is FAILED, the corresponding error code and + * message. Defaults to code=OK for all other states. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/saas/{saas}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/saas/{saas}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. List of locations that the service is available in. Rollout + * refers to the list to generate a rollout plan. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Location locations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Location> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Optional. List of locations that the service is available in. Rollout + * refers to the list to generate a rollout plan. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Location locations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Location[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Location::class); + $this->locations = $arr; + + return $this; + } + + /** + * Optional. Reference to composite ApplicationTemplate. + * When specified, the template components will be imported into their + * equivalent UnitKind, Release and Blueprint resources. + * Deleted references will not delete imported resources. + * Should only be specified on source regions, and be unspecified on replica + * regions. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef application_template = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef|null + */ + public function getApplicationTemplate() + { + return $this->application_template; + } + + public function hasApplicationTemplate() + { + return isset($this->application_template); + } + + public function clearApplicationTemplate() + { + unset($this->application_template); + } + + /** + * Optional. Reference to composite ApplicationTemplate. + * When specified, the template components will be imported into their + * equivalent UnitKind, Release and Blueprint resources. + * Deleted references will not delete imported resources. + * Should only be specified on source regions, and be unspecified on replica + * regions. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.CompositeRef application_template = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef $var + * @return $this + */ + public function setApplicationTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CompositeRef::class); + $this->application_template = $var; + + return $this; + } + + /** + * Output only. Name of repository in Artifact Registry for system-generated + * Blueprints, eg. Blueprints of imported ApplicationTemplates. + * + * Generated from protobuf field string blueprint_repo = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBlueprintRepo() + { + return $this->blueprint_repo; + } + + /** + * Output only. Name of repository in Artifact Registry for system-generated + * Blueprints, eg. Blueprints of imported ApplicationTemplates. + * + * Generated from protobuf field string blueprint_repo = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBlueprintRepo($var) + { + GPBUtil::checkString($var, True); + $this->blueprint_repo = $var; + + return $this; + } + + /** + * Output only. State of the Saas. + * It is always in STATE_ACTIVE state if the application_template is empty. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the Saas. + * It is always in STATE_ACTIVE state if the application_template is empty. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A set of conditions which indicate the various conditions this + * resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition conditions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition> + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. A set of conditions which indicate the various conditions this + * resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition conditions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition[] $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. If the state is FAILED, the corresponding error code and + * message. Defaults to code=OK for all other states. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. If the state is FAILED, the corresponding error code and + * message. Defaults to code=OK for all other states. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Saas/State.php b/SaasPlatformSaasServiceMgmt/src/V1/Saas/State.php new file mode 100644 index 000000000000..814cbb9b1d03 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Saas/State.php @@ -0,0 +1,78 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Saas.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State type is unspecified. + * Deprecated: Use STATE_UNSPECIFIED instead. + * + * Generated from protobuf enum STATE_TYPE_UNSPECIFIED = 0 [deprecated = true]; + */ + const STATE_TYPE_UNSPECIFIED = 0; + /** + * The Saas is ready + * + * Generated from protobuf enum STATE_ACTIVE = 1; + */ + const STATE_ACTIVE = 1; + /** + * In the process of importing, synchronizing or replicating + * ApplicationTemplates + * + * Generated from protobuf enum STATE_RUNNING = 2; + */ + const STATE_RUNNING = 2; + /** + * Failure during process of importing, synchronizing or replicating + * ApplicationTemplate processing + * + * Generated from protobuf enum STATE_FAILED = 3; + */ + const STATE_FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STATE_TYPE_UNSPECIFIED => 'STATE_TYPE_UNSPECIFIED', + self::STATE_ACTIVE => 'STATE_ACTIVE', + self::STATE_RUNNING => 'STATE_RUNNING', + self::STATE_FAILED => 'STATE_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/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition.php b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition.php new file mode 100644 index 000000000000..9c63c4ffb57f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition.php @@ -0,0 +1,217 @@ +google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition + */ +class SaasCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $status = 0; + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $last_transition_time = null; + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status + * Required. Status of the condition. + * @type int $type + * Required. Type of the condition. + * @type \Google\Protobuf\Timestamp $last_transition_time + * Required. Last time the condition transited from one status to another. + * @type string $message + * Required. Human readable message indicating details about the last + * transition. + * @type string $reason + * Required. Brief reason for the condition's last transition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\SaasCondition\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransitionTime() + { + return $this->last_transition_time; + } + + public function hasLastTransitionTime() + { + return isset($this->last_transition_time); + } + + public function clearLastTransitionTime() + { + unset($this->last_transition_time); + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransitionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transition_time = $var; + + return $this; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Status.php b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Status.php new file mode 100644 index 000000000000..755edc844790 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Status.php @@ -0,0 +1,68 @@ +google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Status + */ +class Status +{ + /** + * Condition status is unspecified. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * Condition is unknown. + * + * Generated from protobuf enum STATUS_UNKNOWN = 1; + */ + const STATUS_UNKNOWN = 1; + /** + * Condition is true. + * + * Generated from protobuf enum STATUS_TRUE = 2; + */ + const STATUS_TRUE = 2; + /** + * Condition is false. + * + * Generated from protobuf enum STATUS_FALSE = 3; + */ + const STATUS_FALSE = 3; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::STATUS_UNKNOWN => 'STATUS_UNKNOWN', + self::STATUS_TRUE => 'STATUS_TRUE', + self::STATUS_FALSE => 'STATUS_FALSE', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Type.php b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Type.php new file mode 100644 index 000000000000..d44e4902f263 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/SaasCondition/Type.php @@ -0,0 +1,61 @@ +google.cloud.saasplatform.saasservicemgmt.v1.SaasCondition.Type + */ +class Type +{ + /** + * Condition type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Condition type is ready. + * + * Generated from protobuf enum TYPE_READY = 1; + */ + const TYPE_READY = 1; + /** + * Condition type is synchronized. + * + * Generated from protobuf enum TYPE_SYNCHRONIZED = 2; + */ + const TYPE_SYNCHRONIZED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TYPE_READY => 'TYPE_READY', + self::TYPE_SYNCHRONIZED => 'TYPE_SYNCHRONIZED', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/Schedule.php b/SaasPlatformSaasServiceMgmt/src/V1/Schedule.php new file mode 100644 index 000000000000..8b72a01ea9db --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Schedule.php @@ -0,0 +1,81 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Start of operation. If not set, will be set to the start of the + * next window. (optional) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Optional. Start of operation. If not set, will be set to the start of the + * next window. (optional) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Start of operation. If not set, will be set to the start of the + * next window. (optional) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. Start of operation. If not set, will be set to the start of the + * next window. (optional) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Tenant.php b/SaasPlatformSaasServiceMgmt/src/V1/Tenant.php new file mode 100644 index 000000000000..3cdc7834dcc9 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Tenant.php @@ -0,0 +1,450 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Tenant + */ +class Tenant extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/tenants/{tenant}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Immutable. A reference to the consumer resource this SaaS Tenant + * is representing. + * The relationship with a consumer resource can be used by App Lifecycle + * Manager for retrieving consumer-defined settings and policies such as + * maintenance policies (using Unified Maintenance Policy API). + * + * Generated from protobuf field string consumer_resource = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $consumer_resource = ''; + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. + * + * Generated from protobuf field string saas = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $saas = ''; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/tenants/{tenant}" + * @type string $consumer_resource + * Optional. Immutable. A reference to the consumer resource this SaaS Tenant + * is representing. + * The relationship with a consumer resource can be used by App Lifecycle + * Manager for retrieving consumer-defined settings and policies such as + * maintenance policies (using Unified Maintenance Policy API). + * @type string $saas + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/tenants/{tenant}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/tenants/{tenant}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Immutable. A reference to the consumer resource this SaaS Tenant + * is representing. + * The relationship with a consumer resource can be used by App Lifecycle + * Manager for retrieving consumer-defined settings and policies such as + * maintenance policies (using Unified Maintenance Policy API). + * + * Generated from protobuf field string consumer_resource = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getConsumerResource() + { + return $this->consumer_resource; + } + + /** + * Optional. Immutable. A reference to the consumer resource this SaaS Tenant + * is representing. + * The relationship with a consumer resource can be used by App Lifecycle + * Manager for retrieving consumer-defined settings and policies such as + * maintenance policies (using Unified Maintenance Policy API). + * + * Generated from protobuf field string consumer_resource = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setConsumerResource($var) + { + GPBUtil::checkString($var, True); + $this->consumer_resource = $var; + + return $this; + } + + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. + * + * Generated from protobuf field string saas = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getSaas() + { + return $this->saas; + } + + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. + * + * Generated from protobuf field string saas = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSaas($var) + { + GPBUtil::checkString($var, True); + $this->saas = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/ToMapping.php b/SaasPlatformSaasServiceMgmt/src/V1/ToMapping.php new file mode 100644 index 000000000000..66d82c107a62 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/ToMapping.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.ToMapping + */ +class ToMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Alias of the dependency that the inputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dependency = ''; + /** + * Required. Name of the inputVariable on the dependency + * + * Generated from protobuf field string input_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_variable = ''; + /** + * Optional. Tells App Lifecycle Manager if this mapping should be used during + * lookup or not + * + * Generated from protobuf field bool ignore_for_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_for_lookup = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dependency + * Required. Alias of the dependency that the inputVariable will pass its + * value to + * @type string $input_variable + * Required. Name of the inputVariable on the dependency + * @type bool $ignore_for_lookup + * Optional. Tells App Lifecycle Manager if this mapping should be used during + * lookup or not + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Alias of the dependency that the inputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDependency() + { + return $this->dependency; + } + + /** + * Required. Alias of the dependency that the inputVariable will pass its + * value to + * + * Generated from protobuf field string dependency = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDependency($var) + { + GPBUtil::checkString($var, True); + $this->dependency = $var; + + return $this; + } + + /** + * Required. Name of the inputVariable on the dependency + * + * Generated from protobuf field string input_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputVariable() + { + return $this->input_variable; + } + + /** + * Required. Name of the inputVariable on the dependency + * + * Generated from protobuf field string input_variable = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputVariable($var) + { + GPBUtil::checkString($var, True); + $this->input_variable = $var; + + return $this; + } + + /** + * Optional. Tells App Lifecycle Manager if this mapping should be used during + * lookup or not + * + * Generated from protobuf field bool ignore_for_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreForLookup() + { + return $this->ignore_for_lookup; + } + + /** + * Optional. Tells App Lifecycle Manager if this mapping should be used during + * lookup or not + * + * Generated from protobuf field bool ignore_for_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreForLookup($var) + { + GPBUtil::checkBool($var); + $this->ignore_for_lookup = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Unit.php b/SaasPlatformSaasServiceMgmt/src/V1/Unit.php new file mode 100644 index 000000000000..acbc17dec449 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Unit.php @@ -0,0 +1,1103 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Unit + */ +class Unit extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/units/{unit}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Reference to the UnitKind this Unit belongs to. Immutable once + * set. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $unit_kind = ''; + /** + * Optional. Output only. The current Release object for this Unit. + * + * Generated from protobuf field string release = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $release = ''; + /** + * Optional. Reference to the Saas Tenant resource this unit belongs to. This + * for example informs the maintenance policies to use for scheduling future + * updates on a unit. (optional and immutable once created) + * + * Generated from protobuf field string tenant = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $tenant = ''; + /** + * Optional. Output only. List of concurrent UnitOperations that are operating + * on this Unit. + * + * Generated from protobuf field repeated string ongoing_operations = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $ongoing_operations; + /** + * Optional. Output only. List of pending (wait to be executed) UnitOperations + * for this unit. + * + * Generated from protobuf field repeated string pending_operations = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $pending_operations; + /** + * Optional. Output only. List of scheduled UnitOperations for this unit. + * + * Generated from protobuf field repeated string scheduled_operations = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $scheduled_operations; + /** + * Optional. Output only. List of Units that depend on this unit. Unit can + * only be deprovisioned if this list is empty. Maximum 1000. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependents = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $dependents; + /** + * Optional. Output only. Set of dependencies for this unit. Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependencies = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $dependencies; + /** + * Optional. Output only. Indicates the current input variables deployed by + * the unit + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $input_variables; + /** + * Optional. Output only. Set of key/value pairs corresponding to output + * variables from execution of actuation templates. The variables are declared + * in actuation configs (in Terraform for example) and the values are fetched + * and returned by the actuation engine upon completion of execution. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $output_variables; + /** + * Optional. Captures requested directives for performing future maintenance + * on the unit. This includes a request for the unit to skip maintenance for a + * period of time and remain pinned to its current release as well as controls + * for postponing maintenance scheduled in future. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.MaintenanceSettings maintenance = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance = null; + /** + * Optional. Output only. Current lifecycle state of the resource (e.g. if + * it's being created or ready to use). + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.UnitState state = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition conditions = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Optional. Immutable. Indicates whether the Unit life cycle is controlled + * by the user or by the system. + * Immutable once created. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.ManagementMode management_mode = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $management_mode = 0; + /** + * Optional. Output only. Indicates the system managed state of the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.SystemManagedState system_managed_state = 25 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $system_managed_state = 0; + /** + * Optional. Output only. If set, indicates the time when the system will + * start removing the unit. + * + * Generated from protobuf field .google.protobuf.Timestamp system_cleanup_at = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $system_cleanup_at = null; + /** + * Optional. Reference to the AppHub Application this unit belongs to. + * All resources deployed in this Unit will be associated with the specified + * Application. + * + * Generated from protobuf field string application = 29 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $application = ''; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Indicates whether the resource location satisfies Zone + * Separation constraints. This is false by default. + * + * Generated from protobuf field bool satisfies_pzs = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/units/{unit}" + * @type string $unit_kind + * Optional. Reference to the UnitKind this Unit belongs to. Immutable once + * set. + * @type string $release + * Optional. Output only. The current Release object for this Unit. + * @type string $tenant + * Optional. Reference to the Saas Tenant resource this unit belongs to. This + * for example informs the maintenance policies to use for scheduling future + * updates on a unit. (optional and immutable once created) + * @type string[] $ongoing_operations + * Optional. Output only. List of concurrent UnitOperations that are operating + * on this Unit. + * @type string[] $pending_operations + * Optional. Output only. List of pending (wait to be executed) UnitOperations + * for this unit. + * @type string[] $scheduled_operations + * Optional. Output only. List of scheduled UnitOperations for this unit. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency[] $dependents + * Optional. Output only. List of Units that depend on this unit. Unit can + * only be deprovisioned if this list is empty. Maximum 1000. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency[] $dependencies + * Optional. Output only. Set of dependencies for this unit. Maximum 10. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $input_variables + * Optional. Output only. Indicates the current input variables deployed by + * the unit + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $output_variables + * Optional. Output only. Set of key/value pairs corresponding to output + * variables from execution of actuation templates. The variables are declared + * in actuation configs (in Terraform for example) and the values are fetched + * and returned by the actuation engine upon completion of execution. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\MaintenanceSettings $maintenance + * Optional. Captures requested directives for performing future maintenance + * on the unit. This includes a request for the unit to skip maintenance for a + * period of time and remain pinned to its current release as well as controls + * for postponing maintenance scheduled in future. + * @type int $state + * Optional. Output only. Current lifecycle state of the resource (e.g. if + * it's being created or ready to use). + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition[] $conditions + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * @type int $management_mode + * Optional. Immutable. Indicates whether the Unit life cycle is controlled + * by the user or by the system. + * Immutable once created. + * @type int $system_managed_state + * Optional. Output only. Indicates the system managed state of the unit. + * @type \Google\Protobuf\Timestamp $system_cleanup_at + * Optional. Output only. If set, indicates the time when the system will + * start removing the unit. + * @type string $application + * Optional. Reference to the AppHub Application this unit belongs to. + * All resources deployed in this Unit will be associated with the specified + * Application. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * @type bool $satisfies_pzs + * Output only. Indicates whether the resource location satisfies Zone + * Separation constraints. This is false by default. + * @type bool $satisfies_pzi + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/units/{unit}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/units/{unit}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Reference to the UnitKind this Unit belongs to. Immutable once + * set. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + /** + * Optional. Reference to the UnitKind this Unit belongs to. Immutable once + * set. + * + * Generated from protobuf field string unit_kind = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkString($var, True); + $this->unit_kind = $var; + + return $this; + } + + /** + * Optional. Output only. The current Release object for this Unit. + * + * Generated from protobuf field string release = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getRelease() + { + return $this->release; + } + + /** + * Optional. Output only. The current Release object for this Unit. + * + * Generated from protobuf field string release = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkString($var, True); + $this->release = $var; + + return $this; + } + + /** + * Optional. Reference to the Saas Tenant resource this unit belongs to. This + * for example informs the maintenance policies to use for scheduling future + * updates on a unit. (optional and immutable once created) + * + * Generated from protobuf field string tenant = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTenant() + { + return $this->tenant; + } + + /** + * Optional. Reference to the Saas Tenant resource this unit belongs to. This + * for example informs the maintenance policies to use for scheduling future + * updates on a unit. (optional and immutable once created) + * + * Generated from protobuf field string tenant = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkString($var, True); + $this->tenant = $var; + + return $this; + } + + /** + * Optional. Output only. List of concurrent UnitOperations that are operating + * on this Unit. + * + * Generated from protobuf field repeated string ongoing_operations = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getOngoingOperations() + { + return $this->ongoing_operations; + } + + /** + * Optional. Output only. List of concurrent UnitOperations that are operating + * on this Unit. + * + * Generated from protobuf field repeated string ongoing_operations = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setOngoingOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ongoing_operations = $arr; + + return $this; + } + + /** + * Optional. Output only. List of pending (wait to be executed) UnitOperations + * for this unit. + * + * Generated from protobuf field repeated string pending_operations = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getPendingOperations() + { + return $this->pending_operations; + } + + /** + * Optional. Output only. List of pending (wait to be executed) UnitOperations + * for this unit. + * + * Generated from protobuf field repeated string pending_operations = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setPendingOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->pending_operations = $arr; + + return $this; + } + + /** + * Optional. Output only. List of scheduled UnitOperations for this unit. + * + * Generated from protobuf field repeated string scheduled_operations = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getScheduledOperations() + { + return $this->scheduled_operations; + } + + /** + * Optional. Output only. List of scheduled UnitOperations for this unit. + * + * Generated from protobuf field repeated string scheduled_operations = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setScheduledOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scheduled_operations = $arr; + + return $this; + } + + /** + * Optional. Output only. List of Units that depend on this unit. Unit can + * only be deprovisioned if this list is empty. Maximum 1000. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependents = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency> + */ + public function getDependents() + { + return $this->dependents; + } + + /** + * Optional. Output only. List of Units that depend on this unit. Unit can + * only be deprovisioned if this list is empty. Maximum 1000. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependents = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency[] $var + * @return $this + */ + public function setDependents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency::class); + $this->dependents = $arr; + + return $this; + } + + /** + * Optional. Output only. Set of dependencies for this unit. Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependencies = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency> + */ + public function getDependencies() + { + return $this->dependencies; + } + + /** + * Optional. Output only. Set of dependencies for this unit. Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency dependencies = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency[] $var + * @return $this + */ + public function setDependencies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitDependency::class); + $this->dependencies = $arr; + + return $this; + } + + /** + * Optional. Output only. Indicates the current input variables deployed by + * the unit + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getInputVariables() + { + return $this->input_variables; + } + + /** + * Optional. Output only. Indicates the current input variables deployed by + * the unit + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setInputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->input_variables = $arr; + + return $this; + } + + /** + * Optional. Output only. Set of key/value pairs corresponding to output + * variables from execution of actuation templates. The variables are declared + * in actuation configs (in Terraform for example) and the values are fetched + * and returned by the actuation engine upon completion of execution. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getOutputVariables() + { + return $this->output_variables; + } + + /** + * Optional. Output only. Set of key/value pairs corresponding to output + * variables from execution of actuation templates. The variables are declared + * in actuation configs (in Terraform for example) and the values are fetched + * and returned by the actuation engine upon completion of execution. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable output_variables = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setOutputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->output_variables = $arr; + + return $this; + } + + /** + * Optional. Captures requested directives for performing future maintenance + * on the unit. This includes a request for the unit to skip maintenance for a + * period of time and remain pinned to its current release as well as controls + * for postponing maintenance scheduled in future. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.MaintenanceSettings maintenance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\MaintenanceSettings|null + */ + public function getMaintenance() + { + return $this->maintenance; + } + + public function hasMaintenance() + { + return isset($this->maintenance); + } + + public function clearMaintenance() + { + unset($this->maintenance); + } + + /** + * Optional. Captures requested directives for performing future maintenance + * on the unit. This includes a request for the unit to skip maintenance for a + * period of time and remain pinned to its current release as well as controls + * for postponing maintenance scheduled in future. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.MaintenanceSettings maintenance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\MaintenanceSettings $var + * @return $this + */ + public function setMaintenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\MaintenanceSettings::class); + $this->maintenance = $var; + + return $this; + } + + /** + * Optional. Output only. Current lifecycle state of the resource (e.g. if + * it's being created or ready to use). + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.UnitState state = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Optional. Output only. Current lifecycle state of the resource (e.g. if + * it's being created or ready to use). + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.UnitState state = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\UnitState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition conditions = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition> + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition conditions = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition[] $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Optional. Immutable. Indicates whether the Unit life cycle is controlled + * by the user or by the system. + * Immutable once created. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.ManagementMode management_mode = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getManagementMode() + { + return $this->management_mode; + } + + /** + * Optional. Immutable. Indicates whether the Unit life cycle is controlled + * by the user or by the system. + * Immutable once created. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.ManagementMode management_mode = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setManagementMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\ManagementMode::class); + $this->management_mode = $var; + + return $this; + } + + /** + * Optional. Output only. Indicates the system managed state of the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.SystemManagedState system_managed_state = 25 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSystemManagedState() + { + return $this->system_managed_state; + } + + /** + * Optional. Output only. Indicates the system managed state of the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit.SystemManagedState system_managed_state = 25 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSystemManagedState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit\SystemManagedState::class); + $this->system_managed_state = $var; + + return $this; + } + + /** + * Optional. Output only. If set, indicates the time when the system will + * start removing the unit. + * + * Generated from protobuf field .google.protobuf.Timestamp system_cleanup_at = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSystemCleanupAt() + { + return $this->system_cleanup_at; + } + + public function hasSystemCleanupAt() + { + return isset($this->system_cleanup_at); + } + + public function clearSystemCleanupAt() + { + unset($this->system_cleanup_at); + } + + /** + * Optional. Output only. If set, indicates the time when the system will + * start removing the unit. + * + * Generated from protobuf field .google.protobuf.Timestamp system_cleanup_at = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSystemCleanupAt($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->system_cleanup_at = $var; + + return $this; + } + + /** + * Optional. Reference to the AppHub Application this unit belongs to. + * All resources deployed in this Unit will be associated with the specified + * Application. + * + * Generated from protobuf field string application = 29 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getApplication() + { + return $this->application; + } + + /** + * Optional. Reference to the AppHub Application this unit belongs to. + * All resources deployed in this Unit will be associated with the specified + * Application. + * + * Generated from protobuf field string application = 29 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setApplication($var) + { + GPBUtil::checkString($var, True); + $this->application = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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. Indicates whether the resource location satisfies Zone + * Separation constraints. This is false by default. + * + * Generated from protobuf field bool satisfies_pzs = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Indicates whether the resource location satisfies Zone + * Separation constraints. This is false by default. + * + * Generated from protobuf field bool satisfies_pzs = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return $this->satisfies_pzi; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Unit/MaintenanceSettings.php b/SaasPlatformSaasServiceMgmt/src/V1/Unit/MaintenanceSettings.php new file mode 100644 index 000000000000..5a51953aedd4 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Unit/MaintenanceSettings.php @@ -0,0 +1,92 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Unit.MaintenanceSettings + */ +class MaintenanceSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If present, it fixes the release on the unit until the given + * time; i.e. changes to the release field will be rejected. Rollouts should + * and will also respect this by not requesting an upgrade in the first + * place. + * + * Generated from protobuf field .google.protobuf.Timestamp pinned_until_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pinned_until_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $pinned_until_time + * Optional. If present, it fixes the release on the unit until the given + * time; i.e. changes to the release field will be rejected. Rollouts should + * and will also respect this by not requesting an upgrade in the first + * place. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If present, it fixes the release on the unit until the given + * time; i.e. changes to the release field will be rejected. Rollouts should + * and will also respect this by not requesting an upgrade in the first + * place. + * + * Generated from protobuf field .google.protobuf.Timestamp pinned_until_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPinnedUntilTime() + { + return $this->pinned_until_time; + } + + public function hasPinnedUntilTime() + { + return isset($this->pinned_until_time); + } + + public function clearPinnedUntilTime() + { + unset($this->pinned_until_time); + } + + /** + * Optional. If present, it fixes the release on the unit until the given + * time; i.e. changes to the release field will be rejected. Rollouts should + * and will also respect this by not requesting an upgrade in the first + * place. + * + * Generated from protobuf field .google.protobuf.Timestamp pinned_until_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPinnedUntilTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->pinned_until_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Unit/ManagementMode.php b/SaasPlatformSaasServiceMgmt/src/V1/Unit/ManagementMode.php new file mode 100644 index 000000000000..68eaa7361769 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Unit/ManagementMode.php @@ -0,0 +1,62 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Unit.ManagementMode + */ +class ManagementMode +{ + /** + * Unspecified management mode. + * + * Generated from protobuf enum MANAGEMENT_MODE_UNSPECIFIED = 0; + */ + const MANAGEMENT_MODE_UNSPECIFIED = 0; + /** + * Unit's lifecycle is managed by the user. + * + * Generated from protobuf enum MANAGEMENT_MODE_USER = 1; + */ + const MANAGEMENT_MODE_USER = 1; + /** + * The system will decide when to deprovision and delete the unit. + * User still can deprovision or delete the unit manually. + * + * Generated from protobuf enum MANAGEMENT_MODE_SYSTEM = 2; + */ + const MANAGEMENT_MODE_SYSTEM = 2; + + private static $valueToName = [ + self::MANAGEMENT_MODE_UNSPECIFIED => 'MANAGEMENT_MODE_UNSPECIFIED', + self::MANAGEMENT_MODE_USER => 'MANAGEMENT_MODE_USER', + self::MANAGEMENT_MODE_SYSTEM => 'MANAGEMENT_MODE_SYSTEM', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/Unit/SystemManagedState.php b/SaasPlatformSaasServiceMgmt/src/V1/Unit/SystemManagedState.php new file mode 100644 index 000000000000..62e0183001f8 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Unit/SystemManagedState.php @@ -0,0 +1,68 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Unit.SystemManagedState + */ +class SystemManagedState +{ + /** + * Unspecified system managed state. + * + * Generated from protobuf enum SYSTEM_MANAGED_STATE_UNSPECIFIED = 0; + */ + const SYSTEM_MANAGED_STATE_UNSPECIFIED = 0; + /** + * Unit has dependents attached. + * + * Generated from protobuf enum SYSTEM_MANAGED_STATE_ACTIVE = 1; + */ + const SYSTEM_MANAGED_STATE_ACTIVE = 1; + /** + * Unit has no dependencies attached, but attachment is allowed. + * + * Generated from protobuf enum SYSTEM_MANAGED_STATE_INACTIVE = 2; + */ + const SYSTEM_MANAGED_STATE_INACTIVE = 2; + /** + * Unit has no dependencies attached, and attachment is not allowed. + * + * Generated from protobuf enum SYSTEM_MANAGED_STATE_DECOMMISSIONED = 3; + */ + const SYSTEM_MANAGED_STATE_DECOMMISSIONED = 3; + + private static $valueToName = [ + self::SYSTEM_MANAGED_STATE_UNSPECIFIED => 'SYSTEM_MANAGED_STATE_UNSPECIFIED', + self::SYSTEM_MANAGED_STATE_ACTIVE => 'SYSTEM_MANAGED_STATE_ACTIVE', + self::SYSTEM_MANAGED_STATE_INACTIVE => 'SYSTEM_MANAGED_STATE_INACTIVE', + self::SYSTEM_MANAGED_STATE_DECOMMISSIONED => 'SYSTEM_MANAGED_STATE_DECOMMISSIONED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/Unit/UnitState.php b/SaasPlatformSaasServiceMgmt/src/V1/Unit/UnitState.php new file mode 100644 index 000000000000..b3aa5eae80f6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Unit/UnitState.php @@ -0,0 +1,92 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Unit.UnitState + */ +class UnitState +{ + /** + * Unspecified state. + * + * Generated from protobuf enum UNIT_STATE_UNSPECIFIED = 0; + */ + const UNIT_STATE_UNSPECIFIED = 0; + /** + * Unit is not provisioned. + * + * Generated from protobuf enum UNIT_STATE_NOT_PROVISIONED = 1; + */ + const UNIT_STATE_NOT_PROVISIONED = 1; + /** + * Unit is being provisioned. + * + * Generated from protobuf enum UNIT_STATE_PROVISIONING = 2; + */ + const UNIT_STATE_PROVISIONING = 2; + /** + * Unit is being updated. This is typically when a unit is being upgraded to + * a new release or some of the input variables on the Unit is being + * changed. Certain kinds of updates may cause the Unit to become unusable + * while the update is in progress. + * + * Generated from protobuf enum UNIT_STATE_UPDATING = 3; + */ + const UNIT_STATE_UPDATING = 3; + /** + * Unit is being deleted. + * + * Generated from protobuf enum UNIT_STATE_DEPROVISIONING = 4; + */ + const UNIT_STATE_DEPROVISIONING = 4; + /** + * Unit has been provisioned and is ready for use + * + * Generated from protobuf enum UNIT_STATE_READY = 5; + */ + const UNIT_STATE_READY = 5; + /** + * Unit has error, when it is not ready and some error operation + * + * Generated from protobuf enum UNIT_STATE_ERROR = 6; + */ + const UNIT_STATE_ERROR = 6; + + private static $valueToName = [ + self::UNIT_STATE_UNSPECIFIED => 'UNIT_STATE_UNSPECIFIED', + self::UNIT_STATE_NOT_PROVISIONED => 'UNIT_STATE_NOT_PROVISIONED', + self::UNIT_STATE_PROVISIONING => 'UNIT_STATE_PROVISIONING', + self::UNIT_STATE_UPDATING => 'UNIT_STATE_UPDATING', + self::UNIT_STATE_DEPROVISIONING => 'UNIT_STATE_DEPROVISIONING', + self::UNIT_STATE_READY => 'UNIT_STATE_READY', + self::UNIT_STATE_ERROR => 'UNIT_STATE_ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition.php new file mode 100644 index 000000000000..6afee30664d0 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition.php @@ -0,0 +1,218 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition + */ +class UnitCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $status = 0; + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $last_transition_time = null; + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status + * Required. Status of the condition. + * @type int $type + * Required. Type of the condition. + * @type \Google\Protobuf\Timestamp $last_transition_time + * Required. Last time the condition transited from one status to another. + * @type string $message + * Required. Human readable message indicating details about the last + * transition. + * @type string $reason + * Required. Brief reason for the condition's last transition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitCondition\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransitionTime() + { + return $this->last_transition_time; + } + + public function hasLastTransitionTime() + { + return isset($this->last_transition_time); + } + + public function clearLastTransitionTime() + { + unset($this->last_transition_time); + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransitionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transition_time = $var; + + return $this; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Status.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Status.php new file mode 100644 index 000000000000..9ca771c34903 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Status.php @@ -0,0 +1,68 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Status + */ +class Status +{ + /** + * Condition status is unspecified. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * Condition is unknown. + * + * Generated from protobuf enum STATUS_UNKNOWN = 1; + */ + const STATUS_UNKNOWN = 1; + /** + * Condition is true. + * + * Generated from protobuf enum STATUS_TRUE = 2; + */ + const STATUS_TRUE = 2; + /** + * Condition is false. + * + * Generated from protobuf enum STATUS_FALSE = 3; + */ + const STATUS_FALSE = 3; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::STATUS_UNKNOWN => 'STATUS_UNKNOWN', + self::STATUS_TRUE => 'STATUS_TRUE', + self::STATUS_FALSE => 'STATUS_FALSE', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Type.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Type.php new file mode 100644 index 000000000000..738f86e13929 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitCondition/Type.php @@ -0,0 +1,99 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitCondition.Type + */ +class Type +{ + /** + * Condition type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Condition type is ready. + * + * Generated from protobuf enum TYPE_READY = 1; + */ + const TYPE_READY = 1; + /** + * Condition type is updating. + * + * Generated from protobuf enum TYPE_UPDATING = 2; + */ + const TYPE_UPDATING = 2; + /** + * Condition type is provisioned. + * + * Generated from protobuf enum TYPE_PROVISIONED = 3; + */ + const TYPE_PROVISIONED = 3; + /** + * Condition type is operationError. + * True when the last unit operation fails with a non-ignorable error. + * + * Generated from protobuf enum TYPE_OPERATION_ERROR = 4; + */ + const TYPE_OPERATION_ERROR = 4; + /** + * Condition type is flagsConfigInitialized. + * True when the flags configuration is synchronized and ready to be served. + * + * Generated from protobuf enum TYPE_FLAGS_CONFIG_INITIALIZED = 5; + */ + const TYPE_FLAGS_CONFIG_INITIALIZED = 5; + /** + * Indicates if AppHub app has been created or if Apphub app has already + * existed. + * + * Generated from protobuf enum TYPE_APP_CREATED_OR_ALREADY_EXISTS = 6; + */ + const TYPE_APP_CREATED_OR_ALREADY_EXISTS = 6; + /** + * Indicates if services and workloads have been registered with AppHub. + * + * Generated from protobuf enum TYPE_APP_COMPONENTS_REGISTERED = 7; + */ + const TYPE_APP_COMPONENTS_REGISTERED = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TYPE_READY => 'TYPE_READY', + self::TYPE_UPDATING => 'TYPE_UPDATING', + self::TYPE_PROVISIONED => 'TYPE_PROVISIONED', + self::TYPE_OPERATION_ERROR => 'TYPE_OPERATION_ERROR', + self::TYPE_FLAGS_CONFIG_INITIALIZED => 'TYPE_FLAGS_CONFIG_INITIALIZED', + self::TYPE_APP_CREATED_OR_ALREADY_EXISTS => 'TYPE_APP_CREATED_OR_ALREADY_EXISTS', + self::TYPE_APP_COMPONENTS_REGISTERED => 'TYPE_APP_COMPONENTS_REGISTERED', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitDependency.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitDependency.php new file mode 100644 index 000000000000..57e0b18ea6af --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitDependency.php @@ -0,0 +1,101 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitDependency + */ +class UnitDependency extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Alias for the name of the dependency. + * + * Generated from protobuf field string alias = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $alias = ''; + /** + * Output only. A reference to the Unit object. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $alias + * Output only. Alias for the name of the dependency. + * @type string $unit + * Output only. A reference to the Unit object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Alias for the name of the dependency. + * + * Generated from protobuf field string alias = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Output only. Alias for the name of the dependency. + * + * Generated from protobuf field string alias = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * Output only. A reference to the Unit object. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Output only. A reference to the Unit object. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitKind.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitKind.php new file mode 100644 index 000000000000..26d3117d63b5 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitKind.php @@ -0,0 +1,825 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitKind + */ +class UnitKind extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitKinds/{unitKind}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. A reference to the Release object to use as default for creating + * new units of this UnitKind (optional). + * If not specified, a new unit must explicitly reference which release to use + * for its creation. + * + * Generated from protobuf field string default_release = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $default_release = ''; + /** + * Optional. Immutable. List of other unit kinds that this release will depend + * on. Dependencies will be automatically provisioned if not found. + * Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Dependency dependencies = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $dependencies; + /** + * Optional. List of inputVariables for this release that will either be + * retrieved from a dependency's outputVariables, or will be passed on to a + * dependency's inputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping input_variable_mappings = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_variable_mappings; + /** + * Optional. List of outputVariables for this unit kind will be passed to this + * unit's outputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping output_variable_mappings = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $output_variable_mappings; + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. Immutable + * once set. + * + * Generated from protobuf field string saas = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $saas = ''; + /** + * Optional. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $application_template_component = null; + /** + * Optional. AppParams contains the parameters for creating an AppHub + * Application. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams app_params = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $app_params = null; + /** + * Optional. Output only. BoundaryType describes the type of boundary the Unit + * Kind represents. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.BoundaryType boundary_type = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boundary_type = 0; + /** + * Optional. Defines the default duration limits for UnitOperations + * created from this UnitKind. These settings provide a baseline for + * execution time constraints. + * The limits specified here can be overridden by more specific settings + * on an individual UnitOperation resource. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. If not set, UnitOperations will use the system + * default duration limits unless overridden on the UnitOperation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $duration_limits = null; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitKinds/{unitKind}" + * @type string $default_release + * Optional. A reference to the Release object to use as default for creating + * new units of this UnitKind (optional). + * If not specified, a new unit must explicitly reference which release to use + * for its creation. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Dependency[] $dependencies + * Optional. Immutable. List of other unit kinds that this release will depend + * on. Dependencies will be automatically provisioned if not found. + * Maximum 10. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping[] $input_variable_mappings + * Optional. List of inputVariables for this release that will either be + * retrieved from a dependency's outputVariables, or will be passed on to a + * dependency's inputVariables. Maximum 100. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping[] $output_variable_mappings + * Optional. List of outputVariables for this unit kind will be passed to this + * unit's outputVariables. Maximum 100. + * @type string $saas + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. Immutable + * once set. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef $application_template_component + * Optional. Reference to component and revision in a composite + * ApplicationTemplate. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams $app_params + * Optional. AppParams contains the parameters for creating an AppHub + * Application. + * @type int $boundary_type + * Optional. Output only. BoundaryType describes the type of boundary the Unit + * Kind represents. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits $duration_limits + * Optional. Defines the default duration limits for UnitOperations + * created from this UnitKind. These settings provide a baseline for + * execution time constraints. + * The limits specified here can be overridden by more specific settings + * on an individual UnitOperation resource. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. If not set, UnitOperations will use the system + * default duration limits unless overridden on the UnitOperation. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitKinds/{unitKind}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitKinds/{unitKind}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A reference to the Release object to use as default for creating + * new units of this UnitKind (optional). + * If not specified, a new unit must explicitly reference which release to use + * for its creation. + * + * Generated from protobuf field string default_release = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getDefaultRelease() + { + return $this->default_release; + } + + /** + * Optional. A reference to the Release object to use as default for creating + * new units of this UnitKind (optional). + * If not specified, a new unit must explicitly reference which release to use + * for its creation. + * + * Generated from protobuf field string default_release = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultRelease($var) + { + GPBUtil::checkString($var, True); + $this->default_release = $var; + + return $this; + } + + /** + * Optional. Immutable. List of other unit kinds that this release will depend + * on. Dependencies will be automatically provisioned if not found. + * Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Dependency dependencies = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Dependency> + */ + public function getDependencies() + { + return $this->dependencies; + } + + /** + * Optional. Immutable. List of other unit kinds that this release will depend + * on. Dependencies will be automatically provisioned if not found. + * Maximum 10. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.Dependency dependencies = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Dependency[] $var + * @return $this + */ + public function setDependencies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Dependency::class); + $this->dependencies = $arr; + + return $this; + } + + /** + * Optional. List of inputVariables for this release that will either be + * retrieved from a dependency's outputVariables, or will be passed on to a + * dependency's inputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping input_variable_mappings = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping> + */ + public function getInputVariableMappings() + { + return $this->input_variable_mappings; + } + + /** + * Optional. List of inputVariables for this release that will either be + * retrieved from a dependency's outputVariables, or will be passed on to a + * dependency's inputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping input_variable_mappings = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping[] $var + * @return $this + */ + public function setInputVariableMappings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping::class); + $this->input_variable_mappings = $arr; + + return $this; + } + + /** + * Optional. List of outputVariables for this unit kind will be passed to this + * unit's outputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping output_variable_mappings = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping> + */ + public function getOutputVariableMappings() + { + return $this->output_variable_mappings; + } + + /** + * Optional. List of outputVariables for this unit kind will be passed to this + * unit's outputVariables. Maximum 100. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping output_variable_mappings = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping[] $var + * @return $this + */ + public function setOutputVariableMappings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\VariableMapping::class); + $this->output_variable_mappings = $arr; + + return $this; + } + + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. Immutable + * once set. + * + * Generated from protobuf field string saas = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getSaas() + { + return $this->saas; + } + + /** + * Required. Immutable. A reference to the Saas that defines the product + * (managed service) that the producer wants to manage with App Lifecycle + * Manager. Part of the App Lifecycle Manager common data model. Immutable + * once set. + * + * Generated from protobuf field string saas = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSaas($var) + { + GPBUtil::checkString($var, True); + $this->saas = $var; + + return $this; + } + + /** + * Optional. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef|null + */ + public function getApplicationTemplateComponent() + { + return $this->application_template_component; + } + + public function hasApplicationTemplateComponent() + { + return isset($this->application_template_component); + } + + public function clearApplicationTemplateComponent() + { + unset($this->application_template_component); + } + + /** + * Optional. Reference to component and revision in a composite + * ApplicationTemplate. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ComponentRef application_template_component = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef $var + * @return $this + */ + public function setApplicationTemplateComponent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ComponentRef::class); + $this->application_template_component = $var; + + return $this; + } + + /** + * Optional. AppParams contains the parameters for creating an AppHub + * Application. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams app_params = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams|null + */ + public function getAppParams() + { + return $this->app_params; + } + + public function hasAppParams() + { + return isset($this->app_params); + } + + public function clearAppParams() + { + unset($this->app_params); + } + + /** + * Optional. AppParams contains the parameters for creating an AppHub + * Application. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.AppParams app_params = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams $var + * @return $this + */ + public function setAppParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\AppParams::class); + $this->app_params = $var; + + return $this; + } + + /** + * Optional. Output only. BoundaryType describes the type of boundary the Unit + * Kind represents. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.BoundaryType boundary_type = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBoundaryType() + { + return $this->boundary_type; + } + + /** + * Optional. Output only. BoundaryType describes the type of boundary the Unit + * Kind represents. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.BoundaryType boundary_type = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBoundaryType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind\BoundaryType::class); + $this->boundary_type = $var; + + return $this; + } + + /** + * Optional. Defines the default duration limits for UnitOperations + * created from this UnitKind. These settings provide a baseline for + * execution time constraints. + * The limits specified here can be overridden by more specific settings + * on an individual UnitOperation resource. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. If not set, UnitOperations will use the system + * default duration limits unless overridden on the UnitOperation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits|null + */ + public function getDurationLimits() + { + return $this->duration_limits; + } + + public function hasDurationLimits() + { + return isset($this->duration_limits); + } + + public function clearDurationLimits() + { + unset($this->duration_limits); + } + + /** + * Optional. Defines the default duration limits for UnitOperations + * created from this UnitKind. These settings provide a baseline for + * execution time constraints. + * The limits specified here can be overridden by more specific settings + * on an individual UnitOperation resource. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. If not set, UnitOperations will use the system + * default duration limits unless overridden on the UnitOperation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits $var + * @return $this + */ + public function setDurationLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits::class); + $this->duration_limits = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10306 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitKind/BoundaryType.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitKind/BoundaryType.php new file mode 100644 index 000000000000..1246e5393379 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitKind/BoundaryType.php @@ -0,0 +1,61 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitKind.BoundaryType + */ +class BoundaryType +{ + /** + * Unspecified boundary type. + * + * Generated from protobuf enum BOUNDARY_TYPE_UNSPECIFIED = 0; + */ + const BOUNDARY_TYPE_UNSPECIFIED = 0; + /** + * Tenant project boundary. + * + * Generated from protobuf enum BOUNDARY_TYPE_TENANT_PROJECT = 1; + */ + const BOUNDARY_TYPE_TENANT_PROJECT = 1; + /** + * Managed project boundary. + * + * Generated from protobuf enum BOUNDARY_TYPE_MANAGED_PROJECT = 2; + */ + const BOUNDARY_TYPE_MANAGED_PROJECT = 2; + + private static $valueToName = [ + self::BOUNDARY_TYPE_UNSPECIFIED => 'BOUNDARY_TYPE_UNSPECIFIED', + self::BOUNDARY_TYPE_TENANT_PROJECT => 'BOUNDARY_TYPE_TENANT_PROJECT', + self::BOUNDARY_TYPE_MANAGED_PROJECT => 'BOUNDARY_TYPE_MANAGED_PROJECT', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation.php new file mode 100644 index 000000000000..f51b5213b93b --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation.php @@ -0,0 +1,943 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation + */ +class UnitOperation extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitOperations/{unitOperation}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Immutable. The Unit a given UnitOperation will act upon. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $unit = ''; + /** + * Optional. Reference to parent resource: UnitOperation. If an operation + * needs to create other operations as part of its workflow, each of the child + * operations should have this field set to the parent. This can be used for + * tracing. (Optional) + * + * Generated from protobuf field string parent_unit_operation = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $parent_unit_operation = ''; + /** + * Optional. Specifies which rollout created this Unit Operation. This cannot + * be modified and is used for filtering purposes only. If a dependent unit + * and unit operation are created as part of another unit operation, they will + * use the same rolloutId. + * + * Generated from protobuf field string rollout = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $rollout = ''; + /** + * Optional. When true, attempt to cancel the operation. Cancellation may fail + * if the operation is already executing. (Optional) + * + * Generated from protobuf field bool cancel = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cancel = false; + /** + * Optional. Output only. UnitOperationState describes the current state of + * the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.UnitOperationState state = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition conditions = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Optional. When to schedule this operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Schedule schedule = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule = null; + /** + * Optional. Output only. The engine state for on-going + * deployment engine operation(s). + * This field is opaque for external usage. + * + * Generated from protobuf field string engine_state = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $engine_state = ''; + /** + * Optional. Output only. UnitOperationErrorCategory describe the error + * category. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationErrorCategory error_category = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_category = 0; + /** + * Optional. Defines the duration limits for this specific UnitOperation + * instance. + * These settings override any default duration limits set on the UnitKind. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $duration_limits = null; + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + protected $unit_operation_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Provision $provision + * Optional. Provision operation. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Upgrade $upgrade + * Optional. Upgrade operation. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Deprovision $deprovision + * Optional. Deprovision operation. + * @type string $name + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitOperations/{unitOperation}" + * @type string $unit + * Required. Immutable. The Unit a given UnitOperation will act upon. + * @type string $parent_unit_operation + * Optional. Reference to parent resource: UnitOperation. If an operation + * needs to create other operations as part of its workflow, each of the child + * operations should have this field set to the parent. This can be used for + * tracing. (Optional) + * @type string $rollout + * Optional. Specifies which rollout created this Unit Operation. This cannot + * be modified and is used for filtering purposes only. If a dependent unit + * and unit operation are created as part of another unit operation, they will + * use the same rolloutId. + * @type bool $cancel + * Optional. When true, attempt to cancel the operation. Cancellation may fail + * if the operation is already executing. (Optional) + * @type int $state + * Optional. Output only. UnitOperationState describes the current state of + * the unit operation. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition[] $conditions + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Schedule $schedule + * Optional. When to schedule this operation. + * @type string $engine_state + * Optional. Output only. The engine state for on-going + * deployment engine operation(s). + * This field is opaque for external usage. + * @type int $error_category + * Optional. Output only. UnitOperationErrorCategory describe the error + * category. + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits $duration_limits + * Optional. Defines the duration limits for this specific UnitOperation + * instance. + * These settings override any default duration limits set on the UnitKind. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * @type string $uid + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * @type string $etag + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Provision operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Provision provision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Provision|null + */ + public function getProvision() + { + return $this->readOneof(8); + } + + public function hasProvision() + { + return $this->hasOneof(8); + } + + /** + * Optional. Provision operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Provision provision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Provision $var + * @return $this + */ + public function setProvision($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Provision::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. Upgrade operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Upgrade upgrade = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Upgrade|null + */ + public function getUpgrade() + { + return $this->readOneof(9); + } + + public function hasUpgrade() + { + return $this->hasOneof(9); + } + + /** + * Optional. Upgrade operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Upgrade upgrade = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Upgrade $var + * @return $this + */ + public function setUpgrade($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Upgrade::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Optional. Deprovision operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Deprovision deprovision = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Deprovision|null + */ + public function getDeprovision() + { + return $this->readOneof(10); + } + + public function hasDeprovision() + { + return $this->hasOneof(10); + } + + /** + * Optional. Deprovision operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Deprovision deprovision = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Deprovision $var + * @return $this + */ + public function setDeprovision($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Deprovision::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitOperations/{unitOperation}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name (full URI of the resource) following the + * standard naming scheme: + * "projects/{project}/locations/{location}/unitOperations/{unitOperation}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. The Unit a given UnitOperation will act upon. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Required. Immutable. The Unit a given UnitOperation will act upon. + * + * Generated from protobuf field string unit = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + + /** + * Optional. Reference to parent resource: UnitOperation. If an operation + * needs to create other operations as part of its workflow, each of the child + * operations should have this field set to the parent. This can be used for + * tracing. (Optional) + * + * Generated from protobuf field string parent_unit_operation = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getParentUnitOperation() + { + return $this->parent_unit_operation; + } + + /** + * Optional. Reference to parent resource: UnitOperation. If an operation + * needs to create other operations as part of its workflow, each of the child + * operations should have this field set to the parent. This can be used for + * tracing. (Optional) + * + * Generated from protobuf field string parent_unit_operation = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParentUnitOperation($var) + { + GPBUtil::checkString($var, True); + $this->parent_unit_operation = $var; + + return $this; + } + + /** + * Optional. Specifies which rollout created this Unit Operation. This cannot + * be modified and is used for filtering purposes only. If a dependent unit + * and unit operation are created as part of another unit operation, they will + * use the same rolloutId. + * + * Generated from protobuf field string rollout = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRollout() + { + return $this->rollout; + } + + /** + * Optional. Specifies which rollout created this Unit Operation. This cannot + * be modified and is used for filtering purposes only. If a dependent unit + * and unit operation are created as part of another unit operation, they will + * use the same rolloutId. + * + * Generated from protobuf field string rollout = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkString($var, True); + $this->rollout = $var; + + return $this; + } + + /** + * Optional. When true, attempt to cancel the operation. Cancellation may fail + * if the operation is already executing. (Optional) + * + * Generated from protobuf field bool cancel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getCancel() + { + return $this->cancel; + } + + /** + * Optional. When true, attempt to cancel the operation. Cancellation may fail + * if the operation is already executing. (Optional) + * + * Generated from protobuf field bool cancel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setCancel($var) + { + GPBUtil::checkBool($var); + $this->cancel = $var; + + return $this; + } + + /** + * Optional. Output only. UnitOperationState describes the current state of + * the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.UnitOperationState state = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Optional. Output only. UnitOperationState describes the current state of + * the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.UnitOperationState state = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation\UnitOperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition conditions = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition> + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Optional. Output only. A set of conditions which indicate the various + * conditions this resource can have. + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition conditions = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition[] $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Optional. When to schedule this operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Schedule schedule = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * Optional. When to schedule this operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Schedule schedule = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Optional. Output only. The engine state for on-going + * deployment engine operation(s). + * This field is opaque for external usage. + * + * Generated from protobuf field string engine_state = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEngineState() + { + return $this->engine_state; + } + + /** + * Optional. Output only. The engine state for on-going + * deployment engine operation(s). + * This field is opaque for external usage. + * + * Generated from protobuf field string engine_state = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEngineState($var) + { + GPBUtil::checkString($var, True); + $this->engine_state = $var; + + return $this; + } + + /** + * Optional. Output only. UnitOperationErrorCategory describe the error + * category. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationErrorCategory error_category = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getErrorCategory() + { + return $this->error_category; + } + + /** + * Optional. Output only. UnitOperationErrorCategory describe the error + * category. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationErrorCategory error_category = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setErrorCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationErrorCategory::class); + $this->error_category = $var; + + return $this; + } + + /** + * Optional. Defines the duration limits for this specific UnitOperation + * instance. + * These settings override any default duration limits set on the UnitKind. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits|null + */ + public function getDurationLimits() + { + return $this->duration_limits; + } + + public function hasDurationLimits() + { + return isset($this->duration_limits); + } + + public function clearDurationLimits() + { + unset($this->duration_limits); + } + + /** + * Optional. Defines the duration limits for this specific UnitOperation + * instance. + * These settings override any default duration limits set on the UnitKind. + * See the DurationLimits message definition for details on the constraints + * like minimum, maximum, and system default values for + * unit_operation_timeout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.DurationLimits duration_limits = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits $var + * @return $this + */ + public function setDurationLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DurationLimits::class); + $this->duration_limits = $var; + + return $this; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels on the resource, which can be used for categorization. + * similar to Kubernetes resource labels. + * + * Generated from protobuf field map labels = 10401 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations is an unstructured key-value map stored with a + * resource that may be set by external tools to store and retrieve arbitrary + * metadata. They are not queryable and should be preserved when modifying + * objects. + * More info: https://kubernetes.io/docs/user-guide/annotations + * + * Generated from protobuf field map annotations = 10402 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the resource. UID is unique in the + * time and space for this resource within the scope of the service. It is + * typically generated by the server on successful creation of a resource + * and must not be changed. UID is used to uniquely identify resources + * with resource name reuses. This should be a UUID4. + * + * Generated from protobuf field string uid = 10201 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. An opaque value that uniquely identifies a version or + * generation of a resource. It can be used to confirm that the client + * and server agree on the ordering of a resource being written. + * + * Generated from protobuf field string etag = 10202 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10303 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.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 resource was last updated. Any + * change to the resource made by users must refresh this value. + * Changes to a resource made by the service should refresh this value. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10304 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The timestamp when the resource was marked for deletion + * (deletion is an asynchronous operation). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10305 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getUnitOperationType() + { + return $this->whichOneof("unit_operation_type"); + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation/UnitOperationState.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation/UnitOperationState.php new file mode 100644 index 000000000000..abd831162f8f --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperation/UnitOperationState.php @@ -0,0 +1,89 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation.UnitOperationState + */ +class UnitOperationState +{ + /** + * Unit operation state is unknown. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_UNKNOWN = 0; + */ + const UNIT_OPERATION_STATE_UNKNOWN = 0; + /** + * Unit operation is accepted but not ready to run. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_PENDING = 1; + */ + const UNIT_OPERATION_STATE_PENDING = 1; + /** + * Unit operation is accepted and scheduled. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_SCHEDULED = 2; + */ + const UNIT_OPERATION_STATE_SCHEDULED = 2; + /** + * Unit operation is running. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_RUNNING = 4; + */ + const UNIT_OPERATION_STATE_RUNNING = 4; + /** + * Unit operation has completed successfully. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_SUCCEEDED = 5; + */ + const UNIT_OPERATION_STATE_SUCCEEDED = 5; + /** + * Unit operation has failed. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_FAILED = 6; + */ + const UNIT_OPERATION_STATE_FAILED = 6; + /** + * Unit operation was cancelled. + * + * Generated from protobuf enum UNIT_OPERATION_STATE_CANCELLED = 7; + */ + const UNIT_OPERATION_STATE_CANCELLED = 7; + + private static $valueToName = [ + self::UNIT_OPERATION_STATE_UNKNOWN => 'UNIT_OPERATION_STATE_UNKNOWN', + self::UNIT_OPERATION_STATE_PENDING => 'UNIT_OPERATION_STATE_PENDING', + self::UNIT_OPERATION_STATE_SCHEDULED => 'UNIT_OPERATION_STATE_SCHEDULED', + self::UNIT_OPERATION_STATE_RUNNING => 'UNIT_OPERATION_STATE_RUNNING', + self::UNIT_OPERATION_STATE_SUCCEEDED => 'UNIT_OPERATION_STATE_SUCCEEDED', + self::UNIT_OPERATION_STATE_FAILED => 'UNIT_OPERATION_STATE_FAILED', + self::UNIT_OPERATION_STATE_CANCELLED => 'UNIT_OPERATION_STATE_CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition.php new file mode 100644 index 000000000000..2d28c4f947ee --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition.php @@ -0,0 +1,219 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition + */ +class UnitOperationCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $status = 0; + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $last_transition_time = null; + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status + * Required. Status of the condition. + * @type int $type + * Required. Type of the condition. + * @type \Google\Protobuf\Timestamp $last_transition_time + * Required. Last time the condition transited from one status to another. + * @type string $message + * Required. Human readable message indicating details about the last + * transition. + * @type string $reason + * Required. Brief reason for the condition's last transition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Required. Status of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Status status = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the condition. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperationCondition\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransitionTime() + { + return $this->last_transition_time; + } + + public function hasLastTransitionTime() + { + return isset($this->last_transition_time); + } + + public function clearLastTransitionTime() + { + unset($this->last_transition_time); + } + + /** + * Required. Last time the condition transited from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransitionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transition_time = $var; + + return $this; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. Human readable message indicating details about the last + * transition. + * + * Generated from protobuf field string message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. Brief reason for the condition's last transition. + * + * Generated from protobuf field string reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Status.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Status.php new file mode 100644 index 000000000000..156d00729041 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Status.php @@ -0,0 +1,68 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Status + */ +class Status +{ + /** + * Condition status is unspecified. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * Condition is unknown. + * + * Generated from protobuf enum STATUS_UNKNOWN = 1; + */ + const STATUS_UNKNOWN = 1; + /** + * Condition is true. + * + * Generated from protobuf enum STATUS_TRUE = 2; + */ + const STATUS_TRUE = 2; + /** + * Condition is false. + * + * Generated from protobuf enum STATUS_FALSE = 3; + */ + const STATUS_FALSE = 3; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::STATUS_UNKNOWN => 'STATUS_UNKNOWN', + self::STATUS_TRUE => 'STATUS_TRUE', + self::STATUS_FALSE => 'STATUS_FALSE', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Type.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Type.php new file mode 100644 index 000000000000..ecf4a2598650 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationCondition/Type.php @@ -0,0 +1,100 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationCondition.Type + */ +class Type +{ + /** + * Condition type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Condition type is scheduled. + * + * Generated from protobuf enum TYPE_SCHEDULED = 2; + */ + const TYPE_SCHEDULED = 2; + /** + * Condition type is running. + * + * Generated from protobuf enum TYPE_RUNNING = 3; + */ + const TYPE_RUNNING = 3; + /** + * Condition type is succeeded. + * + * Generated from protobuf enum TYPE_SUCCEEDED = 4; + */ + const TYPE_SUCCEEDED = 4; + /** + * Condition type is cancelled. + * + * Generated from protobuf enum TYPE_CANCELLED = 5; + */ + const TYPE_CANCELLED = 5; + /** + * Indicates if AppHub app has been created. + * + * Generated from protobuf enum TYPE_APP_CREATED = 6; + */ + const TYPE_APP_CREATED = 6; + /** + * Indicates if services and workloads have been registered with AppHub. + * + * Generated from protobuf enum TYPE_APP_COMPONENTS_REGISTERED = 7; + */ + const TYPE_APP_COMPONENTS_REGISTERED = 7; + /** + * Indicates if the UnitOperation's core workload execution completed + * successfully. + * The workload is the core execution operation performed for a + * UnitOperation (e.g., provisioning, updating, or deprovisioning + * resources) excluding post-operation checks. + * + * Generated from protobuf enum TYPE_WORKLOAD_SUCCEEDED = 8; + */ + const TYPE_WORKLOAD_SUCCEEDED = 8; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TYPE_SCHEDULED => 'TYPE_SCHEDULED', + self::TYPE_RUNNING => 'TYPE_RUNNING', + self::TYPE_SUCCEEDED => 'TYPE_SUCCEEDED', + self::TYPE_CANCELLED => 'TYPE_CANCELLED', + self::TYPE_APP_CREATED => 'TYPE_APP_CREATED', + self::TYPE_APP_COMPONENTS_REGISTERED => 'TYPE_APP_COMPONENTS_REGISTERED', + self::TYPE_WORKLOAD_SUCCEEDED => 'TYPE_WORKLOAD_SUCCEEDED', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationErrorCategory.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationErrorCategory.php new file mode 100644 index 000000000000..7766ddead844 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitOperationErrorCategory.php @@ -0,0 +1,84 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitOperationErrorCategory + */ +class UnitOperationErrorCategory +{ + /** + * Unit operation error category is unspecified + * + * Generated from protobuf enum UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED = 0; + */ + const UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED = 0; + /** + * Unit operation error category is not applicable, or it is not an error + * + * Generated from protobuf enum NOT_APPLICABLE = 1; + */ + const NOT_APPLICABLE = 1; + /** + * Unit operation error category is fatal + * + * Generated from protobuf enum FATAL = 2; + */ + const FATAL = 2; + /** + * Unit operation error category is retriable + * + * Generated from protobuf enum RETRIABLE = 3; + */ + const RETRIABLE = 3; + /** + * Unit operation error category is ignorable + * + * Generated from protobuf enum IGNORABLE = 4; + */ + const IGNORABLE = 4; + /** + * Unit operation error category is standard, counts towards Rollout error + * budget + * + * Generated from protobuf enum STANDARD = 5; + */ + const STANDARD = 5; + + private static $valueToName = [ + self::UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED => 'UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED', + self::NOT_APPLICABLE => 'NOT_APPLICABLE', + self::FATAL => 'FATAL', + self::RETRIABLE => 'RETRIABLE', + self::IGNORABLE => 'IGNORABLE', + self::STANDARD => 'STANDARD', + ]; + + 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/SaasPlatformSaasServiceMgmt/src/V1/UnitUpdatePacing.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitUpdatePacing.php new file mode 100644 index 000000000000..f6ae1803e060 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitUpdatePacing.php @@ -0,0 +1,138 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitUpdatePacing + */ +class UnitUpdatePacing extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum percentage of total units in the scope that can be + * in-flight. Example: 10.5 for 10.5%. If both percent and count are provided, + * the system uses the MINIMUM (most restrictive). + * + * Generated from protobuf field optional .google.type.Decimal max_concurrent_operations_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_concurrent_operations_percent = null; + /** + * Optional. An absolute cap on concurrent units operations. + * If both percent and count are provided, the system uses the MINIMUM + * (most restrictive). + * + * Generated from protobuf field optional int32 max_concurrent_operations_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_concurrent_operations_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Decimal $max_concurrent_operations_percent + * Optional. The maximum percentage of total units in the scope that can be + * in-flight. Example: 10.5 for 10.5%. If both percent and count are provided, + * the system uses the MINIMUM (most restrictive). + * @type int $max_concurrent_operations_count + * Optional. An absolute cap on concurrent units operations. + * If both percent and count are provided, the system uses the MINIMUM + * (most restrictive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum percentage of total units in the scope that can be + * in-flight. Example: 10.5 for 10.5%. If both percent and count are provided, + * the system uses the MINIMUM (most restrictive). + * + * Generated from protobuf field optional .google.type.Decimal max_concurrent_operations_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Decimal|null + */ + public function getMaxConcurrentOperationsPercent() + { + return $this->max_concurrent_operations_percent; + } + + public function hasMaxConcurrentOperationsPercent() + { + return isset($this->max_concurrent_operations_percent); + } + + public function clearMaxConcurrentOperationsPercent() + { + unset($this->max_concurrent_operations_percent); + } + + /** + * Optional. The maximum percentage of total units in the scope that can be + * in-flight. Example: 10.5 for 10.5%. If both percent and count are provided, + * the system uses the MINIMUM (most restrictive). + * + * Generated from protobuf field optional .google.type.Decimal max_concurrent_operations_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Decimal $var + * @return $this + */ + public function setMaxConcurrentOperationsPercent($var) + { + GPBUtil::checkMessage($var, \Google\Type\Decimal::class); + $this->max_concurrent_operations_percent = $var; + + return $this; + } + + /** + * Optional. An absolute cap on concurrent units operations. + * If both percent and count are provided, the system uses the MINIMUM + * (most restrictive). + * + * Generated from protobuf field optional int32 max_concurrent_operations_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxConcurrentOperationsCount() + { + return isset($this->max_concurrent_operations_count) ? $this->max_concurrent_operations_count : 0; + } + + public function hasMaxConcurrentOperationsCount() + { + return isset($this->max_concurrent_operations_count); + } + + public function clearMaxConcurrentOperationsCount() + { + unset($this->max_concurrent_operations_count); + } + + /** + * Optional. An absolute cap on concurrent units operations. + * If both percent and count are provided, the system uses the MINIMUM + * (most restrictive). + * + * Generated from protobuf field optional int32 max_concurrent_operations_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxConcurrentOperationsCount($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_operations_count = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable.php new file mode 100644 index 000000000000..8bb3ec5b914e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable.php @@ -0,0 +1,139 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable + */ +class UnitVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Name of the variable from actuation configs. + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $variable = ''; + /** + * Optional. Immutable. Name of a supported variable type. Supported types are + * string, int, bool. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable.Type type = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Optional. String encoded value for the variable. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $variable + * Required. Immutable. Name of the variable from actuation configs. + * @type int $type + * Optional. Immutable. Name of a supported variable type. Supported types are + * string, int, bool. + * @type string $value + * Optional. String encoded value for the variable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. Name of the variable from actuation configs. + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getVariable() + { + return $this->variable; + } + + /** + * Required. Immutable. Name of the variable from actuation configs. + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setVariable($var) + { + GPBUtil::checkString($var, True); + $this->variable = $var; + + return $this; + } + + /** + * Optional. Immutable. Name of a supported variable type. Supported types are + * string, int, bool. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable.Type type = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Immutable. Name of a supported variable type. Supported types are + * string, int, bool. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable.Type type = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. String encoded value for the variable. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. String encoded value for the variable. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable/Type.php b/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable/Type.php new file mode 100644 index 000000000000..023ce6afd60d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UnitVariable/Type.php @@ -0,0 +1,87 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable.Type + */ +class Type +{ + /** + * Variable type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Variable type is string. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Variable type is int. + * + * Generated from protobuf enum INT = 2; + */ + const INT = 2; + /** + * Variable type is bool. + * + * Generated from protobuf enum BOOL = 3; + */ + const BOOL = 3; + /** + * Variable type is struct. + * + * Generated from protobuf enum STRUCT = 4; + */ + const STRUCT = 4; + /** + * Variable type is list. + * + * Generated from protobuf enum LIST = 5; + */ + const PBLIST = 5; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::INT => 'INT', + self::BOOL => 'BOOL', + self::STRUCT => 'STRUCT', + self::PBLIST => 'LIST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/UpdateReleaseRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateReleaseRequest.php new file mode 100644 index 000000000000..adab181bd231 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateReleaseRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateReleaseRequest + */ +class UpdateReleaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $release = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * Release resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Release will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release Required. The desired state for the release. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Release resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * Release will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateReleaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRelease($release) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $release + * Required. The desired state for the release. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Release resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Release will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release|null + */ + public function getRelease() + { + return $this->release; + } + + public function hasRelease() + { + return isset($this->release); + } + + public function clearRelease() + { + unset($this->release); + } + + /** + * Required. The desired state for the release. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Release release = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release::class); + $this->release = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Release resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Release will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Release resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Release will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutKindRequest.php new file mode 100644 index 000000000000..b2474b18efd3 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutKindRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateRolloutKindRequest + */ +class UpdateRolloutKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout_kind = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * RolloutKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * RolloutKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rolloutKind Required. The desired state for the rollout kind. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * RolloutKind resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * RolloutKind will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutKindRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rolloutKind, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRolloutKind($rolloutKind) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $rollout_kind + * Required. The desired state for the rollout kind. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * RolloutKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * RolloutKind will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind|null + */ + public function getRolloutKind() + { + return $this->rollout_kind; + } + + public function hasRolloutKind() + { + return isset($this->rollout_kind); + } + + public function clearRolloutKind() + { + unset($this->rollout_kind); + } + + /** + * Required. The desired state for the rollout kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.RolloutKind rollout_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind $var + * @return $this + */ + public function setRolloutKind($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind::class); + $this->rollout_kind = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * RolloutKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * RolloutKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * RolloutKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * RolloutKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutRequest.php new file mode 100644 index 000000000000..a0c553d38271 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateRolloutRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateRolloutRequest + */ +class UpdateRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * Rollout resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Rollout will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout Required. The desired state for the rollout. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Rollout resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * Rollout will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRollout($rollout) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $rollout + * Required. The desired state for the rollout. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Rollout resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Rollout will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\RolloutsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Required. The desired state for the rollout. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Rollout rollout = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Rollout resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Rollout will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Rollout resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Rollout will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateSaasRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateSaasRequest.php new file mode 100644 index 000000000000..8614af44b5ff --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateSaasRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateSaasRequest + */ +class UpdateSaasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $saas = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * Saas resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Saas will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas Required. The desired state for the saas. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Saas resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * Saas will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateSaasRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSaas($saas) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $saas + * Required. The desired state for the saas. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Saas resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Saas will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas|null + */ + public function getSaas() + { + return $this->saas; + } + + public function hasSaas() + { + return isset($this->saas); + } + + public function clearSaas() + { + unset($this->saas); + } + + /** + * Required. The desired state for the saas. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Saas saas = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas $var + * @return $this + */ + public function setSaas($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas::class); + $this->saas = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Saas resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Saas will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Saas resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Saas will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateTenantRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateTenantRequest.php new file mode 100644 index 000000000000..2520eaf98c31 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateTenantRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateTenantRequest + */ +class UpdateTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * Tenant resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Tenant will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant Required. The desired state for the tenant. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Tenant resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * Tenant will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateTenantRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTenant($tenant) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $tenant + * Required. The desired state for the tenant. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Tenant resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Tenant will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant|null + */ + public function getTenant() + { + return $this->tenant; + } + + public function hasTenant() + { + return isset($this->tenant); + } + + public function clearTenant() + { + unset($this->tenant); + } + + /** + * Required. The desired state for the tenant. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Tenant tenant = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant::class); + $this->tenant = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Tenant resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Tenant will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Tenant resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Tenant will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitKindRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitKindRequest.php new file mode 100644 index 000000000000..b24e22543116 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitKindRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitKindRequest + */ +class UpdateUnitKindRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_kind = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unitKind Required. The desired state for the unit kind. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * UnitKind resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * UnitKind will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateUnitKindRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unitKind, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setUnitKind($unitKind) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $unit_kind + * Required. The desired state for the unit kind. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * UnitKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitKind will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind|null + */ + public function getUnitKind() + { + return $this->unit_kind; + } + + public function hasUnitKind() + { + return isset($this->unit_kind); + } + + public function clearUnitKind() + { + unset($this->unit_kind); + } + + /** + * Required. The desired state for the unit kind. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitKind unit_kind = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind $var + * @return $this + */ + public function setUnitKind($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind::class); + $this->unit_kind = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitKind resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitKind will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitOperationRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitOperationRequest.php new file mode 100644 index 000000000000..5f8e08655ebe --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitOperationRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitOperationRequest + */ +class UpdateUnitOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit_operation = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitOperation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitOperation will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unitOperation Required. The desired state for the unit operation. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * UnitOperation resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * UnitOperation will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateUnitOperationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unitOperation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setUnitOperation($unitOperation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $unit_operation + * Required. The desired state for the unit operation. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * UnitOperation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitOperation will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation|null + */ + public function getUnitOperation() + { + return $this->unit_operation; + } + + public function hasUnitOperation() + { + return isset($this->unit_operation); + } + + public function clearUnitOperation() + { + unset($this->unit_operation); + } + + /** + * Required. The desired state for the unit operation. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.UnitOperation unit_operation = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation $var + * @return $this + */ + public function setUnitOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation::class); + $this->unit_operation = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitOperation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitOperation will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * UnitOperation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * UnitOperation will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitRequest.php b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitRequest.php new file mode 100644 index 000000000000..66cae140550e --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/UpdateUnitRequest.php @@ -0,0 +1,275 @@ +google.cloud.saasplatform.saasservicemgmt.v1.UpdateUnitRequest + */ +class UpdateUnitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $unit = null; + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + */ + protected $validate_only = false; + /** + * 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 = 10502; + */ + protected $request_id = ''; + /** + * Field mask is used to specify the fields to be overwritten in the + * Unit resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Unit will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit Required. The desired state for the unit. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Unit resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the user does not provide a mask then all fields in the + * Unit will be overwritten. + * + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateUnitRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setUnit($unit) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $unit + * Required. The desired state for the unit. + * @type bool $validate_only + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Unit resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Unit will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit|null + */ + public function getUnit() + { + return $this->unit; + } + + public function hasUnit() + { + return isset($this->unit); + } + + public function clearUnit() + { + unset($this->unit); + } + + /** + * Required. The desired state for the unit. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.Unit unit = 10504 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit::class); + $this->unit = $var; + + return $this; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If "validate_only" is set to true, the service will try to validate + * that this request would succeed, but will not actually make changes. + * + * Generated from protobuf field bool validate_only = 10501; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 10502; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Unit resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Unit will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Unit resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the user does not provide a mask then all fields in the + * Unit will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 10512; + * @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/SaasPlatformSaasServiceMgmt/src/V1/Upgrade.php b/SaasPlatformSaasServiceMgmt/src/V1/Upgrade.php new file mode 100644 index 000000000000..e5740bf47d3a --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/Upgrade.php @@ -0,0 +1,103 @@ +google.cloud.saasplatform.saasservicemgmt.v1.Upgrade + */ +class Upgrade extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $release = ''; + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_variables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $release + * Optional. Reference to the Release object to use for the Unit. (optional). + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $input_variables + * Optional. Set of input variables. Maximum 100. (optional) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRelease() + { + return $this->release; + } + + /** + * Optional. Reference to the Release object to use for the Unit. (optional). + * + * Generated from protobuf field string release = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRelease($var) + { + GPBUtil::checkString($var, True); + $this->release = $var; + + return $this; + } + + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable> + */ + public function getInputVariables() + { + return $this->input_variables; + } + + /** + * Optional. Set of input variables. Maximum 100. (optional) + * + * Generated from protobuf field repeated .google.cloud.saasplatform.saasservicemgmt.v1.UnitVariable input_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable[] $var + * @return $this + */ + public function setInputVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitVariable::class); + $this->input_variables = $arr; + + return $this; + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/VariableMapping.php b/SaasPlatformSaasServiceMgmt/src/V1/VariableMapping.php new file mode 100644 index 000000000000..bf6156b02cd1 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/VariableMapping.php @@ -0,0 +1,143 @@ +google.cloud.saasplatform.saasservicemgmt.v1.VariableMapping + */ +class VariableMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. name of the variable + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $variable = ''; + protected $mapping_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\FromMapping $from + * Optional. Output variables which will get their values from dependencies + * @type \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ToMapping $to + * Optional. Input variables whose values will be passed on to dependencies. + * @type string $variable + * Required. name of the variable + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Saasplatform\Saasservicemgmt\V1\DeploymentsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Output variables which will get their values from dependencies + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.FromMapping from = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\FromMapping|null + */ + public function getFrom() + { + return $this->readOneof(2); + } + + public function hasFrom() + { + return $this->hasOneof(2); + } + + /** + * Optional. Output variables which will get their values from dependencies + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.FromMapping from = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\FromMapping $var + * @return $this + */ + public function setFrom($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\FromMapping::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Input variables whose values will be passed on to dependencies. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ToMapping to = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ToMapping|null + */ + public function getTo() + { + return $this->readOneof(3); + } + + public function hasTo() + { + return $this->hasOneof(3); + } + + /** + * Optional. Input variables whose values will be passed on to dependencies. + * + * Generated from protobuf field .google.cloud.saasplatform.saasservicemgmt.v1.ToMapping to = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ToMapping $var + * @return $this + */ + public function setTo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ToMapping::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. name of the variable + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVariable() + { + return $this->variable; + } + + /** + * Required. name of the variable + * + * Generated from protobuf field string variable = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVariable($var) + { + GPBUtil::checkString($var, True); + $this->variable = $var; + + return $this; + } + + /** + * @return string + */ + public function getMappingType() + { + return $this->whichOneof("mapping_type"); + } + +} + diff --git a/SaasPlatformSaasServiceMgmt/src/V1/gapic_metadata.json b/SaasPlatformSaasServiceMgmt/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..cb5615d1b492 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/gapic_metadata.json @@ -0,0 +1,247 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.saasplatform.saasservicemgmt.v1", + "libraryPackage": "Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1", + "services": { + "SaasDeployments": { + "clients": { + "grpc": { + "libraryClient": "SaasDeploymentsClient", + "rpcs": { + "CreateRelease": { + "methods": [ + "createRelease" + ] + }, + "CreateSaas": { + "methods": [ + "createSaas" + ] + }, + "CreateTenant": { + "methods": [ + "createTenant" + ] + }, + "CreateUnit": { + "methods": [ + "createUnit" + ] + }, + "CreateUnitKind": { + "methods": [ + "createUnitKind" + ] + }, + "CreateUnitOperation": { + "methods": [ + "createUnitOperation" + ] + }, + "DeleteRelease": { + "methods": [ + "deleteRelease" + ] + }, + "DeleteSaas": { + "methods": [ + "deleteSaas" + ] + }, + "DeleteTenant": { + "methods": [ + "deleteTenant" + ] + }, + "DeleteUnit": { + "methods": [ + "deleteUnit" + ] + }, + "DeleteUnitKind": { + "methods": [ + "deleteUnitKind" + ] + }, + "DeleteUnitOperation": { + "methods": [ + "deleteUnitOperation" + ] + }, + "GetRelease": { + "methods": [ + "getRelease" + ] + }, + "GetSaas": { + "methods": [ + "getSaas" + ] + }, + "GetTenant": { + "methods": [ + "getTenant" + ] + }, + "GetUnit": { + "methods": [ + "getUnit" + ] + }, + "GetUnitKind": { + "methods": [ + "getUnitKind" + ] + }, + "GetUnitOperation": { + "methods": [ + "getUnitOperation" + ] + }, + "ListReleases": { + "methods": [ + "listReleases" + ] + }, + "ListSaas": { + "methods": [ + "listSaas" + ] + }, + "ListTenants": { + "methods": [ + "listTenants" + ] + }, + "ListUnitKinds": { + "methods": [ + "listUnitKinds" + ] + }, + "ListUnitOperations": { + "methods": [ + "listUnitOperations" + ] + }, + "ListUnits": { + "methods": [ + "listUnits" + ] + }, + "UpdateRelease": { + "methods": [ + "updateRelease" + ] + }, + "UpdateSaas": { + "methods": [ + "updateSaas" + ] + }, + "UpdateTenant": { + "methods": [ + "updateTenant" + ] + }, + "UpdateUnit": { + "methods": [ + "updateUnit" + ] + }, + "UpdateUnitKind": { + "methods": [ + "updateUnitKind" + ] + }, + "UpdateUnitOperation": { + "methods": [ + "updateUnitOperation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "SaasRollouts": { + "clients": { + "grpc": { + "libraryClient": "SaasRolloutsClient", + "rpcs": { + "CreateRollout": { + "methods": [ + "createRollout" + ] + }, + "CreateRolloutKind": { + "methods": [ + "createRolloutKind" + ] + }, + "DeleteRollout": { + "methods": [ + "deleteRollout" + ] + }, + "DeleteRolloutKind": { + "methods": [ + "deleteRolloutKind" + ] + }, + "GetRollout": { + "methods": [ + "getRollout" + ] + }, + "GetRolloutKind": { + "methods": [ + "getRolloutKind" + ] + }, + "ListRolloutKinds": { + "methods": [ + "listRolloutKinds" + ] + }, + "ListRollouts": { + "methods": [ + "listRollouts" + ] + }, + "UpdateRollout": { + "methods": [ + "updateRollout" + ] + }, + "UpdateRolloutKind": { + "methods": [ + "updateRolloutKind" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_client_config.json b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_client_config.json new file mode 100644 index 000000000000..85937da56290 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_client_config.json @@ -0,0 +1,226 @@ +{ + "interfaces": { + "google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 80000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 80000, + "total_timeout_millis": 80000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 80000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 80000, + "total_timeout_millis": 80000 + } + }, + "methods": { + "CreateRelease": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSaas": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTenant": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUnit": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUnitKind": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUnitOperation": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRelease": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSaas": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTenant": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteUnit": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteUnitKind": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteUnitOperation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRelease": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSaas": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTenant": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetUnit": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetUnitKind": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetUnitOperation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReleases": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListSaas": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListTenants": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListUnitKinds": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListUnitOperations": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListUnits": { + "timeout_millis": 80000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateRelease": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSaas": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTenant": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateUnit": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateUnitKind": { + "timeout_millis": 80000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateUnitOperation": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_descriptor_config.php b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_descriptor_config.php new file mode 100644 index 000000000000..631579b02e09 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_descriptor_config.php @@ -0,0 +1,491 @@ + [ + 'google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments' => [ + 'CreateRelease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSaas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUnit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUnitKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUnitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRelease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSaas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnitKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRelease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSaas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUnit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUnitKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUnitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReleases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReleases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListReleasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSaas' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSaas', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListSaasResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTenants' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTenants', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListTenantsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnitKinds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUnitKinds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitKindsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnitOperations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUnitOperations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitOperationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnits' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUnits', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListUnitsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRelease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Release', + 'headerParams' => [ + [ + 'keyName' => 'release.name', + 'fieldAccessors' => [ + 'getRelease', + 'getName', + ], + ], + ], + ], + 'UpdateSaas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Saas', + 'headerParams' => [ + [ + 'keyName' => 'saas.name', + 'fieldAccessors' => [ + 'getSaas', + 'getName', + ], + ], + ], + ], + 'UpdateTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'tenant.name', + 'fieldAccessors' => [ + 'getTenant', + 'getName', + ], + ], + ], + ], + 'UpdateUnit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Unit', + 'headerParams' => [ + [ + 'keyName' => 'unit.name', + 'fieldAccessors' => [ + 'getUnit', + 'getName', + ], + ], + ], + ], + 'UpdateUnitKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitKind', + 'headerParams' => [ + [ + 'keyName' => 'unit_kind.name', + 'fieldAccessors' => [ + 'getUnitKind', + 'getName', + ], + ], + ], + ], + 'UpdateUnitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UnitOperation', + 'headerParams' => [ + [ + 'keyName' => 'unit_operation.name', + 'fieldAccessors' => [ + 'getUnitOperation', + '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' => [ + 'application' => 'projects/{project}/locations/{location}/applications/{application}', + 'applicationTemplate' => 'projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}', + 'applicationTemplateRevision' => 'projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/revisions/{revision}', + 'location' => 'projects/{project}/locations/{location}', + 'projectLocationSpaceApplicationTemplate' => 'projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}', + 'projectLocationWorkspaceApplicationTemplate' => 'projects/{project}/locations/{location}/workspaces/{workspace}/applicationTemplates/{application_template}', + 'release' => 'projects/{project}/locations/{location}/releases/{release}', + 'rollout' => 'projects/{project}/locations/{location}/rollouts/{rollout_id}', + 'saas' => 'projects/{project}/locations/{location}/saas/{saas}', + 'tenant' => 'projects/{project}/locations/{location}/tenants/{tenant}', + 'unit' => 'projects/{project}/locations/{location}/units/{unit}', + 'unitKind' => 'projects/{project}/locations/{location}/unitKinds/{unit_kind}', + 'unitOperation' => 'projects/{project}/locations/{location}/unitOperations/{unit_operation}', + ], + ], + ], +]; diff --git a/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_rest_client_config.php b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_rest_client_config.php new file mode 100644 index 000000000000..0a2315af8c54 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_deployments_rest_client_config.php @@ -0,0 +1,419 @@ + [ + '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.saasplatform.saasservicemgmt.v1.SaasDeployments' => [ + 'CreateRelease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/releases', + 'body' => 'release', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'release_id', + ], + ], + 'CreateSaas' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/saas', + 'body' => 'saas', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'saas_id', + ], + ], + 'CreateTenant' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tenants', + 'body' => 'tenant', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tenant_id', + ], + ], + 'CreateUnit' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/units', + 'body' => 'unit', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'unit_id', + ], + ], + 'CreateUnitKind' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/unitKinds', + 'body' => 'unit_kind', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'unit_kind_id', + ], + ], + 'CreateUnitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/unitOperations', + 'body' => 'unit_operation', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'unit_operation_id', + ], + ], + 'DeleteRelease' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/releases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSaas' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/saas/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTenant' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tenants/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnit' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/units/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnitKind' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/unitKinds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUnitOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/unitOperations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRelease' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/releases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSaas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/saas/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTenant' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tenants/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUnit' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/units/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUnitKind' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/unitKinds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUnitOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/unitOperations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReleases' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/releases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSaas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/saas', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTenants' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tenants', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnitKinds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/unitKinds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnitOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/unitOperations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUnits' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/units', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRelease' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{release.name=projects/*/locations/*/releases/*}', + 'body' => 'release', + 'placeholders' => [ + 'release.name' => [ + 'getters' => [ + 'getRelease', + 'getName', + ], + ], + ], + ], + 'UpdateSaas' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{saas.name=projects/*/locations/*/saas/*}', + 'body' => 'saas', + 'placeholders' => [ + 'saas.name' => [ + 'getters' => [ + 'getSaas', + 'getName', + ], + ], + ], + ], + 'UpdateTenant' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tenant.name=projects/*/locations/*/tenants/*}', + 'body' => 'tenant', + 'placeholders' => [ + 'tenant.name' => [ + 'getters' => [ + 'getTenant', + 'getName', + ], + ], + ], + ], + 'UpdateUnit' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{unit.name=projects/*/locations/*/units/*}', + 'body' => 'unit', + 'placeholders' => [ + 'unit.name' => [ + 'getters' => [ + 'getUnit', + 'getName', + ], + ], + ], + ], + 'UpdateUnitKind' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{unit_kind.name=projects/*/locations/*/unitKinds/*}', + 'body' => 'unit_kind', + 'placeholders' => [ + 'unit_kind.name' => [ + 'getters' => [ + 'getUnitKind', + 'getName', + ], + ], + ], + ], + 'UpdateUnitOperation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{unit_operation.name=projects/*/locations/*/unitOperations/*}', + 'body' => 'unit_operation', + 'placeholders' => [ + 'unit_operation.name' => [ + 'getters' => [ + 'getUnitOperation', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_client_config.json b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_client_config.json new file mode 100644 index 000000000000..9004ab0b5c02 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_client_config.json @@ -0,0 +1,116 @@ +{ + "interfaces": { + "google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ], + "no_retry_3_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 540000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 540000, + "total_timeout_millis": 540000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateRollout": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "CreateRolloutKind": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteRollout": { + "timeout_millis": 540000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "DeleteRolloutKind": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetRollout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetRolloutKind": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListRolloutKinds": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListRollouts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateRollout": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "UpdateRolloutKind": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_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/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_descriptor_config.php b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_descriptor_config.php new file mode 100644 index 000000000000..d2be74db0e6d --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_descriptor_config.php @@ -0,0 +1,207 @@ + [ + 'google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts' => [ + 'CreateRollout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRolloutKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRollout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRolloutKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRollout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRolloutKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRolloutKinds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRolloutKinds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutKindsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRollouts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRollouts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRollout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout', + 'headerParams' => [ + [ + 'keyName' => 'rollout.name', + 'fieldAccessors' => [ + 'getRollout', + 'getName', + ], + ], + ], + ], + 'UpdateRolloutKind' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind', + 'headerParams' => [ + [ + 'keyName' => 'rollout_kind.name', + 'fieldAccessors' => [ + 'getRolloutKind', + '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' => [ + 'location' => 'projects/{project}/locations/{location}', + 'release' => 'projects/{project}/locations/{location}/releases/{release}', + 'rollout' => 'projects/{project}/locations/{location}/rollouts/{rollout_id}', + 'rolloutKind' => 'projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}', + 'unitKind' => 'projects/{project}/locations/{location}/unitKinds/{unit_kind}', + ], + ], + ], +]; diff --git a/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_rest_client_config.php b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_rest_client_config.php new file mode 100644 index 000000000000..c2e6b1626eb6 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/src/V1/resources/saas_rollouts_rest_client_config.php @@ -0,0 +1,175 @@ + [ + '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.saasplatform.saasservicemgmt.v1.SaasRollouts' => [ + 'CreateRollout' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/rollouts', + 'body' => 'rollout', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rollout_id', + ], + ], + 'CreateRolloutKind' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/rolloutKinds', + 'body' => 'rollout_kind', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rollout_kind_id', + ], + ], + 'DeleteRollout' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/rollouts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRolloutKind' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/rolloutKinds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRollout' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/rollouts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRolloutKind' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/rolloutKinds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRolloutKinds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/rolloutKinds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRollouts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/rollouts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRollout' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rollout.name=projects/*/locations/*/rollouts/*}', + 'body' => 'rollout', + 'placeholders' => [ + 'rollout.name' => [ + 'getters' => [ + 'getRollout', + 'getName', + ], + ], + ], + ], + 'UpdateRolloutKind' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rollout_kind.name=projects/*/locations/*/rolloutKinds/*}', + 'body' => 'rollout_kind', + 'placeholders' => [ + 'rollout_kind.name' => [ + 'getters' => [ + 'getRolloutKind', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasDeploymentsClientTest.php b/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasDeploymentsClientTest.php new file mode 100644 index 000000000000..35ac56a33812 --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasDeploymentsClientTest.php @@ -0,0 +1,2591 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return SaasDeploymentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SaasDeploymentsClient($options); + } + + /** @test */ + public function createReleaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Release(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $releaseId = 'releaseId-1517127597'; + $release = new Release(); + $releaseUnitKind = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $release->setUnitKind($releaseUnitKind); + $request = (new CreateReleaseRequest()) + ->setParent($formattedParent) + ->setReleaseId($releaseId) + ->setRelease($release); + $response = $gapicClient->createRelease($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateRelease', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReleaseId(); + $this->assertProtobufEquals($releaseId, $actualValue); + $actualValue = $actualRequestObject->getRelease(); + $this->assertProtobufEquals($release, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReleaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $releaseId = 'releaseId-1517127597'; + $release = new Release(); + $releaseUnitKind = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $release->setUnitKind($releaseUnitKind); + $request = (new CreateReleaseRequest()) + ->setParent($formattedParent) + ->setReleaseId($releaseId) + ->setRelease($release); + try { + $gapicClient->createRelease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSaasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $blueprintRepo = 'blueprintRepo1625230750'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Saas(); + $expectedResponse->setName($name); + $expectedResponse->setBlueprintRepo($blueprintRepo); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $saasId = 'saasId1853838010'; + $saas = new Saas(); + $request = (new CreateSaasRequest()) + ->setParent($formattedParent) + ->setSaasId($saasId) + ->setSaas($saas); + $response = $gapicClient->createSaas($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateSaas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSaasId(); + $this->assertProtobufEquals($saasId, $actualValue); + $actualValue = $actualRequestObject->getSaas(); + $this->assertProtobufEquals($saas, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSaasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $saasId = 'saasId1853838010'; + $saas = new Saas(); + $request = (new CreateSaasRequest()) + ->setParent($formattedParent) + ->setSaasId($saasId) + ->setSaas($saas); + try { + $gapicClient->createSaas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $consumerResource = 'consumerResource-748779977'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name); + $expectedResponse->setConsumerResource($consumerResource); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tenantId = 'tenantId-1852780336'; + $tenant = new Tenant(); + $tenantSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $tenant->setSaas($tenantSaas); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenantId($tenantId) + ->setTenant($tenant); + $response = $gapicClient->createTenant($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateTenant', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTenantId(); + $this->assertProtobufEquals($tenantId, $actualValue); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($tenant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $tenantId = 'tenantId-1852780336'; + $tenant = new Tenant(); + $tenantSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $tenant->setSaas($tenantSaas); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenantId($tenantId) + ->setTenant($tenant); + try { + $gapicClient->createTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $release = 'release1090594823'; + $tenant = 'tenant-877336406'; + $application = 'application1554253136'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Unit(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRelease($release); + $expectedResponse->setTenant($tenant); + $expectedResponse->setApplication($application); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $unitId = 'unitId-286525002'; + $unit = new Unit(); + $request = (new CreateUnitRequest()) + ->setParent($formattedParent) + ->setUnitId($unitId) + ->setUnit($unit); + $response = $gapicClient->createUnit($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUnitId(); + $this->assertProtobufEquals($unitId, $actualValue); + $actualValue = $actualRequestObject->getUnit(); + $this->assertProtobufEquals($unit, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $unitId = 'unitId-286525002'; + $unit = new Unit(); + $request = (new CreateUnitRequest()) + ->setParent($formattedParent) + ->setUnitId($unitId) + ->setUnit($unit); + try { + $gapicClient->createUnit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $defaultRelease = 'defaultRelease1087296521'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitKind(); + $expectedResponse->setName($name); + $expectedResponse->setDefaultRelease($defaultRelease); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $unitKindId = 'unitKindId1103845867'; + $unitKind = new UnitKind(); + $unitKindSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $unitKind->setSaas($unitKindSaas); + $request = (new CreateUnitKindRequest()) + ->setParent($formattedParent) + ->setUnitKindId($unitKindId) + ->setUnitKind($unitKind); + $response = $gapicClient->createUnitKind($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateUnitKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUnitKindId(); + $this->assertProtobufEquals($unitKindId, $actualValue); + $actualValue = $actualRequestObject->getUnitKind(); + $this->assertProtobufEquals($unitKind, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $unitKindId = 'unitKindId1103845867'; + $unitKind = new UnitKind(); + $unitKindSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $unitKind->setSaas($unitKindSaas); + $request = (new CreateUnitKindRequest()) + ->setParent($formattedParent) + ->setUnitKindId($unitKindId) + ->setUnitKind($unitKind); + try { + $gapicClient->createUnitKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unit = 'unit3594628'; + $parentUnitOperation = 'parentUnitOperation45174945'; + $rollout = 'rollout1377108401'; + $cancel = true; + $engineState = 'engineState1194780756'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitOperation(); + $expectedResponse->setName($name); + $expectedResponse->setUnit($unit); + $expectedResponse->setParentUnitOperation($parentUnitOperation); + $expectedResponse->setRollout($rollout); + $expectedResponse->setCancel($cancel); + $expectedResponse->setEngineState($engineState); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $unitOperationId = 'unitOperationId1880520142'; + $unitOperation = new UnitOperation(); + $unitOperationUnit = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $unitOperation->setUnit($unitOperationUnit); + $request = (new CreateUnitOperationRequest()) + ->setParent($formattedParent) + ->setUnitOperationId($unitOperationId) + ->setUnitOperation($unitOperation); + $response = $gapicClient->createUnitOperation($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateUnitOperation', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUnitOperationId(); + $this->assertProtobufEquals($unitOperationId, $actualValue); + $actualValue = $actualRequestObject->getUnitOperation(); + $this->assertProtobufEquals($unitOperation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUnitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $unitOperationId = 'unitOperationId1880520142'; + $unitOperation = new UnitOperation(); + $unitOperationUnit = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $unitOperation->setUnit($unitOperationUnit); + $request = (new CreateUnitOperationRequest()) + ->setParent($formattedParent) + ->setUnitOperationId($unitOperationId) + ->setUnitOperation($unitOperation); + try { + $gapicClient->createUnitOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReleaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + $request = (new DeleteReleaseRequest())->setName($formattedName); + $gapicClient->deleteRelease($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteRelease', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReleaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + $request = (new DeleteReleaseRequest())->setName($formattedName); + try { + $gapicClient->deleteRelease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSaasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $request = (new DeleteSaasRequest())->setName($formattedName); + $gapicClient->deleteSaas($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteSaas', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSaasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $request = (new DeleteSaasRequest())->setName($formattedName); + try { + $gapicClient->deleteSaas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + $request = (new DeleteTenantRequest())->setName($formattedName); + $gapicClient->deleteTenant($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteTenant', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + $request = (new DeleteTenantRequest())->setName($formattedName); + try { + $gapicClient->deleteTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $request = (new DeleteUnitRequest())->setName($formattedName); + $gapicClient->deleteUnit($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $request = (new DeleteUnitRequest())->setName($formattedName); + try { + $gapicClient->deleteUnit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $request = (new DeleteUnitKindRequest())->setName($formattedName); + $gapicClient->deleteUnitKind($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteUnitKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $request = (new DeleteUnitKindRequest())->setName($formattedName); + try { + $gapicClient->deleteUnitKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitOperationName('[PROJECT]', '[LOCATION]', '[UNIT_OPERATION]'); + $request = (new DeleteUnitOperationRequest())->setName($formattedName); + $gapicClient->deleteUnitOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/DeleteUnitOperation', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUnitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitOperationName('[PROJECT]', '[LOCATION]', '[UNIT_OPERATION]'); + $request = (new DeleteUnitOperationRequest())->setName($formattedName); + try { + $gapicClient->deleteUnitOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReleaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $unitKind = 'unitKind-472552081'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Release(); + $expectedResponse->setName($name2); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + $request = (new GetReleaseRequest())->setName($formattedName); + $response = $gapicClient->getRelease($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetRelease', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReleaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->releaseName('[PROJECT]', '[LOCATION]', '[RELEASE]'); + $request = (new GetReleaseRequest())->setName($formattedName); + try { + $gapicClient->getRelease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSaasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $blueprintRepo = 'blueprintRepo1625230750'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Saas(); + $expectedResponse->setName($name2); + $expectedResponse->setBlueprintRepo($blueprintRepo); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $request = (new GetSaasRequest())->setName($formattedName); + $response = $gapicClient->getSaas($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetSaas', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSaasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $request = (new GetSaasRequest())->setName($formattedName); + try { + $gapicClient->getSaas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $consumerResource = 'consumerResource-748779977'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name2); + $expectedResponse->setConsumerResource($consumerResource); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + $request = (new GetTenantRequest())->setName($formattedName); + $response = $gapicClient->getTenant($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[LOCATION]', '[TENANT]'); + $request = (new GetTenantRequest())->setName($formattedName); + try { + $gapicClient->getTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $unitKind = 'unitKind-472552081'; + $release = 'release1090594823'; + $tenant = 'tenant-877336406'; + $application = 'application1554253136'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Unit(); + $expectedResponse->setName($name2); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRelease($release); + $expectedResponse->setTenant($tenant); + $expectedResponse->setApplication($application); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $request = (new GetUnitRequest())->setName($formattedName); + $response = $gapicClient->getUnit($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $request = (new GetUnitRequest())->setName($formattedName); + try { + $gapicClient->getUnit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $defaultRelease = 'defaultRelease1087296521'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitKind(); + $expectedResponse->setName($name2); + $expectedResponse->setDefaultRelease($defaultRelease); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $request = (new GetUnitKindRequest())->setName($formattedName); + $response = $gapicClient->getUnitKind($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetUnitKind', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $request = (new GetUnitKindRequest())->setName($formattedName); + try { + $gapicClient->getUnitKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $unit = 'unit3594628'; + $parentUnitOperation = 'parentUnitOperation45174945'; + $rollout = 'rollout1377108401'; + $cancel = true; + $engineState = 'engineState1194780756'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitOperation(); + $expectedResponse->setName($name2); + $expectedResponse->setUnit($unit); + $expectedResponse->setParentUnitOperation($parentUnitOperation); + $expectedResponse->setRollout($rollout); + $expectedResponse->setCancel($cancel); + $expectedResponse->setEngineState($engineState); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->unitOperationName('[PROJECT]', '[LOCATION]', '[UNIT_OPERATION]'); + $request = (new GetUnitOperationRequest())->setName($formattedName); + $response = $gapicClient->getUnitOperation($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.saasplatform.saasservicemgmt.v1.SaasDeployments/GetUnitOperation', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUnitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->unitOperationName('[PROJECT]', '[LOCATION]', '[UNIT_OPERATION]'); + $request = (new GetUnitOperationRequest())->setName($formattedName); + try { + $gapicClient->getUnitOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReleasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $releasesElement = new Release(); + $releases = [$releasesElement]; + $expectedResponse = new ListReleasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReleases($releases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReleasesRequest())->setParent($formattedParent); + $response = $gapicClient->listReleases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReleases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListReleases', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReleasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListReleasesRequest())->setParent($formattedParent); + try { + $gapicClient->listReleases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSaasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $saasElement = new Saas(); + $saas = [$saasElement]; + $expectedResponse = new ListSaasResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSaas($saas); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSaasRequest())->setParent($formattedParent); + $response = $gapicClient->listSaas($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSaas()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListSaas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSaasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSaasRequest())->setParent($formattedParent); + try { + $gapicClient->listSaas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTenantsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tenantsElement = new Tenant(); + $tenants = [$tenantsElement]; + $expectedResponse = new ListTenantsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTenants($tenants); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTenantsRequest())->setParent($formattedParent); + $response = $gapicClient->listTenants($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTenants()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListTenants', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTenantsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListTenantsRequest())->setParent($formattedParent); + try { + $gapicClient->listTenants($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitKindsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $unitKindsElement = new UnitKind(); + $unitKinds = [$unitKindsElement]; + $expectedResponse = new ListUnitKindsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUnitKinds($unitKinds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUnitKindsRequest())->setParent($formattedParent); + $response = $gapicClient->listUnitKinds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUnitKinds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListUnitKinds', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitKindsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListUnitKindsRequest())->setParent($formattedParent); + try { + $gapicClient->listUnitKinds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitOperationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $unitOperationsElement = new UnitOperation(); + $unitOperations = [$unitOperationsElement]; + $expectedResponse = new ListUnitOperationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUnitOperations($unitOperations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUnitOperationsRequest())->setParent($formattedParent); + $response = $gapicClient->listUnitOperations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUnitOperations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListUnitOperations', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitOperationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListUnitOperationsRequest())->setParent($formattedParent); + try { + $gapicClient->listUnitOperations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $unitsElement = new Unit(); + $units = [$unitsElement]; + $expectedResponse = new ListUnitsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUnits($units); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUnitsRequest())->setParent($formattedParent); + $response = $gapicClient->listUnits($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUnits()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasDeployments/ListUnits', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUnitsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListUnitsRequest())->setParent($formattedParent); + try { + $gapicClient->listUnits($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReleaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Release(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $release = new Release(); + $releaseUnitKind = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $release->setUnitKind($releaseUnitKind); + $request = (new UpdateReleaseRequest())->setRelease($release); + $response = $gapicClient->updateRelease($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateRelease', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getRelease(); + $this->assertProtobufEquals($release, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReleaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $release = new Release(); + $releaseUnitKind = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $release->setUnitKind($releaseUnitKind); + $request = (new UpdateReleaseRequest())->setRelease($release); + try { + $gapicClient->updateRelease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSaasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $blueprintRepo = 'blueprintRepo1625230750'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Saas(); + $expectedResponse->setName($name); + $expectedResponse->setBlueprintRepo($blueprintRepo); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $saas = new Saas(); + $request = (new UpdateSaasRequest())->setSaas($saas); + $response = $gapicClient->updateSaas($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateSaas', $actualFuncCall); + $actualValue = $actualRequestObject->getSaas(); + $this->assertProtobufEquals($saas, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSaasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $saas = new Saas(); + $request = (new UpdateSaasRequest())->setSaas($saas); + try { + $gapicClient->updateSaas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $consumerResource = 'consumerResource-748779977'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name); + $expectedResponse->setConsumerResource($consumerResource); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $tenant = new Tenant(); + $tenantSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $tenant->setSaas($tenantSaas); + $request = (new UpdateTenantRequest())->setTenant($tenant); + $response = $gapicClient->updateTenant($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateTenant', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($tenant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $tenant = new Tenant(); + $tenantSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $tenant->setSaas($tenantSaas); + $request = (new UpdateTenantRequest())->setTenant($tenant); + try { + $gapicClient->updateTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $release = 'release1090594823'; + $tenant = 'tenant-877336406'; + $application = 'application1554253136'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Unit(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRelease($release); + $expectedResponse->setTenant($tenant); + $expectedResponse->setApplication($application); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $unit = new Unit(); + $request = (new UpdateUnitRequest())->setUnit($unit); + $response = $gapicClient->updateUnit($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getUnit(); + $this->assertProtobufEquals($unit, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $unit = new Unit(); + $request = (new UpdateUnitRequest())->setUnit($unit); + try { + $gapicClient->updateUnit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $defaultRelease = 'defaultRelease1087296521'; + $saas = 'saas3522304'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitKind(); + $expectedResponse->setName($name); + $expectedResponse->setDefaultRelease($defaultRelease); + $expectedResponse->setSaas($saas); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $unitKind = new UnitKind(); + $unitKindSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $unitKind->setSaas($unitKindSaas); + $request = (new UpdateUnitKindRequest())->setUnitKind($unitKind); + $response = $gapicClient->updateUnitKind($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateUnitKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getUnitKind(); + $this->assertProtobufEquals($unitKind, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $unitKind = new UnitKind(); + $unitKindSaas = $gapicClient->saasName('[PROJECT]', '[LOCATION]', '[SAAS]'); + $unitKind->setSaas($unitKindSaas); + $request = (new UpdateUnitKindRequest())->setUnitKind($unitKind); + try { + $gapicClient->updateUnitKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unit = 'unit3594628'; + $parentUnitOperation = 'parentUnitOperation45174945'; + $rollout = 'rollout1377108401'; + $cancel = true; + $engineState = 'engineState1194780756'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new UnitOperation(); + $expectedResponse->setName($name); + $expectedResponse->setUnit($unit); + $expectedResponse->setParentUnitOperation($parentUnitOperation); + $expectedResponse->setRollout($rollout); + $expectedResponse->setCancel($cancel); + $expectedResponse->setEngineState($engineState); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $unitOperation = new UnitOperation(); + $unitOperationUnit = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $unitOperation->setUnit($unitOperationUnit); + $request = (new UpdateUnitOperationRequest())->setUnitOperation($unitOperation); + $response = $gapicClient->updateUnitOperation($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.saasplatform.saasservicemgmt.v1.SaasDeployments/UpdateUnitOperation', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getUnitOperation(); + $this->assertProtobufEquals($unitOperation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUnitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $unitOperation = new UnitOperation(); + $unitOperationUnit = $gapicClient->unitName('[PROJECT]', '[LOCATION]', '[UNIT]'); + $unitOperation->setUnit($unitOperationUnit); + $request = (new UpdateUnitOperationRequest())->setUnitOperation($unitOperation); + try { + $gapicClient->updateUnitOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createReleaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Release(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $releaseId = 'releaseId-1517127597'; + $release = new Release(); + $releaseUnitKind = $gapicClient->unitKindName('[PROJECT]', '[LOCATION]', '[UNIT_KIND]'); + $release->setUnitKind($releaseUnitKind); + $request = (new CreateReleaseRequest()) + ->setParent($formattedParent) + ->setReleaseId($releaseId) + ->setRelease($release); + $response = $gapicClient->createReleaseAsync($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.saasplatform.saasservicemgmt.v1.SaasDeployments/CreateRelease', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReleaseId(); + $this->assertProtobufEquals($releaseId, $actualValue); + $actualValue = $actualRequestObject->getRelease(); + $this->assertProtobufEquals($release, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasRolloutsClientTest.php b/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasRolloutsClientTest.php new file mode 100644 index 000000000000..93de4e5830de --- /dev/null +++ b/SaasPlatformSaasServiceMgmt/tests/Unit/V1/Client/SaasRolloutsClientTest.php @@ -0,0 +1,1062 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return SaasRolloutsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SaasRolloutsClient($options); + } + + /** @test */ + public function createRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $release = 'release1090594823'; + $stateMessage = 'stateMessage29641305'; + $rootRollout = 'rootRollout-171694252'; + $parentRollout = 'parentRollout1631151900'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $rolloutKind = 'rolloutKind-1688577694'; + $effectiveUnitFilter = 'effectiveUnitFilter1368209403'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Rollout(); + $expectedResponse->setName($name); + $expectedResponse->setRelease($release); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setRootRollout($rootRollout); + $expectedResponse->setParentRollout($parentRollout); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setRolloutKind($rolloutKind); + $expectedResponse->setEffectiveUnitFilter($effectiveUnitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $rolloutId = 'rolloutId-91142551'; + $rollout = new Rollout(); + $rolloutRolloutKind = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $rollout->setRolloutKind($rolloutRolloutKind); + $request = (new CreateRolloutRequest()) + ->setParent($formattedParent) + ->setRolloutId($rolloutId) + ->setRollout($rollout); + $response = $gapicClient->createRollout($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.saasplatform.saasservicemgmt.v1.SaasRollouts/CreateRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRolloutId(); + $this->assertProtobufEquals($rolloutId, $actualValue); + $actualValue = $actualRequestObject->getRollout(); + $this->assertProtobufEquals($rollout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $rolloutId = 'rolloutId-91142551'; + $rollout = new Rollout(); + $rolloutRolloutKind = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $rollout->setRolloutKind($rolloutRolloutKind); + $request = (new CreateRolloutRequest()) + ->setParent($formattedParent) + ->setRolloutId($rolloutId) + ->setRollout($rollout); + try { + $gapicClient->createRollout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createRolloutKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new RolloutKind(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $rolloutKindId = 'rolloutKindId-1761016552'; + $rolloutKind = new RolloutKind(); + $request = (new CreateRolloutKindRequest()) + ->setParent($formattedParent) + ->setRolloutKindId($rolloutKindId) + ->setRolloutKind($rolloutKind); + $response = $gapicClient->createRolloutKind($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.saasplatform.saasservicemgmt.v1.SaasRollouts/CreateRolloutKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRolloutKindId(); + $this->assertProtobufEquals($rolloutKindId, $actualValue); + $actualValue = $actualRequestObject->getRolloutKind(); + $this->assertProtobufEquals($rolloutKind, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createRolloutKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $rolloutKindId = 'rolloutKindId-1761016552'; + $rolloutKind = new RolloutKind(); + $request = (new CreateRolloutKindRequest()) + ->setParent($formattedParent) + ->setRolloutKindId($rolloutKindId) + ->setRolloutKind($rolloutKind); + try { + $gapicClient->createRolloutKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + $request = (new DeleteRolloutRequest())->setName($formattedName); + $gapicClient->deleteRollout($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts/DeleteRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + $request = (new DeleteRolloutRequest())->setName($formattedName); + try { + $gapicClient->deleteRollout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRolloutKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $request = (new DeleteRolloutKindRequest())->setName($formattedName); + $gapicClient->deleteRolloutKind($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts/DeleteRolloutKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRolloutKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $request = (new DeleteRolloutKindRequest())->setName($formattedName); + try { + $gapicClient->deleteRolloutKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $release = 'release1090594823'; + $stateMessage = 'stateMessage29641305'; + $rootRollout = 'rootRollout-171694252'; + $parentRollout = 'parentRollout1631151900'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $rolloutKind = 'rolloutKind-1688577694'; + $effectiveUnitFilter = 'effectiveUnitFilter1368209403'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Rollout(); + $expectedResponse->setName($name2); + $expectedResponse->setRelease($release); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setRootRollout($rootRollout); + $expectedResponse->setParentRollout($parentRollout); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setRolloutKind($rolloutKind); + $expectedResponse->setEffectiveUnitFilter($effectiveUnitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + $request = (new GetRolloutRequest())->setName($formattedName); + $response = $gapicClient->getRollout($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.saasplatform.saasservicemgmt.v1.SaasRollouts/GetRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]'); + $request = (new GetRolloutRequest())->setName($formattedName); + try { + $gapicClient->getRollout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRolloutKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $unitKind = 'unitKind-472552081'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new RolloutKind(); + $expectedResponse->setName($name2); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $request = (new GetRolloutKindRequest())->setName($formattedName); + $response = $gapicClient->getRolloutKind($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.saasplatform.saasservicemgmt.v1.SaasRollouts/GetRolloutKind', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRolloutKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $request = (new GetRolloutKindRequest())->setName($formattedName); + try { + $gapicClient->getRolloutKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRolloutKindsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rolloutKindsElement = new RolloutKind(); + $rolloutKinds = [$rolloutKindsElement]; + $expectedResponse = new ListRolloutKindsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRolloutKinds($rolloutKinds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRolloutKindsRequest())->setParent($formattedParent); + $response = $gapicClient->listRolloutKinds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRolloutKinds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts/ListRolloutKinds', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRolloutKindsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListRolloutKindsRequest())->setParent($formattedParent); + try { + $gapicClient->listRolloutKinds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRolloutsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rolloutsElement = new Rollout(); + $rollouts = [$rolloutsElement]; + $expectedResponse = new ListRolloutsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRollouts($rollouts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRolloutsRequest())->setParent($formattedParent); + $response = $gapicClient->listRollouts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRollouts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.saasplatform.saasservicemgmt.v1.SaasRollouts/ListRollouts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRolloutsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListRolloutsRequest())->setParent($formattedParent); + try { + $gapicClient->listRollouts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $release = 'release1090594823'; + $stateMessage = 'stateMessage29641305'; + $rootRollout = 'rootRollout-171694252'; + $parentRollout = 'parentRollout1631151900'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $rolloutKind = 'rolloutKind-1688577694'; + $effectiveUnitFilter = 'effectiveUnitFilter1368209403'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Rollout(); + $expectedResponse->setName($name); + $expectedResponse->setRelease($release); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setRootRollout($rootRollout); + $expectedResponse->setParentRollout($parentRollout); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setRolloutKind($rolloutKind); + $expectedResponse->setEffectiveUnitFilter($effectiveUnitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $rollout = new Rollout(); + $rolloutRolloutKind = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $rollout->setRolloutKind($rolloutRolloutKind); + $request = (new UpdateRolloutRequest())->setRollout($rollout); + $response = $gapicClient->updateRollout($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.saasplatform.saasservicemgmt.v1.SaasRollouts/UpdateRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getRollout(); + $this->assertProtobufEquals($rollout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $rollout = new Rollout(); + $rolloutRolloutKind = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $rollout->setRolloutKind($rolloutRolloutKind); + $request = (new UpdateRolloutRequest())->setRollout($rollout); + try { + $gapicClient->updateRollout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRolloutKindTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $unitKind = 'unitKind-472552081'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new RolloutKind(); + $expectedResponse->setName($name); + $expectedResponse->setUnitKind($unitKind); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $rolloutKind = new RolloutKind(); + $request = (new UpdateRolloutKindRequest())->setRolloutKind($rolloutKind); + $response = $gapicClient->updateRolloutKind($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.saasplatform.saasservicemgmt.v1.SaasRollouts/UpdateRolloutKind', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getRolloutKind(); + $this->assertProtobufEquals($rolloutKind, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRolloutKindExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $rolloutKind = new RolloutKind(); + $request = (new UpdateRolloutKindRequest())->setRolloutKind($rolloutKind); + try { + $gapicClient->updateRolloutKind($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createRolloutAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $release = 'release1090594823'; + $stateMessage = 'stateMessage29641305'; + $rootRollout = 'rootRollout-171694252'; + $parentRollout = 'parentRollout1631151900'; + $rolloutOrchestrationStrategy = 'rolloutOrchestrationStrategy-925283841'; + $unitFilter = 'unitFilter1000796819'; + $rolloutKind = 'rolloutKind-1688577694'; + $effectiveUnitFilter = 'effectiveUnitFilter1368209403'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Rollout(); + $expectedResponse->setName($name); + $expectedResponse->setRelease($release); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setRootRollout($rootRollout); + $expectedResponse->setParentRollout($parentRollout); + $expectedResponse->setRolloutOrchestrationStrategy($rolloutOrchestrationStrategy); + $expectedResponse->setUnitFilter($unitFilter); + $expectedResponse->setRolloutKind($rolloutKind); + $expectedResponse->setEffectiveUnitFilter($effectiveUnitFilter); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $rolloutId = 'rolloutId-91142551'; + $rollout = new Rollout(); + $rolloutRolloutKind = $gapicClient->rolloutKindName('[PROJECT]', '[LOCATION]', '[ROLLOUT_KIND_ID]'); + $rollout->setRolloutKind($rolloutRolloutKind); + $request = (new CreateRolloutRequest()) + ->setParent($formattedParent) + ->setRolloutId($rolloutId) + ->setRollout($rollout); + $response = $gapicClient->createRolloutAsync($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.saasplatform.saasservicemgmt.v1.SaasRollouts/CreateRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRolloutId(); + $this->assertProtobufEquals($rolloutId, $actualValue); + $actualValue = $actualRequestObject->getRollout(); + $this->assertProtobufEquals($rollout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/composer.json b/composer.json index 07b425302346..8ccd3be7b372 100644 --- a/composer.json +++ b/composer.json @@ -253,6 +253,7 @@ "google/cloud-resource-manager": "1.3.0", "google/cloud-retail": "2.7.0", "google/cloud-run": "1.14.0", + "google/cloud-saasplatform-saasservicemgmt": "0.0.0", "google/cloud-scheduler": "2.4.0", "google/cloud-secret-manager": "2.6.0", "google/cloud-securesourcemanager": "1.12.0", @@ -492,6 +493,7 @@ "GPBMetadata\\Google\\Cloud\\Resourcemanager\\": "ResourceManager/metadata", "GPBMetadata\\Google\\Cloud\\Retail\\": "Retail/metadata", "GPBMetadata\\Google\\Cloud\\Run\\": "Run/metadata", + "GPBMetadata\\Google\\Cloud\\Saasplatform\\Saasservicemgmt\\": "SaasPlatformSaasServiceMgmt/metadata", "GPBMetadata\\Google\\Cloud\\Scheduler\\": "Scheduler/metadata", "GPBMetadata\\Google\\Cloud\\Secretmanager\\": "SecretManager/metadata", "GPBMetadata\\Google\\Cloud\\Secrets\\": "SecretManager/metadata", @@ -761,6 +763,7 @@ "Google\\Cloud\\ResourceManager\\": "ResourceManager/src", "Google\\Cloud\\Retail\\": "Retail/src", "Google\\Cloud\\Run\\": "Run/src", + "Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\": "SaasPlatformSaasServiceMgmt/src", "Google\\Cloud\\Scheduler\\": "Scheduler/src", "Google\\Cloud\\SecretManager\\": "SecretManager/src", "Google\\Cloud\\SecureSourceManager\\": "SecureSourceManager/src", diff --git a/librarian.yaml b/librarian.yaml index 33d911de1971..3edf939f3009 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1635,6 +1635,16 @@ libraries: - google/cloud/location/locations.proto copyright_year: "2026" output: Run + - name: saasplatform-saasservicemgmt + version: 0.0.0 + apis: + - path: google/cloud/saasplatform/saasservicemgmt/v1 + php: + additional_protos: + - google/cloud/location/locations.proto + staging_subdir: v1 + copyright_year: "2026" + output: SaasPlatformSaasServiceMgmt - name: scheduler version: 2.3.1 apis: