diff --git a/Optimization/src/V1/Client/FleetRoutingClient.php b/Optimization/src/V1/Client/FleetRoutingClient.php index b50ea4876830..853382b19525 100644 --- a/Optimization/src/V1/Client/FleetRoutingClient.php +++ b/Optimization/src/V1/Client/FleetRoutingClient.php @@ -62,11 +62,6 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Optimization\V1\FleetRoutingClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface batchOptimizeToursAsync(BatchOptimizeToursRequest $request, array $optionalArgs = []) * @method PromiseInterface optimizeToursAsync(OptimizeToursRequest $request, array $optionalArgs = []) */ @@ -77,9 +72,16 @@ final class FleetRoutingClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.optimization.v1.FleetRouting'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudoptimization.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudoptimization.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Optimization/src/V1/Gapic/FleetRoutingGapicClient.php b/Optimization/src/V1/Gapic/FleetRoutingGapicClient.php index 47a36de0bebe..1986416c2b70 100644 --- a/Optimization/src/V1/Gapic/FleetRoutingGapicClient.php +++ b/Optimization/src/V1/Gapic/FleetRoutingGapicClient.php @@ -102,8 +102,7 @@ * } * ``` * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Optimization\V1\Client\FleetRoutingClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Optimization\V1\Client\FleetRoutingClient}. */ class FleetRoutingGapicClient { @@ -112,9 +111,16 @@ class FleetRoutingGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.optimization.v1.FleetRouting'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudoptimization.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudoptimization.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php b/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php index a111856c1534..353ca67d2017 100644 --- a/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php +++ b/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php @@ -66,12 +66,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentsClient} for the - * stable implementation - * - * @experimental - * * @method PromiseInterface createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) * @method PromiseInterface databaseFailoverAsync(DatabaseFailoverRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) @@ -93,9 +87,16 @@ final class EnvironmentsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.Environments'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'composer.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php b/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php index a25c7933f126..f7ca2ae03018 100644 --- a/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php +++ b/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php @@ -41,12 +41,6 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersionsClient} for the - * stable implementation - * - * @experimental - * * @method PromiseInterface listImageVersionsAsync(ListImageVersionsRequest $request, array $optionalArgs = []) */ final class ImageVersionsClient @@ -56,9 +50,16 @@ final class ImageVersionsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.ImageVersions'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'composer.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OrchestrationAirflow/src/V1/Gapic/EnvironmentsGapicClient.php b/OrchestrationAirflow/src/V1/Gapic/EnvironmentsGapicClient.php index 067c5536b38c..77062db764b6 100644 --- a/OrchestrationAirflow/src/V1/Gapic/EnvironmentsGapicClient.php +++ b/OrchestrationAirflow/src/V1/Gapic/EnvironmentsGapicClient.php @@ -101,9 +101,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Orchestration\Airflow\Service\V1\Client\EnvironmentsClient} to use - * the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Orchestration\Airflow\Service\V1\Client\EnvironmentsClient}. */ class EnvironmentsGapicClient { @@ -112,9 +110,16 @@ class EnvironmentsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.Environments'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'composer.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OrchestrationAirflow/src/V1/Gapic/ImageVersionsGapicClient.php b/OrchestrationAirflow/src/V1/Gapic/ImageVersionsGapicClient.php index b9d5653b557b..8d9cd7582af1 100644 --- a/OrchestrationAirflow/src/V1/Gapic/ImageVersionsGapicClient.php +++ b/OrchestrationAirflow/src/V1/Gapic/ImageVersionsGapicClient.php @@ -62,9 +62,7 @@ * } * ``` * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Orchestration\Airflow\Service\V1\Client\ImageVersionsClient} to - * use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Orchestration\Airflow\Service\V1\Client\ImageVersionsClient}. */ class ImageVersionsGapicClient { @@ -73,9 +71,16 @@ class ImageVersionsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.ImageVersions'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'composer.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OrgPolicy/src/V2/Client/OrgPolicyClient.php b/OrgPolicy/src/V2/Client/OrgPolicyClient.php index f1fcb608df4c..3f77c2d1d0c4 100644 --- a/OrgPolicy/src/V2/Client/OrgPolicyClient.php +++ b/OrgPolicy/src/V2/Client/OrgPolicyClient.php @@ -73,11 +73,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\OrgPolicy\V2\OrgPolicyClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createPolicyAsync(CreatePolicyRequest $request, array $optionalArgs = []) * @method PromiseInterface deletePolicyAsync(DeletePolicyRequest $request, array $optionalArgs = []) * @method PromiseInterface getEffectivePolicyAsync(GetEffectivePolicyRequest $request, array $optionalArgs = []) @@ -94,9 +89,16 @@ final class OrgPolicyClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.orgpolicy.v2.OrgPolicy'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'orgpolicy.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'orgpolicy.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OrgPolicy/src/V2/Gapic/OrgPolicyGapicClient.php b/OrgPolicy/src/V2/Gapic/OrgPolicyGapicClient.php index 54a3b6c65dbe..a53d5a5e6f7a 100644 --- a/OrgPolicy/src/V2/Gapic/OrgPolicyGapicClient.php +++ b/OrgPolicy/src/V2/Gapic/OrgPolicyGapicClient.php @@ -87,8 +87,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\OrgPolicy\V2\Client\OrgPolicyClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\OrgPolicy\V2\Client\OrgPolicyClient}. */ class OrgPolicyGapicClient { @@ -97,9 +96,16 @@ class OrgPolicyGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.orgpolicy.v2.OrgPolicy'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'orgpolicy.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'orgpolicy.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OsConfig/src/V1/Client/OsConfigServiceClient.php b/OsConfig/src/V1/Client/OsConfigServiceClient.php index edc8011a4d06..4fd4c06a33bb 100644 --- a/OsConfig/src/V1/Client/OsConfigServiceClient.php +++ b/OsConfig/src/V1/Client/OsConfigServiceClient.php @@ -63,11 +63,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\OsConfig\V1\OsConfigServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface cancelPatchJobAsync(CancelPatchJobRequest $request, array $optionalArgs = []) * @method PromiseInterface createPatchDeploymentAsync(CreatePatchDeploymentRequest $request, array $optionalArgs = []) * @method PromiseInterface deletePatchDeploymentAsync(DeletePatchDeploymentRequest $request, array $optionalArgs = []) @@ -89,9 +84,16 @@ class OsConfigServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php b/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php index 041ec32c5378..350fcd487f26 100644 --- a/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php +++ b/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php @@ -68,12 +68,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\OsConfig\V1\OsConfigZonalServiceClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface createOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest $request, array $optionalArgs = []) * @method PromiseInterface getInventoryAsync(GetInventoryRequest $request, array $optionalArgs = []) @@ -95,9 +89,16 @@ class OsConfigZonalServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigZonalService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OsConfig/src/V1/Gapic/OsConfigServiceGapicClient.php b/OsConfig/src/V1/Gapic/OsConfigServiceGapicClient.php index 74e7c70427e4..60eceb73ff63 100644 --- a/OsConfig/src/V1/Gapic/OsConfigServiceGapicClient.php +++ b/OsConfig/src/V1/Gapic/OsConfigServiceGapicClient.php @@ -81,8 +81,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\OsConfig\V1\Client\OsConfigServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\OsConfig\V1\Client\OsConfigServiceClient}. */ class OsConfigServiceGapicClient { @@ -91,9 +90,16 @@ class OsConfigServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OsConfig/src/V1/Gapic/OsConfigZonalServiceGapicClient.php b/OsConfig/src/V1/Gapic/OsConfigZonalServiceGapicClient.php index 7b3a7a609058..6279ec6f7010 100644 --- a/OsConfig/src/V1/Gapic/OsConfigZonalServiceGapicClient.php +++ b/OsConfig/src/V1/Gapic/OsConfigZonalServiceGapicClient.php @@ -110,9 +110,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\OsConfig\V1\Client\OsConfigZonalServiceClient} to use the new - * surface. + * @deprecated Please use the new service client {@see \Google\Cloud\OsConfig\V1\Client\OsConfigZonalServiceClient}. */ class OsConfigZonalServiceGapicClient { @@ -121,9 +119,16 @@ class OsConfigZonalServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigZonalService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OsLogin/metadata/V1Beta/Oslogin.php b/OsLogin/metadata/V1Beta/Oslogin.php index a0cd30a19f62..f4f2f98421ba 100644 Binary files a/OsLogin/metadata/V1Beta/Oslogin.php and b/OsLogin/metadata/V1Beta/Oslogin.php differ diff --git a/OsLogin/src/V1/Client/OsLoginServiceClient.php b/OsLogin/src/V1/Client/OsLoginServiceClient.php index 85f45490bb95..8126f7f2ea4b 100644 --- a/OsLogin/src/V1/Client/OsLoginServiceClient.php +++ b/OsLogin/src/V1/Client/OsLoginServiceClient.php @@ -58,11 +58,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\OsLogin\V1\OsLoginServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createSshPublicKeyAsync(CreateSshPublicKeyRequest $request, array $optionalArgs = []) * @method PromiseInterface deletePosixAccountAsync(DeletePosixAccountRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteSshPublicKeyAsync(DeleteSshPublicKeyRequest $request, array $optionalArgs = []) @@ -79,9 +74,16 @@ class OsLoginServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.oslogin.v1.OsLoginService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'oslogin.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'oslogin.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/OsLogin/src/V1/Gapic/OsLoginServiceGapicClient.php b/OsLogin/src/V1/Gapic/OsLoginServiceGapicClient.php index 103d2adfe2f6..e18108f95458 100644 --- a/OsLogin/src/V1/Gapic/OsLoginServiceGapicClient.php +++ b/OsLogin/src/V1/Gapic/OsLoginServiceGapicClient.php @@ -71,8 +71,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\OsLogin\V1\Client\OsLoginServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\OsLogin\V1\Client\OsLoginServiceClient}. */ class OsLoginServiceGapicClient { @@ -81,9 +80,16 @@ class OsLoginServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.oslogin.v1.OsLoginService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'oslogin.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'oslogin.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/OsLogin/src/V1beta/Gapic/OsLoginServiceGapicClient.php b/OsLogin/src/V1beta/Gapic/OsLoginServiceGapicClient.php index f47c64ea4717..496f15f23c61 100644 --- a/OsLogin/src/V1beta/Gapic/OsLoginServiceGapicClient.php +++ b/OsLogin/src/V1beta/Gapic/OsLoginServiceGapicClient.php @@ -76,6 +76,8 @@ * contained within formatted names that are returned by the API. * * @experimental + * + * @deprecated This class will be removed in the next major version update. */ class OsLoginServiceGapicClient { @@ -84,9 +86,16 @@ class OsLoginServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.oslogin.v1beta.OsLoginService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'oslogin.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'oslogin.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/PolicySimulator/src/V1/Client/SimulatorClient.php b/PolicySimulator/src/V1/Client/SimulatorClient.php index 32fa127cc901..34c715a200ce 100644 --- a/PolicySimulator/src/V1/Client/SimulatorClient.php +++ b/PolicySimulator/src/V1/Client/SimulatorClient.php @@ -64,10 +64,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * - * @experimental - * * @method PromiseInterface createReplayAsync(CreateReplayRequest $request, array $optionalArgs = []) * @method PromiseInterface getReplayAsync(GetReplayRequest $request, array $optionalArgs = []) * @method PromiseInterface listReplayResultsAsync(ListReplayResultsRequest $request, array $optionalArgs = []) @@ -80,9 +76,16 @@ final class SimulatorClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.policysimulator.v1.Simulator'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'policysimulator.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'policysimulator.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; @@ -90,9 +93,7 @@ final class SimulatorClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -138,7 +139,9 @@ public function getOperationsClient() */ public function resumeOperation($operationName, $methodName = null) { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); $operation->reload(); return $operation; @@ -173,8 +176,11 @@ public static function folderLocationReplayName(string $folder, string $location * * @return string The formatted organization_location_replay resource. */ - public static function organizationLocationReplayName(string $organization, string $location, string $replay): string - { + public static function organizationLocationReplayName( + string $organization, + string $location, + string $replay + ): string { return self::getPathTemplate('organizationLocationReplay')->render([ 'organization' => $organization, 'location' => $location, diff --git a/PolicySimulator/tests/Unit/V1/Client/SimulatorClientTest.php b/PolicySimulator/tests/Unit/V1/Client/SimulatorClientTest.php index 1a9b0d4c7d1b..f931e2836865 100644 --- a/PolicySimulator/tests/Unit/V1/Client/SimulatorClientTest.php +++ b/PolicySimulator/tests/Unit/V1/Client/SimulatorClientTest.php @@ -57,7 +57,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return SimulatorClient */ @@ -105,9 +107,7 @@ public function createReplayTest() $replay = new Replay(); $replayConfig = new ReplayConfig(); $replay->setConfig($replayConfig); - $request = (new CreateReplayRequest()) - ->setParent($parent) - ->setReplay($replay); + $request = (new CreateReplayRequest())->setParent($parent)->setReplay($replay); $response = $gapicClient->createReplay($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -165,21 +165,22 @@ public function createReplayExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $parent = 'parent-995424086'; $replay = new Replay(); $replayConfig = new ReplayConfig(); $replay->setConfig($replayConfig); - $request = (new CreateReplayRequest()) - ->setParent($parent) - ->setReplay($replay); + $request = (new CreateReplayRequest())->setParent($parent)->setReplay($replay); $response = $gapicClient->createReplay($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -217,8 +218,7 @@ public function getReplayTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->replayName('[PROJECT]', '[LOCATION]', '[REPLAY]'); - $request = (new GetReplayRequest()) - ->setName($formattedName); + $request = (new GetReplayRequest())->setName($formattedName); $response = $gapicClient->getReplay($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -242,17 +242,19 @@ public function getReplayExceptionTest() $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); + $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->replayName('[PROJECT]', '[LOCATION]', '[REPLAY]'); - $request = (new GetReplayRequest()) - ->setName($formattedName); + $request = (new GetReplayRequest())->setName($formattedName); try { $gapicClient->getReplay($request); // If the $gapicClient method call did not throw, fail the test @@ -277,17 +279,14 @@ public function listReplayResultsTest() // Mock response $nextPageToken = ''; $replayResultsElement = new ReplayResult(); - $replayResults = [ - $replayResultsElement, - ]; + $replayResults = [$replayResultsElement]; $expectedResponse = new ListReplayResultsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setReplayResults($replayResults); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->replayName('[PROJECT]', '[LOCATION]', '[REPLAY]'); - $request = (new ListReplayResultsRequest()) - ->setParent($formattedParent); + $request = (new ListReplayResultsRequest())->setParent($formattedParent); $response = $gapicClient->listReplayResults($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -314,17 +313,19 @@ public function listReplayResultsExceptionTest() $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); + $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->replayName('[PROJECT]', '[LOCATION]', '[REPLAY]'); - $request = (new ListReplayResultsRequest()) - ->setParent($formattedParent); + $request = (new ListReplayResultsRequest())->setParent($formattedParent); try { $gapicClient->listReplayResults($request); // If the $gapicClient method call did not throw, fail the test @@ -374,9 +375,7 @@ public function createReplayAsyncTest() $replay = new Replay(); $replayConfig = new ReplayConfig(); $replay->setConfig($replayConfig); - $request = (new CreateReplayRequest()) - ->setParent($parent) - ->setReplay($replay); + $request = (new CreateReplayRequest())->setParent($parent)->setReplay($replay); $response = $gapicClient->createReplayAsync($request)->wait(); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); diff --git a/PolicyTroubleshooter/src/V1/Client/IamCheckerClient.php b/PolicyTroubleshooter/src/V1/Client/IamCheckerClient.php index 5eadc4fb660f..f33b0492fc4f 100644 --- a/PolicyTroubleshooter/src/V1/Client/IamCheckerClient.php +++ b/PolicyTroubleshooter/src/V1/Client/IamCheckerClient.php @@ -43,12 +43,6 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\PolicyTroubleshooter\V1\IamCheckerClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface troubleshootIamPolicyAsync(TroubleshootIamPolicyRequest $request, array $optionalArgs = []) */ final class IamCheckerClient @@ -58,9 +52,16 @@ final class IamCheckerClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.policytroubleshooter.v1.IamChecker'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'policytroubleshooter.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'policytroubleshooter.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/PolicyTroubleshooter/src/V1/Gapic/IamCheckerGapicClient.php b/PolicyTroubleshooter/src/V1/Gapic/IamCheckerGapicClient.php index c041db295ee9..d6b689899276 100644 --- a/PolicyTroubleshooter/src/V1/Gapic/IamCheckerGapicClient.php +++ b/PolicyTroubleshooter/src/V1/Gapic/IamCheckerGapicClient.php @@ -52,9 +52,7 @@ * } * ``` * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\PolicyTroubleshooter\V1\Client\IamCheckerClient} to use the new - * surface. + * @deprecated Please use the new service client {@see \Google\Cloud\PolicyTroubleshooter\V1\Client\IamCheckerClient}. */ class IamCheckerGapicClient { @@ -63,9 +61,16 @@ class IamCheckerGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.policytroubleshooter.v1.IamChecker'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'policytroubleshooter.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'policytroubleshooter.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/PolicyTroubleshooterIam/src/V3/Client/PolicyTroubleshooterClient.php b/PolicyTroubleshooterIam/src/V3/Client/PolicyTroubleshooterClient.php index 4a323a67c6ab..c42d44c26977 100644 --- a/PolicyTroubleshooterIam/src/V3/Client/PolicyTroubleshooterClient.php +++ b/PolicyTroubleshooterIam/src/V3/Client/PolicyTroubleshooterClient.php @@ -43,10 +43,6 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * This class is currently experimental and may be subject to changes. - * - * @experimental - * * @method PromiseInterface troubleshootIamPolicyAsync(TroubleshootIamPolicyRequest $request, array $optionalArgs = []) */ final class PolicyTroubleshooterClient @@ -56,9 +52,16 @@ final class PolicyTroubleshooterClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'policytroubleshooter.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'policytroubleshooter.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; @@ -66,9 +69,7 @@ final class PolicyTroubleshooterClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private static function getClientDefaults() { @@ -184,8 +185,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function troubleshootIamPolicy(TroubleshootIamPolicyRequest $request, array $callOptions = []): TroubleshootIamPolicyResponse - { + public function troubleshootIamPolicy( + TroubleshootIamPolicyRequest $request, + array $callOptions = [] + ): TroubleshootIamPolicyResponse { return $this->startApiCall('TroubleshootIamPolicy', $request, $callOptions)->wait(); } } diff --git a/PolicyTroubleshooterIam/tests/Unit/V3/Client/PolicyTroubleshooterClientTest.php b/PolicyTroubleshooterIam/tests/Unit/V3/Client/PolicyTroubleshooterClientTest.php index 94fb08f77975..290ed7ee8f8e 100644 --- a/PolicyTroubleshooterIam/tests/Unit/V3/Client/PolicyTroubleshooterClientTest.php +++ b/PolicyTroubleshooterIam/tests/Unit/V3/Client/PolicyTroubleshooterClientTest.php @@ -48,7 +48,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return PolicyTroubleshooterClient */ @@ -78,7 +80,10 @@ public function troubleshootIamPolicyTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter/TroubleshootIamPolicy', $actualFuncCall); + $this->assertSame( + '/google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter/TroubleshootIamPolicy', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -93,12 +98,15 @@ public function troubleshootIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new TroubleshootIamPolicyRequest(); try { @@ -132,7 +140,10 @@ public function troubleshootIamPolicyAsyncTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter/TroubleshootIamPolicy', $actualFuncCall); + $this->assertSame( + '/google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter/TroubleshootIamPolicy', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } } diff --git a/PrivateCatalog/src/V1beta1/Client/PrivateCatalogClient.php b/PrivateCatalog/src/V1beta1/Client/PrivateCatalogClient.php index f1dc7be0d757..875be0ed546e 100644 --- a/PrivateCatalog/src/V1beta1/Client/PrivateCatalogClient.php +++ b/PrivateCatalog/src/V1beta1/Client/PrivateCatalogClient.php @@ -65,8 +65,6 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * This class is currently experimental and may be subject to changes. - * * @experimental * * @method PromiseInterface searchCatalogsAsync(SearchCatalogsRequest $request, array $optionalArgs = []) @@ -80,9 +78,16 @@ final class PrivateCatalogClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.privatecatalog.v1beta1.PrivateCatalog'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudprivatecatalog.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprivatecatalog.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/PrivateCatalog/src/V1beta1/Gapic/PrivateCatalogGapicClient.php b/PrivateCatalog/src/V1beta1/Gapic/PrivateCatalogGapicClient.php index c8c7a14549ea..060ccd539031 100644 --- a/PrivateCatalog/src/V1beta1/Gapic/PrivateCatalogGapicClient.php +++ b/PrivateCatalog/src/V1beta1/Gapic/PrivateCatalogGapicClient.php @@ -89,11 +89,9 @@ * } * ``` * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\PrivateCatalog\V1beta1\Client\PrivateCatalogClient} to use the new - * surface. - * * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\PrivateCatalog\V1beta1\Client\PrivateCatalogClient}. */ class PrivateCatalogGapicClient { @@ -102,9 +100,16 @@ class PrivateCatalogGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.privatecatalog.v1beta1.PrivateCatalog'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudprivatecatalog.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprivatecatalog.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Profiler/src/V2/Client/ExportServiceClient.php b/Profiler/src/V2/Client/ExportServiceClient.php index 63d609f0d9fb..342fbab32eec 100644 --- a/Profiler/src/V2/Client/ExportServiceClient.php +++ b/Profiler/src/V2/Client/ExportServiceClient.php @@ -48,11 +48,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Profiler\V2\ExportServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface listProfilesAsync(ListProfilesRequest $request, array $optionalArgs = []) */ final class ExportServiceClient @@ -63,9 +58,16 @@ final class ExportServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.devtools.cloudprofiler.v2.ExportService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudprofiler.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprofiler.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Profiler/src/V2/Client/ProfilerServiceClient.php b/Profiler/src/V2/Client/ProfilerServiceClient.php index 85d9e32a227c..ff92bcbc15d3 100644 --- a/Profiler/src/V2/Client/ProfilerServiceClient.php +++ b/Profiler/src/V2/Client/ProfilerServiceClient.php @@ -54,11 +54,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Profiler\V2\ProfilerServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createOfflineProfileAsync(CreateOfflineProfileRequest $request, array $optionalArgs = []) * @method PromiseInterface createProfileAsync(CreateProfileRequest $request, array $optionalArgs = []) * @method PromiseInterface updateProfileAsync(UpdateProfileRequest $request, array $optionalArgs = []) @@ -71,9 +66,16 @@ final class ProfilerServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.devtools.cloudprofiler.v2.ProfilerService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudprofiler.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprofiler.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Profiler/src/V2/Gapic/ExportServiceGapicClient.php b/Profiler/src/V2/Gapic/ExportServiceGapicClient.php index 0b761bc9f635..9975dff7d78f 100644 --- a/Profiler/src/V2/Gapic/ExportServiceGapicClient.php +++ b/Profiler/src/V2/Gapic/ExportServiceGapicClient.php @@ -70,8 +70,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Profiler\V2\Client\ExportServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Profiler\V2\Client\ExportServiceClient}. */ class ExportServiceGapicClient { @@ -80,9 +79,16 @@ class ExportServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.devtools.cloudprofiler.v2.ExportService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudprofiler.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprofiler.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Profiler/src/V2/Gapic/ProfilerServiceGapicClient.php b/Profiler/src/V2/Gapic/ProfilerServiceGapicClient.php index 919cf3f85e87..2a98eb092083 100644 --- a/Profiler/src/V2/Gapic/ProfilerServiceGapicClient.php +++ b/Profiler/src/V2/Gapic/ProfilerServiceGapicClient.php @@ -65,8 +65,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Profiler\V2\Client\ProfilerServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Profiler\V2\Client\ProfilerServiceClient}. */ class ProfilerServiceGapicClient { @@ -75,9 +74,16 @@ class ProfilerServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.devtools.cloudprofiler.v2.ProfilerService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudprofiler.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudprofiler.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Client/PublisherClient.php b/PubSub/src/V1/Client/PublisherClient.php index 0e87283a1b16..2c354f3fe77f 100644 --- a/PubSub/src/V1/Client/PublisherClient.php +++ b/PubSub/src/V1/Client/PublisherClient.php @@ -63,11 +63,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\PubSub\V1\PublisherClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createTopicAsync(Topic $request, array $optionalArgs = []) * @method PromiseInterface deleteTopicAsync(DeleteTopicRequest $request, array $optionalArgs = []) * @method PromiseInterface detachSubscriptionAsync(DetachSubscriptionRequest $request, array $optionalArgs = []) @@ -89,9 +84,16 @@ final class PublisherClient /** The name of the service. */ private const SERVICE_NAME = 'google.pubsub.v1.Publisher'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Client/SchemaServiceClient.php b/PubSub/src/V1/Client/SchemaServiceClient.php index 39bbbeff6133..eb8b8c1df08a 100644 --- a/PubSub/src/V1/Client/SchemaServiceClient.php +++ b/PubSub/src/V1/Client/SchemaServiceClient.php @@ -64,11 +64,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\PubSub\V1\SchemaServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface commitSchemaAsync(CommitSchemaRequest $request, array $optionalArgs = []) * @method PromiseInterface createSchemaAsync(CreateSchemaRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteSchemaAsync(DeleteSchemaRequest $request, array $optionalArgs = []) @@ -91,9 +86,16 @@ final class SchemaServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.pubsub.v1.SchemaService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Client/SubscriberClient.php b/PubSub/src/V1/Client/SubscriberClient.php index de7ee0ad07f2..e1542cc42fd8 100644 --- a/PubSub/src/V1/Client/SubscriberClient.php +++ b/PubSub/src/V1/Client/SubscriberClient.php @@ -72,11 +72,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\PubSub\V1\SubscriberClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface acknowledgeAsync(AcknowledgeRequest $request, array $optionalArgs = []) * @method PromiseInterface createSnapshotAsync(CreateSnapshotRequest $request, array $optionalArgs = []) * @method PromiseInterface createSubscriptionAsync(Subscription $request, array $optionalArgs = []) @@ -104,9 +99,16 @@ final class SubscriberClient /** The name of the service. */ private const SERVICE_NAME = 'google.pubsub.v1.Subscriber'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Gapic/PublisherGapicClient.php b/PubSub/src/V1/Gapic/PublisherGapicClient.php index 68dcbeffbc06..9f2d7c551ad1 100644 --- a/PubSub/src/V1/Gapic/PublisherGapicClient.php +++ b/PubSub/src/V1/Gapic/PublisherGapicClient.php @@ -83,8 +83,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\PubSub\V1\Client\PublisherClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\PubSub\V1\Client\PublisherClient}. */ class PublisherGapicClient { @@ -93,9 +92,16 @@ class PublisherGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.pubsub.v1.Publisher'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Gapic/SchemaServiceGapicClient.php b/PubSub/src/V1/Gapic/SchemaServiceGapicClient.php index e38df1b8d9c8..1a561dd8cb1f 100644 --- a/PubSub/src/V1/Gapic/SchemaServiceGapicClient.php +++ b/PubSub/src/V1/Gapic/SchemaServiceGapicClient.php @@ -81,8 +81,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\PubSub\V1\Client\SchemaServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\PubSub\V1\Client\SchemaServiceClient}. */ class SchemaServiceGapicClient { @@ -91,9 +90,16 @@ class SchemaServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.pubsub.v1.SchemaService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/PubSub/src/V1/Gapic/SubscriberGapicClient.php b/PubSub/src/V1/Gapic/SubscriberGapicClient.php index a2b23380c31c..5a6f8ab005ee 100644 --- a/PubSub/src/V1/Gapic/SubscriberGapicClient.php +++ b/PubSub/src/V1/Gapic/SubscriberGapicClient.php @@ -98,8 +98,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\PubSub\V1\Client\SubscriberClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\PubSub\V1\Client\SubscriberClient}. */ class SubscriberGapicClient { @@ -108,9 +107,16 @@ class SubscriberGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.pubsub.v1.Subscriber'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'pubsub.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'pubsub.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RapidMigrationAssessment/src/V1/Client/RapidMigrationAssessmentClient.php b/RapidMigrationAssessment/src/V1/Client/RapidMigrationAssessmentClient.php index 28c7371fab86..65ed6a9b5fd1 100644 --- a/RapidMigrationAssessment/src/V1/Client/RapidMigrationAssessmentClient.php +++ b/RapidMigrationAssessment/src/V1/Client/RapidMigrationAssessmentClient.php @@ -64,10 +64,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * - * @experimental - * * @method PromiseInterface createAnnotationAsync(CreateAnnotationRequest $request, array $optionalArgs = []) * @method PromiseInterface createCollectorAsync(CreateCollectorRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteCollectorAsync(DeleteCollectorRequest $request, array $optionalArgs = []) @@ -89,9 +85,16 @@ final class RapidMigrationAssessmentClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'rapidmigrationassessment.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'rapidmigrationassessment.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; @@ -99,9 +102,7 @@ final class RapidMigrationAssessmentClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -118,7 +119,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/rapid_migration_assessment_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/rapid_migration_assessment_rest_client_config.php', ], ], ]; @@ -147,7 +149,9 @@ public function getOperationsClient() */ public function resumeOperation($operationName, $methodName = null) { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); $operation->reload(); return $operation; diff --git a/RapidMigrationAssessment/tests/Unit/V1/Client/RapidMigrationAssessmentClientTest.php b/RapidMigrationAssessment/tests/Unit/V1/Client/RapidMigrationAssessmentClientTest.php index 73138bb9704f..d860ccf2034a 100644 --- a/RapidMigrationAssessment/tests/Unit/V1/Client/RapidMigrationAssessmentClientTest.php +++ b/RapidMigrationAssessment/tests/Unit/V1/Client/RapidMigrationAssessmentClientTest.php @@ -68,7 +68,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return RapidMigrationAssessmentClient */ @@ -114,9 +116,7 @@ public function createAnnotationTest() // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $annotation = new Annotation(); - $request = (new CreateAnnotationRequest()) - ->setParent($formattedParent) - ->setAnnotation($annotation); + $request = (new CreateAnnotationRequest())->setParent($formattedParent)->setAnnotation($annotation); $response = $gapicClient->createAnnotation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -126,7 +126,10 @@ public function createAnnotationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateAnnotation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateAnnotation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getAnnotation(); @@ -174,19 +177,20 @@ public function createAnnotationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $annotation = new Annotation(); - $request = (new CreateAnnotationRequest()) - ->setParent($formattedParent) - ->setAnnotation($annotation); + $request = (new CreateAnnotationRequest())->setParent($formattedParent)->setAnnotation($annotation); $response = $gapicClient->createAnnotation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -273,7 +277,10 @@ public function createCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getCollectorId(); @@ -323,12 +330,15 @@ public function createCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -409,8 +419,7 @@ public function deleteCollectorTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new DeleteCollectorRequest()) - ->setName($formattedName); + $request = (new DeleteCollectorRequest())->setName($formattedName); $response = $gapicClient->deleteCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -420,7 +429,10 @@ public function deleteCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/DeleteCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/DeleteCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -466,17 +478,19 @@ public function deleteCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new DeleteCollectorRequest()) - ->setName($formattedName); + $request = (new DeleteCollectorRequest())->setName($formattedName); $response = $gapicClient->deleteCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -514,15 +528,17 @@ public function getAnnotationTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->annotationName('[PROJECT]', '[LOCATION]', '[ANNOTATION]'); - $request = (new GetAnnotationRequest()) - ->setName($formattedName); + $request = (new GetAnnotationRequest())->setName($formattedName); $response = $gapicClient->getAnnotation($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.rapidmigrationassessment.v1.RapidMigrationAssessment/GetAnnotation', $actualFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/GetAnnotation', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -539,17 +555,19 @@ public function getAnnotationExceptionTest() $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); + $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->annotationName('[PROJECT]', '[LOCATION]', '[ANNOTATION]'); - $request = (new GetAnnotationRequest()) - ->setName($formattedName); + $request = (new GetAnnotationRequest())->setName($formattedName); try { $gapicClient->getAnnotation($request); // If the $gapicClient method call did not throw, fail the test @@ -594,15 +612,17 @@ public function getCollectorTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new GetCollectorRequest()) - ->setName($formattedName); + $request = (new GetCollectorRequest())->setName($formattedName); $response = $gapicClient->getCollector($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.rapidmigrationassessment.v1.RapidMigrationAssessment/GetCollector', $actualFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/GetCollector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -619,17 +639,19 @@ public function getCollectorExceptionTest() $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); + $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->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new GetCollectorRequest()) - ->setName($formattedName); + $request = (new GetCollectorRequest())->setName($formattedName); try { $gapicClient->getCollector($request); // If the $gapicClient method call did not throw, fail the test @@ -654,17 +676,14 @@ public function listCollectorsTest() // Mock response $nextPageToken = ''; $collectorsElement = new Collector(); - $collectors = [ - $collectorsElement, - ]; + $collectors = [$collectorsElement]; $expectedResponse = new ListCollectorsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCollectors($collectors); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCollectorsRequest()) - ->setParent($formattedParent); + $request = (new ListCollectorsRequest())->setParent($formattedParent); $response = $gapicClient->listCollectors($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -674,7 +693,10 @@ public function listCollectorsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/ListCollectors', $actualFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/ListCollectors', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -691,17 +713,19 @@ public function listCollectorsExceptionTest() $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); + $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 ListCollectorsRequest()) - ->setParent($formattedParent); + $request = (new ListCollectorsRequest())->setParent($formattedParent); try { $gapicClient->listCollectors($request); // If the $gapicClient method call did not throw, fail the test @@ -764,8 +788,7 @@ public function pauseCollectorTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new PauseCollectorRequest()) - ->setName($formattedName); + $request = (new PauseCollectorRequest())->setName($formattedName); $response = $gapicClient->pauseCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -775,7 +798,10 @@ public function pauseCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/PauseCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/PauseCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -821,17 +847,19 @@ public function pauseCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new PauseCollectorRequest()) - ->setName($formattedName); + $request = (new PauseCollectorRequest())->setName($formattedName); $response = $gapicClient->pauseCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -903,8 +931,7 @@ public function registerCollectorTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new RegisterCollectorRequest()) - ->setName($formattedName); + $request = (new RegisterCollectorRequest())->setName($formattedName); $response = $gapicClient->registerCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -914,7 +941,10 @@ public function registerCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/RegisterCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/RegisterCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -960,17 +990,19 @@ public function registerCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new RegisterCollectorRequest()) - ->setName($formattedName); + $request = (new RegisterCollectorRequest())->setName($formattedName); $response = $gapicClient->registerCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1042,8 +1074,7 @@ public function resumeCollectorTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new ResumeCollectorRequest()) - ->setName($formattedName); + $request = (new ResumeCollectorRequest())->setName($formattedName); $response = $gapicClient->resumeCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1053,7 +1084,10 @@ public function resumeCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/ResumeCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/ResumeCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1099,17 +1133,19 @@ public function resumeCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->collectorName('[PROJECT]', '[LOCATION]', '[COLLECTOR]'); - $request = (new ResumeCollectorRequest()) - ->setName($formattedName); + $request = (new ResumeCollectorRequest())->setName($formattedName); $response = $gapicClient->resumeCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1182,9 +1218,7 @@ public function updateCollectorTest() // Mock request $updateMask = new FieldMask(); $collector = new Collector(); - $request = (new UpdateCollectorRequest()) - ->setUpdateMask($updateMask) - ->setCollector($collector); + $request = (new UpdateCollectorRequest())->setUpdateMask($updateMask)->setCollector($collector); $response = $gapicClient->updateCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1194,7 +1228,10 @@ public function updateCollectorTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/UpdateCollector', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/UpdateCollector', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getCollector(); @@ -1242,19 +1279,20 @@ public function updateCollectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); $collector = new Collector(); - $request = (new UpdateCollectorRequest()) - ->setUpdateMask($updateMask) - ->setCollector($collector); + $request = (new UpdateCollectorRequest())->setUpdateMask($updateMask)->setCollector($collector); $response = $gapicClient->updateCollector($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1316,12 +1354,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -1348,9 +1389,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -1380,12 +1419,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -1435,9 +1477,7 @@ public function createAnnotationAsyncTest() // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $annotation = new Annotation(); - $request = (new CreateAnnotationRequest()) - ->setParent($formattedParent) - ->setAnnotation($annotation); + $request = (new CreateAnnotationRequest())->setParent($formattedParent)->setAnnotation($annotation); $response = $gapicClient->createAnnotationAsync($request)->wait(); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1447,7 +1487,10 @@ public function createAnnotationAsyncTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateAnnotation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment/CreateAnnotation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getAnnotation(); diff --git a/RecaptchaEnterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php b/RecaptchaEnterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php index 759b20393081..024d5e537d31 100644 --- a/RecaptchaEnterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php +++ b/RecaptchaEnterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php @@ -70,12 +70,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\RecaptchaEnterprise\V1\RecaptchaEnterpriseServiceClient} for the - * stable implementation - * - * @experimental - * * @method PromiseInterface annotateAssessmentAsync(AnnotateAssessmentRequest $request, array $optionalArgs = []) * @method PromiseInterface createAssessmentAsync(CreateAssessmentRequest $request, array $optionalArgs = []) * @method PromiseInterface createFirewallPolicyAsync(CreateFirewallPolicyRequest $request, array $optionalArgs = []) @@ -103,9 +97,16 @@ final class RecaptchaEnterpriseServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php b/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php index 431dee6e2cca..76bc277a1b81 100644 --- a/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php +++ b/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php @@ -89,9 +89,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient} to - * use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient}. */ class RecaptchaEnterpriseServiceGapicClient { @@ -100,9 +98,16 @@ class RecaptchaEnterpriseServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Client/CatalogServiceClient.php b/RecommendationEngine/src/V1beta1/Client/CatalogServiceClient.php index 89ccf375bdc2..54de938985f9 100644 --- a/RecommendationEngine/src/V1beta1/Client/CatalogServiceClient.php +++ b/RecommendationEngine/src/V1beta1/Client/CatalogServiceClient.php @@ -58,8 +58,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * * @experimental * * @method PromiseInterface createCatalogItemAsync(CreateCatalogItemRequest $request, array $optionalArgs = []) @@ -77,9 +75,16 @@ final class CatalogServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.CatalogService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Client/PredictionApiKeyRegistryClient.php b/RecommendationEngine/src/V1beta1/Client/PredictionApiKeyRegistryClient.php index ebebd476c007..b35a126d1c28 100644 --- a/RecommendationEngine/src/V1beta1/Client/PredictionApiKeyRegistryClient.php +++ b/RecommendationEngine/src/V1beta1/Client/PredictionApiKeyRegistryClient.php @@ -56,8 +56,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * * @experimental * * @method PromiseInterface createPredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest $request, array $optionalArgs = []) @@ -72,9 +70,16 @@ final class PredictionApiKeyRegistryClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Client/PredictionServiceClient.php b/RecommendationEngine/src/V1beta1/Client/PredictionServiceClient.php index 3410e02726bb..342d4437880a 100644 --- a/RecommendationEngine/src/V1beta1/Client/PredictionServiceClient.php +++ b/RecommendationEngine/src/V1beta1/Client/PredictionServiceClient.php @@ -49,8 +49,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * * @experimental * * @method PromiseInterface predictAsync(PredictRequest $request, array $optionalArgs = []) @@ -63,9 +61,16 @@ final class PredictionServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.PredictionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Client/UserEventServiceClient.php b/RecommendationEngine/src/V1beta1/Client/UserEventServiceClient.php index f3b9f488aa57..5e440dc891d9 100644 --- a/RecommendationEngine/src/V1beta1/Client/UserEventServiceClient.php +++ b/RecommendationEngine/src/V1beta1/Client/UserEventServiceClient.php @@ -59,8 +59,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * * @experimental * * @method PromiseInterface collectUserEventAsync(CollectUserEventRequest $request, array $optionalArgs = []) @@ -77,9 +75,16 @@ final class UserEventServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.UserEventService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Gapic/CatalogServiceGapicClient.php b/RecommendationEngine/src/V1beta1/Gapic/CatalogServiceGapicClient.php index 40125499150f..479e70fa8ebe 100644 --- a/RecommendationEngine/src/V1beta1/Gapic/CatalogServiceGapicClient.php +++ b/RecommendationEngine/src/V1beta1/Gapic/CatalogServiceGapicClient.php @@ -73,11 +73,9 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecommendationEngine\V1beta1\Client\CatalogServiceClient} to use - * the new surface. - * * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\RecommendationEngine\V1beta1\Client\CatalogServiceClient}. */ class CatalogServiceGapicClient { @@ -86,9 +84,16 @@ class CatalogServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.CatalogService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Gapic/PredictionApiKeyRegistryGapicClient.php b/RecommendationEngine/src/V1beta1/Gapic/PredictionApiKeyRegistryGapicClient.php index f5ad270ae1db..af3209fc0229 100644 --- a/RecommendationEngine/src/V1beta1/Gapic/PredictionApiKeyRegistryGapicClient.php +++ b/RecommendationEngine/src/V1beta1/Gapic/PredictionApiKeyRegistryGapicClient.php @@ -68,11 +68,9 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecommendationEngine\V1beta1\Client\PredictionApiKeyRegistryClient} - * to use the new surface. - * * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\RecommendationEngine\V1beta1\Client\PredictionApiKeyRegistryClient}. */ class PredictionApiKeyRegistryGapicClient { @@ -81,9 +79,16 @@ class PredictionApiKeyRegistryGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Gapic/PredictionServiceGapicClient.php b/RecommendationEngine/src/V1beta1/Gapic/PredictionServiceGapicClient.php index d6867d5976b8..b2adeff517be 100644 --- a/RecommendationEngine/src/V1beta1/Gapic/PredictionServiceGapicClient.php +++ b/RecommendationEngine/src/V1beta1/Gapic/PredictionServiceGapicClient.php @@ -73,11 +73,9 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecommendationEngine\V1beta1\Client\PredictionServiceClient} to - * use the new surface. - * * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\RecommendationEngine\V1beta1\Client\PredictionServiceClient}. */ class PredictionServiceGapicClient { @@ -86,9 +84,16 @@ class PredictionServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.PredictionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RecommendationEngine/src/V1beta1/Gapic/UserEventServiceGapicClient.php b/RecommendationEngine/src/V1beta1/Gapic/UserEventServiceGapicClient.php index 1c15494e071a..3a9209a0239e 100644 --- a/RecommendationEngine/src/V1beta1/Gapic/UserEventServiceGapicClient.php +++ b/RecommendationEngine/src/V1beta1/Gapic/UserEventServiceGapicClient.php @@ -72,11 +72,9 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecommendationEngine\V1beta1\Client\UserEventServiceClient} to use - * the new surface. - * * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\RecommendationEngine\V1beta1\Client\UserEventServiceClient}. */ class UserEventServiceGapicClient { @@ -85,9 +83,16 @@ class UserEventServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recommendationengine.v1beta1.UserEventService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recommendationengine.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommendationengine.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Recommender/src/V1/Client/RecommenderClient.php b/Recommender/src/V1/Client/RecommenderClient.php index c9b9e3ad9e6b..ebd14c8186d1 100644 --- a/Recommender/src/V1/Client/RecommenderClient.php +++ b/Recommender/src/V1/Client/RecommenderClient.php @@ -66,11 +66,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Recommender\V1\RecommenderClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface getInsightAsync(GetInsightRequest $request, array $optionalArgs = []) * @method PromiseInterface getInsightTypeConfigAsync(GetInsightTypeConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface getRecommendationAsync(GetRecommendationRequest $request, array $optionalArgs = []) @@ -93,9 +88,16 @@ final class RecommenderClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.recommender.v1.Recommender'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'recommender.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommender.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Recommender/src/V1/Gapic/RecommenderGapicClient.php b/Recommender/src/V1/Gapic/RecommenderGapicClient.php index fead5d7c676d..e8da3932d68f 100644 --- a/Recommender/src/V1/Gapic/RecommenderGapicClient.php +++ b/Recommender/src/V1/Gapic/RecommenderGapicClient.php @@ -78,8 +78,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Recommender\V1\Client\RecommenderClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Recommender\V1\Client\RecommenderClient}. */ class RecommenderGapicClient { @@ -88,9 +87,16 @@ class RecommenderGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.recommender.v1.Recommender'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'recommender.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommender.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Redis/src/V1/Client/CloudRedisClient.php b/Redis/src/V1/Client/CloudRedisClient.php index 3d35c9c198e0..ac84114f4311 100644 --- a/Redis/src/V1/Client/CloudRedisClient.php +++ b/Redis/src/V1/Client/CloudRedisClient.php @@ -79,11 +79,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Redis\V1\CloudRedisClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) * @method PromiseInterface exportInstanceAsync(ExportInstanceRequest $request, array $optionalArgs = []) @@ -106,9 +101,16 @@ final class CloudRedisClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.redis.v1.CloudRedis'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'redis.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Redis/src/V1/Gapic/CloudRedisGapicClient.php b/Redis/src/V1/Gapic/CloudRedisGapicClient.php index a893afe34e47..4de254de21dc 100644 --- a/Redis/src/V1/Gapic/CloudRedisGapicClient.php +++ b/Redis/src/V1/Gapic/CloudRedisGapicClient.php @@ -123,8 +123,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Redis\V1\Client\CloudRedisClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Redis\V1\Client\CloudRedisClient}. */ class CloudRedisGapicClient { @@ -133,9 +132,16 @@ class CloudRedisGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.redis.v1.CloudRedis'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'redis.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Redis/src/V1beta1/Gapic/CloudRedisGapicClient.php b/Redis/src/V1beta1/Gapic/CloudRedisGapicClient.php index cf8992ced270..159c8194ad7d 100644 --- a/Redis/src/V1beta1/Gapic/CloudRedisGapicClient.php +++ b/Redis/src/V1beta1/Gapic/CloudRedisGapicClient.php @@ -122,6 +122,8 @@ * contained within formatted names that are returned by the API. * * @experimental + * + * @deprecated This class will be removed in the next major version update. */ class CloudRedisGapicClient { @@ -130,9 +132,16 @@ class CloudRedisGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.redis.v1beta1.CloudRedis'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'redis.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/RedisCluster/src/V1/Client/CloudRedisClusterClient.php b/RedisCluster/src/V1/Client/CloudRedisClusterClient.php index 0f62fec3d963..6b937e16541c 100644 --- a/RedisCluster/src/V1/Client/CloudRedisClusterClient.php +++ b/RedisCluster/src/V1/Client/CloudRedisClusterClient.php @@ -79,10 +79,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. - * - * @experimental - * * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) @@ -99,9 +95,16 @@ final class CloudRedisClusterClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.redis.cluster.v1.CloudRedisCluster'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'redis.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; @@ -109,9 +112,7 @@ final class CloudRedisClusterClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -157,7 +158,9 @@ public function getOperationsClient() */ public function resumeOperation($operationName, $methodName = null) { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); $operation->reload(); return $operation; diff --git a/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php b/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php index a91699595389..570744dc9f19 100644 --- a/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php +++ b/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php @@ -63,7 +63,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return CloudRedisClusterClient */ @@ -187,12 +189,15 @@ public function createClusterExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -261,8 +266,7 @@ public function deleteClusterTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); + $request = (new DeleteClusterRequest())->setName($formattedName); $response = $gapicClient->deleteCluster($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -318,17 +322,19 @@ public function deleteClusterExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); + $request = (new DeleteClusterRequest())->setName($formattedName); $response = $gapicClient->deleteCluster($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -374,8 +380,7 @@ public function getClusterTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); + $request = (new GetClusterRequest())->setName($formattedName); $response = $gapicClient->getCluster($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -399,17 +404,19 @@ public function getClusterExceptionTest() $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); + $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->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); + $request = (new GetClusterRequest())->setName($formattedName); try { $gapicClient->getCluster($request); // If the $gapicClient method call did not throw, fail the test @@ -434,17 +441,14 @@ public function listClustersTest() // Mock response $nextPageToken = ''; $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; + $clusters = [$clustersElement]; $expectedResponse = new ListClustersResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setClusters($clusters); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); + $request = (new ListClustersRequest())->setParent($formattedParent); $response = $gapicClient->listClusters($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -471,17 +475,19 @@ public function listClustersExceptionTest() $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); + $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 ListClustersRequest()) - ->setParent($formattedParent); + $request = (new ListClustersRequest())->setParent($formattedParent); try { $gapicClient->listClusters($request); // If the $gapicClient method call did not throw, fail the test @@ -543,9 +549,7 @@ public function updateClusterTest() $cluster->setShardCount($clusterShardCount); $clusterPscConfigs = []; $cluster->setPscConfigs($clusterPscConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); + $request = (new UpdateClusterRequest())->setUpdateMask($updateMask)->setCluster($cluster); $response = $gapicClient->updateCluster($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -603,12 +607,15 @@ public function updateClusterExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); @@ -619,9 +626,7 @@ public function updateClusterExceptionTest() $cluster->setShardCount($clusterShardCount); $clusterPscConfigs = []; $cluster->setPscConfigs($clusterPscConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); + $request = (new UpdateClusterRequest())->setUpdateMask($updateMask)->setCluster($cluster); $response = $gapicClient->updateCluster($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -683,12 +688,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -715,9 +723,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -747,12 +753,15 @@ public function listLocationsExceptionTest() $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); + $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 { diff --git a/ResourceManager/src/V3/Client/FoldersClient.php b/ResourceManager/src/V3/Client/FoldersClient.php index 4ebcb704ee4e..cc627c3f9e2d 100644 --- a/ResourceManager/src/V3/Client/FoldersClient.php +++ b/ResourceManager/src/V3/Client/FoldersClient.php @@ -65,11 +65,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\FoldersClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) @@ -90,9 +85,16 @@ final class FoldersClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Folders'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/OrganizationsClient.php b/ResourceManager/src/V3/Client/OrganizationsClient.php index 9832dee74c99..470cd688165a 100644 --- a/ResourceManager/src/V3/Client/OrganizationsClient.php +++ b/ResourceManager/src/V3/Client/OrganizationsClient.php @@ -54,12 +54,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\OrganizationsClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) * @method PromiseInterface getOrganizationAsync(GetOrganizationRequest $request, array $optionalArgs = []) * @method PromiseInterface searchOrganizationsAsync(SearchOrganizationsRequest $request, array $optionalArgs = []) @@ -74,9 +68,16 @@ final class OrganizationsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Organizations'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/ProjectsClient.php b/ResourceManager/src/V3/Client/ProjectsClient.php index a65b4aacfe75..34e0665bef20 100644 --- a/ResourceManager/src/V3/Client/ProjectsClient.php +++ b/ResourceManager/src/V3/Client/ProjectsClient.php @@ -63,11 +63,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\ProjectsClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createProjectAsync(CreateProjectRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteProjectAsync(DeleteProjectRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) @@ -88,9 +83,16 @@ final class ProjectsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Projects'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/TagBindingsClient.php b/ResourceManager/src/V3/Client/TagBindingsClient.php index d6c50806c007..0d88fa6baafa 100644 --- a/ResourceManager/src/V3/Client/TagBindingsClient.php +++ b/ResourceManager/src/V3/Client/TagBindingsClient.php @@ -55,12 +55,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\TagBindingsClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface createTagBindingAsync(CreateTagBindingRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteTagBindingAsync(DeleteTagBindingRequest $request, array $optionalArgs = []) * @method PromiseInterface listEffectiveTagsAsync(ListEffectiveTagsRequest $request, array $optionalArgs = []) @@ -74,9 +68,16 @@ final class TagBindingsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagBindings'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/TagHoldsClient.php b/ResourceManager/src/V3/Client/TagHoldsClient.php index 9641624c80c3..33155ebffc4f 100644 --- a/ResourceManager/src/V3/Client/TagHoldsClient.php +++ b/ResourceManager/src/V3/Client/TagHoldsClient.php @@ -57,11 +57,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\TagHoldsClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createTagHoldAsync(CreateTagHoldRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteTagHoldAsync(DeleteTagHoldRequest $request, array $optionalArgs = []) * @method PromiseInterface listTagHoldsAsync(ListTagHoldsRequest $request, array $optionalArgs = []) @@ -74,9 +69,16 @@ final class TagHoldsClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagHolds'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/TagKeysClient.php b/ResourceManager/src/V3/Client/TagKeysClient.php index 0b4c1817813f..4935d918c3b7 100644 --- a/ResourceManager/src/V3/Client/TagKeysClient.php +++ b/ResourceManager/src/V3/Client/TagKeysClient.php @@ -61,11 +61,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\TagKeysClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createTagKeyAsync(CreateTagKeyRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteTagKeyAsync(DeleteTagKeyRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) @@ -84,9 +79,16 @@ final class TagKeysClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagKeys'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Client/TagValuesClient.php b/ResourceManager/src/V3/Client/TagValuesClient.php index 76361c76d857..61372323e326 100644 --- a/ResourceManager/src/V3/Client/TagValuesClient.php +++ b/ResourceManager/src/V3/Client/TagValuesClient.php @@ -61,11 +61,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceManager\V3\TagValuesClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createTagValueAsync(CreateTagValueRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteTagValueAsync(DeleteTagValueRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) @@ -84,9 +79,16 @@ final class TagValuesClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagValues'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/FoldersGapicClient.php b/ResourceManager/src/V3/Gapic/FoldersGapicClient.php index 1aa2b1e1010e..4a1120d15a46 100644 --- a/ResourceManager/src/V3/Gapic/FoldersGapicClient.php +++ b/ResourceManager/src/V3/Gapic/FoldersGapicClient.php @@ -103,8 +103,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\FoldersClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\FoldersClient}. */ class FoldersGapicClient { @@ -113,9 +112,16 @@ class FoldersGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Folders'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/OrganizationsGapicClient.php b/ResourceManager/src/V3/Gapic/OrganizationsGapicClient.php index 6affd1c1012c..6d1d84c9b155 100644 --- a/ResourceManager/src/V3/Gapic/OrganizationsGapicClient.php +++ b/ResourceManager/src/V3/Gapic/OrganizationsGapicClient.php @@ -66,9 +66,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\OrganizationsClient} to use the new - * surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\OrganizationsClient}. */ class OrganizationsGapicClient { @@ -77,9 +75,16 @@ class OrganizationsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Organizations'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/ProjectsGapicClient.php b/ResourceManager/src/V3/Gapic/ProjectsGapicClient.php index 3500475e543d..8944d9cf009e 100644 --- a/ResourceManager/src/V3/Gapic/ProjectsGapicClient.php +++ b/ResourceManager/src/V3/Gapic/ProjectsGapicClient.php @@ -101,8 +101,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\ProjectsClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\ProjectsClient}. */ class ProjectsGapicClient { @@ -111,9 +110,16 @@ class ProjectsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.Projects'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/TagBindingsGapicClient.php b/ResourceManager/src/V3/Gapic/TagBindingsGapicClient.php index 4632e44f12fe..cf377a851528 100644 --- a/ResourceManager/src/V3/Gapic/TagBindingsGapicClient.php +++ b/ResourceManager/src/V3/Gapic/TagBindingsGapicClient.php @@ -91,9 +91,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\TagBindingsClient} to use the new - * surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\TagBindingsClient}. */ class TagBindingsGapicClient { @@ -102,9 +100,16 @@ class TagBindingsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagBindings'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/TagHoldsGapicClient.php b/ResourceManager/src/V3/Gapic/TagHoldsGapicClient.php index 5aa4b9881dc7..bccd6ce4cbc2 100644 --- a/ResourceManager/src/V3/Gapic/TagHoldsGapicClient.php +++ b/ResourceManager/src/V3/Gapic/TagHoldsGapicClient.php @@ -93,8 +93,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\TagHoldsClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\TagHoldsClient}. */ class TagHoldsGapicClient { @@ -103,9 +102,16 @@ class TagHoldsGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagHolds'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/TagKeysGapicClient.php b/ResourceManager/src/V3/Gapic/TagKeysGapicClient.php index 7550aff6ac77..edc964146c80 100644 --- a/ResourceManager/src/V3/Gapic/TagKeysGapicClient.php +++ b/ResourceManager/src/V3/Gapic/TagKeysGapicClient.php @@ -98,8 +98,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\TagKeysClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\TagKeysClient}. */ class TagKeysGapicClient { @@ -108,9 +107,16 @@ class TagKeysGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagKeys'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceManager/src/V3/Gapic/TagValuesGapicClient.php b/ResourceManager/src/V3/Gapic/TagValuesGapicClient.php index 4e99558e141e..61d1506aa5ea 100644 --- a/ResourceManager/src/V3/Gapic/TagValuesGapicClient.php +++ b/ResourceManager/src/V3/Gapic/TagValuesGapicClient.php @@ -98,8 +98,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceManager\V3\Client\TagValuesClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceManager\V3\Client\TagValuesClient}. */ class TagValuesGapicClient { @@ -108,9 +107,16 @@ class TagValuesGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcemanager.v3.TagValues'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudresourcemanager.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceSettings/src/V1/Client/ResourceSettingsServiceClient.php b/ResourceSettings/src/V1/Client/ResourceSettingsServiceClient.php index f3b2c5859185..5999bb0080db 100644 --- a/ResourceSettings/src/V1/Client/ResourceSettingsServiceClient.php +++ b/ResourceSettings/src/V1/Client/ResourceSettingsServiceClient.php @@ -61,12 +61,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\ResourceSettings\V1\ResourceSettingsServiceClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface getSettingAsync(GetSettingRequest $request, array $optionalArgs = []) * @method PromiseInterface listSettingsAsync(ListSettingsRequest $request, array $optionalArgs = []) * @method PromiseInterface updateSettingAsync(UpdateSettingRequest $request, array $optionalArgs = []) @@ -79,9 +73,16 @@ final class ResourceSettingsServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.resourcesettings.v1.ResourceSettingsService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'resourcesettings.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'resourcesettings.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/ResourceSettings/src/V1/Gapic/ResourceSettingsServiceGapicClient.php b/ResourceSettings/src/V1/Gapic/ResourceSettingsServiceGapicClient.php index b1f6f4409213..81b66a825428 100644 --- a/ResourceSettings/src/V1/Gapic/ResourceSettingsServiceGapicClient.php +++ b/ResourceSettings/src/V1/Gapic/ResourceSettingsServiceGapicClient.php @@ -72,9 +72,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\ResourceSettings\V1\Client\ResourceSettingsServiceClient} to use - * the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\ResourceSettings\V1\Client\ResourceSettingsServiceClient}. */ class ResourceSettingsServiceGapicClient { @@ -83,9 +81,16 @@ class ResourceSettingsServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.resourcesettings.v1.ResourceSettingsService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'resourcesettings.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'resourcesettings.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/CatalogServiceClient.php b/Retail/src/V2/Client/CatalogServiceClient.php index a63ce42f565f..ff59ce041a02 100644 --- a/Retail/src/V2/Client/CatalogServiceClient.php +++ b/Retail/src/V2/Client/CatalogServiceClient.php @@ -61,11 +61,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\CatalogServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface addCatalogAttributeAsync(AddCatalogAttributeRequest $request, array $optionalArgs = []) * @method PromiseInterface getAttributesConfigAsync(GetAttributesConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface getCompletionConfigAsync(GetCompletionConfigRequest $request, array $optionalArgs = []) @@ -86,9 +81,16 @@ final class CatalogServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.CatalogService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/CompletionServiceClient.php b/Retail/src/V2/Client/CompletionServiceClient.php index 64dce9f49158..6d60e54fbce9 100644 --- a/Retail/src/V2/Client/CompletionServiceClient.php +++ b/Retail/src/V2/Client/CompletionServiceClient.php @@ -54,11 +54,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\CompletionServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface completeQueryAsync(CompleteQueryRequest $request, array $optionalArgs = []) * @method PromiseInterface importCompletionDataAsync(ImportCompletionDataRequest $request, array $optionalArgs = []) */ @@ -70,9 +65,16 @@ final class CompletionServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.CompletionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/ControlServiceClient.php b/Retail/src/V2/Client/ControlServiceClient.php index 465ffa79bc04..ddff7a70e112 100644 --- a/Retail/src/V2/Client/ControlServiceClient.php +++ b/Retail/src/V2/Client/ControlServiceClient.php @@ -52,11 +52,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\ControlServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createControlAsync(CreateControlRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteControlAsync(DeleteControlRequest $request, array $optionalArgs = []) * @method PromiseInterface getControlAsync(GetControlRequest $request, array $optionalArgs = []) @@ -71,9 +66,16 @@ final class ControlServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.ControlService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/ModelServiceClient.php b/Retail/src/V2/Client/ModelServiceClient.php index 35a06e247c1c..b80c42b6b10f 100644 --- a/Retail/src/V2/Client/ModelServiceClient.php +++ b/Retail/src/V2/Client/ModelServiceClient.php @@ -69,11 +69,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\ModelServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) @@ -91,9 +86,16 @@ final class ModelServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.ModelService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/PredictionServiceClient.php b/Retail/src/V2/Client/PredictionServiceClient.php index 3c086832336c..485aba004995 100644 --- a/Retail/src/V2/Client/PredictionServiceClient.php +++ b/Retail/src/V2/Client/PredictionServiceClient.php @@ -47,11 +47,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\PredictionServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface predictAsync(PredictRequest $request, array $optionalArgs = []) */ final class PredictionServiceClient @@ -62,9 +57,16 @@ final class PredictionServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.PredictionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/ProductServiceClient.php b/Retail/src/V2/Client/ProductServiceClient.php index b24a8db7d0a9..2066b782b6f1 100644 --- a/Retail/src/V2/Client/ProductServiceClient.php +++ b/Retail/src/V2/Client/ProductServiceClient.php @@ -62,11 +62,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\ProductServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface addFulfillmentPlacesAsync(AddFulfillmentPlacesRequest $request, array $optionalArgs = []) * @method PromiseInterface addLocalInventoriesAsync(AddLocalInventoriesRequest $request, array $optionalArgs = []) * @method PromiseInterface createProductAsync(CreateProductRequest $request, array $optionalArgs = []) @@ -87,9 +82,16 @@ final class ProductServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.ProductService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/SearchServiceClient.php b/Retail/src/V2/Client/SearchServiceClient.php index 7db334b4e8dc..230e6da0bf2f 100644 --- a/Retail/src/V2/Client/SearchServiceClient.php +++ b/Retail/src/V2/Client/SearchServiceClient.php @@ -50,11 +50,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\SearchServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface searchAsync(SearchRequest $request, array $optionalArgs = []) */ final class SearchServiceClient @@ -65,9 +60,16 @@ final class SearchServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.SearchService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/ServingConfigServiceClient.php b/Retail/src/V2/Client/ServingConfigServiceClient.php index fdb9d3159dc9..17860f1f15c2 100644 --- a/Retail/src/V2/Client/ServingConfigServiceClient.php +++ b/Retail/src/V2/Client/ServingConfigServiceClient.php @@ -54,12 +54,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\ServingConfigServiceClient} for the stable - * implementation - * - * @experimental - * * @method PromiseInterface addControlAsync(AddControlRequest $request, array $optionalArgs = []) * @method PromiseInterface createServingConfigAsync(CreateServingConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteServingConfigAsync(DeleteServingConfigRequest $request, array $optionalArgs = []) @@ -76,9 +70,16 @@ final class ServingConfigServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.ServingConfigService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Client/UserEventServiceClient.php b/Retail/src/V2/Client/UserEventServiceClient.php index c36185dfd084..e1a9ed7287a4 100644 --- a/Retail/src/V2/Client/UserEventServiceClient.php +++ b/Retail/src/V2/Client/UserEventServiceClient.php @@ -56,11 +56,6 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This class is currently experimental and may be subject to changes. See {@see - * \Google\Cloud\Retail\V2\UserEventServiceClient} for the stable implementation - * - * @experimental - * * @method PromiseInterface collectUserEventAsync(CollectUserEventRequest $request, array $optionalArgs = []) * @method PromiseInterface importUserEventsAsync(ImportUserEventsRequest $request, array $optionalArgs = []) * @method PromiseInterface purgeUserEventsAsync(PurgeUserEventsRequest $request, array $optionalArgs = []) @@ -75,9 +70,16 @@ final class UserEventServiceClient /** The name of the service. */ private const SERVICE_NAME = 'google.cloud.retail.v2.UserEventService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ private const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ private const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/CatalogServiceGapicClient.php b/Retail/src/V2/Gapic/CatalogServiceGapicClient.php index 973d10dfced6..3192f5f602b4 100644 --- a/Retail/src/V2/Gapic/CatalogServiceGapicClient.php +++ b/Retail/src/V2/Gapic/CatalogServiceGapicClient.php @@ -75,8 +75,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\CatalogServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\CatalogServiceClient}. */ class CatalogServiceGapicClient { @@ -85,9 +84,16 @@ class CatalogServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.CatalogService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/CompletionServiceGapicClient.php b/Retail/src/V2/Gapic/CompletionServiceGapicClient.php index dd73e935727a..f59f436d4bee 100644 --- a/Retail/src/V2/Gapic/CompletionServiceGapicClient.php +++ b/Retail/src/V2/Gapic/CompletionServiceGapicClient.php @@ -66,8 +66,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\CompletionServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\CompletionServiceClient}. */ class CompletionServiceGapicClient { @@ -76,9 +75,16 @@ class CompletionServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.CompletionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/ControlServiceGapicClient.php b/Retail/src/V2/Gapic/ControlServiceGapicClient.php index 4574f998ae84..caab413779b8 100644 --- a/Retail/src/V2/Gapic/ControlServiceGapicClient.php +++ b/Retail/src/V2/Gapic/ControlServiceGapicClient.php @@ -66,8 +66,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\ControlServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\ControlServiceClient}. */ class ControlServiceGapicClient { @@ -76,9 +75,16 @@ class ControlServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.ControlService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/ModelServiceGapicClient.php b/Retail/src/V2/Gapic/ModelServiceGapicClient.php index f88431911e0a..927fc76b36e1 100644 --- a/Retail/src/V2/Gapic/ModelServiceGapicClient.php +++ b/Retail/src/V2/Gapic/ModelServiceGapicClient.php @@ -107,8 +107,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\ModelServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\ModelServiceClient}. */ class ModelServiceGapicClient { @@ -117,9 +116,16 @@ class ModelServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.ModelService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/PredictionServiceGapicClient.php b/Retail/src/V2/Gapic/PredictionServiceGapicClient.php index 894df0eac147..9e4619e06aed 100644 --- a/Retail/src/V2/Gapic/PredictionServiceGapicClient.php +++ b/Retail/src/V2/Gapic/PredictionServiceGapicClient.php @@ -59,8 +59,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\PredictionServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\PredictionServiceClient}. */ class PredictionServiceGapicClient { @@ -69,9 +68,16 @@ class PredictionServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.PredictionService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/ProductServiceGapicClient.php b/Retail/src/V2/Gapic/ProductServiceGapicClient.php index 70644e116c44..f918232f243c 100644 --- a/Retail/src/V2/Gapic/ProductServiceGapicClient.php +++ b/Retail/src/V2/Gapic/ProductServiceGapicClient.php @@ -106,8 +106,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\ProductServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\ProductServiceClient}. */ class ProductServiceGapicClient { @@ -116,9 +115,16 @@ class ProductServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.ProductService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/SearchServiceGapicClient.php b/Retail/src/V2/Gapic/SearchServiceGapicClient.php index f820b730bfd7..784e0548b68e 100644 --- a/Retail/src/V2/Gapic/SearchServiceGapicClient.php +++ b/Retail/src/V2/Gapic/SearchServiceGapicClient.php @@ -80,8 +80,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\SearchServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\SearchServiceClient}. */ class SearchServiceGapicClient { @@ -90,9 +89,16 @@ class SearchServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.SearchService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php b/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php index 0be09cc7cf02..998831f52d2e 100644 --- a/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php +++ b/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php @@ -67,9 +67,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\ServingConfigServiceClient} to use the new - * surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\ServingConfigServiceClient}. */ class ServingConfigServiceGapicClient { @@ -78,9 +76,16 @@ class ServingConfigServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.ServingConfigService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; diff --git a/Retail/src/V2/Gapic/UserEventServiceGapicClient.php b/Retail/src/V2/Gapic/UserEventServiceGapicClient.php index d02781db334f..04d9066f2f14 100644 --- a/Retail/src/V2/Gapic/UserEventServiceGapicClient.php +++ b/Retail/src/V2/Gapic/UserEventServiceGapicClient.php @@ -69,8 +69,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Retail\V2\Client\UserEventServiceClient} to use the new surface. + * @deprecated Please use the new service client {@see \Google\Cloud\Retail\V2\Client\UserEventServiceClient}. */ class UserEventServiceGapicClient { @@ -79,9 +78,16 @@ class UserEventServiceGapicClient /** The name of the service. */ const SERVICE_NAME = 'google.cloud.retail.v2.UserEventService'; - /** The default address of the service. */ + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ const SERVICE_ADDRESS = 'retail.googleapis.com'; + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'retail.UNIVERSE_DOMAIN'; + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443;