diff --git a/composer.json b/composer.json index 639cb3a25..c0bb7e17b 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,6 @@ }, "autoload": { "classmap": ["generated/php"], - "exclude-from-classmap": ["generated/php/google-longrunning-v1/proto"] + "exclude-from-classmap": ["generated/php/google-cloud-longrunning-v1/proto"] } } diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/composer.json b/generated/php/google-cloud-bigquerydatatransfer-v1/composer.json index 7d4ba55de..0d5f767cd 100644 --- a/generated/php/google-cloud-bigquerydatatransfer-v1/composer.json +++ b/generated/php/google-cloud-bigquerydatatransfer-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "datatransfer/datatransfer", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-bigquery-datatransfer", "description": "BigQuery Data Transfer API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\BigQuery\\DataTransfer\\": "src", + "Google\\Cloud\\BigQuery\\DataTransfer\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/DataTransferServiceClient.php b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/DataTransferServiceClient.php similarity index 94% rename from generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/DataTransferServiceClient.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/DataTransferServiceClient.php index b764680d1..bd55c403e 100644 --- a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/DataTransferServiceClient.php +++ b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/DataTransferServiceClient.php @@ -38,5 +38,5 @@ class DataTransferServiceClient extends DataTransferServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see DataTransferServiceClientImpl} class. + // additions to the generated {@see DataTransferServiceGapicClient} class. } diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/Gapic/DataTransferServiceGapicClient.php b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/Gapic/DataTransferServiceGapicClient.php similarity index 91% rename from generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/Gapic/DataTransferServiceGapicClient.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/Gapic/DataTransferServiceGapicClient.php index 7c59c4a19..c2c0024a4 100644 --- a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/Gapic/DataTransferServiceGapicClient.php +++ b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/Gapic/DataTransferServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\BigQuery\DataTransfer\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsRequest; use Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsResponse; use Google\Cloud\BigQuery\DataTransfer\V1\CreateTransferConfigRequest; @@ -63,8 +63,6 @@ use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to @@ -121,10 +119,11 @@ class DataTransferServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectDataSourceNameTemplate; private static $projectNameTemplate; private static $projectTransferConfigNameTemplate; @@ -135,15 +134,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/data_transfer_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/data_transfer_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/data_transfer_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/data_transfer_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/data_transfer_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -319,57 +321,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'bigquerydatatransfer.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the BigQuery Data Transfer API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigquerydatatransfer.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_client_config.json b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_client_config.json similarity index 100% rename from generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_client_config.json rename to generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_client_config.json diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_descriptor_config.php b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_descriptor_config.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_descriptor_config.php diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_rest_client_config.php b/generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-bigquerydatatransfer-v1/src/BigQuery/DataTransfer/V1/resources/data_transfer_service_rest_client_config.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/src/V1/resources/data_transfer_service_rest_client_config.php diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/tests/system/BigQuery/DataTransfer/V1/DataTransferServiceSmokeTest.php b/generated/php/google-cloud-bigquerydatatransfer-v1/tests/System/V1/DataTransferServiceSmokeTest.php similarity index 93% rename from generated/php/google-cloud-bigquerydatatransfer-v1/tests/system/BigQuery/DataTransfer/V1/DataTransferServiceSmokeTest.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/tests/System/V1/DataTransferServiceSmokeTest.php index f2f5b04eb..b44ced0b8 100644 --- a/generated/php/google-cloud-bigquerydatatransfer-v1/tests/system/BigQuery/DataTransfer/V1/DataTransferServiceSmokeTest.php +++ b/generated/php/google-cloud-bigquerydatatransfer-v1/tests/System/V1/DataTransferServiceSmokeTest.php @@ -20,13 +20,13 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\BigQuery\DataTransfer\V1; +namespace Google\Cloud\BigQuery\DataTransfer\Tests\System\V1; use Google\Cloud\BigQuery\DataTransfer\V1\DataTransferServiceClient; use Google\ApiCore\Testing\GeneratedTest; /** - * @group data_transfer + * @group bigquerydatatransfer * @group grpc */ class DataTransferServiceSmokeTest extends GeneratedTest diff --git a/generated/php/google-cloud-bigquerydatatransfer-v1/tests/unit/BigQuery/DataTransfer/V1/DataTransferServiceClientTest.php b/generated/php/google-cloud-bigquerydatatransfer-v1/tests/Unit/V1/DataTransferServiceClientTest.php similarity index 96% rename from generated/php/google-cloud-bigquerydatatransfer-v1/tests/unit/BigQuery/DataTransfer/V1/DataTransferServiceClientTest.php rename to generated/php/google-cloud-bigquerydatatransfer-v1/tests/Unit/V1/DataTransferServiceClientTest.php index e1d651f78..cda2b6573 100644 --- a/generated/php/google-cloud-bigquerydatatransfer-v1/tests/unit/BigQuery/DataTransfer/V1/DataTransferServiceClientTest.php +++ b/generated/php/google-cloud-bigquerydatatransfer-v1/tests/Unit/V1/DataTransferServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\BigQuery\DataTransfer\V1; +namespace Google\Cloud\BigQuery\DataTransfer\Tests\Unit\V1; use Google\Cloud\BigQuery\DataTransfer\V1\DataTransferServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsResponse; @@ -40,11 +41,11 @@ use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group data_transfer + * @group bigquerydatatransfer * @group grpc */ class DataTransferServiceClientTest extends GeneratedTest @@ -62,6 +63,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new DataTransferServiceClient($options); } @@ -132,12 +139,12 @@ public function getDataSourceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -211,12 +218,12 @@ public function listDataSourcesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -304,12 +311,12 @@ public function createTransferConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -398,12 +405,12 @@ public function updateTransferConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -469,12 +476,12 @@ public function deleteTransferConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -558,12 +565,12 @@ public function getTransferConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -637,12 +644,12 @@ public function listTransferConfigsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -716,12 +723,12 @@ public function scheduleTransferRunsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -799,12 +806,12 @@ public function getTransferRunExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -869,12 +876,12 @@ public function deleteTransferRunExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -948,12 +955,12 @@ public function listTransferRunsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1027,12 +1034,12 @@ public function listTransferLogsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1100,12 +1107,12 @@ public function checkValidCredsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-bigtable-admin-v2/composer.json b/generated/php/google-cloud-bigtable-admin-v2/composer.json index c2fbdc450..0e3213f34 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/composer.json +++ b/generated/php/google-cloud-bigtable-admin-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "admin/admin", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-bigtable-admin", "description": "Cloud Bigtable Admin API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Bigtable\\Admin\\": "src", + "Google\\Cloud\\Bigtable\\Admin\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-bigtable-admin-v2/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php b/generated/php/google-cloud-bigtable-admin-v2/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php index 967d126a8..9ad050d23 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php +++ b/generated/php/google-cloud-bigtable-admin-v2/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php @@ -23,7 +23,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0abb2e0a36676f6f676c652f6269677461626c652f61646d696e2f76322f" . + "0ad72e0a36676f6f676c652f6269677461626c652f61646d696e2f76322f" . "6269677461626c655f696e7374616e63655f61646d696e2e70726f746f12" . "18676f6f676c652e6269677461626c652e61646d696e2e76321a27676f6f" . "676c652f6269677461626c652f61646d696e2f76322f696e7374616e6365" . @@ -115,113 +115,114 @@ public static function initOnce() { "12170a0f69676e6f72655f7761726e696e677318032001280822400a1744" . "656c65746541707050726f66696c6552657175657374120c0a046e616d65" . "18012001280912170a0f69676e6f72655f7761726e696e67731802200128" . - "0832aa170a154269677461626c65496e7374616e636541646d696e128e01" . - "0a0e437265617465496e7374616e6365122f2e676f6f676c652e62696774" . - "61626c652e61646d696e2e76322e437265617465496e7374616e63655265" . - "71756573741a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f7065" . - "726174696f6e222c82d3e493022622212f76322f7b706172656e743d7072" . - "6f6a656374732f2a7d2f696e7374616e6365733a012a128a010a0b476574" . - "496e7374616e6365122c2e676f6f676c652e6269677461626c652e61646d" . - "696e2e76322e476574496e7374616e6365526571756573741a222e676f6f" . - "676c652e6269677461626c652e61646d696e2e76322e496e7374616e6365" . - "222982d3e493022312212f76322f7b6e616d653d70726f6a656374732f2a" . - "2f696e7374616e6365732f2a7d129b010a0d4c697374496e7374616e6365" . - "73122e2e676f6f676c652e6269677461626c652e61646d696e2e76322e4c" . - "697374496e7374616e636573526571756573741a2f2e676f6f676c652e62" . - "69677461626c652e61646d696e2e76322e4c697374496e7374616e636573" . - "526573706f6e7365222982d3e493022312212f76322f7b706172656e743d" . - "70726f6a656374732f2a7d2f696e7374616e6365731286010a0e55706461" . - "7465496e7374616e636512222e676f6f676c652e6269677461626c652e61" . - "646d696e2e76322e496e7374616e63651a222e676f6f676c652e62696774" . - "61626c652e61646d696e2e76322e496e7374616e6365222c82d3e4930226" . - "1a212f76322f7b6e616d653d70726f6a656374732f2a2f696e7374616e63" . - "65732f2a7d3a012a12ac010a155061727469616c557064617465496e7374" . - "616e636512362e676f6f676c652e6269677461626c652e61646d696e2e76" . - "322e5061727469616c557064617465496e7374616e636552657175657374" . - "1a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f7065726174696f" . - "6e223c82d3e4930236322a2f76322f7b696e7374616e63652e6e616d653d" . - "70726f6a656374732f2a2f696e7374616e6365732f2a7d3a08696e737461" . - "6e63651284010a0e44656c657465496e7374616e6365122f2e676f6f676c" . - "652e6269677461626c652e61646d696e2e76322e44656c657465496e7374" . - "616e6365526571756573741a162e676f6f676c652e70726f746f6275662e" . - "456d707479222982d3e49302232a212f76322f7b6e616d653d70726f6a65" . - "6374732f2a2f696e7374616e6365732f2a7d129d010a0d43726561746543" . - "6c7573746572122e2e676f6f676c652e6269677461626c652e61646d696e" . - "2e76322e437265617465436c7573746572526571756573741a1d2e676f6f" . - "676c652e6c6f6e6772756e6e696e672e4f7065726174696f6e223d82d3e4" . - "930237222c2f76322f7b706172656e743d70726f6a656374732f2a2f696e" . - "7374616e6365732f2a7d2f636c7573746572733a07636c75737465721292" . - "010a0a476574436c7573746572122b2e676f6f676c652e6269677461626c" . - "652e61646d696e2e76322e476574436c7573746572526571756573741a21" . - "2e676f6f676c652e6269677461626c652e61646d696e2e76322e436c7573" . - "746572223482d3e493022e122c2f76322f7b6e616d653d70726f6a656374" . - "732f2a2f696e7374616e6365732f2a2f636c7573746572732f2a7d12a301" . - "0a0c4c697374436c757374657273122d2e676f6f676c652e626967746162" . - "6c652e61646d696e2e76322e4c697374436c757374657273526571756573" . - "741a2e2e676f6f676c652e6269677461626c652e61646d696e2e76322e4c" . - "697374436c757374657273526573706f6e7365223482d3e493022e122c2f" . - "76322f7b706172656e743d70726f6a656374732f2a2f696e7374616e6365" . - "732f2a7d2f636c757374657273128a010a0d557064617465436c75737465" . - "7212212e676f6f676c652e6269677461626c652e61646d696e2e76322e43" . - "6c75737465721a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f70" . - "65726174696f6e223782d3e49302311a2c2f76322f7b6e616d653d70726f" . - "6a656374732f2a2f696e7374616e6365732f2a2f636c7573746572732f2a" . - "7d3a012a128d010a0d44656c657465436c7573746572122e2e676f6f676c" . - "652e6269677461626c652e61646d696e2e76322e44656c657465436c7573" . - "746572526571756573741a162e676f6f676c652e70726f746f6275662e45" . - "6d707479223482d3e493022e2a2c2f76322f7b6e616d653d70726f6a6563" . - "74732f2a2f696e7374616e6365732f2a2f636c7573746572732f2a7d12b1" . - "010a1043726561746541707050726f66696c6512312e676f6f676c652e62" . - "69677461626c652e61646d696e2e76322e43726561746541707050726f66" . - "696c65526571756573741a242e676f6f676c652e6269677461626c652e61" . - "646d696e2e76322e41707050726f66696c65224482d3e493023e222f2f76" . - "322f7b706172656e743d70726f6a656374732f2a2f696e7374616e636573" . - "2f2a7d2f61707050726f66696c65733a0b6170705f70726f66696c65129e" . - "010a0d47657441707050726f66696c65122e2e676f6f676c652e62696774" . - "61626c652e61646d696e2e76322e47657441707050726f66696c65526571" . - "756573741a242e676f6f676c652e6269677461626c652e61646d696e2e76" . - "322e41707050726f66696c65223782d3e4930231122f2f76322f7b6e616d" . - "653d70726f6a656374732f2a2f696e7374616e6365732f2a2f6170705072" . - "6f66696c65732f2a7d12af010a0f4c69737441707050726f66696c657312" . - "302e676f6f676c652e6269677461626c652e61646d696e2e76322e4c6973" . - "7441707050726f66696c6573526571756573741a312e676f6f676c652e62" . - "69677461626c652e61646d696e2e76322e4c69737441707050726f66696c" . - "6573526573706f6e7365223782d3e4930231122f2f76322f7b706172656e" . - "743d70726f6a656374732f2a2f696e7374616e6365732f2a7d2f61707050" . - "726f66696c657312b6010a1055706461746541707050726f66696c651231" . - "2e676f6f676c652e6269677461626c652e61646d696e2e76322e55706461" . - "746541707050726f66696c65526571756573741a1d2e676f6f676c652e6c" . - "6f6e6772756e6e696e672e4f7065726174696f6e225082d3e493024a323b" . - "2f76322f7b6170705f70726f66696c652e6e616d653d70726f6a65637473" . - "2f2a2f696e7374616e6365732f2a2f61707050726f66696c65732f2a7d3a" . - "0b6170705f70726f66696c651296010a1044656c65746541707050726f66" . - "696c6512312e676f6f676c652e6269677461626c652e61646d696e2e7632" . - "2e44656c65746541707050726f66696c65526571756573741a162e676f6f" . - "676c652e70726f746f6275662e456d707479223782d3e49302312a2f2f76" . - "322f7b6e616d653d70726f6a656374732f2a2f696e7374616e6365732f2a" . - "2f61707050726f66696c65732f2a7d1288010a0c47657449616d506f6c69" . - "637912222e676f6f676c652e69616d2e76312e47657449616d506f6c6963" . - "79526571756573741a152e676f6f676c652e69616d2e76312e506f6c6963" . - "79223d82d3e493023722322f76322f7b7265736f757263653d70726f6a65" . - "6374732f2a2f696e7374616e6365732f2a7d3a67657449616d506f6c6963" . - "793a012a1288010a0c53657449616d506f6c69637912222e676f6f676c65" . - "2e69616d2e76312e53657449616d506f6c696379526571756573741a152e" . - "676f6f676c652e69616d2e76312e506f6c696379223d82d3e49302372232" . - "2f76322f7b7265736f757263653d70726f6a656374732f2a2f696e737461" . - "6e6365732f2a7d3a73657449616d506f6c6963793a012a12ae010a125465" . - "737449616d5065726d697373696f6e7312282e676f6f676c652e69616d2e" . - "76312e5465737449616d5065726d697373696f6e73526571756573741a29" . - "2e676f6f676c652e69616d2e76312e5465737449616d5065726d69737369" . - "6f6e73526573706f6e7365224382d3e493023d22382f76322f7b7265736f" . - "757263653d70726f6a656374732f2a2f696e7374616e6365732f2a7d3a74" . - "65737449616d5065726d697373696f6e733a012a42bd010a1c636f6d2e67" . - "6f6f676c652e6269677461626c652e61646d696e2e7632421a4269677461" . - "626c65496e7374616e636541646d696e50726f746f50015a3d676f6f676c" . - "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . - "69732f6269677461626c652f61646d696e2f76323b61646d696eaa021e47" . - "6f6f676c652e436c6f75642e4269677461626c652e41646d696e2e5632ca" . - "021e476f6f676c655c436c6f75645c4269677461626c655c41646d696e5c" . - "5632620670726f746f33" + "08221a0a1855706461746541707050726f66696c654d6574616461746132" . + "aa170a154269677461626c65496e7374616e636541646d696e128e010a0e" . + "437265617465496e7374616e6365122f2e676f6f676c652e626967746162" . + "6c652e61646d696e2e76322e437265617465496e7374616e636552657175" . + "6573741a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f70657261" . + "74696f6e222c82d3e493022622212f76322f7b706172656e743d70726f6a" . + "656374732f2a7d2f696e7374616e6365733a012a128a010a0b476574496e" . + "7374616e6365122c2e676f6f676c652e6269677461626c652e61646d696e" . + "2e76322e476574496e7374616e6365526571756573741a222e676f6f676c" . + "652e6269677461626c652e61646d696e2e76322e496e7374616e63652229" . + "82d3e493022312212f76322f7b6e616d653d70726f6a656374732f2a2f69" . + "6e7374616e6365732f2a7d129b010a0d4c697374496e7374616e63657312" . + "2e2e676f6f676c652e6269677461626c652e61646d696e2e76322e4c6973" . + "74496e7374616e636573526571756573741a2f2e676f6f676c652e626967" . + "7461626c652e61646d696e2e76322e4c697374496e7374616e6365735265" . + "73706f6e7365222982d3e493022312212f76322f7b706172656e743d7072" . + "6f6a656374732f2a7d2f696e7374616e6365731286010a0e557064617465" . + "496e7374616e636512222e676f6f676c652e6269677461626c652e61646d" . + "696e2e76322e496e7374616e63651a222e676f6f676c652e626967746162" . + "6c652e61646d696e2e76322e496e7374616e6365222c82d3e49302261a21" . + "2f76322f7b6e616d653d70726f6a656374732f2a2f696e7374616e636573" . + "2f2a7d3a012a12ac010a155061727469616c557064617465496e7374616e" . + "636512362e676f6f676c652e6269677461626c652e61646d696e2e76322e" . + "5061727469616c557064617465496e7374616e6365526571756573741a1d" . + "2e676f6f676c652e6c6f6e6772756e6e696e672e4f7065726174696f6e22" . + "3c82d3e4930236322a2f76322f7b696e7374616e63652e6e616d653d7072" . + "6f6a656374732f2a2f696e7374616e6365732f2a7d3a08696e7374616e63" . + "651284010a0e44656c657465496e7374616e6365122f2e676f6f676c652e" . + "6269677461626c652e61646d696e2e76322e44656c657465496e7374616e" . + "6365526571756573741a162e676f6f676c652e70726f746f6275662e456d" . + "707479222982d3e49302232a212f76322f7b6e616d653d70726f6a656374" . + "732f2a2f696e7374616e6365732f2a7d129d010a0d437265617465436c75" . + "73746572122e2e676f6f676c652e6269677461626c652e61646d696e2e76" . + "322e437265617465436c7573746572526571756573741a1d2e676f6f676c" . + "652e6c6f6e6772756e6e696e672e4f7065726174696f6e223d82d3e49302" . + "37222c2f76322f7b706172656e743d70726f6a656374732f2a2f696e7374" . + "616e6365732f2a7d2f636c7573746572733a07636c75737465721292010a" . + "0a476574436c7573746572122b2e676f6f676c652e6269677461626c652e" . + "61646d696e2e76322e476574436c7573746572526571756573741a212e67" . + "6f6f676c652e6269677461626c652e61646d696e2e76322e436c75737465" . + "72223482d3e493022e122c2f76322f7b6e616d653d70726f6a656374732f" . + "2a2f696e7374616e6365732f2a2f636c7573746572732f2a7d12a3010a0c" . + "4c697374436c757374657273122d2e676f6f676c652e6269677461626c65" . + "2e61646d696e2e76322e4c697374436c757374657273526571756573741a" . + "2e2e676f6f676c652e6269677461626c652e61646d696e2e76322e4c6973" . + "74436c757374657273526573706f6e7365223482d3e493022e122c2f7632" . + "2f7b706172656e743d70726f6a656374732f2a2f696e7374616e6365732f" . + "2a7d2f636c757374657273128a010a0d557064617465436c757374657212" . + "212e676f6f676c652e6269677461626c652e61646d696e2e76322e436c75" . + "737465721a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f706572" . + "6174696f6e223782d3e49302311a2c2f76322f7b6e616d653d70726f6a65" . + "6374732f2a2f696e7374616e6365732f2a2f636c7573746572732f2a7d3a" . + "012a128d010a0d44656c657465436c7573746572122e2e676f6f676c652e" . + "6269677461626c652e61646d696e2e76322e44656c657465436c75737465" . + "72526571756573741a162e676f6f676c652e70726f746f6275662e456d70" . + "7479223482d3e493022e2a2c2f76322f7b6e616d653d70726f6a65637473" . + "2f2a2f696e7374616e6365732f2a2f636c7573746572732f2a7d12b1010a" . + "1043726561746541707050726f66696c6512312e676f6f676c652e626967" . + "7461626c652e61646d696e2e76322e43726561746541707050726f66696c" . + "65526571756573741a242e676f6f676c652e6269677461626c652e61646d" . + "696e2e76322e41707050726f66696c65224482d3e493023e222f2f76322f" . + "7b706172656e743d70726f6a656374732f2a2f696e7374616e6365732f2a" . + "7d2f61707050726f66696c65733a0b6170705f70726f66696c65129e010a" . + "0d47657441707050726f66696c65122e2e676f6f676c652e626967746162" . + "6c652e61646d696e2e76322e47657441707050726f66696c655265717565" . + "73741a242e676f6f676c652e6269677461626c652e61646d696e2e76322e" . + "41707050726f66696c65223782d3e4930231122f2f76322f7b6e616d653d" . + "70726f6a656374732f2a2f696e7374616e6365732f2a2f61707050726f66" . + "696c65732f2a7d12af010a0f4c69737441707050726f66696c657312302e" . + "676f6f676c652e6269677461626c652e61646d696e2e76322e4c69737441" . + "707050726f66696c6573526571756573741a312e676f6f676c652e626967" . + "7461626c652e61646d696e2e76322e4c69737441707050726f66696c6573" . + "526573706f6e7365223782d3e4930231122f2f76322f7b706172656e743d" . + "70726f6a656374732f2a2f696e7374616e6365732f2a7d2f61707050726f" . + "66696c657312b6010a1055706461746541707050726f66696c6512312e67" . + "6f6f676c652e6269677461626c652e61646d696e2e76322e557064617465" . + "41707050726f66696c65526571756573741a1d2e676f6f676c652e6c6f6e" . + "6772756e6e696e672e4f7065726174696f6e225082d3e493024a323b2f76" . + "322f7b6170705f70726f66696c652e6e616d653d70726f6a656374732f2a" . + "2f696e7374616e6365732f2a2f61707050726f66696c65732f2a7d3a0b61" . + "70705f70726f66696c651296010a1044656c65746541707050726f66696c" . + "6512312e676f6f676c652e6269677461626c652e61646d696e2e76322e44" . + "656c65746541707050726f66696c65526571756573741a162e676f6f676c" . + "652e70726f746f6275662e456d707479223782d3e49302312a2f2f76322f" . + "7b6e616d653d70726f6a656374732f2a2f696e7374616e6365732f2a2f61" . + "707050726f66696c65732f2a7d1288010a0c47657449616d506f6c696379" . + "12222e676f6f676c652e69616d2e76312e47657449616d506f6c69637952" . + "6571756573741a152e676f6f676c652e69616d2e76312e506f6c69637922" . + "3d82d3e493023722322f76322f7b7265736f757263653d70726f6a656374" . + "732f2a2f696e7374616e6365732f2a7d3a67657449616d506f6c6963793a" . + "012a1288010a0c53657449616d506f6c69637912222e676f6f676c652e69" . + "616d2e76312e53657449616d506f6c696379526571756573741a152e676f" . + "6f676c652e69616d2e76312e506f6c696379223d82d3e493023722322f76" . + "322f7b7265736f757263653d70726f6a656374732f2a2f696e7374616e63" . + "65732f2a7d3a73657449616d506f6c6963793a012a12ae010a1254657374" . + "49616d5065726d697373696f6e7312282e676f6f676c652e69616d2e7631" . + "2e5465737449616d5065726d697373696f6e73526571756573741a292e67" . + "6f6f676c652e69616d2e76312e5465737449616d5065726d697373696f6e" . + "73526573706f6e7365224382d3e493023d22382f76322f7b7265736f7572" . + "63653d70726f6a656374732f2a2f696e7374616e6365732f2a7d3a746573" . + "7449616d5065726d697373696f6e733a012a42bd010a1c636f6d2e676f6f" . + "676c652e6269677461626c652e61646d696e2e7632421a4269677461626c" . + "65496e7374616e636541646d696e50726f746f50015a3d676f6f676c652e" . + "676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561706973" . + "2f6269677461626c652f61646d696e2f76323b61646d696eaa021e476f6f" . + "676c652e436c6f75642e4269677461626c652e41646d696e2e5632ca021e" . + "476f6f676c655c436c6f75645c4269677461626c655c41646d696e5c5632" . + "620670726f746f33" )); static::$is_initialized = true; diff --git a/generated/php/google-cloud-bigtable-admin-v2/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php b/generated/php/google-cloud-bigtable-admin-v2/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php new file mode 100644 index 000000000..7d8f659c9 --- /dev/null +++ b/generated/php/google-cloud-bigtable-admin-v2/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php @@ -0,0 +1,29 @@ +google.bigtable.admin.v2.UpdateAppProfileMetadata + */ +class UpdateAppProfileMetadata extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct(); + } + +} + diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php b/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php deleted file mode 100644 index 16e2b2862..000000000 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateInstanceMetadata', - ], - ], - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata', - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateClusterMetadata', - ], - ], - 'ListAppProfiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppProfiles', - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableInstanceAdminClient.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableInstanceAdminClient.php similarity index 94% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableInstanceAdminClient.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableInstanceAdminClient.php index 547029fba..15b090385 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableInstanceAdminClient.php +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableInstanceAdminClient.php @@ -38,5 +38,5 @@ class BigtableInstanceAdminClient extends BigtableInstanceAdminGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see BigtableInstanceAdminClientImpl} class. + // additions to the generated {@see BigtableInstanceAdminGapicClient} class. } diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableTableAdminClient.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableTableAdminClient.php similarity index 94% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableTableAdminClient.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableTableAdminClient.php index 6e3412666..f2d12e89f 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/BigtableTableAdminClient.php +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/BigtableTableAdminClient.php @@ -38,5 +38,5 @@ class BigtableTableAdminClient extends BigtableTableAdminGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see BigtableTableAdminClientImpl} class. + // additions to the generated {@see BigtableTableAdminGapicClient} class. } diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableInstanceAdminGapicClient.php similarity index 81% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableInstanceAdminGapicClient.php index a633cb7e0..a09e84e6e 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableInstanceAdminGapicClient.php @@ -31,15 +31,16 @@ namespace Google\Cloud\Bigtable\Admin\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\PathTemplate; +use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Bigtable\Admin\V2\AppProfile; use Google\Cloud\Bigtable\Admin\V2\Cluster; use Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest; @@ -69,8 +70,6 @@ use Google\LongRunning\Operation; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for creating, configuring, and deleting Cloud Bigtable Instances and @@ -154,10 +153,19 @@ class BigtableInstanceAdminGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.cluster', + 'https://www.googleapis.com/auth/bigtable.admin.instance', + 'https://www.googleapis.com/auth/bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; private static $projectNameTemplate; private static $instanceNameTemplate; private static $appProfileNameTemplate; @@ -171,23 +179,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.cluster', - 'https://www.googleapis.com/auth/bigtable.admin.instance', - 'https://www.googleapis.com/auth/bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ], - 'clientConfigPath' => __DIR__.'/../resources/bigtable_instance_admin_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/bigtable_instance_admin_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/bigtable_instance_admin_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/bigtable_instance_admin_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/bigtable_instance_admin_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -429,65 +432,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'bigtableadmin.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Bigtable Admin API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigtableadmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** @@ -567,6 +562,13 @@ public function createInstance($parent, $instanceId, $instance, $clusters, $opti $request->setInstance($instance); $request->setClusters($clusters); + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startOperationsCall( 'CreateInstance', $optionalArgs, @@ -611,6 +613,13 @@ public function getInstance($name, $optionalArgs = []) $request = new GetInstanceRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetInstance', Instance::class, @@ -660,6 +669,13 @@ public function listInstances($parent, $optionalArgs = []) $request->setPageToken($optionalArgs['pageToken']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'ListInstances', ListInstancesResponse::class, @@ -734,6 +750,13 @@ public function updateInstance($name, $displayName, $type, $labels, $optionalArg $request->setState($optionalArgs['state']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'UpdateInstance', Instance::class, @@ -751,7 +774,32 @@ public function updateInstance($name, $displayName, $type, $labels, $optionalArg * try { * $instance = new Instance(); * $updateMask = new FieldMask(); - * $response = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); + * $operationResponse = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * + * // OR start the operation, keep the operation name, and resume later + * $operationResponse = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'partialUpdateInstance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } * } finally { * $bigtableInstanceAdminClient->close(); * } @@ -770,7 +818,7 @@ public function updateInstance($name, $displayName, $type, $labels, $optionalArg * {@see Google\ApiCore\RetrySettings} for example usage. * } * - * @return \Google\LongRunning\Operation + * @return \Google\ApiCore\OperationResponse * * @throws ApiException if the remote call fails * @experimental @@ -781,11 +829,18 @@ public function partialUpdateInstance($instance, $updateMask, $optionalArgs = [] $request->setInstance($instance); $request->setUpdateMask($updateMask); - return $this->startCall( + $requestParams = new RequestParamsHeaderDescriptor([ + 'instance.name' => $request->getInstance()->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + + return $this->startOperationsCall( 'PartialUpdateInstance', - Operation::class, $optionalArgs, - $request + $request, + $this->getOperationsClient() )->wait(); } @@ -823,6 +878,13 @@ public function deleteInstance($name, $optionalArgs = []) $request = new DeleteInstanceRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DeleteInstance', GPBEmpty::class, @@ -902,6 +964,13 @@ public function createCluster($parent, $clusterId, $cluster, $optionalArgs = []) $request->setClusterId($clusterId); $request->setCluster($cluster); + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startOperationsCall( 'CreateCluster', $optionalArgs, @@ -946,6 +1015,13 @@ public function getCluster($name, $optionalArgs = []) $request = new GetClusterRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetCluster', Cluster::class, @@ -997,6 +1073,13 @@ public function listClusters($parent, $optionalArgs = []) $request->setPageToken($optionalArgs['pageToken']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'ListClusters', ListClustersResponse::class, @@ -1093,6 +1176,13 @@ public function updateCluster($name, $location, $serveNodes, $optionalArgs = []) $request->setDefaultStorageType($optionalArgs['defaultStorageType']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startOperationsCall( 'UpdateCluster', $optionalArgs, @@ -1135,6 +1225,13 @@ public function deleteCluster($name, $optionalArgs = []) $request = new DeleteClusterRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DeleteCluster', GPBEmpty::class, @@ -1199,6 +1296,13 @@ public function createAppProfile($parent, $appProfileId, $appProfile, $optionalA $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'CreateAppProfile', AppProfile::class, @@ -1248,6 +1352,13 @@ public function getAppProfile($name, $optionalArgs = []) $request = new GetAppProfileRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetAppProfile', AppProfile::class, @@ -1318,6 +1429,13 @@ public function listAppProfiles($parent, $optionalArgs = []) $request->setPageToken($optionalArgs['pageToken']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( 'ListAppProfiles', $optionalArgs, @@ -1340,7 +1458,32 @@ public function listAppProfiles($parent, $optionalArgs = []) * try { * $appProfile = new AppProfile(); * $updateMask = new FieldMask(); - * $response = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask); + * $operationResponse = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * + * // OR start the operation, keep the operation name, and resume later + * $operationResponse = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'updateAppProfile'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } * } finally { * $bigtableInstanceAdminClient->close(); * } @@ -1361,7 +1504,7 @@ public function listAppProfiles($parent, $optionalArgs = []) * {@see Google\ApiCore\RetrySettings} for example usage. * } * - * @return \Google\LongRunning\Operation + * @return \Google\ApiCore\OperationResponse * * @throws ApiException if the remote call fails * @experimental @@ -1375,11 +1518,18 @@ public function updateAppProfile($appProfile, $updateMask, $optionalArgs = []) $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); } - return $this->startCall( + $requestParams = new RequestParamsHeaderDescriptor([ + 'app_profile.name' => $request->getAppProfile()->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + + return $this->startOperationsCall( 'UpdateAppProfile', - Operation::class, $optionalArgs, - $request + $request, + $this->getOperationsClient() )->wait(); } @@ -1425,6 +1575,13 @@ public function deleteAppProfile($name, $ignoreWarnings, $optionalArgs = []) $request->setName($name); $request->setIgnoreWarnings($ignoreWarnings); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DeleteAppProfile', GPBEmpty::class, @@ -1477,6 +1634,13 @@ public function getIamPolicy($resource, $optionalArgs = []) $request = new GetIamPolicyRequest(); $request->setResource($resource); + $requestParams = new RequestParamsHeaderDescriptor([ + 'resource' => $request->getResource(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetIamPolicy', Policy::class, @@ -1535,6 +1699,13 @@ public function setIamPolicy($resource, $policy, $optionalArgs = []) $request->setResource($resource); $request->setPolicy($policy); + $requestParams = new RequestParamsHeaderDescriptor([ + 'resource' => $request->getResource(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'SetIamPolicy', Policy::class, @@ -1592,6 +1763,13 @@ public function testIamPermissions($resource, $permissions, $optionalArgs = []) $request->setResource($resource); $request->setPermissions($permissions); + $requestParams = new RequestParamsHeaderDescriptor([ + 'resource' => $request->getResource(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'TestIamPermissions', TestIamPermissionsResponse::class, diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableTableAdminGapicClient.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableTableAdminGapicClient.php similarity index 82% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableTableAdminGapicClient.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableTableAdminGapicClient.php index d4cb4978e..44266bd28 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/Gapic/BigtableTableAdminGapicClient.php +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/Gapic/BigtableTableAdminGapicClient.php @@ -31,15 +31,16 @@ namespace Google\Cloud\Bigtable\Admin\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\PathTemplate; +use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse; use Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest; @@ -64,8 +65,6 @@ use Google\LongRunning\Operation; use Google\Protobuf\Duration; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for creating, configuring, and deleting Cloud Bigtable tables. @@ -125,10 +124,19 @@ class BigtableTableAdminGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.cluster', + 'https://www.googleapis.com/auth/bigtable.admin.instance', + 'https://www.googleapis.com/auth/bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; private static $instanceNameTemplate; private static $clusterNameTemplate; private static $snapshotNameTemplate; @@ -141,23 +149,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.cluster', - 'https://www.googleapis.com/auth/bigtable.admin.instance', - 'https://www.googleapis.com/auth/bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ], - 'clientConfigPath' => __DIR__.'/../resources/bigtable_table_admin_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/bigtable_table_admin_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/bigtable_table_admin_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/bigtable_table_admin_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/bigtable_table_admin_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -376,65 +379,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'bigtableadmin.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Bigtable Admin API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigtableadmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** @@ -502,6 +497,13 @@ public function createTable($parent, $tableId, $table, $optionalArgs = []) $request->setInitialSplits($optionalArgs['initialSplits']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'CreateTable', Table::class, @@ -587,6 +589,13 @@ public function createTableFromSnapshot($parent, $tableId, $sourceSnapshot, $opt $request->setTableId($tableId); $request->setSourceSnapshot($sourceSnapshot); + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startOperationsCall( 'CreateTableFromSnapshot', $optionalArgs, @@ -658,6 +667,13 @@ public function listTables($parent, $optionalArgs = []) $request->setPageToken($optionalArgs['pageToken']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( 'ListTables', $optionalArgs, @@ -710,6 +726,13 @@ public function getTable($name, $optionalArgs = []) $request->setView($optionalArgs['view']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetTable', Table::class, @@ -753,6 +776,13 @@ public function deleteTable($name, $optionalArgs = []) $request = new DeleteTableRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DeleteTable', GPBEmpty::class, @@ -807,6 +837,13 @@ public function modifyColumnFamilies($name, $modifications, $optionalArgs = []) $request->setName($name); $request->setModifications($modifications); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'ModifyColumnFamilies', Table::class, @@ -863,6 +900,13 @@ public function dropRowRange($name, $optionalArgs = []) $request->setDeleteAllDataFromTable($optionalArgs['deleteAllDataFromTable']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DropRowRange', GPBEmpty::class, @@ -916,6 +960,13 @@ public function generateConsistencyToken($name, $optionalArgs = []) $request = new GenerateConsistencyTokenRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GenerateConsistencyToken', GenerateConsistencyTokenResponse::class, @@ -971,6 +1022,13 @@ public function checkConsistency($name, $consistencyToken, $optionalArgs = []) $request->setName($name); $request->setConsistencyToken($consistencyToken); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'CheckConsistency', CheckConsistencyResponse::class, @@ -996,7 +1054,32 @@ public function checkConsistency($name, $consistencyToken, $optionalArgs = []) * $cluster = ''; * $snapshotId = ''; * $description = ''; - * $response = $bigtableTableAdminClient->snapshotTable($formattedName, $cluster, $snapshotId, $description); + * $operationResponse = $bigtableTableAdminClient->snapshotTable($formattedName, $cluster, $snapshotId, $description); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * + * // OR start the operation, keep the operation name, and resume later + * $operationResponse = $bigtableTableAdminClient->snapshotTable($formattedName, $cluster, $snapshotId, $description); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'snapshotTable'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } * } finally { * $bigtableTableAdminClient->close(); * } @@ -1028,7 +1111,7 @@ public function checkConsistency($name, $consistencyToken, $optionalArgs = []) * {@see Google\ApiCore\RetrySettings} for example usage. * } * - * @return \Google\LongRunning\Operation + * @return \Google\ApiCore\OperationResponse * * @throws ApiException if the remote call fails * @experimental @@ -1044,11 +1127,18 @@ public function snapshotTable($name, $cluster, $snapshotId, $description, $optio $request->setTtl($optionalArgs['ttl']); } - return $this->startCall( + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + + return $this->startOperationsCall( 'SnapshotTable', - Operation::class, $optionalArgs, - $request + $request, + $this->getOperationsClient() )->wait(); } @@ -1094,6 +1184,13 @@ public function getSnapshot($name, $optionalArgs = []) $request = new GetSnapshotRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'GetSnapshot', Snapshot::class, @@ -1173,6 +1270,13 @@ public function listSnapshots($parent, $optionalArgs = []) $request->setPageToken($optionalArgs['pageToken']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'parent' => $request->getParent(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( 'ListSnapshots', $optionalArgs, @@ -1221,6 +1325,13 @@ public function deleteSnapshot($name, $optionalArgs = []) $request = new DeleteSnapshotRequest(); $request->setName($name); + $requestParams = new RequestParamsHeaderDescriptor([ + 'name' => $request->getName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'DeleteSnapshot', GPBEmpty::class, diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_client_config.json b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_client_config.json similarity index 100% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_client_config.json rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_client_config.json diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_descriptor_config.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_descriptor_config.php new file mode 100644 index 000000000..c3967f370 --- /dev/null +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_descriptor_config.php @@ -0,0 +1,66 @@ + [ + 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateInstanceMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'PartialUpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateInstanceMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateClusterMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateAppProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AppProfile', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileMetadata', + 'initialPollDelayMillis' => '5', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListAppProfiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppProfiles', + ], + ], + ], + ], +]; diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_instance_admin_rest_client_config.php diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_client_config.json b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_client_config.json similarity index 74% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_client_config.json rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_client_config.json index d1cb8a083..755500f21 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_client_config.json +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_client_config.json @@ -17,13 +17,31 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 + }, + "create_table": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 130000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 130000, + "total_timeout_millis": 3600000 + }, + "drop_row_range": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 900000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 900000, + "total_timeout_millis": 3600000 } }, "methods": { "CreateTable": { "timeout_millis": 130000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "create_table" }, "CreateTableFromSnapshot": { "timeout_millis": 60000, @@ -51,9 +69,9 @@ "retry_params_name": "default" }, "DropRowRange": { - "timeout_millis": 60000, + "timeout_millis": 900000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "drop_row_range" }, "GenerateConsistencyToken": { "timeout_millis": 60000, @@ -62,7 +80,7 @@ }, "CheckConsistency": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "SnapshotTable": { diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_descriptor_config.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_descriptor_config.php similarity index 64% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_descriptor_config.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_descriptor_config.php index 691f5f662..46a321d02 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_descriptor_config.php +++ b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_descriptor_config.php @@ -7,6 +7,20 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'SnapshotTable' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Snapshot', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\SnapshotTableMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', ], ], 'ListTables' => [ diff --git a/generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_rest_client_config.php b/generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-bigtable-admin-v2/src/Bigtable/Admin/V2/resources/bigtable_table_admin_rest_client_config.php rename to generated/php/google-cloud-bigtable-admin-v2/src/V2/resources/bigtable_table_admin_rest_client_config.php diff --git a/generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableInstanceAdminClientTest.php b/generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableInstanceAdminClientTest.php similarity index 85% rename from generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableInstanceAdminClientTest.php rename to generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableInstanceAdminClientTest.php index c55ad6a2d..1cc67fe5f 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableInstanceAdminClientTest.php +++ b/generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableInstanceAdminClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Bigtable\Admin\V2; +namespace Google\Cloud\Bigtable\Admin\Tests\Unit\V2; use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -41,11 +42,11 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group admin + * @group bigtable-admin * @group grpc */ class BigtableInstanceAdminClientTest extends GeneratedTest @@ -63,6 +64,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new BigtableInstanceAdminClient($options); } @@ -74,7 +81,6 @@ public function createInstanceTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -162,7 +168,6 @@ public function createInstanceExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -181,12 +186,12 @@ public function createInstanceExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -268,12 +273,12 @@ public function getInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -341,12 +346,12 @@ public function listInstancesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -428,12 +433,12 @@ public function updateInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -464,39 +469,78 @@ public function updateInstanceExceptionTest() */ public function partialUpdateInstanceTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/partialUpdateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $name = 'name3373707'; - $done = true; - $expectedResponse = new Operation(); + $displayName = 'displayName1615086568'; + $expectedResponse = new Instance(); $expectedResponse->setName($name); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/partialUpdateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request $instance = new Instance(); $updateMask = new FieldMask(); $response = $client->partialUpdateInstance($instance, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualFuncCall); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); - $actualValue = $actualRequestObject->getInstance(); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); + $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); + + $response->pollUntilComplete(); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -504,39 +548,63 @@ public function partialUpdateInstanceTest() */ public function partialUpdateInstanceExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/partialUpdateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request $instance = new Instance(); $updateMask = new FieldMask(); + $response = $client->partialUpdateInstance($instance, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); + try { - $client->partialUpdateInstance($instance, $updateMask); - // If the $client method call did not throw, fail the test + $response->pollUntilComplete(); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -581,12 +649,12 @@ public function deleteInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -617,7 +685,6 @@ public function createClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -703,7 +770,6 @@ public function createClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -722,12 +788,12 @@ public function createClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -810,12 +876,12 @@ public function getClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -883,12 +949,12 @@ public function listClustersExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -919,7 +985,6 @@ public function updateClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -1005,7 +1070,6 @@ public function updateClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -1024,12 +1088,12 @@ public function updateClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1105,12 +1169,12 @@ public function deleteClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1190,12 +1254,12 @@ public function createAppProfileExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1269,12 +1333,12 @@ public function getAppProfileExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1348,12 +1412,12 @@ public function listAppProfilesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1381,39 +1445,80 @@ public function listAppProfilesExceptionTest() */ public function updateAppProfileTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAppProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $name = 'name3373707'; - $done = true; - $expectedResponse = new Operation(); + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new AppProfile(); $expectedResponse->setName($name); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAppProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request $appProfile = new AppProfile(); $updateMask = new FieldMask(); $response = $client->updateAppProfile($appProfile, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualFuncCall); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); - $actualValue = $actualRequestObject->getAppProfile(); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAppProfile(); $this->assertProtobufEquals($appProfile, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); + $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); + + $response->pollUntilComplete(); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -1421,39 +1526,63 @@ public function updateAppProfileTest() */ public function updateAppProfileExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAppProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request $appProfile = new AppProfile(); $updateMask = new FieldMask(); + $response = $client->updateAppProfile($appProfile, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); + try { - $client->updateAppProfile($appProfile, $updateMask); - // If the $client method call did not throw, fail the test + $response->pollUntilComplete(); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -1502,12 +1631,12 @@ public function deleteAppProfileExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1578,12 +1707,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1657,12 +1786,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1733,12 +1862,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableTableAdminClientTest.php b/generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableTableAdminClientTest.php similarity index 87% rename from generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableTableAdminClientTest.php rename to generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableTableAdminClientTest.php index 8a2e34099..308690e52 100644 --- a/generated/php/google-cloud-bigtable-admin-v2/tests/unit/Bigtable/Admin/V2/BigtableTableAdminClientTest.php +++ b/generated/php/google-cloud-bigtable-admin-v2/tests/Unit/V2/BigtableTableAdminClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Bigtable\Admin\V2; +namespace Google\Cloud\Bigtable\Admin\Tests\Unit\V2; use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -37,11 +38,11 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group admin + * @group bigtable-admin * @group grpc */ class BigtableTableAdminClientTest extends GeneratedTest @@ -59,6 +60,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new BigtableTableAdminClient($options); } @@ -115,12 +122,12 @@ public function createTableExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -153,7 +160,6 @@ public function createTableFromSnapshotTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -235,7 +241,6 @@ public function createTableFromSnapshotExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -254,12 +259,12 @@ public function createTableFromSnapshotExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -344,12 +349,12 @@ public function listTablesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -417,12 +422,12 @@ public function getTableExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -487,12 +492,12 @@ public function deleteTableExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -564,12 +569,12 @@ public function modifyColumnFamiliesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -635,12 +640,12 @@ public function dropRowRangeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -708,12 +713,12 @@ public function generateConsistencyTokenExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -785,12 +790,12 @@ public function checkConsistencyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -819,18 +824,39 @@ public function checkConsistencyExceptionTest() */ public function snapshotTableTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/snapshotTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); + $dataSizeBytes = 2110122398; + $description2 = 'description2568623279'; + $expectedResponse = new Snapshot(); $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); + $expectedResponse->setDataSizeBytes($dataSizeBytes); + $expectedResponse->setDescription($description2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/snapshotTableTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $client->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); @@ -839,27 +865,47 @@ public function snapshotTableTest() $description = 'description-1724546052'; $response = $client->snapshotTable($formattedName, $cluster, $snapshotId, $description); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualFuncCall); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); - $actualValue = $actualRequestObject->getName(); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCluster(); + $actualValue = $actualApiRequestObject->getCluster(); $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualRequestObject->getSnapshotId(); + $actualValue = $actualApiRequestObject->getSnapshotId(); $this->assertProtobufEquals($snapshotId, $actualValue); - $actualValue = $actualRequestObject->getDescription(); + $actualValue = $actualApiRequestObject->getDescription(); $this->assertProtobufEquals($description, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); + + $response->pollUntilComplete(); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -867,22 +913,37 @@ public function snapshotTableTest() */ public function snapshotTableExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'serviceAddress' => '', + 'transport' => $operationsTransport, + ]); $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); + $client = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/snapshotTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $client->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); @@ -890,18 +951,27 @@ public function snapshotTableExceptionTest() $snapshotId = 'snapshotId-168585866'; $description = 'description-1724546052'; + $response = $client->snapshotTable($formattedName, $cluster, $snapshotId, $description); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); + try { - $client->snapshotTable($formattedName, $cluster, $snapshotId, $description); - // If the $client method call did not throw, fail the test + $response->pollUntilComplete(); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @@ -953,12 +1023,12 @@ public function getSnapshotExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1032,12 +1102,12 @@ public function listSnapshotsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1102,12 +1172,12 @@ public function deleteSnapshotExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-bigtable-v2/composer.json b/generated/php/google-cloud-bigtable-v2/composer.json index 7a2ef0038..153358e68 100644 --- a/generated/php/google-cloud-bigtable-v2/composer.json +++ b/generated/php/google-cloud-bigtable-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "bigtable/bigtable", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-bigtable", "description": "Cloud Bigtable API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Bigtable\\": "src", + "Google\\Cloud\\Bigtable\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/BigtableClient.php b/generated/php/google-cloud-bigtable-v2/src/V2/BigtableClient.php similarity index 95% rename from generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/BigtableClient.php rename to generated/php/google-cloud-bigtable-v2/src/V2/BigtableClient.php index 948710423..1cff26ad6 100644 --- a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/BigtableClient.php +++ b/generated/php/google-cloud-bigtable-v2/src/V2/BigtableClient.php @@ -38,5 +38,5 @@ class BigtableClient extends BigtableGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see BigtableClientImpl} class. + // additions to the generated {@see BigtableGapicClient} class. } diff --git a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/Gapic/BigtableGapicClient.php b/generated/php/google-cloud-bigtable-v2/src/V2/Gapic/BigtableGapicClient.php similarity index 81% rename from generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/Gapic/BigtableGapicClient.php rename to generated/php/google-cloud-bigtable-v2/src/V2/Gapic/BigtableGapicClient.php index 71b718894..8988df5d8 100644 --- a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/Gapic/BigtableGapicClient.php +++ b/generated/php/google-cloud-bigtable-v2/src/V2/Gapic/BigtableGapicClient.php @@ -32,12 +32,14 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; +use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest; use Google\Cloud\Bigtable\V2\CheckAndMutateRowResponse; use Google\Cloud\Bigtable\V2\MutateRowRequest; @@ -55,8 +57,6 @@ use Google\Cloud\Bigtable\V2\RowSet; use Google\Cloud\Bigtable\V2\SampleRowKeysRequest; use Google\Cloud\Bigtable\V2\SampleRowKeysResponse; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for reading from and writing to existing Bigtable tables. @@ -114,10 +114,16 @@ class BigtableGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.data', + 'https://www.googleapis.com/auth/bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-bigtable.data', + 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; private static $tableNameTemplate; private static $pathTemplateMap; @@ -125,20 +131,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/bigtable.data', - 'https://www.googleapis.com/auth/bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-bigtable.data', - 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ], - 'clientConfigPath' => __DIR__.'/../resources/bigtable_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/bigtable_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/bigtable_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/bigtable_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/bigtable_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -229,57 +233,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'bigtable.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Bigtable API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigtable.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** @@ -352,6 +355,13 @@ public function readRows($tableName, $optionalArgs = []) $request->setRowsLimit($optionalArgs['rowsLimit']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'ReadRows', ReadRowsResponse::class, @@ -413,6 +423,13 @@ public function sampleRowKeys($tableName, $optionalArgs = []) $request->setAppProfileId($optionalArgs['appProfileId']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'SampleRowKeys', SampleRowKeysResponse::class, @@ -479,6 +496,13 @@ public function mutateRow($tableName, $rowKey, $mutations, $optionalArgs = []) $request->setAppProfileId($optionalArgs['appProfileId']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'MutateRow', MutateRowResponse::class, @@ -543,6 +567,13 @@ public function mutateRows($tableName, $entries, $optionalArgs = []) $request->setAppProfileId($optionalArgs['appProfileId']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'MutateRows', MutateRowsResponse::class, @@ -630,6 +661,13 @@ public function checkAndMutateRow($tableName, $rowKey, $optionalArgs = []) $request->setFalseMutations($optionalArgs['falseMutations']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'CheckAndMutateRow', CheckAndMutateRowResponse::class, @@ -699,6 +737,13 @@ public function readModifyWriteRow($tableName, $rowKey, $rules, $optionalArgs = $request->setAppProfileId($optionalArgs['appProfileId']); } + $requestParams = new RequestParamsHeaderDescriptor([ + 'table_name' => $request->getTableName(), + ]); + $optionalArgs['userHeaders'] = isset($optionalArgs['userHeaders']) + ? array_merge($requestParams->getHeader(), $optionalArgs['userHeaders']) + : $requestParams->getHeader(); + return $this->startCall( 'ReadModifyWriteRow', ReadModifyWriteRowResponse::class, diff --git a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_client_config.json b/generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_client_config.json similarity index 96% rename from generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_client_config.json rename to generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_client_config.json index a8dcf28e0..bb7d68ad0 100644 --- a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_client_config.json +++ b/generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_client_config.json @@ -28,7 +28,7 @@ }, "MutateRow": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "MutateRows": { diff --git a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_descriptor_config.php b/generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_descriptor_config.php rename to generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_descriptor_config.php diff --git a/generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_rest_client_config.php b/generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-bigtable-v2/src/Bigtable/V2/resources/bigtable_rest_client_config.php rename to generated/php/google-cloud-bigtable-v2/src/V2/resources/bigtable_rest_client_config.php diff --git a/generated/php/google-cloud-bigtable-v2/tests/unit/Bigtable/V2/BigtableClientTest.php b/generated/php/google-cloud-bigtable-v2/tests/Unit/V2/BigtableClientTest.php similarity index 96% rename from generated/php/google-cloud-bigtable-v2/tests/unit/Bigtable/V2/BigtableClientTest.php rename to generated/php/google-cloud-bigtable-v2/tests/Unit/V2/BigtableClientTest.php index 6a5f6def2..6c598d18a 100644 --- a/generated/php/google-cloud-bigtable-v2/tests/unit/Bigtable/V2/BigtableClientTest.php +++ b/generated/php/google-cloud-bigtable-v2/tests/Unit/V2/BigtableClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Bigtable\V2; +namespace Google\Cloud\Bigtable\Tests\Unit\V2; use Google\Cloud\Bigtable\V2\BigtableClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\ServerStream; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -34,7 +35,7 @@ use Google\Cloud\Bigtable\V2\ReadRowsResponse; use Google\Cloud\Bigtable\V2\SampleRowKeysResponse; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new BigtableClient($options); } @@ -119,12 +126,12 @@ public function readRowsExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -219,12 +226,12 @@ public function sampleRowKeysExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -304,12 +311,12 @@ public function mutateRowExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -392,12 +399,12 @@ public function mutateRowsExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -476,12 +483,12 @@ public function checkAndMutateRowExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -556,12 +563,12 @@ public function readModifyWriteRowExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-cloudiot-v1/composer.json b/generated/php/google-cloud-cloudiot-v1/composer.json new file mode 100644 index 000000000..c33bb5660 --- /dev/null +++ b/generated/php/google-cloud-cloudiot-v1/composer.json @@ -0,0 +1,21 @@ +{ + "name": "google/cloud-iot", + "description": "Cloud IoT API client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\Iot\\": "src", + "Google\\Cloud\\Iot\\Tests\\": "tests", + "": "proto/src" + } + }, + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + } +} \ No newline at end of file diff --git a/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php b/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php new file mode 100644 index 000000000..e24533dac --- /dev/null +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php @@ -0,0 +1,217 @@ +internalAddGeneratedFile(hex2bin( + "0aae2b0a28676f6f676c652f636c6f75642f696f742f76312f6465766963" . + "655f6d616e616765722e70726f746f1213676f6f676c652e636c6f75642e" . + "696f742e76311a23676f6f676c652f636c6f75642f696f742f76312f7265" . + "736f75726365732e70726f746f1a1e676f6f676c652f69616d2f76312f69" . + "616d5f706f6c6963792e70726f746f1a1a676f6f676c652f69616d2f7631" . + "2f706f6c6963792e70726f746f1a1e676f6f676c652f70726f746f627566" . + "2f6475726174696f6e2e70726f746f1a1b676f6f676c652f70726f746f62" . + "75662f656d7074792e70726f746f1a20676f6f676c652f70726f746f6275" . + "662f6669656c645f6d61736b2e70726f746f1a1f676f6f676c652f70726f" . + "746f6275662f74696d657374616d702e70726f746f226b0a1b4372656174" . + "65446576696365526567697374727952657175657374120e0a0670617265" . + "6e74180120012809123c0a0f6465766963655f7265676973747279180220" . + "01280b32232e676f6f676c652e636c6f75642e696f742e76312e44657669" . + "6365526567697374727922280a1847657444657669636552656769737472" . + "7952657175657374120c0a046e616d65180120012809222b0a1b44656c65" . + "7465446576696365526567697374727952657175657374120c0a046e616d" . + "65180120012809228c010a1b557064617465446576696365526567697374" . + "727952657175657374123c0a0f6465766963655f72656769737472791801" . + "2001280b32232e676f6f676c652e636c6f75642e696f742e76312e446576" . + "6963655265676973747279122f0a0b7570646174655f6d61736b18022001" . + "280b321a2e676f6f676c652e70726f746f6275662e4669656c644d61736b" . + "22540a1b4c69737444657669636552656769737472696573526571756573" . + "74120e0a06706172656e7418012001280912110a09706167655f73697a65" . + "18022001280512120a0a706167655f746f6b656e18032001280922770a1c" . + "4c69737444657669636552656769737472696573526573706f6e7365123e" . + "0a116465766963655f7265676973747269657318012003280b32232e676f" . + "6f676c652e636c6f75642e696f742e76312e446576696365526567697374" . + "727912170a0f6e6578745f706167655f746f6b656e18022001280922520a" . + "1343726561746544657669636552657175657374120e0a06706172656e74" . + "180120012809122b0a0664657669636518022001280b321b2e676f6f676c" . + "652e636c6f75642e696f742e76312e44657669636522500a104765744465" . + "7669636552657175657374120c0a046e616d65180120012809122e0a0a66" . + "69656c645f6d61736b18022001280b321a2e676f6f676c652e70726f746f" . + "6275662e4669656c644d61736b22730a1355706461746544657669636552" . + "657175657374122b0a0664657669636518022001280b321b2e676f6f676c" . + "652e636c6f75642e696f742e76312e446576696365122f0a0b7570646174" . + "655f6d61736b18032001280b321a2e676f6f676c652e70726f746f627566" . + "2e4669656c644d61736b22230a1344656c65746544657669636552657175" . + "657374120c0a046e616d6518012001280922a7010a124c69737444657669" . + "63657352657175657374120e0a06706172656e7418012001280912160a0e" . + "6465766963655f6e756d5f69647318022003280412120a0a646576696365" . + "5f696473180320032809122e0a0a6669656c645f6d61736b18042001280b" . + "321a2e676f6f676c652e70726f746f6275662e4669656c644d61736b1211" . + "0a09706167655f73697a6518642001280512120a0a706167655f746f6b65" . + "6e186520012809225c0a134c69737444657669636573526573706f6e7365" . + "122c0a076465766963657318012003280b321b2e676f6f676c652e636c6f" . + "75642e696f742e76312e44657669636512170a0f6e6578745f706167655f" . + "746f6b656e18022001280922600a204d6f64696679436c6f7564546f4465" . + "76696365436f6e66696752657175657374120c0a046e616d651801200128" . + "0912190a1176657273696f6e5f746f5f7570646174651802200128031213" . + "0a0b62696e6172795f6461746118032001280c22450a1f4c697374446576" . + "696365436f6e66696756657273696f6e7352657175657374120c0a046e61" . + "6d6518012001280912140a0c6e756d5f76657273696f6e73180220012805" . + "225d0a204c697374446576696365436f6e66696756657273696f6e735265" . + "73706f6e736512390a0e6465766963655f636f6e6669677318012003280b" . + "32212e676f6f676c652e636c6f75642e696f742e76312e44657669636543" . + "6f6e666967223b0a174c6973744465766963655374617465735265717565" . + "7374120c0a046e616d6518012001280912120a0a6e756d5f737461746573" . + "18022001280522530a184c69737444657669636553746174657352657370" . + "6f6e736512370a0d6465766963655f73746174657318012003280b32202e" . + "676f6f676c652e636c6f75642e696f742e76312e44657669636553746174" . + "6532931c0a0d4465766963654d616e6167657212b6010a14437265617465" . + "446576696365526567697374727912302e676f6f676c652e636c6f75642e" . + "696f742e76312e4372656174654465766963655265676973747279526571" . + "756573741a232e676f6f676c652e636c6f75642e696f742e76312e446576" . + "6963655265676973747279224782d3e4930241222e2f76312f7b70617265" . + "6e743d70726f6a656374732f2a2f6c6f636174696f6e732f2a7d2f726567" . + "697374726965733a0f6465766963655f7265676973747279129f010a1147" . + "65744465766963655265676973747279122d2e676f6f676c652e636c6f75" . + "642e696f742e76312e476574446576696365526567697374727952657175" . + "6573741a232e676f6f676c652e636c6f75642e696f742e76312e44657669" . + "63655265676973747279223682d3e4930230122e2f76312f7b6e616d653d" . + "70726f6a656374732f2a2f6c6f636174696f6e732f2a2f72656769737472" . + "6965732f2a7d12c6010a1455706461746544657669636552656769737472" . + "7912302e676f6f676c652e636c6f75642e696f742e76312e557064617465" . + "4465766963655265676973747279526571756573741a232e676f6f676c65" . + "2e636c6f75642e696f742e76312e44657669636552656769737472792257" . + "82d3e4930251323e2f76312f7b6465766963655f72656769737472792e6e" . + "616d653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f726567" . + "697374726965732f2a7d3a0f6465766963655f7265676973747279129801" . + "0a1444656c657465446576696365526567697374727912302e676f6f676c" . + "652e636c6f75642e696f742e76312e44656c657465446576696365526567" . + "6973747279526571756573741a162e676f6f676c652e70726f746f627566" . + "2e456d707479223682d3e49302302a2e2f76312f7b6e616d653d70726f6a" . + "656374732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f" . + "2a7d12b3010a144c6973744465766963655265676973747269657312302e" . + "676f6f676c652e636c6f75642e696f742e76312e4c697374446576696365" . + "52656769737472696573526571756573741a312e676f6f676c652e636c6f" . + "75642e696f742e76312e4c69737444657669636552656769737472696573" . + "526573706f6e7365223682d3e4930230122e2f76312f7b706172656e743d" . + "70726f6a656374732f2a2f6c6f636174696f6e732f2a7d2f726567697374" . + "72696573129f010a0c43726561746544657669636512282e676f6f676c65" . + "2e636c6f75642e696f742e76312e43726561746544657669636552657175" . + "6573741a1b2e676f6f676c652e636c6f75642e696f742e76312e44657669" . + "6365224882d3e493024222382f76312f7b706172656e743d70726f6a6563" . + "74732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a7d" . + "2f646576696365733a0664657669636512d7010a09476574446576696365" . + "12252e676f6f676c652e636c6f75642e696f742e76312e47657444657669" . + "6365526571756573741a1b2e676f6f676c652e636c6f75642e696f742e76" . + "312e44657669636522850182d3e493027f12382f76312f7b6e616d653d70" . + "726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265676973747269" . + "65732f2a2f646576696365732f2a7d5a4312412f76312f7b6e616d653d70" . + "726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265676973747269" . + "65732f2a2f67726f7570732f2a2f646576696365732f2a7d12fc010a0c55" . + "706461746544657669636512282e676f6f676c652e636c6f75642e696f74" . + "2e76312e557064617465446576696365526571756573741a1b2e676f6f67" . + "6c652e636c6f75642e696f742e76312e44657669636522a40182d3e49302" . + "9d01323f2f76312f7b6465766963652e6e616d653d70726f6a656374732f" . + "2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f646576" . + "696365732f2a7d3a066465766963655a5232482f76312f7b646576696365" . + "2e6e616d653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f72" . + "6567697374726965732f2a2f67726f7570732f2a2f646576696365732f2a" . + "7d3a0664657669636512d8010a0c44656c65746544657669636512282e67" . + "6f6f676c652e636c6f75642e696f742e76312e44656c6574654465766963" . + "65526571756573741a162e676f6f676c652e70726f746f6275662e456d70" . + "747922850182d3e493027f2a382f76312f7b6e616d653d70726f6a656374" . + "732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f64" . + "6576696365732f2a7d5a432a412f76312f7b6e616d653d70726f6a656374" . + "732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f67" . + "726f7570732f2a2f646576696365732f2a7d12da010a0b4c697374446576" . + "6963657312272e676f6f676c652e636c6f75642e696f742e76312e4c6973" . + "7444657669636573526571756573741a282e676f6f676c652e636c6f7564" . + "2e696f742e76312e4c69737444657669636573526573706f6e7365227882" . + "d3e493027212382f76312f7b706172656e743d70726f6a656374732f2a2f" . + "6c6f636174696f6e732f2a2f726567697374726965732f2a7d2f64657669" . + "6365735a3612342f76312f7b706172656e743d70726f6a656374732f2a2f" . + "6c6f636174696f6e732f2a2f67726f7570732f2a7d2f6465766963657312" . + "b8020a194d6f64696679436c6f7564546f446576696365436f6e66696712" . + "352e676f6f676c652e636c6f75642e696f742e76312e4d6f64696679436c" . + "6f7564546f446576696365436f6e666967526571756573741a212e676f6f" . + "676c652e636c6f75642e696f742e76312e446576696365436f6e66696722" . + "c00182d3e49302b90122522f76312f7b6e616d653d70726f6a656374732f" . + "2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f646576" . + "696365732f2a7d3a6d6f64696679436c6f7564546f446576696365436f6e" . + "6669673a012a5a60225b2f76312f7b6e616d653d70726f6a656374732f2a" . + "2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f67726f75" . + "70732f2a2f646576696365732f2a7d3a6d6f64696679436c6f7564546f44" . + "6576696365436f6e6669673a012a12ae020a184c69737444657669636543" . + "6f6e66696756657273696f6e7312342e676f6f676c652e636c6f75642e69" . + "6f742e76312e4c697374446576696365436f6e66696756657273696f6e73" . + "526571756573741a352e676f6f676c652e636c6f75642e696f742e76312e" . + "4c697374446576696365436f6e66696756657273696f6e73526573706f6e" . + "736522a40182d3e493029d0112472f76312f7b6e616d653d70726f6a6563" . + "74732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f" . + "646576696365732f2a7d2f636f6e66696756657273696f6e735a5212502f" . + "76312f7b6e616d653d70726f6a656374732f2a2f6c6f636174696f6e732f" . + "2a2f726567697374726965732f2a2f67726f7570732f2a2f646576696365" . + "732f2a7d2f636f6e66696756657273696f6e731286020a104c6973744465" . + "76696365537461746573122c2e676f6f676c652e636c6f75642e696f742e" . + "76312e4c697374446576696365537461746573526571756573741a2d2e67" . + "6f6f676c652e636c6f75642e696f742e76312e4c69737444657669636553" . + "7461746573526573706f6e736522940182d3e493028d01123f2f76312f7b" . + "6e616d653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265" . + "67697374726965732f2a2f646576696365732f2a7d2f7374617465735a4a" . + "12482f76312f7b6e616d653d70726f6a656374732f2a2f6c6f636174696f" . + "6e732f2a2f726567697374726965732f2a2f67726f7570732f2a2f646576" . + "696365732f2a7d2f73746174657312e6010a0c53657449616d506f6c6963" . + "7912222e676f6f676c652e69616d2e76312e53657449616d506f6c696379" . + "526571756573741a152e676f6f676c652e69616d2e76312e506f6c696379" . + "229a0182d3e493029301223f2f76312f7b7265736f757263653d70726f6a" . + "656374732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f" . + "2a7d3a73657449616d506f6c6963793a012a5a4d22482f76312f7b726573" . + "6f757263653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f72" . + "6567697374726965732f2a2f67726f7570732f2a7d3a73657449616d506f" . + "6c6963793a012a12e6010a0c47657449616d506f6c69637912222e676f6f" . + "676c652e69616d2e76312e47657449616d506f6c69637952657175657374" . + "1a152e676f6f676c652e69616d2e76312e506f6c696379229a0182d3e493" . + "029301223f2f76312f7b7265736f757263653d70726f6a656374732f2a2f" . + "6c6f636174696f6e732f2a2f726567697374726965732f2a7d3a67657449" . + "616d506f6c6963793a012a5a4d22482f76312f7b7265736f757263653d70" . + "726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265676973747269" . + "65732f2a2f67726f7570732f2a7d3a67657449616d506f6c6963793a012a" . + "1292020a125465737449616d5065726d697373696f6e7312282e676f6f67" . + "6c652e69616d2e76312e5465737449616d5065726d697373696f6e735265" . + "71756573741a292e676f6f676c652e69616d2e76312e5465737449616d50" . + "65726d697373696f6e73526573706f6e736522a60182d3e493029f012245" . + "2f76312f7b7265736f757263653d70726f6a656374732f2a2f6c6f636174" . + "696f6e732f2a2f726567697374726965732f2a7d3a7465737449616d5065" . + "726d697373696f6e733a012a5a53224e2f76312f7b7265736f757263653d" . + "70726f6a656374732f2a2f6c6f636174696f6e732f2a2f72656769737472" . + "6965732f2a2f67726f7570732f2a7d3a7465737449616d5065726d697373" . + "696f6e733a012a426a0a17636f6d2e676f6f676c652e636c6f75642e696f" . + "742e763142124465766963654d616e6167657250726f746f50015a36676f" . + "6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c" . + "65617069732f636c6f75642f696f742f76313b696f74f80101620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php b/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php new file mode 100644 index 000000000..62b6fe690 --- /dev/null +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php @@ -0,0 +1,126 @@ +internalAddGeneratedFile(hex2bin( + "0aa4170a23676f6f676c652f636c6f75642f696f742f76312f7265736f75" . + "726365732e70726f746f1213676f6f676c652e636c6f75642e696f742e76" . + "311a1f676f6f676c652f70726f746f6275662f74696d657374616d702e70" . + "726f746f1a17676f6f676c652f7270632f7374617475732e70726f746f22" . + "cd050a06446576696365120a0a026964180120012809120c0a046e616d65" . + "180220012809120e0a066e756d5f6964180320012804123a0a0b63726564" . + "656e7469616c73180c2003280b32252e676f6f676c652e636c6f75642e69" . + "6f742e76312e44657669636543726564656e7469616c12370a136c617374" . + "5f6865617274626561745f74696d6518072001280b321a2e676f6f676c65" . + "2e70726f746f6275662e54696d657374616d7012330a0f6c6173745f6576" . + "656e745f74696d6518082001280b321a2e676f6f676c652e70726f746f62" . + "75662e54696d657374616d7012330a0f6c6173745f73746174655f74696d" . + "6518142001280b321a2e676f6f676c652e70726f746f6275662e54696d65" . + "7374616d7012380a146c6173745f636f6e6669675f61636b5f74696d6518" . + "0e2001280b321a2e676f6f676c652e70726f746f6275662e54696d657374" . + "616d7012390a156c6173745f636f6e6669675f73656e645f74696d651812" . + "2001280b321a2e676f6f676c652e70726f746f6275662e54696d65737461" . + "6d70120f0a07626c6f636b656418132001280812330a0f6c6173745f6572" . + "726f725f74696d65180a2001280b321a2e676f6f676c652e70726f746f62" . + "75662e54696d657374616d70122d0a116c6173745f6572726f725f737461" . + "747573180b2001280b32122e676f6f676c652e7270632e53746174757312" . + "310a06636f6e666967180d2001280b32212e676f6f676c652e636c6f7564" . + "2e696f742e76312e446576696365436f6e666967122f0a05737461746518" . + "102001280b32202e676f6f676c652e636c6f75642e696f742e76312e4465" . + "766963655374617465123b0a086d6574616461746118112003280b32292e" . + "676f6f676c652e636c6f75642e696f742e76312e4465766963652e4d6574" . + "6164617461456e7472791a2f0a0d4d65746164617461456e747279120b0a" . + "036b6579180120012809120d0a0576616c75651802200128093a02380122" . + "f7020a0e4465766963655265676973747279120a0a026964180120012809" . + "120c0a046e616d6518022001280912500a1a6576656e745f6e6f74696669" . + "636174696f6e5f636f6e66696773180a2003280b322c2e676f6f676c652e" . + "636c6f75642e696f742e76312e4576656e744e6f74696669636174696f6e" . + "436f6e666967124f0a1973746174655f6e6f74696669636174696f6e5f63" . + "6f6e66696718072001280b322c2e676f6f676c652e636c6f75642e696f74" . + "2e76312e53746174654e6f74696669636174696f6e436f6e66696712340a" . + "0b6d7174745f636f6e66696718042001280b321f2e676f6f676c652e636c" . + "6f75642e696f742e76312e4d717474436f6e66696712340a0b687474705f" . + "636f6e66696718092001280b321f2e676f6f676c652e636c6f75642e696f" . + "742e76312e48747470436f6e666967123c0a0b63726564656e7469616c73" . + "18082003280b32272e676f6f676c652e636c6f75642e696f742e76312e52" . + "6567697374727943726564656e7469616c22480a0a4d717474436f6e6669" . + "67123a0a126d7174745f656e61626c65645f737461746518012001280e32" . + "1e2e676f6f676c652e636c6f75642e696f742e76312e4d71747453746174" . + "6522480a0a48747470436f6e666967123a0a12687474705f656e61626c65" . + "645f737461746518012001280e321e2e676f6f676c652e636c6f75642e69" . + "6f742e76312e487474705374617465224f0a174576656e744e6f74696669" . + "636174696f6e436f6e66696712190a11737562666f6c6465725f6d617463" . + "68657318022001280912190a117075627375625f746f7069635f6e616d65" . + "18012001280922340a1753746174654e6f74696669636174696f6e436f6e" . + "66696712190a117075627375625f746f7069635f6e616d65180120012809" . + "226f0a12526567697374727943726564656e7469616c124b0a167075626c" . + "69635f6b65795f636572746966696361746518012001280b32292e676f6f" . + "676c652e636c6f75642e696f742e76312e5075626c69634b657943657274" . + "696669636174654800420c0a0a63726564656e7469616c22d0010a165835" . + "3039436572746966696361746544657461696c73120e0a06697373756572" . + "180120012809120f0a077375626a656374180220012809122e0a0a737461" . + "72745f74696d6518032001280b321a2e676f6f676c652e70726f746f6275" . + "662e54696d657374616d70122f0a0b6578706972795f74696d6518042001" . + "280b321a2e676f6f676c652e70726f746f6275662e54696d657374616d70" . + "121b0a137369676e61747572655f616c676f726974686d18052001280912" . + "170a0f7075626c69635f6b65795f7479706518062001280922af010a1450" . + "75626c69634b65794365727469666963617465123f0a06666f726d617418" . + "012001280e322f2e676f6f676c652e636c6f75642e696f742e76312e5075" . + "626c69634b65794365727469666963617465466f726d617412130a0b6365" . + "72746966696361746518022001280912410a0c783530395f64657461696c" . + "7318032001280b322b2e676f6f676c652e636c6f75642e696f742e76312e" . + "58353039436572746966696361746544657461696c732295010a10446576" . + "69636543726564656e7469616c123e0a0a7075626c69635f6b6579180220" . + "01280b32282e676f6f676c652e636c6f75642e696f742e76312e5075626c" . + "69634b657943726564656e7469616c480012330a0f65787069726174696f" . + "6e5f74696d6518062001280b321a2e676f6f676c652e70726f746f627566" . + "2e54696d657374616d70420c0a0a63726564656e7469616c22580a135075" . + "626c69634b657943726564656e7469616c12340a06666f726d6174180120" . + "01280e32242e676f6f676c652e636c6f75642e696f742e76312e5075626c" . + "69634b6579466f726d6174120b0a036b657918022001280922a0010a0c44" . + "6576696365436f6e666967120f0a0776657273696f6e1801200128031235" . + "0a11636c6f75645f7570646174655f74696d6518022001280b321a2e676f" . + "6f676c652e70726f746f6275662e54696d657374616d7012330a0f646576" . + "6963655f61636b5f74696d6518032001280b321a2e676f6f676c652e7072" . + "6f746f6275662e54696d657374616d7012130a0b62696e6172795f646174" . + "6118042001280c22530a0b4465766963655374617465122f0a0b75706461" . + "74655f74696d6518012001280b321a2e676f6f676c652e70726f746f6275" . + "662e54696d657374616d7012130a0b62696e6172795f6461746118022001" . + "280c2a4c0a094d7174745374617465121a0a164d5154545f53544154455f" . + "554e535045434946494544100012100a0c4d5154545f454e41424c454410" . + "0112110a0d4d5154545f44495341424c454410022a4c0a09487474705374" . + "617465121a0a16485454505f53544154455f554e53504543494649454410" . + "0012100a0c485454505f454e41424c4544100112110a0d485454505f4449" . + "5341424c454410022a650a1a5075626c69634b6579436572746966696361" . + "7465466f726d6174122d0a29554e5350454349464945445f5055424c4943" . + "5f4b45595f43455254494649434154455f464f524d4154100012180a1458" . + "3530395f43455254494649434154455f50454d10012a760a0f5075626c69" . + "634b6579466f726d617412210a1d554e5350454349464945445f5055424c" . + "49435f4b45595f464f524d41541000120b0a075253415f50454d10031210" . + "0a0c5253415f583530395f50454d1001120d0a0945533235365f50454d10" . + "0212120a0e45533235365f583530395f50454d100442660a17636f6d2e67" . + "6f6f676c652e636c6f75642e696f742e7631420e5265736f757263657350" . + "726f746f50015a36676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f636c6f75642f696f742f76313b69" . + "6f74f80101620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php similarity index 81% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php index 0fad9e4eb..838ddb81c 100644 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php @@ -24,7 +24,9 @@ class CreateDeviceRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The device registration details. + * The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. * * Generated from protobuf field .google.cloud.iot.v1.Device device = 2; */ @@ -66,7 +68,9 @@ public function setParent($var) } /** - * The device registration details. + * The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. * * Generated from protobuf field .google.cloud.iot.v1.Device device = 2; * @return \Google\Cloud\Iot\V1\Device @@ -77,7 +81,9 @@ public function getDevice() } /** - * The device registration details. + * The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. * * Generated from protobuf field .google.cloud.iot.v1.Device device = 2; * @param \Google\Cloud\Iot\V1\Device $var diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/Device.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/Device.php similarity index 93% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/Device.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/Device.php index ddd02ed7d..4b5b19af0 100644 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/Device.php +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/Device.php @@ -51,9 +51,11 @@ class Device extends \Google\Protobuf\Internal\Message */ private $credentials; /** - * [Output only] The last time a heartbeat was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. This field is only for devices connecting through MQTT. + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. * * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; */ @@ -136,8 +138,8 @@ class Device extends \Google\Protobuf\Internal\Message * The metadata key-value pairs assigned to the device. This metadata is not * interpreted or indexed by Cloud IoT Core. It can be used to add contextual * information for the device. - * Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than - * 128 bytes in length. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. * Values are free-form strings. Each value must be less than or equal to 32 * KB in size. * The total size of all keys and values must be less than 256 KB, and the @@ -279,9 +281,11 @@ public function setCredentials($var) } /** - * [Output only] The last time a heartbeat was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. This field is only for devices connecting through MQTT. + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. * * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; * @return \Google\Protobuf\Timestamp @@ -292,9 +296,11 @@ public function getLastHeartbeatTime() } /** - * [Output only] The last time a heartbeat was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. This field is only for devices connecting through MQTT. + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. * * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; * @param \Google\Protobuf\Timestamp $var @@ -586,8 +592,8 @@ public function setState($var) * The metadata key-value pairs assigned to the device. This metadata is not * interpreted or indexed by Cloud IoT Core. It can be used to add contextual * information for the device. - * Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than - * 128 bytes in length. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. * Values are free-form strings. Each value must be less than or equal to 32 * KB in size. * The total size of all keys and values must be less than 256 KB, and the @@ -605,8 +611,8 @@ public function getMetadata() * The metadata key-value pairs assigned to the device. This metadata is not * interpreted or indexed by Cloud IoT Core. It can be used to add contextual * information for the device. - * Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than - * 128 bytes in length. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. * Values are free-form strings. Each value must be less than or equal to 32 * KB in size. * The total size of all keys and values must be less than 256 KB, and the diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php similarity index 99% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php index 5b84daf73..2a1a07eb8 100644 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php @@ -2,7 +2,7 @@ // GENERATED CODE -- DO NOT EDIT! // Original file comments: -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php similarity index 89% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php index 48e99b5c5..cb06663e7 100644 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php @@ -32,11 +32,12 @@ class DeviceRegistry extends \Google\Protobuf\Internal\Message * The configuration for notification of telemetry events received from the * device. All telemetry events that were successfully published by the * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. Only the first configuration is used. If you - * try to publish a device telemetry event using MQTT without specifying a - * Cloud Pub/Sub topic for the device's registry, the connection closes - * automatically. If you try to do so using an HTTP connection, an error - * is returned. + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. * * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; */ @@ -143,11 +144,12 @@ public function setName($var) * The configuration for notification of telemetry events received from the * device. All telemetry events that were successfully published by the * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. Only the first configuration is used. If you - * try to publish a device telemetry event using MQTT without specifying a - * Cloud Pub/Sub topic for the device's registry, the connection closes - * automatically. If you try to do so using an HTTP connection, an error - * is returned. + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. * * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; * @return \Google\Protobuf\Internal\RepeatedField @@ -161,11 +163,12 @@ public function getEventNotificationConfigs() * The configuration for notification of telemetry events received from the * device. All telemetry events that were successfully published by the * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. Only the first configuration is used. If you - * try to publish a device telemetry event using MQTT without specifying a - * Cloud Pub/Sub topic for the device's registry, the connection closes - * automatically. If you try to do so using an HTTP connection, an error - * is returned. + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. * * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; * @param \Google\Cloud\Iot\V1\EventNotificationConfig[]|\Google\Protobuf\Internal\RepeatedField $var diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php diff --git a/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php new file mode 100644 index 000000000..145386c2d --- /dev/null +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php @@ -0,0 +1,101 @@ +google.cloud.iot.v1.EventNotificationConfig + */ +class EventNotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + */ + private $subfolder_matches = ''; + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + */ + private $pubsub_topic_name = ''; + + public function __construct() { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct(); + } + + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + * @return string + */ + public function getSubfolderMatches() + { + return $this->subfolder_matches; + } + + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + * @param string $var + * @return $this + */ + public function setSubfolderMatches($var) + { + GPBUtil::checkString($var, True); + $this->subfolder_matches = $var; + + return $this; + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @return string + */ + public function getPubsubTopicName() + { + return $this->pubsub_topic_name; + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @param string $var + * @return $this + */ + public function setPubsubTopicName($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic_name = $var; + + return $this; + } + +} + diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/HttpState.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/HttpState.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/HttpState.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/HttpState.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/MqttState.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/MqttState.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/MqttState.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/MqttState.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php similarity index 93% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php index 59484abc5..6fbe0e046 100644 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php +++ b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php @@ -28,7 +28,7 @@ class UpdateDeviceRequest extends \Google\Protobuf\Internal\Message * Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; */ @@ -75,7 +75,7 @@ public function setDevice($var) * Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; * @return \Google\Protobuf\FieldMask @@ -89,7 +89,7 @@ public function getUpdateMask() * Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; * @param \Google\Protobuf\FieldMask $var diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php b/generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php similarity index 100% rename from generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php rename to generated/php/google-cloud-cloudiot-v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php diff --git a/generated/php/google-cloud-iot-v1/src/Iot/V1/DeviceManagerClient.php b/generated/php/google-cloud-cloudiot-v1/src/V1/DeviceManagerClient.php similarity index 94% rename from generated/php/google-cloud-iot-v1/src/Iot/V1/DeviceManagerClient.php rename to generated/php/google-cloud-cloudiot-v1/src/V1/DeviceManagerClient.php index 70f62131b..c9ea76012 100644 --- a/generated/php/google-cloud-iot-v1/src/Iot/V1/DeviceManagerClient.php +++ b/generated/php/google-cloud-cloudiot-v1/src/V1/DeviceManagerClient.php @@ -38,5 +38,5 @@ class DeviceManagerClient extends DeviceManagerGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see DeviceManagerClientImpl} class. + // additions to the generated {@see DeviceManagerGapicClient} class. } diff --git a/generated/php/google-cloud-iot-v1/src/Iot/V1/Gapic/DeviceManagerGapicClient.php b/generated/php/google-cloud-cloudiot-v1/src/V1/Gapic/DeviceManagerGapicClient.php similarity index 91% rename from generated/php/google-cloud-iot-v1/src/Iot/V1/Gapic/DeviceManagerGapicClient.php rename to generated/php/google-cloud-cloudiot-v1/src/V1/Gapic/DeviceManagerGapicClient.php index d3190e9d9..606184dab 100644 --- a/generated/php/google-cloud-iot-v1/src/Iot/V1/Gapic/DeviceManagerGapicClient.php +++ b/generated/php/google-cloud-cloudiot-v1/src/V1/Gapic/DeviceManagerGapicClient.php @@ -31,14 +31,14 @@ namespace Google\Cloud\Iot\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\SetIamPolicyRequest; @@ -66,8 +66,6 @@ use Google\Cloud\Iot\V1\UpdateDeviceRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Internet of things (IoT) service. Allows to manipulate device registry @@ -123,10 +121,12 @@ class DeviceManagerGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloudiot', + ]; private static $locationNameTemplate; private static $registryNameTemplate; private static $deviceNameTemplate; @@ -136,16 +136,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudiot', - ], - 'clientConfigPath' => __DIR__.'/../resources/device_manager_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/device_manager_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/device_manager_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/device_manager_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/device_manager_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -298,57 +300,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'cloudiot.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud IoT API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudiot.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** @@ -662,7 +663,9 @@ public function listDeviceRegistries($parent, $optionalArgs = []) * @param string $parent The name of the device registry where this device should be created. * For example, * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param Device $device The device registration details. + * @param Device $device The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. * @param array $optionalArgs { * Optional. * @@ -779,7 +782,7 @@ public function getDevice($name, $optionalArgs = []) * @param FieldMask $updateMask Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` * @param array $optionalArgs { * Optional. * diff --git a/generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_client_config.json b/generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_client_config.json similarity index 100% rename from generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_client_config.json rename to generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_client_config.json diff --git a/generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_descriptor_config.php b/generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_descriptor_config.php rename to generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_descriptor_config.php diff --git a/generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_rest_client_config.php b/generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_rest_client_config.php similarity index 70% rename from generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_rest_client_config.php rename to generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_rest_client_config.php index 3ff5d71c2..be57d424d 100644 --- a/generated/php/google-cloud-iot-v1/src/Iot/V1/resources/device_manager_rest_client_config.php +++ b/generated/php/google-cloud-cloudiot-v1/src/V1/resources/device_manager_rest_client_config.php @@ -76,6 +76,12 @@ 'GetDevice' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -88,6 +94,13 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/devices/*}', 'body' => 'device', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}', + 'body' => 'device', + ], + ], 'placeholders' => [ 'device.name' => [ 'getters' => [ @@ -100,6 +113,12 @@ 'DeleteDevice' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -111,6 +130,12 @@ 'ListDevices' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}/devices', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/groups/*}/devices', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -123,6 +148,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -134,6 +166,12 @@ 'ListDeviceConfigVersions' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -145,6 +183,12 @@ 'ListDeviceStates' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/states', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -157,6 +201,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -169,6 +220,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -181,6 +239,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ diff --git a/generated/php/google-cloud-iot-v1/tests/system/Iot/V1/DeviceManagerSmokeTest.php b/generated/php/google-cloud-cloudiot-v1/tests/System/V1/DeviceManagerSmokeTest.php similarity index 95% rename from generated/php/google-cloud-iot-v1/tests/system/Iot/V1/DeviceManagerSmokeTest.php rename to generated/php/google-cloud-cloudiot-v1/tests/System/V1/DeviceManagerSmokeTest.php index 7ab16915b..764a22cc3 100644 --- a/generated/php/google-cloud-iot-v1/tests/system/Iot/V1/DeviceManagerSmokeTest.php +++ b/generated/php/google-cloud-cloudiot-v1/tests/System/V1/DeviceManagerSmokeTest.php @@ -20,13 +20,13 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Iot\V1; +namespace Google\Cloud\Iot\Tests\System\V1; use Google\Cloud\Iot\V1\DeviceManagerClient; use Google\ApiCore\Testing\GeneratedTest; /** - * @group iot + * @group cloudiot * @group grpc */ class DeviceManagerSmokeTest extends GeneratedTest diff --git a/generated/php/google-cloud-iot-v1/tests/unit/Iot/V1/DeviceManagerClientTest.php b/generated/php/google-cloud-cloudiot-v1/tests/Unit/V1/DeviceManagerClientTest.php similarity index 96% rename from generated/php/google-cloud-iot-v1/tests/unit/Iot/V1/DeviceManagerClientTest.php rename to generated/php/google-cloud-cloudiot-v1/tests/Unit/V1/DeviceManagerClientTest.php index 6dcb05516..d17cf47f3 100644 --- a/generated/php/google-cloud-iot-v1/tests/unit/Iot/V1/DeviceManagerClientTest.php +++ b/generated/php/google-cloud-cloudiot-v1/tests/Unit/V1/DeviceManagerClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Iot\V1; +namespace Google\Cloud\Iot\Tests\Unit\V1; use Google\Cloud\Iot\V1\DeviceManagerClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Iam\V1\Policy; @@ -38,11 +39,11 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group iot + * @group cloudiot * @group grpc */ class DeviceManagerClientTest extends GeneratedTest @@ -60,6 +61,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new DeviceManagerClient($options); } @@ -114,12 +121,12 @@ public function createDeviceRegistryExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -190,12 +197,12 @@ public function getDeviceRegistryExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -269,12 +276,12 @@ public function updateDeviceRegistryExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -340,12 +347,12 @@ public function deleteDeviceRegistryExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -419,12 +426,12 @@ public function listDeviceRegistriesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -502,12 +509,12 @@ public function createDeviceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -582,12 +589,12 @@ public function getDeviceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -665,12 +672,12 @@ public function updateDeviceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -736,12 +743,12 @@ public function deleteDeviceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -815,12 +822,12 @@ public function listDevicesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -894,12 +901,12 @@ public function modifyCloudToDeviceConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -966,12 +973,12 @@ public function listDeviceConfigVersionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1037,12 +1044,12 @@ public function listDeviceStatesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1116,12 +1123,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1192,12 +1199,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1267,12 +1274,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-container-v1/composer.json b/generated/php/google-cloud-container-v1/composer.json index 44a3265df..203772e1a 100644 --- a/generated/php/google-cloud-container-v1/composer.json +++ b/generated/php/google-cloud-container-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "container/container", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-container", "description": "Google Container Engine API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Container\\": "src", + "Google\\Cloud\\Container\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-container-v1/src/Container/V1/ClusterManagerClient.php b/generated/php/google-cloud-container-v1/src/V1/ClusterManagerClient.php similarity index 94% rename from generated/php/google-cloud-container-v1/src/Container/V1/ClusterManagerClient.php rename to generated/php/google-cloud-container-v1/src/V1/ClusterManagerClient.php index 91f6da642..856ee1af3 100644 --- a/generated/php/google-cloud-container-v1/src/Container/V1/ClusterManagerClient.php +++ b/generated/php/google-cloud-container-v1/src/V1/ClusterManagerClient.php @@ -38,5 +38,5 @@ class ClusterManagerClient extends ClusterManagerGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ClusterManagerClientImpl} class. + // additions to the generated {@see ClusterManagerGapicClient} class. } diff --git a/generated/php/google-cloud-container-v1/src/Container/V1/Gapic/ClusterManagerGapicClient.php b/generated/php/google-cloud-container-v1/src/V1/Gapic/ClusterManagerGapicClient.php similarity index 94% rename from generated/php/google-cloud-container-v1/src/Container/V1/Gapic/ClusterManagerGapicClient.php rename to generated/php/google-cloud-container-v1/src/V1/Gapic/ClusterManagerGapicClient.php index 1c64ef467..1034625e8 100644 --- a/generated/php/google-cloud-container-v1/src/Container/V1/Gapic/ClusterManagerGapicClient.php +++ b/generated/php/google-cloud-container-v1/src/V1/Gapic/ClusterManagerGapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Container\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Container\V1\AddonsConfig; use Google\Cloud\Container\V1\CancelOperationRequest; use Google\Cloud\Container\V1\Cluster; @@ -82,8 +83,6 @@ use Google\Cloud\Container\V1\UpdateMasterRequest; use Google\Cloud\Container\V1\UpdateNodePoolRequest; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Google Container Engine Cluster Manager v1. @@ -133,23 +132,28 @@ class ClusterManagerGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/cluster_manager_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/cluster_manager_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/cluster_manager_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/cluster_manager_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/cluster_manager_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -159,57 +163,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'container.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Container Engine API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'container.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_client_config.json b/generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_client_config.json similarity index 100% rename from generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_client_config.json rename to generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_client_config.json diff --git a/generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_descriptor_config.php b/generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_descriptor_config.php rename to generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_descriptor_config.php diff --git a/generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_rest_client_config.php b/generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-container-v1/src/Container/V1/resources/cluster_manager_rest_client_config.php rename to generated/php/google-cloud-container-v1/src/V1/resources/cluster_manager_rest_client_config.php diff --git a/generated/php/google-cloud-container-v1/tests/system/Container/V1/ClusterManagerSmokeTest.php b/generated/php/google-cloud-container-v1/tests/System/V1/ClusterManagerSmokeTest.php similarity index 96% rename from generated/php/google-cloud-container-v1/tests/system/Container/V1/ClusterManagerSmokeTest.php rename to generated/php/google-cloud-container-v1/tests/System/V1/ClusterManagerSmokeTest.php index 9fdfe03ce..e92372566 100644 --- a/generated/php/google-cloud-container-v1/tests/system/Container/V1/ClusterManagerSmokeTest.php +++ b/generated/php/google-cloud-container-v1/tests/System/V1/ClusterManagerSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Container\V1; +namespace Google\Cloud\Container\Tests\System\V1; use Google\Cloud\Container\V1\ClusterManagerClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-container-v1/tests/unit/Container/V1/ClusterManagerClientTest.php b/generated/php/google-cloud-container-v1/tests/Unit/V1/ClusterManagerClientTest.php similarity index 97% rename from generated/php/google-cloud-container-v1/tests/unit/Container/V1/ClusterManagerClientTest.php rename to generated/php/google-cloud-container-v1/tests/Unit/V1/ClusterManagerClientTest.php index 86f215bbb..c1ecc6adb 100644 --- a/generated/php/google-cloud-container-v1/tests/unit/Container/V1/ClusterManagerClientTest.php +++ b/generated/php/google-cloud-container-v1/tests/Unit/V1/ClusterManagerClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Container\V1; +namespace Google\Cloud\Container\Tests\Unit\V1; use Google\Cloud\Container\V1\ClusterManagerClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Container\V1\AddonsConfig; @@ -43,7 +44,7 @@ use Google\Cloud\Container\V1\SetMasterAuthRequest_Action; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -65,6 +66,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ClusterManagerClient($options); } @@ -115,12 +122,12 @@ public function listClustersExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -239,12 +246,12 @@ public function getClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -336,12 +343,12 @@ public function createClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -437,12 +444,12 @@ public function updateClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -547,12 +554,12 @@ public function updateNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -655,12 +662,12 @@ public function setNodePoolAutoscalingExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -758,12 +765,12 @@ public function setLoggingServiceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -860,12 +867,12 @@ public function setMonitoringServiceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -962,12 +969,12 @@ public function setAddonsConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1064,12 +1071,12 @@ public function setLocationsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1166,12 +1173,12 @@ public function updateMasterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1272,12 +1279,12 @@ public function setMasterAuthExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1371,12 +1378,12 @@ public function deleteClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1448,12 +1455,12 @@ public function listOperationsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1544,12 +1551,12 @@ public function getOperationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1624,12 +1631,12 @@ public function cancelOperationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1705,12 +1712,12 @@ public function getServerConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1785,12 +1792,12 @@ public function listNodePoolsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1880,12 +1887,12 @@ public function getNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1982,12 +1989,12 @@ public function createNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2084,12 +2091,12 @@ public function deleteNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2186,12 +2193,12 @@ public function rollbackNodePoolUpgradeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2292,12 +2299,12 @@ public function setNodePoolManagementExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2399,12 +2406,12 @@ public function setLabelsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2502,12 +2509,12 @@ public function setLegacyAbacExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2600,12 +2607,12 @@ public function startIPRotationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2697,12 +2704,12 @@ public function completeIPRotationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2802,12 +2809,12 @@ public function setNodePoolSizeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -2905,12 +2912,12 @@ public function setNetworkPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -3007,12 +3014,12 @@ public function setMaintenancePolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dataproc-v1/composer.json b/generated/php/google-cloud-dataproc-v1/composer.json index a5838d6c4..7ea22949d 100644 --- a/generated/php/google-cloud-dataproc-v1/composer.json +++ b/generated/php/google-cloud-dataproc-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "dataproc/dataproc", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-dataproc", "description": "Google Cloud Dataproc API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Dataproc\\": "src", + "Google\\Cloud\\Dataproc\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-dataproc-v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication_State.php b/generated/php/google-cloud-dataproc-v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication_State.php index 38ce1c6e6..f98c5bc0f 100644 --- a/generated/php/google-cloud-dataproc-v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication_State.php +++ b/generated/php/google-cloud-dataproc-v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication_State.php @@ -23,7 +23,7 @@ class YarnApplication_State * * Generated from protobuf enum NEW = 1; */ - const NEW = 1; + const PBNEW = 1; /** * Status is NEW_SAVING. * diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/ClusterControllerClient.php b/generated/php/google-cloud-dataproc-v1/src/V1/ClusterControllerClient.php similarity index 94% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/ClusterControllerClient.php rename to generated/php/google-cloud-dataproc-v1/src/V1/ClusterControllerClient.php index 6d4e740b2..3d3fd52c6 100644 --- a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/ClusterControllerClient.php +++ b/generated/php/google-cloud-dataproc-v1/src/V1/ClusterControllerClient.php @@ -38,5 +38,5 @@ class ClusterControllerClient extends ClusterControllerGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ClusterControllerClientImpl} class. + // additions to the generated {@see ClusterControllerGapicClient} class. } diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/ClusterControllerGapicClient.php b/generated/php/google-cloud-dataproc-v1/src/V1/Gapic/ClusterControllerGapicClient.php similarity index 85% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/ClusterControllerGapicClient.php rename to generated/php/google-cloud-dataproc-v1/src/V1/Gapic/ClusterControllerGapicClient.php index 75825d9f7..4255b0b21 100644 --- a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/ClusterControllerGapicClient.php +++ b/generated/php/google-cloud-dataproc-v1/src/V1/Gapic/ClusterControllerGapicClient.php @@ -31,13 +31,14 @@ namespace Google\Cloud\Dataproc\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Dataproc\V1\Cluster; use Google\Cloud\Dataproc\V1\CreateClusterRequest; use Google\Cloud\Dataproc\V1\DeleteClusterRequest; @@ -48,8 +49,6 @@ use Google\Cloud\Dataproc\V1\UpdateClusterRequest; use Google\LongRunning\Operation; use Google\Protobuf\FieldMask; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The ClusterControllerService provides methods to manage clusters @@ -126,9 +125,11 @@ class ClusterControllerGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -136,15 +137,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/cluster_controller_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/cluster_controller_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/cluster_controller_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/cluster_controller_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/cluster_controller_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -189,65 +193,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dataproc.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Dataproc API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataproc.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/JobControllerGapicClient.php b/generated/php/google-cloud-dataproc-v1/src/V1/Gapic/JobControllerGapicClient.php similarity index 80% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/JobControllerGapicClient.php rename to generated/php/google-cloud-dataproc-v1/src/V1/Gapic/JobControllerGapicClient.php index 585567043..6a7e8b0a9 100644 --- a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/Gapic/JobControllerGapicClient.php +++ b/generated/php/google-cloud-dataproc-v1/src/V1/Gapic/JobControllerGapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Dataproc\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Dataproc\V1\CancelJobRequest; use Google\Cloud\Dataproc\V1\DeleteJobRequest; use Google\Cloud\Dataproc\V1\GetJobRequest; @@ -46,8 +47,6 @@ use Google\Cloud\Dataproc\V1\UpdateJobRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The JobController provides methods to manage jobs. @@ -98,23 +97,28 @@ class JobControllerGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/job_controller_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/job_controller_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/job_controller_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/job_controller_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/job_controller_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -124,57 +128,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dataproc.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Dataproc API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataproc.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/JobControllerClient.php b/generated/php/google-cloud-dataproc-v1/src/V1/JobControllerClient.php similarity index 94% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/JobControllerClient.php rename to generated/php/google-cloud-dataproc-v1/src/V1/JobControllerClient.php index 435a785b9..ac6bc1f99 100644 --- a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/JobControllerClient.php +++ b/generated/php/google-cloud-dataproc-v1/src/V1/JobControllerClient.php @@ -38,5 +38,5 @@ class JobControllerClient extends JobControllerGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see JobControllerClientImpl} class. + // additions to the generated {@see JobControllerGapicClient} class. } diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_client_config.json b/generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_client_config.json similarity index 100% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_client_config.json rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_client_config.json diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_descriptor_config.php b/generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_descriptor_config.php similarity index 66% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_descriptor_config.php rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_descriptor_config.php index 7bcc3147c..6721dfa79 100644 --- a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_descriptor_config.php +++ b/generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_descriptor_config.php @@ -7,24 +7,40 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', + 'initialPollDelayMillis' => '1000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '10000', + 'totalPollTimeoutMillis' => '300000', ], ], 'UpdateCluster' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', + 'initialPollDelayMillis' => '1000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '10000', + 'totalPollTimeoutMillis' => '300000', ], ], 'DeleteCluster' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', + 'initialPollDelayMillis' => '1000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '10000', + 'totalPollTimeoutMillis' => '300000', ], ], 'DiagnoseCluster' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\DiagnoseClusterResults', + 'initialPollDelayMillis' => '1000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '10000', + 'totalPollTimeoutMillis' => '30000', ], ], 'ListClusters' => [ diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_rest_client_config.php b/generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/cluster_controller_rest_client_config.php rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/cluster_controller_rest_client_config.php diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_client_config.json b/generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_client_config.json similarity index 100% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_client_config.json rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_client_config.json diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_descriptor_config.php b/generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_descriptor_config.php rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_descriptor_config.php diff --git a/generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_rest_client_config.php b/generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dataproc-v1/src/Dataproc/V1/resources/job_controller_rest_client_config.php rename to generated/php/google-cloud-dataproc-v1/src/V1/resources/job_controller_rest_client_config.php diff --git a/generated/php/google-cloud-dataproc-v1/tests/system/Dataproc/V1/ClusterControllerSmokeTest.php b/generated/php/google-cloud-dataproc-v1/tests/System/V1/ClusterControllerSmokeTest.php similarity index 96% rename from generated/php/google-cloud-dataproc-v1/tests/system/Dataproc/V1/ClusterControllerSmokeTest.php rename to generated/php/google-cloud-dataproc-v1/tests/System/V1/ClusterControllerSmokeTest.php index d8e56252d..cd251119d 100644 --- a/generated/php/google-cloud-dataproc-v1/tests/system/Dataproc/V1/ClusterControllerSmokeTest.php +++ b/generated/php/google-cloud-dataproc-v1/tests/System/V1/ClusterControllerSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Dataproc\V1; +namespace Google\Cloud\Dataproc\Tests\System\V1; use Google\Cloud\Dataproc\V1\ClusterControllerClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/ClusterControllerClientTest.php b/generated/php/google-cloud-dataproc-v1/tests/Unit/V1/ClusterControllerClientTest.php similarity index 97% rename from generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/ClusterControllerClientTest.php rename to generated/php/google-cloud-dataproc-v1/tests/Unit/V1/ClusterControllerClientTest.php index ebac15ce7..34de20ed3 100644 --- a/generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/ClusterControllerClientTest.php +++ b/generated/php/google-cloud-dataproc-v1/tests/Unit/V1/ClusterControllerClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dataproc\V1; +namespace Google\Cloud\Dataproc\Tests\Unit\V1; use Google\Cloud\Dataproc\V1\ClusterControllerClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -34,7 +35,7 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ClusterControllerClient($options); } @@ -67,7 +74,6 @@ public function createClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -153,7 +159,6 @@ public function createClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -172,12 +177,12 @@ public function createClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -219,7 +224,6 @@ public function updateClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -313,7 +317,6 @@ public function updateClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -332,12 +335,12 @@ public function updateClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -381,7 +384,6 @@ public function deleteClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -461,7 +463,6 @@ public function deleteClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -480,12 +481,12 @@ public function deleteClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -576,12 +577,12 @@ public function getClusterExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -661,12 +662,12 @@ public function listClustersExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -698,7 +699,6 @@ public function diagnoseClusterTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -778,7 +778,6 @@ public function diagnoseClusterExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -797,12 +796,12 @@ public function diagnoseClusterExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/JobControllerClientTest.php b/generated/php/google-cloud-dataproc-v1/tests/Unit/V1/JobControllerClientTest.php similarity index 96% rename from generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/JobControllerClientTest.php rename to generated/php/google-cloud-dataproc-v1/tests/Unit/V1/JobControllerClientTest.php index 8d1b5b97b..19fab243f 100644 --- a/generated/php/google-cloud-dataproc-v1/tests/unit/Dataproc/V1/JobControllerClientTest.php +++ b/generated/php/google-cloud-dataproc-v1/tests/Unit/V1/JobControllerClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dataproc\V1; +namespace Google\Cloud\Dataproc\Tests\Unit\V1; use Google\Cloud\Dataproc\V1\JobControllerClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Dataproc\V1\Job; @@ -31,7 +32,7 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -53,6 +54,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new JobControllerClient($options); } @@ -111,12 +118,12 @@ public function submitJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -196,12 +203,12 @@ public function getJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -281,12 +288,12 @@ public function listJobsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -373,12 +380,12 @@ public function updateJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -460,12 +467,12 @@ public function cancelJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -540,12 +547,12 @@ public function deleteJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-debugger-v2/composer.json b/generated/php/google-cloud-debugger-v2/composer.json index b6dc92064..e8d59384a 100644 --- a/generated/php/google-cloud-debugger-v2/composer.json +++ b/generated/php/google-cloud-debugger-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "debugger/debugger", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-debugger", "description": "Stackdriver Debugger API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Debugger\\": "src", + "Google\\Cloud\\Debugger\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Controller2Client.php b/generated/php/google-cloud-debugger-v2/src/V2/Controller2Client.php similarity index 94% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/Controller2Client.php rename to generated/php/google-cloud-debugger-v2/src/V2/Controller2Client.php index d52b412bb..c98db2d8e 100644 --- a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Controller2Client.php +++ b/generated/php/google-cloud-debugger-v2/src/V2/Controller2Client.php @@ -38,5 +38,5 @@ class Controller2Client extends Controller2GapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see Controller2ClientImpl} class. + // additions to the generated {@see Controller2GapicClient} class. } diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Debugger2Client.php b/generated/php/google-cloud-debugger-v2/src/V2/Debugger2Client.php similarity index 95% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/Debugger2Client.php rename to generated/php/google-cloud-debugger-v2/src/V2/Debugger2Client.php index ee0ebc549..156d62112 100644 --- a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Debugger2Client.php +++ b/generated/php/google-cloud-debugger-v2/src/V2/Debugger2Client.php @@ -38,5 +38,5 @@ class Debugger2Client extends Debugger2GapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see Debugger2ClientImpl} class. + // additions to the generated {@see Debugger2GapicClient} class. } diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Controller2GapicClient.php b/generated/php/google-cloud-debugger-v2/src/V2/Gapic/Controller2GapicClient.php similarity index 73% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Controller2GapicClient.php rename to generated/php/google-cloud-debugger-v2/src/V2/Gapic/Controller2GapicClient.php index 30405e263..dc5b977a1 100644 --- a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Controller2GapicClient.php +++ b/generated/php/google-cloud-debugger-v2/src/V2/Gapic/Controller2GapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Debugger\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Debugger\V2\Breakpoint; use Google\Cloud\Debugger\V2\Debuggee; use Google\Cloud\Debugger\V2\ListActiveBreakpointsRequest; @@ -44,8 +45,6 @@ use Google\Cloud\Debugger\V2\RegisterDebuggeeResponse; use Google\Cloud\Debugger\V2\UpdateActiveBreakpointRequest; use Google\Cloud\Debugger\V2\UpdateActiveBreakpointResponse; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Controller service provides the API for orchestrating a collection of @@ -113,24 +112,29 @@ class Controller2GapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud_debugger', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud_debugger', - ], - 'clientConfigPath' => __DIR__.'/../resources/controller2_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/controller2_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/controller2_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/controller2_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/controller2_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -140,57 +144,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'clouddebugger.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Debugger API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouddebugger.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Debugger2GapicClient.php b/generated/php/google-cloud-debugger-v2/src/V2/Gapic/Debugger2GapicClient.php similarity index 78% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Debugger2GapicClient.php rename to generated/php/google-cloud-debugger-v2/src/V2/Gapic/Debugger2GapicClient.php index 402bc523e..38eb21787 100644 --- a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/Gapic/Debugger2GapicClient.php +++ b/generated/php/google-cloud-debugger-v2/src/V2/Gapic/Debugger2GapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Debugger\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Debugger\V2\Breakpoint; use Google\Cloud\Debugger\V2\DeleteBreakpointRequest; use Google\Cloud\Debugger\V2\GetBreakpointRequest; @@ -48,8 +49,6 @@ use Google\Cloud\Debugger\V2\SetBreakpointRequest; use Google\Cloud\Debugger\V2\SetBreakpointResponse; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Debugger service provides the API that allows users to collect run-time @@ -111,24 +110,29 @@ class Debugger2GapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud_debugger', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud_debugger', - ], - 'clientConfigPath' => __DIR__.'/../resources/debugger2_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/debugger2_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/debugger2_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/debugger2_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/debugger2_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -138,57 +142,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'clouddebugger.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Debugger API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouddebugger.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_client_config.json b/generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_client_config.json similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_client_config.json rename to generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_client_config.json diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_descriptor_config.php b/generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_descriptor_config.php rename to generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_descriptor_config.php diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_rest_client_config.php b/generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/controller2_rest_client_config.php rename to generated/php/google-cloud-debugger-v2/src/V2/resources/controller2_rest_client_config.php diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_client_config.json b/generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_client_config.json similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_client_config.json rename to generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_client_config.json diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_descriptor_config.php b/generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_descriptor_config.php rename to generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_descriptor_config.php diff --git a/generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_rest_client_config.php b/generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-debugger-v2/src/Debugger/V2/resources/debugger2_rest_client_config.php rename to generated/php/google-cloud-debugger-v2/src/V2/resources/debugger2_rest_client_config.php diff --git a/generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Controller2ClientTest.php b/generated/php/google-cloud-debugger-v2/tests/Unit/V2/Controller2ClientTest.php similarity index 94% rename from generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Controller2ClientTest.php rename to generated/php/google-cloud-debugger-v2/tests/Unit/V2/Controller2ClientTest.php index 732d734e4..d9f622917 100644 --- a/generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Controller2ClientTest.php +++ b/generated/php/google-cloud-debugger-v2/tests/Unit/V2/Controller2ClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Debugger\V2; +namespace Google\Cloud\Debugger\Tests\Unit\V2; use Google\Cloud\Debugger\V2\Controller2Client; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Debugger\V2\Breakpoint; @@ -32,7 +33,7 @@ use Google\Cloud\Debugger\V2\RegisterDebuggeeResponse; use Google\Cloud\Debugger\V2\UpdateActiveBreakpointResponse; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new Controller2Client($options); } @@ -100,12 +107,12 @@ public function registerDebuggeeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -175,12 +182,12 @@ public function listActiveBreakpointsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -250,12 +257,12 @@ public function updateActiveBreakpointExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Debugger2ClientTest.php b/generated/php/google-cloud-debugger-v2/tests/Unit/V2/Debugger2ClientTest.php similarity index 95% rename from generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Debugger2ClientTest.php rename to generated/php/google-cloud-debugger-v2/tests/Unit/V2/Debugger2ClientTest.php index 02c4682bb..1ce7073a3 100644 --- a/generated/php/google-cloud-debugger-v2/tests/unit/Debugger/V2/Debugger2ClientTest.php +++ b/generated/php/google-cloud-debugger-v2/tests/Unit/V2/Debugger2ClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Debugger\V2; +namespace Google\Cloud\Debugger\Tests\Unit\V2; use Google\Cloud\Debugger\V2\Debugger2Client; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Debugger\V2\Breakpoint; @@ -33,7 +34,7 @@ use Google\Cloud\Debugger\V2\SetBreakpointResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -55,6 +56,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new Debugger2Client($options); } @@ -109,12 +116,12 @@ public function setBreakpointExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -190,12 +197,12 @@ public function getBreakpointExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -270,12 +277,12 @@ public function deleteBreakpointExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -349,12 +356,12 @@ public function listBreakpointsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -425,12 +432,12 @@ public function listDebuggeesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/composer.json b/generated/php/google-cloud-dialogflow-v2/composer.json index 5c8773a47..bcc02ba98 100644 --- a/generated/php/google-cloud-dialogflow-v2/composer.json +++ b/generated/php/google-cloud-dialogflow-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "dialogflow/dialogflow", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-dialogflow", "description": "Dialogflow API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Dialogflow\\": "src", + "Google\\Cloud\\Dialogflow\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/AgentsClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/AgentsClient.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/AgentsClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/AgentsClient.php index efd918306..2f71e71f4 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/AgentsClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/AgentsClient.php @@ -38,5 +38,5 @@ class AgentsClient extends AgentsGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see AgentsClientImpl} class. + // additions to the generated {@see AgentsGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/ContextsClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/ContextsClient.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/ContextsClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/ContextsClient.php index c71cbd18f..9001ce05e 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/ContextsClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/ContextsClient.php @@ -38,5 +38,5 @@ class ContextsClient extends ContextsGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ContextsClientImpl} class. + // additions to the generated {@see ContextsGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/EntityTypesClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/EntityTypesClient.php similarity index 94% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/EntityTypesClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/EntityTypesClient.php index 249fad887..4dbe703a0 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/EntityTypesClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/EntityTypesClient.php @@ -38,5 +38,5 @@ class EntityTypesClient extends EntityTypesGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see EntityTypesClientImpl} class. + // additions to the generated {@see EntityTypesGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/AgentsGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/AgentsGapicClient.php similarity index 85% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/AgentsGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/AgentsGapicClient.php index c3a381343..27ad90fe9 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/AgentsGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/AgentsGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Dialogflow\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -39,7 +40,6 @@ use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\Agent; use Google\Cloud\Dialogflow\V2\ExportAgentRequest; use Google\Cloud\Dialogflow\V2\ExportAgentResponse; @@ -51,8 +51,6 @@ use Google\Cloud\Dialogflow\V2\TrainAgentRequest; use Google\LongRunning\Operation; use Google\Protobuf\Struct; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Agents are best described as Natural Language Understanding (NLU) modules @@ -130,10 +128,11 @@ class AgentsGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectNameTemplate; private static $pathTemplateMap; @@ -143,15 +142,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/agents_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/agents_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/agents_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/agents_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/agents_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -273,65 +275,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/ContextsGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/ContextsGapicClient.php similarity index 82% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/ContextsGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/ContextsGapicClient.php index 7f8423262..ee5f1caff 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/ContextsGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/ContextsGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Dialogflow\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\Context; use Google\Cloud\Dialogflow\V2\CreateContextRequest; use Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest; @@ -48,8 +48,6 @@ use Google\Cloud\Dialogflow\V2\UpdateContextRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: A context represents additional information included with user input or with @@ -131,10 +129,11 @@ class ContextsGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $sessionNameTemplate; private static $contextNameTemplate; private static $pathTemplateMap; @@ -143,15 +142,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/contexts_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/contexts_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/contexts_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/contexts_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/contexts_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -271,57 +273,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/EntityTypesGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/EntityTypesGapicClient.php similarity index 90% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/EntityTypesGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/EntityTypesGapicClient.php index b7014ae2f..3c4ea60cc 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/EntityTypesGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/EntityTypesGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Dialogflow\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -39,7 +40,6 @@ use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest; use Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest; use Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest; @@ -59,8 +59,6 @@ use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Struct; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Entities are extracted from user input and represent parameters that are @@ -152,10 +150,11 @@ class EntityTypesGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectAgentNameTemplate; private static $entityTypeNameTemplate; private static $pathTemplateMap; @@ -166,15 +165,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/entity_types_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/entity_types_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/entity_types_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/entity_types_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/entity_types_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -325,65 +327,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/IntentsGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/IntentsGapicClient.php similarity index 87% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/IntentsGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/IntentsGapicClient.php index e3db6b6f2..003cb4b72 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/IntentsGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/IntentsGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Dialogflow\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -39,7 +40,6 @@ use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest; use Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest; use Google\Cloud\Dialogflow\V2\BatchUpdateIntentsResponse; @@ -55,8 +55,6 @@ use Google\LongRunning\Operation; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: An intent represents a mapping between input from a user and an action to @@ -152,10 +150,11 @@ class IntentsGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectAgentNameTemplate; private static $intentNameTemplate; private static $agentNameTemplate; @@ -167,15 +166,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/intents_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/intents_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/intents_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/intents_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/intents_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -355,65 +357,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionEntityTypesGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionEntityTypesGapicClient.php similarity index 81% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionEntityTypesGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionEntityTypesGapicClient.php index cd9339de1..a2267d862 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionEntityTypesGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionEntityTypesGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Dialogflow\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\CreateSessionEntityTypeRequest; use Google\Cloud\Dialogflow\V2\DeleteSessionEntityTypeRequest; use Google\Cloud\Dialogflow\V2\GetSessionEntityTypeRequest; @@ -47,8 +47,6 @@ use Google\Cloud\Dialogflow\V2\UpdateSessionEntityTypeRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Entities are extracted from user input and represent parameters that are @@ -125,10 +123,11 @@ class SessionEntityTypesGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $sessionNameTemplate; private static $sessionEntityTypeNameTemplate; private static $pathTemplateMap; @@ -137,15 +136,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/session_entity_types_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/session_entity_types_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/session_entity_types_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/session_entity_types_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/session_entity_types_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -265,57 +267,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionsGapicClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionsGapicClient.php similarity index 74% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionsGapicClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionsGapicClient.php index 79d4edc4b..792dbccba 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/Gapic/SessionsGapicClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/Gapic/SessionsGapicClient.php @@ -32,20 +32,19 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dialogflow\V2\DetectIntentRequest; use Google\Cloud\Dialogflow\V2\DetectIntentResponse; use Google\Cloud\Dialogflow\V2\QueryInput; use Google\Cloud\Dialogflow\V2\QueryParameters; use Google\Cloud\Dialogflow\V2\StreamingDetectIntentRequest; use Google\Cloud\Dialogflow\V2\StreamingDetectIntentResponse; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: A session represents an interaction with a user. You retrieve user input @@ -103,10 +102,11 @@ class SessionsGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $sessionNameTemplate; private static $pathTemplateMap; @@ -114,15 +114,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/sessions_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/sessions_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/sessions_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/sessions_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/sessions_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -211,57 +214,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dialogflow.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Dialogflow API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dialogflow.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/IntentsClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/IntentsClient.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/IntentsClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/IntentsClient.php index e5941bde6..74d0e98b3 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/IntentsClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/IntentsClient.php @@ -38,5 +38,5 @@ class IntentsClient extends IntentsGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see IntentsClientImpl} class. + // additions to the generated {@see IntentsGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionEntityTypesClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/SessionEntityTypesClient.php similarity index 94% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionEntityTypesClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/SessionEntityTypesClient.php index 4c9b9fb38..330d8fcdd 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionEntityTypesClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/SessionEntityTypesClient.php @@ -38,5 +38,5 @@ class SessionEntityTypesClient extends SessionEntityTypesGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SessionEntityTypesClientImpl} class. + // additions to the generated {@see SessionEntityTypesGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionsClient.php b/generated/php/google-cloud-dialogflow-v2/src/V2/SessionsClient.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionsClient.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/SessionsClient.php index f9392a9b1..1f23e388a 100644 --- a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/SessionsClient.php +++ b/generated/php/google-cloud-dialogflow-v2/src/V2/SessionsClient.php @@ -38,5 +38,5 @@ class SessionsClient extends SessionsGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SessionsClientImpl} class. + // additions to the generated {@see SessionsGapicClient} class. } diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/agents_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/agents_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/contexts_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/contexts_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/entity_types_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/entity_types_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/intents_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/intents_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/session_entity_types_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/session_entity_types_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_client_config.json b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_client_config.json similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_client_config.json rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_client_config.json diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_descriptor_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_descriptor_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_descriptor_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_rest_client_config.php b/generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dialogflow-v2/src/Dialogflow/V2/resources/sessions_rest_client_config.php rename to generated/php/google-cloud-dialogflow-v2/src/V2/resources/sessions_rest_client_config.php diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/AgentsClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/AgentsClientTest.php similarity index 97% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/AgentsClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/AgentsClientTest.php index 0e67b64e9..f233085bb 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/AgentsClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/AgentsClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\AgentsClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -34,7 +35,7 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new AgentsClient($options); } @@ -118,12 +125,12 @@ public function getAgentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -197,12 +204,12 @@ public function searchAgentsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -233,7 +240,6 @@ public function trainAgentTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -305,7 +311,6 @@ public function trainAgentExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -324,12 +329,12 @@ public function trainAgentExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -369,7 +374,6 @@ public function exportAgentTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -443,7 +447,6 @@ public function exportAgentExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -462,12 +465,12 @@ public function exportAgentExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -507,7 +510,6 @@ public function importAgentTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -579,7 +581,6 @@ public function importAgentExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -598,12 +599,12 @@ public function importAgentExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -643,7 +644,6 @@ public function restoreAgentTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -715,7 +715,6 @@ public function restoreAgentExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -734,12 +733,12 @@ public function restoreAgentExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/ContextsClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/ContextsClientTest.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/ContextsClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/ContextsClientTest.php index ecb23be40..54922b38a 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/ContextsClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/ContextsClientTest.php @@ -20,17 +20,18 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\ContextsClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Dialogflow\V2\Context; use Google\Cloud\Dialogflow\V2\ListContextsResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -52,6 +53,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ContextsClient($options); } @@ -106,12 +113,12 @@ public function listContextsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -181,12 +188,12 @@ public function getContextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -260,12 +267,12 @@ public function createContextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -336,12 +343,12 @@ public function updateContextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -406,12 +413,12 @@ public function deleteContextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -476,12 +483,12 @@ public function deleteAllContextsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/EntityTypesClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/EntityTypesClientTest.php similarity index 97% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/EntityTypesClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/EntityTypesClientTest.php index 7b23f99a5..537cb83fe 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/EntityTypesClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/EntityTypesClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\EntityTypesClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -34,7 +35,7 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new EntityTypesClient($options); } @@ -110,12 +117,12 @@ public function listEntityTypesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -185,12 +192,12 @@ public function getEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -264,12 +271,12 @@ public function createEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -340,12 +347,12 @@ public function updateEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -410,12 +417,12 @@ public function deleteEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -446,7 +453,6 @@ public function batchUpdateEntityTypesTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -518,7 +524,6 @@ public function batchUpdateEntityTypesExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -537,12 +542,12 @@ public function batchUpdateEntityTypesExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -582,7 +587,6 @@ public function batchDeleteEntityTypesTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -658,7 +662,6 @@ public function batchDeleteEntityTypesExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -677,12 +680,12 @@ public function batchDeleteEntityTypesExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -723,7 +726,6 @@ public function batchCreateEntitiesTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -799,7 +801,6 @@ public function batchCreateEntitiesExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -818,12 +819,12 @@ public function batchCreateEntitiesExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -864,7 +865,6 @@ public function batchUpdateEntitiesTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -940,7 +940,6 @@ public function batchUpdateEntitiesExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -959,12 +958,12 @@ public function batchUpdateEntitiesExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1005,7 +1004,6 @@ public function batchDeleteEntitiesTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -1081,7 +1079,6 @@ public function batchDeleteEntitiesExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -1100,12 +1097,12 @@ public function batchDeleteEntitiesExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/IntentsClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/IntentsClientTest.php similarity index 97% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/IntentsClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/IntentsClientTest.php index a41781262..7c9662dac 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/IntentsClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/IntentsClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\IntentsClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -34,7 +35,7 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new IntentsClient($options); } @@ -110,12 +117,12 @@ public function listIntentsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -199,12 +206,12 @@ public function getIntentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -292,12 +299,12 @@ public function createIntentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -386,12 +393,12 @@ public function updateIntentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -457,12 +464,12 @@ public function deleteIntentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -493,7 +500,6 @@ public function batchUpdateIntentsTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -569,7 +575,6 @@ public function batchUpdateIntentsExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -588,12 +593,12 @@ public function batchUpdateIntentsExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -634,7 +639,6 @@ public function batchDeleteIntentsTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -710,7 +714,6 @@ public function batchDeleteIntentsExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -729,12 +732,12 @@ public function batchDeleteIntentsExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionEntityTypesClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionEntityTypesClientTest.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionEntityTypesClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionEntityTypesClientTest.php index c3df96755..fe6bfb186 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionEntityTypesClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionEntityTypesClientTest.php @@ -20,17 +20,18 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\SessionEntityTypesClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Dialogflow\V2\ListSessionEntityTypesResponse; use Google\Cloud\Dialogflow\V2\SessionEntityType; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -52,6 +53,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SessionEntityTypesClient($options); } @@ -106,12 +113,12 @@ public function listSessionEntityTypesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -179,12 +186,12 @@ public function getSessionEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -256,12 +263,12 @@ public function createSessionEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -330,12 +337,12 @@ public function updateSessionEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -400,12 +407,12 @@ public function deleteSessionEntityTypeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionsClientTest.php b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionsClientTest.php similarity index 95% rename from generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionsClientTest.php rename to generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionsClientTest.php index a0687195c..e4d25590b 100644 --- a/generated/php/google-cloud-dialogflow-v2/tests/unit/Dialogflow/V2/SessionsClientTest.php +++ b/generated/php/google-cloud-dialogflow-v2/tests/Unit/V2/SessionsClientTest.php @@ -20,11 +20,12 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dialogflow\V2; +namespace Google\Cloud\Dialogflow\Tests\Unit\V2; use Google\Cloud\Dialogflow\V2\SessionsClient; use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Dialogflow\V2\DetectIntentResponse; @@ -32,7 +33,7 @@ use Google\Cloud\Dialogflow\V2\StreamingDetectIntentRequest; use Google\Cloud\Dialogflow\V2\StreamingDetectIntentResponse; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SessionsClient($options); } @@ -106,12 +113,12 @@ public function detectIntentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -224,12 +231,12 @@ public function streamingDetectIntentExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dlp-v2/composer.json b/generated/php/google-cloud-dlp-v2/composer.json index 659fa1cda..d80724e62 100644 --- a/generated/php/google-cloud-dlp-v2/composer.json +++ b/generated/php/google-cloud-dlp-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "dlp/dlp", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-dlp", "description": "Cloud Data Loss Prevention (DLP) API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Dlp\\": "src", + "Google\\Cloud\\Dlp\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Dlp.php b/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Dlp.php index f33510888..fd18f7807 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Dlp.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Dlp.php @@ -25,7 +25,7 @@ public static function initOnce() { \GPBMetadata\Google\Type\Dayofweek::initOnce(); \GPBMetadata\Google\Type\Timeofday::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0a8ad0010a1f676f6f676c652f707269766163792f646c702f76322f646c" . + "0aadd1010a1f676f6f676c652f707269766163792f646c702f76322f646c" . "702e70726f746f1215676f6f676c652e707269766163792e646c702e7632" . "1a23676f6f676c652f707269766163792f646c702f76322f73746f726167" . "652e70726f746f1a1e676f6f676c652f70726f746f6275662f6475726174" . @@ -222,7 +222,7 @@ public static function initOnce() { "655f7461626c6518022001280b32242e676f6f676c652e70726976616379" . "2e646c702e76322e42696751756572795461626c65122e0a07616374696f" . "6e7318032003280b321d2e676f6f676c652e707269766163792e646c702e" . - "76322e416374696f6e22a40c0a0d507269766163794d6574726963125b0a" . + "76322e416374696f6e22d80c0a0d507269766163794d6574726963125b0a" . "166e756d65726963616c5f73746174735f636f6e66696718012001280b32" . "392e676f6f676c652e707269766163792e646c702e76322e507269766163" . "794d65747269632e4e756d65726963616c5374617473436f6e6669674800" . @@ -242,677 +242,683 @@ public static function initOnce() { "69656c6418012001280b321e2e676f6f676c652e707269766163792e646c" . "702e76322e4669656c6449641a470a1643617465676f726963616c537461" . "7473436f6e666967122d0a056669656c6418012001280b321e2e676f6f67" . - "6c652e707269766163792e646c702e76322e4669656c6449641a450a104b" . + "6c652e707269766163792e646c702e76322e4669656c6449641a790a104b" . "416e6f6e796d697479436f6e66696712310a0971756173695f6964731801" . "2003280b321e2e676f6f676c652e707269766163792e646c702e76322e46" . - "69656c6449641a82010a104c446976657273697479436f6e66696712310a" . - "0971756173695f69647318012003280b321e2e676f6f676c652e70726976" . - "6163792e646c702e76322e4669656c644964123b0a1373656e7369746976" . - "655f61747472696275746518022001280b321e2e676f6f676c652e707269" . - "766163792e646c702e76322e4669656c6449641ae8050a144b4d61704573" . - "74696d6174696f6e436f6e66696712580a0971756173695f696473180120" . - "03280b32452e676f6f676c652e707269766163792e646c702e76322e5072" . - "69766163794d65747269632e4b4d6170457374696d6174696f6e436f6e66" . - "69672e5461676765644669656c6412130a0b726567696f6e5f636f646518" . - "022001280912620a10617578696c696172795f7461626c65731803200328" . - "0b32482e676f6f676c652e707269766163792e646c702e76322e50726976" . - "6163794d65747269632e4b4d6170457374696d6174696f6e436f6e666967" . - "2e417578696c696172795461626c651abb010a0b5461676765644669656c" . + "69656c64496412320a09656e746974795f696418022001280b321f2e676f" . + "6f676c652e707269766163792e646c702e76322e456e7469747949641a82" . + "010a104c446976657273697479436f6e66696712310a0971756173695f69" . + "647318012003280b321e2e676f6f676c652e707269766163792e646c702e" . + "76322e4669656c644964123b0a1373656e7369746976655f617474726962" . + "75746518022001280b321e2e676f6f676c652e707269766163792e646c70" . + "2e76322e4669656c6449641ae8050a144b4d6170457374696d6174696f6e" . + "436f6e66696712580a0971756173695f69647318012003280b32452e676f" . + "6f676c652e707269766163792e646c702e76322e507269766163794d6574" . + "7269632e4b4d6170457374696d6174696f6e436f6e6669672e5461676765" . + "644669656c6412130a0b726567696f6e5f636f646518022001280912620a" . + "10617578696c696172795f7461626c657318032003280b32482e676f6f67" . + "6c652e707269766163792e646c702e76322e507269766163794d65747269" . + "632e4b4d6170457374696d6174696f6e436f6e6669672e417578696c6961" . + "72795461626c651abb010a0b5461676765644669656c64122d0a05666965" . + "6c6418012001280b321e2e676f6f676c652e707269766163792e646c702e" . + "76322e4669656c64496412340a09696e666f5f7479706518022001280b32" . + "1f2e676f6f676c652e707269766163792e646c702e76322e496e666f5479" . + "7065480012140a0a637573746f6d5f7461671803200128094800122a0a08" . + "696e66657272656418042001280b32162e676f6f676c652e70726f746f62" . + "75662e456d707479480042050a037461671abe020a0e417578696c696172" . + "795461626c6512330a057461626c6518032001280b32242e676f6f676c65" . + "2e707269766163792e646c702e76322e42696751756572795461626c6512" . + "680a0971756173695f69647318012003280b32552e676f6f676c652e7072" . + "69766163792e646c702e76322e507269766163794d65747269632e4b4d61" . + "70457374696d6174696f6e436f6e6669672e417578696c69617279546162" . + "6c652e517561736949644669656c64123a0a1272656c61746976655f6672" . + "657175656e637918022001280b321e2e676f6f676c652e70726976616379" . + "2e646c702e76322e4669656c6449641a510a0c517561736949644669656c" . "64122d0a056669656c6418012001280b321e2e676f6f676c652e70726976" . - "6163792e646c702e76322e4669656c64496412340a09696e666f5f747970" . - "6518022001280b321f2e676f6f676c652e707269766163792e646c702e76" . - "322e496e666f54797065480012140a0a637573746f6d5f74616718032001" . - "28094800122a0a08696e66657272656418042001280b32162e676f6f676c" . - "652e70726f746f6275662e456d707479480042050a037461671abe020a0e" . - "417578696c696172795461626c6512330a057461626c6518032001280b32" . - "242e676f6f676c652e707269766163792e646c702e76322e426967517565" . - "72795461626c6512680a0971756173695f69647318012003280b32552e67" . - "6f6f676c652e707269766163792e646c702e76322e507269766163794d65" . - "747269632e4b4d6170457374696d6174696f6e436f6e6669672e41757869" . - "6c696172795461626c652e517561736949644669656c64123a0a1272656c" . - "61746976655f6672657175656e637918022001280b321e2e676f6f676c65" . - "2e707269766163792e646c702e76322e4669656c6449641a510a0c517561" . - "736949644669656c64122d0a056669656c6418012001280b321e2e676f6f" . - "676c652e707269766163792e646c702e76322e4669656c64496412120a0a" . - "637573746f6d5f74616718022001280942060a0474797065228c180a1c41" . - "6e616c797a6544617461536f757263655269736b44657461696c7312460a" . - "187265717565737465645f707269766163795f6d65747269631801200128" . - "0b32242e676f6f676c652e707269766163792e646c702e76322e50726976" . - "6163794d657472696312440a167265717565737465645f736f757263655f" . - "7461626c6518022001280b32242e676f6f676c652e707269766163792e64" . - "6c702e76322e42696751756572795461626c65126a0a166e756d65726963" . - "616c5f73746174735f726573756c7418032001280b32482e676f6f676c65" . + "6163792e646c702e76322e4669656c64496412120a0a637573746f6d5f74" . + "616718022001280942060a0474797065228c180a1c416e616c797a654461" . + "7461536f757263655269736b44657461696c7312460a1872657175657374" . + "65645f707269766163795f6d657472696318012001280b32242e676f6f67" . + "6c652e707269766163792e646c702e76322e507269766163794d65747269" . + "6312440a167265717565737465645f736f757263655f7461626c65180220" . + "01280b32242e676f6f676c652e707269766163792e646c702e76322e4269" . + "6751756572795461626c65126a0a166e756d65726963616c5f7374617473" . + "5f726573756c7418032001280b32482e676f6f676c652e70726976616379" . + "2e646c702e76322e416e616c797a6544617461536f757263655269736b44" . + "657461696c732e4e756d65726963616c5374617473526573756c74480012" . + "6e0a1863617465676f726963616c5f73746174735f726573756c74180420" . + "01280b324a2e676f6f676c652e707269766163792e646c702e76322e416e" . + "616c797a6544617461536f757263655269736b44657461696c732e436174" . + "65676f726963616c5374617473526573756c74480012620a126b5f616e6f" . + "6e796d6974795f726573756c7418052001280b32442e676f6f676c652e70" . + "7269766163792e646c702e76322e416e616c797a6544617461536f757263" . + "655269736b44657461696c732e4b416e6f6e796d697479526573756c7448" . + "0012620a126c5f6469766572736974795f726573756c7418062001280b32" . + "442e676f6f676c652e707269766163792e646c702e76322e416e616c797a" . + "6544617461536f757263655269736b44657461696c732e4c446976657273" . + "697479526573756c744800126b0a176b5f6d61705f657374696d6174696f" . + "6e5f726573756c7418072001280b32482e676f6f676c652e707269766163" . + "792e646c702e76322e416e616c797a6544617461536f757263655269736b" . + "44657461696c732e4b4d6170457374696d6174696f6e526573756c744800" . + "1aaf010a144e756d65726963616c5374617473526573756c74122f0a096d" . + "696e5f76616c756518012001280b321c2e676f6f676c652e707269766163" . + "792e646c702e76322e56616c7565122f0a096d61785f76616c7565180220" . + "01280b321c2e676f6f676c652e707269766163792e646c702e76322e5661" . + "6c756512350a0f7175616e74696c655f76616c75657318042003280b321c" . + "2e676f6f676c652e707269766163792e646c702e76322e56616c75651a8d" . + "030a1643617465676f726963616c5374617473526573756c741295010a21" . + "76616c75655f6672657175656e63795f686973746f6772616d5f6275636b" . + "65747318052003280b326a2e676f6f676c652e707269766163792e646c70" . + "2e76322e416e616c797a6544617461536f757263655269736b4465746169" . + "6c732e43617465676f726963616c5374617473526573756c742e43617465" . + "676f726963616c5374617473486973746f6772616d4275636b65741ada01" . + "0a1f43617465676f726963616c5374617473486973746f6772616d427563" . + "6b657412230a1b76616c75655f6672657175656e63795f6c6f7765725f62" . + "6f756e6418012001280312230a1b76616c75655f6672657175656e63795f" . + "75707065725f626f756e6418022001280312130a0b6275636b65745f7369" . + "7a65180320012803123c0a0d6275636b65745f76616c7565731804200328" . + "0b32252e676f6f676c652e707269766163792e646c702e76322e56616c75" . + "654672657175656e6379121a0a126275636b65745f76616c75655f636f75" . + "6e741805200128031ab5040a104b416e6f6e796d697479526573756c7412" . + "8b010a236571756976616c656e63655f636c6173735f686973746f677261" . + "6d5f6275636b65747318052003280b325e2e676f6f676c652e7072697661" . + "63792e646c702e76322e416e616c797a6544617461536f75726365526973" . + "6b44657461696c732e4b416e6f6e796d697479526573756c742e4b416e6f" . + "6e796d697479486973746f6772616d4275636b65741a740a1a4b416e6f6e" . + "796d6974794571756976616c656e6365436c61737312360a107175617369" . + "5f6964735f76616c75657318012003280b321c2e676f6f676c652e707269" . + "766163792e646c702e76322e56616c7565121e0a166571756976616c656e" . + "63655f636c6173735f73697a651802200128031a9c020a194b416e6f6e79" . + "6d697479486973746f6772616d4275636b6574122a0a226571756976616c" . + "656e63655f636c6173735f73697a655f6c6f7765725f626f756e64180120" . + "012803122a0a226571756976616c656e63655f636c6173735f73697a655f" . + "75707065725f626f756e6418022001280312130a0b6275636b65745f7369" . + "7a6518032001280312760a0d6275636b65745f76616c7565731804200328" . + "0b325f2e676f6f676c652e707269766163792e646c702e76322e416e616c" . + "797a6544617461536f757263655269736b44657461696c732e4b416e6f6e" . + "796d697479526573756c742e4b416e6f6e796d6974794571756976616c65" . + "6e6365436c617373121a0a126275636b65745f76616c75655f636f756e74" . + "1805200128031ab0050a104c446976657273697479526573756c74129301" . + "0a2b73656e7369746976655f76616c75655f6672657175656e63795f6869" . + "73746f6772616d5f6275636b65747318052003280b325e2e676f6f676c65" . "2e707269766163792e646c702e76322e416e616c797a6544617461536f75" . - "7263655269736b44657461696c732e4e756d65726963616c537461747352" . - "6573756c744800126e0a1863617465676f726963616c5f73746174735f72" . - "6573756c7418042001280b324a2e676f6f676c652e707269766163792e64" . - "6c702e76322e416e616c797a6544617461536f757263655269736b446574" . - "61696c732e43617465676f726963616c5374617473526573756c74480012" . - "620a126b5f616e6f6e796d6974795f726573756c7418052001280b32442e" . - "676f6f676c652e707269766163792e646c702e76322e416e616c797a6544" . - "617461536f757263655269736b44657461696c732e4b416e6f6e796d6974" . - "79526573756c74480012620a126c5f6469766572736974795f726573756c" . - "7418062001280b32442e676f6f676c652e707269766163792e646c702e76" . - "322e416e616c797a6544617461536f757263655269736b44657461696c73" . - "2e4c446976657273697479526573756c744800126b0a176b5f6d61705f65" . - "7374696d6174696f6e5f726573756c7418072001280b32482e676f6f676c" . - "652e707269766163792e646c702e76322e416e616c797a6544617461536f" . - "757263655269736b44657461696c732e4b4d6170457374696d6174696f6e" . - "526573756c7448001aaf010a144e756d65726963616c5374617473526573" . - "756c74122f0a096d696e5f76616c756518012001280b321c2e676f6f676c" . - "652e707269766163792e646c702e76322e56616c7565122f0a096d61785f" . - "76616c756518022001280b321c2e676f6f676c652e707269766163792e64" . - "6c702e76322e56616c756512350a0f7175616e74696c655f76616c756573" . - "18042003280b321c2e676f6f676c652e707269766163792e646c702e7632" . - "2e56616c75651a8d030a1643617465676f726963616c5374617473526573" . - "756c741295010a2176616c75655f6672657175656e63795f686973746f67" . - "72616d5f6275636b65747318052003280b326a2e676f6f676c652e707269" . - "766163792e646c702e76322e416e616c797a6544617461536f7572636552" . - "69736b44657461696c732e43617465676f726963616c5374617473526573" . - "756c742e43617465676f726963616c5374617473486973746f6772616d42" . - "75636b65741ada010a1f43617465676f726963616c537461747348697374" . - "6f6772616d4275636b657412230a1b76616c75655f6672657175656e6379" . - "5f6c6f7765725f626f756e6418012001280312230a1b76616c75655f6672" . - "657175656e63795f75707065725f626f756e6418022001280312130a0b62" . - "75636b65745f73697a65180320012803123c0a0d6275636b65745f76616c" . - "75657318042003280b32252e676f6f676c652e707269766163792e646c70" . - "2e76322e56616c75654672657175656e6379121a0a126275636b65745f76" . - "616c75655f636f756e741805200128031ab5040a104b416e6f6e796d6974" . - "79526573756c74128b010a236571756976616c656e63655f636c6173735f" . - "686973746f6772616d5f6275636b65747318052003280b325e2e676f6f67" . - "6c652e707269766163792e646c702e76322e416e616c797a654461746153" . - "6f757263655269736b44657461696c732e4b416e6f6e796d697479526573" . - "756c742e4b416e6f6e796d697479486973746f6772616d4275636b65741a" . - "740a1a4b416e6f6e796d6974794571756976616c656e6365436c61737312" . - "360a1071756173695f6964735f76616c75657318012003280b321c2e676f" . - "6f676c652e707269766163792e646c702e76322e56616c7565121e0a1665" . - "71756976616c656e63655f636c6173735f73697a651802200128031a9c02" . - "0a194b416e6f6e796d697479486973746f6772616d4275636b6574122a0a" . - "226571756976616c656e63655f636c6173735f73697a655f6c6f7765725f" . - "626f756e64180120012803122a0a226571756976616c656e63655f636c61" . - "73735f73697a655f75707065725f626f756e6418022001280312130a0b62" . - "75636b65745f73697a6518032001280312760a0d6275636b65745f76616c" . - "75657318042003280b325f2e676f6f676c652e707269766163792e646c70" . + "7263655269736b44657461696c732e4c446976657273697479526573756c" . + "742e4c446976657273697479486973746f6772616d4275636b65741ae001" . + "0a1a4c4469766572736974794571756976616c656e6365436c6173731236" . + "0a1071756173695f6964735f76616c75657318012003280b321c2e676f6f" . + "676c652e707269766163792e646c702e76322e56616c7565121e0a166571" . + "756976616c656e63655f636c6173735f73697a6518022001280312250a1d" . + "6e756d5f64697374696e63745f73656e7369746976655f76616c75657318" . + "032001280312430a14746f705f73656e7369746976655f76616c75657318" . + "042003280b32252e676f6f676c652e707269766163792e646c702e76322e" . + "56616c75654672657175656e63791aa2020a194c44697665727369747948" . + "6973746f6772616d4275636b6574122d0a2573656e7369746976655f7661" . + "6c75655f6672657175656e63795f6c6f7765725f626f756e641801200128" . + "03122d0a2573656e7369746976655f76616c75655f6672657175656e6379" . + "5f75707065725f626f756e6418022001280312130a0b6275636b65745f73" . + "697a6518032001280312760a0d6275636b65745f76616c75657318042003" . + "280b325f2e676f6f676c652e707269766163792e646c702e76322e416e61" . + "6c797a6544617461536f757263655269736b44657461696c732e4c446976" . + "657273697479526573756c742e4c4469766572736974794571756976616c" . + "656e6365436c617373121a0a126275636b65745f76616c75655f636f756e" . + "741805200128031a95040a144b4d6170457374696d6174696f6e52657375" . + "6c74128a010a1a6b5f6d61705f657374696d6174696f6e5f686973746f67" . + "72616d18012003280b32662e676f6f676c652e707269766163792e646c70" . "2e76322e416e616c797a6544617461536f757263655269736b4465746169" . - "6c732e4b416e6f6e796d697479526573756c742e4b416e6f6e796d697479" . - "4571756976616c656e6365436c617373121a0a126275636b65745f76616c" . - "75655f636f756e741805200128031ab0050a104c44697665727369747952" . - "6573756c741293010a2b73656e7369746976655f76616c75655f66726571" . - "75656e63795f686973746f6772616d5f6275636b65747318052003280b32" . - "5e2e676f6f676c652e707269766163792e646c702e76322e416e616c797a" . - "6544617461536f757263655269736b44657461696c732e4c446976657273" . - "697479526573756c742e4c446976657273697479486973746f6772616d42" . - "75636b65741ae0010a1a4c4469766572736974794571756976616c656e63" . - "65436c61737312360a1071756173695f6964735f76616c75657318012003" . - "280b321c2e676f6f676c652e707269766163792e646c702e76322e56616c" . - "7565121e0a166571756976616c656e63655f636c6173735f73697a651802" . - "2001280312250a1d6e756d5f64697374696e63745f73656e736974697665" . - "5f76616c75657318032001280312430a14746f705f73656e736974697665" . - "5f76616c75657318042003280b32252e676f6f676c652e70726976616379" . - "2e646c702e76322e56616c75654672657175656e63791aa2020a194c4469" . - "76657273697479486973746f6772616d4275636b6574122d0a2573656e73" . - "69746976655f76616c75655f6672657175656e63795f6c6f7765725f626f" . - "756e64180120012803122d0a2573656e7369746976655f76616c75655f66" . - "72657175656e63795f75707065725f626f756e6418022001280312130a0b" . - "6275636b65745f73697a6518032001280312760a0d6275636b65745f7661" . - "6c75657318042003280b325f2e676f6f676c652e707269766163792e646c" . - "702e76322e416e616c797a6544617461536f757263655269736b44657461" . - "696c732e4c446976657273697479526573756c742e4c4469766572736974" . - "794571756976616c656e6365436c617373121a0a126275636b65745f7661" . - "6c75655f636f756e741805200128031a95040a144b4d6170457374696d61" . - "74696f6e526573756c74128a010a1a6b5f6d61705f657374696d6174696f" . - "6e5f686973746f6772616d18012003280b32662e676f6f676c652e707269" . - "766163792e646c702e76322e416e616c797a6544617461536f7572636552" . - "69736b44657461696c732e4b4d6170457374696d6174696f6e526573756c" . - "742e4b4d6170457374696d6174696f6e486973746f6772616d4275636b65" . - "741a720a1b4b4d6170457374696d6174696f6e5175617369496456616c75" . - "657312360a1071756173695f6964735f76616c75657318012003280b321c" . - "2e676f6f676c652e707269766163792e646c702e76322e56616c7565121b" . - "0a13657374696d617465645f616e6f6e796d6974791802200128031afb01" . - "0a1d4b4d6170457374696d6174696f6e486973746f6772616d4275636b65" . - "7412150a0d6d696e5f616e6f6e796d69747918012001280312150a0d6d61" . - "785f616e6f6e796d69747918022001280312130a0b6275636b65745f7369" . - "7a65180520012803127b0a0d6275636b65745f76616c7565731806200328" . - "0b32642e676f6f676c652e707269766163792e646c702e76322e416e616c" . - "797a6544617461536f757263655269736b44657461696c732e4b4d617045" . - "7374696d6174696f6e526573756c742e4b4d6170457374696d6174696f6e" . - "5175617369496456616c756573121a0a126275636b65745f76616c75655f" . - "636f756e7418072001280342080a06726573756c74224c0a0e56616c7565" . - "4672657175656e6379122b0a0576616c756518012001280b321c2e676f6f" . - "676c652e707269766163792e646c702e76322e56616c7565120d0a05636f" . - "756e7418022001280322b3020a0556616c756512170a0d696e7465676572" . - "5f76616c7565180120012803480012150a0b666c6f61745f76616c756518" . - "0220012801480012160a0c737472696e675f76616c756518032001280948" . - "0012170a0d626f6f6c65616e5f76616c7565180420012808480012350a0f" . - "74696d657374616d705f76616c756518052001280b321a2e676f6f676c65" . - "2e70726f746f6275662e54696d657374616d704800122c0a0a74696d655f" . - "76616c756518062001280b32162e676f6f676c652e747970652e54696d65" . - "4f66446179480012270a0a646174655f76616c756518072001280b32112e" . - "676f6f676c652e747970652e44617465480012330a116461795f6f665f77" . - "65656b5f76616c756518082001280e32162e676f6f676c652e747970652e" . - "4461794f665765656b480042060a047479706522510a0951756f7465496e" . - "666f12340a09646174655f74696d6518022001280b321f2e676f6f676c65" . - "2e707269766163792e646c702e76322e4461746554696d654800420e0a0c" . - "7061727365645f71756f746522df010a084461746554696d65121f0a0464" . - "61746518012001280b32112e676f6f676c652e747970652e44617465122b" . - "0a0b6461795f6f665f7765656b18022001280e32162e676f6f676c652e74" . - "7970652e4461794f665765656b12240a0474696d6518032001280b32162e" . - "676f6f676c652e747970652e54696d654f66446179123b0a0974696d655f" . - "7a6f6e6518042001280b32282e676f6f676c652e707269766163792e646c" . - "702e76322e4461746554696d652e54696d655a6f6e651a220a0854696d65" . - "5a6f6e6512160a0e6f66667365745f6d696e7574657318012001280522c9" . - "010a1044656964656e74696679436f6e66696712530a19696e666f5f7479" . - "70655f7472616e73666f726d6174696f6e7318012001280b322e2e676f6f" . - "676c652e707269766163792e646c702e76322e496e666f54797065547261" . - "6e73666f726d6174696f6e734800124e0a167265636f72645f7472616e73" . - "666f726d6174696f6e7318022001280b322c2e676f6f676c652e70726976" . - "6163792e646c702e76322e5265636f72645472616e73666f726d6174696f" . - "6e73480042100a0e7472616e73666f726d6174696f6e229c060a17507269" . - "6d69746976655472616e73666f726d6174696f6e12430a0e7265706c6163" . - "655f636f6e66696718012001280b32292e676f6f676c652e707269766163" . - "792e646c702e76322e5265706c61636556616c7565436f6e666967480012" . - "3c0a0d7265646163745f636f6e66696718022001280b32232e676f6f676c" . - "652e707269766163792e646c702e76322e526564616374436f6e66696748" . - "00124b0a156368617261637465725f6d61736b5f636f6e66696718032001" . - "280b322a2e676f6f676c652e707269766163792e646c702e76322e436861" . - "7261637465724d61736b436f6e666967480012590a1d63727970746f5f72" . - "65706c6163655f6666785f6670655f636f6e66696718042001280b32302e" . - "676f6f676c652e707269766163792e646c702e76322e43727970746f5265" . - "706c616365466678467065436f6e666967480012560a1b66697865645f73" . - "697a655f6275636b6574696e675f636f6e66696718052001280b322f2e67" . - "6f6f676c652e707269766163792e646c702e76322e466978656453697a65" . - "4275636b6574696e67436f6e666967480012420a106275636b6574696e67" . - "5f636f6e66696718062001280b32262e676f6f676c652e70726976616379" . - "2e646c702e76322e4275636b6574696e67436f6e666967480012590a1d72" . - "65706c6163655f776974685f696e666f5f747970655f636f6e6669671807" . - "2001280b32302e676f6f676c652e707269766163792e646c702e76322e52" . - "65706c61636557697468496e666f54797065436f6e666967480012410a10" . - "74696d655f706172745f636f6e66696718082001280b32252e676f6f676c" . - "652e707269766163792e646c702e76322e54696d6550617274436f6e6669" . - "67480012450a1263727970746f5f686173685f636f6e6669671809200128" . - "0b32272e676f6f676c652e707269766163792e646c702e76322e43727970" . - "746f48617368436f6e666967480012430a11646174655f73686966745f63" . - "6f6e666967180b2001280b32262e676f6f676c652e707269766163792e64" . - "6c702e76322e446174655368696674436f6e666967480042100a0e747261" . - "6e73666f726d6174696f6e22dc010a0e54696d6550617274436f6e666967" . - "12470a0f706172745f746f5f6578747261637418012001280e322e2e676f" . - "6f676c652e707269766163792e646c702e76322e54696d6550617274436f" . - "6e6669672e54696d65506172742280010a0854696d655061727412190a15" . - "54494d455f504152545f554e535045434946494544100012080a04594541" . - "52100112090a054d4f4e5448100212100a0c4441595f4f465f4d4f4e5448" . - "1003120f0a0b4441595f4f465f5745454b100412100a0c5745454b5f4f46" . - "5f594541521005120f0a0b484f55525f4f465f444159100622480a104372" . - "7970746f48617368436f6e66696712340a0a63727970746f5f6b65791801" . - "2001280b32202e676f6f676c652e707269766163792e646c702e76322e43" . - "727970746f4b657922450a125265706c61636556616c7565436f6e666967" . - "122f0a096e65775f76616c756518012001280b321c2e676f6f676c652e70" . - "7269766163792e646c702e76322e56616c7565221b0a195265706c616365" . - "57697468496e666f54797065436f6e666967220e0a0c526564616374436f" . - "6e66696722b6020a0d4368617273546f49676e6f7265121c0a1263686172" . - "6163746572735f746f5f736b69701801200128094800125f0a1b636f6d6d" . - "6f6e5f636861726163746572735f746f5f69676e6f726518022001280e32" . - "382e676f6f676c652e707269766163792e646c702e76322e436861727354" . - "6f49676e6f72652e436f6d6d6f6e4368617273546f49676e6f7265480022" . - "97010a13436f6d6d6f6e4368617273546f49676e6f726512260a22434f4d" . - "4d4f4e5f43484152535f544f5f49474e4f52455f554e5350454349464945" . - "441000120b0a074e554d45524943100112140a10414c5048415f55505045" . - "525f43415345100212140a10414c5048415f4c4f5745525f434153451003" . - "120f0a0b50554e4354554154494f4e1004120e0a0a574849544553504143" . - "451005420c0a0a6368617261637465727322a3010a134368617261637465" . - "724d61736b436f6e66696712190a116d61736b696e675f63686172616374" . - "657218012001280912160a0e6e756d6265725f746f5f6d61736b18022001" . - "280512150a0d726576657273655f6f7264657218032001280812420a1463" . - "6861726163746572735f746f5f69676e6f726518042003280b32242e676f" . - "6f676c652e707269766163792e646c702e76322e4368617273546f49676e" . - "6f72652295010a18466978656453697a654275636b6574696e67436f6e66" . - "696712310a0b6c6f7765725f626f756e6418012001280b321c2e676f6f67" . - "6c652e707269766163792e646c702e76322e56616c756512310a0b757070" . - "65725f626f756e6418022001280b321c2e676f6f676c652e707269766163" . - "792e646c702e76322e56616c756512130a0b6275636b65745f73697a6518" . - "032001280122eb010a0f4275636b6574696e67436f6e666967123e0a0762" . - "75636b65747318012003280b322d2e676f6f676c652e707269766163792e" . - "646c702e76322e4275636b6574696e67436f6e6669672e4275636b65741a" . - "97010a064275636b657412290a036d696e18012001280b321c2e676f6f67" . - "6c652e707269766163792e646c702e76322e56616c756512290a036d6178" . + "6c732e4b4d6170457374696d6174696f6e526573756c742e4b4d61704573" . + "74696d6174696f6e486973746f6772616d4275636b65741a720a1b4b4d61" . + "70457374696d6174696f6e5175617369496456616c75657312360a107175" . + "6173695f6964735f76616c75657318012003280b321c2e676f6f676c652e" . + "707269766163792e646c702e76322e56616c7565121b0a13657374696d61" . + "7465645f616e6f6e796d6974791802200128031afb010a1d4b4d61704573" . + "74696d6174696f6e486973746f6772616d4275636b657412150a0d6d696e" . + "5f616e6f6e796d69747918012001280312150a0d6d61785f616e6f6e796d" . + "69747918022001280312130a0b6275636b65745f73697a65180520012803" . + "127b0a0d6275636b65745f76616c75657318062003280b32642e676f6f67" . + "6c652e707269766163792e646c702e76322e416e616c797a654461746153" . + "6f757263655269736b44657461696c732e4b4d6170457374696d6174696f" . + "6e526573756c742e4b4d6170457374696d6174696f6e5175617369496456" . + "616c756573121a0a126275636b65745f76616c75655f636f756e74180720" . + "01280342080a06726573756c74224c0a0e56616c75654672657175656e63" . + "79122b0a0576616c756518012001280b321c2e676f6f676c652e70726976" . + "6163792e646c702e76322e56616c7565120d0a05636f756e741802200128" . + "0322b3020a0556616c756512170a0d696e74656765725f76616c75651801" . + "20012803480012150a0b666c6f61745f76616c7565180220012801480012" . + "160a0c737472696e675f76616c7565180320012809480012170a0d626f6f" . + "6c65616e5f76616c7565180420012808480012350a0f74696d657374616d" . + "705f76616c756518052001280b321a2e676f6f676c652e70726f746f6275" . + "662e54696d657374616d704800122c0a0a74696d655f76616c7565180620" . + "01280b32162e676f6f676c652e747970652e54696d654f66446179480012" . + "270a0a646174655f76616c756518072001280b32112e676f6f676c652e74" . + "7970652e44617465480012330a116461795f6f665f7765656b5f76616c75" . + "6518082001280e32162e676f6f676c652e747970652e4461794f66576565" . + "6b480042060a047479706522510a0951756f7465496e666f12340a096461" . + "74655f74696d6518022001280b321f2e676f6f676c652e70726976616379" . + "2e646c702e76322e4461746554696d654800420e0a0c7061727365645f71" . + "756f746522df010a084461746554696d65121f0a04646174651801200128" . + "0b32112e676f6f676c652e747970652e44617465122b0a0b6461795f6f66" . + "5f7765656b18022001280e32162e676f6f676c652e747970652e4461794f" . + "665765656b12240a0474696d6518032001280b32162e676f6f676c652e74" . + "7970652e54696d654f66446179123b0a0974696d655f7a6f6e6518042001" . + "280b32282e676f6f676c652e707269766163792e646c702e76322e446174" . + "6554696d652e54696d655a6f6e651a220a0854696d655a6f6e6512160a0e" . + "6f66667365745f6d696e7574657318012001280522c9010a104465696465" . + "6e74696679436f6e66696712530a19696e666f5f747970655f7472616e73" . + "666f726d6174696f6e7318012001280b322e2e676f6f676c652e70726976" . + "6163792e646c702e76322e496e666f547970655472616e73666f726d6174" . + "696f6e734800124e0a167265636f72645f7472616e73666f726d6174696f" . + "6e7318022001280b322c2e676f6f676c652e707269766163792e646c702e" . + "76322e5265636f72645472616e73666f726d6174696f6e73480042100a0e" . + "7472616e73666f726d6174696f6e229c060a175072696d69746976655472" . + "616e73666f726d6174696f6e12430a0e7265706c6163655f636f6e666967" . + "18012001280b32292e676f6f676c652e707269766163792e646c702e7632" . + "2e5265706c61636556616c7565436f6e6669674800123c0a0d7265646163" . + "745f636f6e66696718022001280b32232e676f6f676c652e707269766163" . + "792e646c702e76322e526564616374436f6e6669674800124b0a15636861" . + "7261637465725f6d61736b5f636f6e66696718032001280b322a2e676f6f" . + "676c652e707269766163792e646c702e76322e4368617261637465724d61" . + "736b436f6e666967480012590a1d63727970746f5f7265706c6163655f66" . + "66785f6670655f636f6e66696718042001280b32302e676f6f676c652e70" . + "7269766163792e646c702e76322e43727970746f5265706c616365466678" . + "467065436f6e666967480012560a1b66697865645f73697a655f6275636b" . + "6574696e675f636f6e66696718052001280b322f2e676f6f676c652e7072" . + "69766163792e646c702e76322e466978656453697a654275636b6574696e" . + "67436f6e666967480012420a106275636b6574696e675f636f6e66696718" . + "062001280b32262e676f6f676c652e707269766163792e646c702e76322e" . + "4275636b6574696e67436f6e666967480012590a1d7265706c6163655f77" . + "6974685f696e666f5f747970655f636f6e66696718072001280b32302e67" . + "6f6f676c652e707269766163792e646c702e76322e5265706c6163655769" . + "7468496e666f54797065436f6e666967480012410a1074696d655f706172" . + "745f636f6e66696718082001280b32252e676f6f676c652e707269766163" . + "792e646c702e76322e54696d6550617274436f6e666967480012450a1263" . + "727970746f5f686173685f636f6e66696718092001280b32272e676f6f67" . + "6c652e707269766163792e646c702e76322e43727970746f48617368436f" . + "6e666967480012430a11646174655f73686966745f636f6e666967180b20" . + "01280b32262e676f6f676c652e707269766163792e646c702e76322e4461" . + "74655368696674436f6e666967480042100a0e7472616e73666f726d6174" . + "696f6e22dc010a0e54696d6550617274436f6e66696712470a0f70617274" . + "5f746f5f6578747261637418012001280e322e2e676f6f676c652e707269" . + "766163792e646c702e76322e54696d6550617274436f6e6669672e54696d" . + "65506172742280010a0854696d655061727412190a1554494d455f504152" . + "545f554e535045434946494544100012080a0459454152100112090a054d" . + "4f4e5448100212100a0c4441595f4f465f4d4f4e54481003120f0a0b4441" . + "595f4f465f5745454b100412100a0c5745454b5f4f465f59454152100512" . + "0f0a0b484f55525f4f465f444159100622480a1043727970746f48617368" . + "436f6e66696712340a0a63727970746f5f6b657918012001280b32202e67" . + "6f6f676c652e707269766163792e646c702e76322e43727970746f4b6579" . + "22450a125265706c61636556616c7565436f6e666967122f0a096e65775f" . + "76616c756518012001280b321c2e676f6f676c652e707269766163792e64" . + "6c702e76322e56616c7565221b0a195265706c61636557697468496e666f" . + "54797065436f6e666967220e0a0c526564616374436f6e66696722b6020a" . + "0d4368617273546f49676e6f7265121c0a12636861726163746572735f74" . + "6f5f736b69701801200128094800125f0a1b636f6d6d6f6e5f6368617261" . + "63746572735f746f5f69676e6f726518022001280e32382e676f6f676c65" . + "2e707269766163792e646c702e76322e4368617273546f49676e6f72652e" . + "436f6d6d6f6e4368617273546f49676e6f726548002297010a13436f6d6d" . + "6f6e4368617273546f49676e6f726512260a22434f4d4d4f4e5f43484152" . + "535f544f5f49474e4f52455f554e5350454349464945441000120b0a074e" . + "554d45524943100112140a10414c5048415f55505045525f434153451002" . + "12140a10414c5048415f4c4f5745525f434153451003120f0a0b50554e43" . + "54554154494f4e1004120e0a0a574849544553504143451005420c0a0a63" . + "68617261637465727322a3010a134368617261637465724d61736b436f6e" . + "66696712190a116d61736b696e675f636861726163746572180120012809" . + "12160a0e6e756d6265725f746f5f6d61736b18022001280512150a0d7265" . + "76657273655f6f7264657218032001280812420a14636861726163746572" . + "735f746f5f69676e6f726518042003280b32242e676f6f676c652e707269" . + "766163792e646c702e76322e4368617273546f49676e6f72652295010a18" . + "466978656453697a654275636b6574696e67436f6e66696712310a0b6c6f" . + "7765725f626f756e6418012001280b321c2e676f6f676c652e7072697661" . + "63792e646c702e76322e56616c756512310a0b75707065725f626f756e64" . "18022001280b321c2e676f6f676c652e707269766163792e646c702e7632" . - "2e56616c756512370a117265706c6163656d656e745f76616c7565180320" . - "01280b321c2e676f6f676c652e707269766163792e646c702e76322e5661" . - "6c756522f4030a1943727970746f5265706c616365466678467065436f6e" . - "66696712340a0a63727970746f5f6b657918012001280b32202e676f6f67" . - "6c652e707269766163792e646c702e76322e43727970746f4b6579122f0a" . - "07636f6e7465787418022001280b321e2e676f6f676c652e707269766163" . - "792e646c702e76322e4669656c64496412630a0f636f6d6d6f6e5f616c70" . - "686162657418042001280e32482e676f6f676c652e707269766163792e64" . - "6c702e76322e43727970746f5265706c616365466678467065436f6e6669" . - "672e466678436f6d6d6f6e4e6174697665416c706861626574480012190a" . - "0f637573746f6d5f616c7068616265741805200128094800120f0a057261" . - "6469781806200128054800123c0a13737572726f676174655f696e666f5f" . - "7479706518082001280b321f2e676f6f676c652e707269766163792e646c" . - "702e76322e496e666f547970652294010a17466678436f6d6d6f6e4e6174" . - "697665416c706861626574122a0a264646585f434f4d4d4f4e5f4e415449" . - "56455f414c5048414245545f554e5350454349464945441000120b0a074e" . - "554d455249431001120f0a0b48455841444543494d414c1002121c0a1855" . - "505045525f434153455f414c5048415f4e554d45524943100312110a0d41" . - "4c5048415f4e554d455249431004420a0a08616c70686162657422d8010a" . - "0943727970746f4b6579123e0a097472616e7369656e7418012001280b32" . - "292e676f6f676c652e707269766163792e646c702e76322e5472616e7369" . - "656e7443727970746f4b65794800123e0a09756e77726170706564180220" . - "01280b32292e676f6f676c652e707269766163792e646c702e76322e556e" . - "7772617070656443727970746f4b6579480012410a0b6b6d735f77726170" . - "70656418032001280b322a2e676f6f676c652e707269766163792e646c70" . - "2e76322e4b6d735772617070656443727970746f4b6579480042080a0673" . - "6f7572636522220a125472616e7369656e7443727970746f4b6579120c0a" . - "046e616d6518012001280922210a12556e7772617070656443727970746f" . - "4b6579120b0a036b657918012001280c22430a134b6d7357726170706564" . - "43727970746f4b657912130a0b777261707065645f6b657918012001280c" . - "12170a0f63727970746f5f6b65795f6e616d6518022001280922b8010a0f" . - "446174655368696674436f6e66696712180a1075707065725f626f756e64" . - "5f6461797318012001280512180a106c6f7765725f626f756e645f646179" . - "73180220012805122f0a07636f6e7465787418032001280b321e2e676f6f" . - "676c652e707269766163792e646c702e76322e4669656c64496412360a0a" . - "63727970746f5f6b657918042001280b32202e676f6f676c652e70726976" . - "6163792e646c702e76322e43727970746f4b6579480042080a066d657468" . - "6f64229b020a17496e666f547970655472616e73666f726d6174696f6e73" . - "125e0a0f7472616e73666f726d6174696f6e7318012003280b32452e676f" . - "6f676c652e707269766163792e646c702e76322e496e666f547970655472" . - "616e73666f726d6174696f6e732e496e666f547970655472616e73666f72" . - "6d6174696f6e1a9f010a16496e666f547970655472616e73666f726d6174" . - "696f6e12330a0a696e666f5f747970657318012003280b321f2e676f6f67" . - "6c652e707269766163792e646c702e76322e496e666f5479706512500a18" . - "7072696d69746976655f7472616e73666f726d6174696f6e18022001280b" . - "322e2e676f6f676c652e707269766163792e646c702e76322e5072696d69" . - "746976655472616e73666f726d6174696f6e22bb020a134669656c645472" . - "616e73666f726d6174696f6e122e0a066669656c647318012003280b321e" . - "2e676f6f676c652e707269766163792e646c702e76322e4669656c644964" . - "12390a09636f6e646974696f6e18032001280b32262e676f6f676c652e70" . - "7269766163792e646c702e76322e5265636f7264436f6e646974696f6e12" . - "520a187072696d69746976655f7472616e73666f726d6174696f6e180420" . - "01280b322e2e676f6f676c652e707269766163792e646c702e76322e5072" . - "696d69746976655472616e73666f726d6174696f6e480012530a19696e66" . - "6f5f747970655f7472616e73666f726d6174696f6e7318052001280b322e" . - "2e676f6f676c652e707269766163792e646c702e76322e496e666f547970" . - "655472616e73666f726d6174696f6e73480042100a0e7472616e73666f72" . - "6d6174696f6e22a9010a155265636f72645472616e73666f726d6174696f" . - "6e7312490a156669656c645f7472616e73666f726d6174696f6e73180120" . - "03280b322a2e676f6f676c652e707269766163792e646c702e76322e4669" . - "656c645472616e73666f726d6174696f6e12450a137265636f72645f7375" . - "707072657373696f6e7318022003280b32282e676f6f676c652e70726976" . - "6163792e646c702e76322e5265636f72645375707072657373696f6e224e" . - "0a115265636f72645375707072657373696f6e12390a09636f6e64697469" . - "6f6e18012001280b32262e676f6f676c652e707269766163792e646c702e" . - "76322e5265636f7264436f6e646974696f6e22d2040a0f5265636f726443" . - "6f6e646974696f6e12470a0b65787072657373696f6e7318032001280b32" . - "322e676f6f676c652e707269766163792e646c702e76322e5265636f7264" . - "436f6e646974696f6e2e45787072657373696f6e731aa4010a09436f6e64" . - "6974696f6e122d0a056669656c6418012001280b321e2e676f6f676c652e" . - "707269766163792e646c702e76322e4669656c644964123b0a086f706572" . - "61746f7218032001280e32292e676f6f676c652e707269766163792e646c" . - "702e76322e52656c6174696f6e616c4f70657261746f72122b0a0576616c" . - "756518042001280b321c2e676f6f676c652e707269766163792e646c702e" . - "76322e56616c75651a520a0a436f6e646974696f6e7312440a0a636f6e64" . - "6974696f6e7318012003280b32302e676f6f676c652e707269766163792e" . - "646c702e76322e5265636f7264436f6e646974696f6e2e436f6e64697469" . - "6f6e1afa010a0b45787072657373696f6e73125c0a106c6f676963616c5f" . - "6f70657261746f7218012001280e32422e676f6f676c652e707269766163" . - "792e646c702e76322e5265636f7264436f6e646974696f6e2e4578707265" . - "7373696f6e732e4c6f676963616c4f70657261746f7212470a0a636f6e64" . - "6974696f6e7318032001280b32312e676f6f676c652e707269766163792e" . - "646c702e76322e5265636f7264436f6e646974696f6e2e436f6e64697469" . - "6f6e734800223c0a0f4c6f676963616c4f70657261746f7212200a1c4c4f" . - "474943414c5f4f50455241544f525f554e53504543494649454410001207" . - "0a03414e44100142060a04747970652283010a165472616e73666f726d61" . - "74696f6e4f7665727669657712190a117472616e73666f726d65645f6279" . - "746573180220012803124e0a187472616e73666f726d6174696f6e5f7375" . - "6d6d617269657318032003280b322c2e676f6f676c652e70726976616379" . - "2e646c702e76322e5472616e73666f726d6174696f6e53756d6d61727922" . - "9f050a155472616e73666f726d6174696f6e53756d6d61727912320a0969" . - "6e666f5f7479706518012001280b321f2e676f6f676c652e707269766163" . - "792e646c702e76322e496e666f54797065122d0a056669656c6418022001" . - "280b321e2e676f6f676c652e707269766163792e646c702e76322e466965" . - "6c64496412460a0e7472616e73666f726d6174696f6e18032001280b322e" . - "2e676f6f676c652e707269766163792e646c702e76322e5072696d697469" . - "76655472616e73666f726d6174696f6e12490a156669656c645f7472616e" . - "73666f726d6174696f6e7318052003280b322a2e676f6f676c652e707269" . - "766163792e646c702e76322e4669656c645472616e73666f726d6174696f" . - "6e12410a0f7265636f72645f737570707265737318062001280b32282e67" . - "6f6f676c652e707269766163792e646c702e76322e5265636f7264537570" . - "7072657373696f6e124b0a07726573756c747318042003280b323a2e676f" . - "6f676c652e707269766163792e646c702e76322e5472616e73666f726d61" . - "74696f6e53756d6d6172792e53756d6d617279526573756c7412190a1174" . - "72616e73666f726d65645f62797465731807200128031a84010a0d53756d" . - "6d617279526573756c74120d0a05636f756e7418012001280312530a0463" . - "6f646518022001280e32452e676f6f676c652e707269766163792e646c70" . - "2e76322e5472616e73666f726d6174696f6e53756d6d6172792e5472616e" . - "73666f726d6174696f6e526573756c74436f6465120f0a0764657461696c" . - "73180320012809225e0a185472616e73666f726d6174696f6e526573756c" . - "74436f6465122a0a265452414e53464f524d4154494f4e5f524553554c54" . - "5f434f44455f554e5350454349464945441000120b0a0753554343455353" . - "100112090a054552524f52100222550a085363686564756c65123f0a1a72" . - "6563757272656e63655f706572696f645f6475726174696f6e1801200128" . - "0b32192e676f6f676c652e70726f746f6275662e4475726174696f6e4800" . - "42080a066f7074696f6e22ea010a0f496e737065637454656d706c617465" . - "120c0a046e616d6518012001280912140a0c646973706c61795f6e616d65" . - "18022001280912130a0b6465736372697074696f6e180320012809122f0a" . - "0b6372656174655f74696d6518042001280b321a2e676f6f676c652e7072" . - "6f746f6275662e54696d657374616d70122f0a0b7570646174655f74696d" . - "6518052001280b321a2e676f6f676c652e70726f746f6275662e54696d65" . - "7374616d70123c0a0e696e73706563745f636f6e66696718062001280b32" . - "242e676f6f676c652e707269766163792e646c702e76322e496e73706563" . - "74436f6e66696722f3010a1244656964656e7469667954656d706c617465" . - "120c0a046e616d6518012001280912140a0c646973706c61795f6e616d65" . - "18022001280912130a0b6465736372697074696f6e180320012809122f0a" . - "0b6372656174655f74696d6518042001280b321a2e676f6f676c652e7072" . - "6f746f6275662e54696d657374616d70122f0a0b7570646174655f74696d" . - "6518052001280b321a2e676f6f676c652e70726f746f6275662e54696d65" . - "7374616d7012420a1164656964656e746966795f636f6e66696718062001" . - "280b32272e676f6f676c652e707269766163792e646c702e76322e446569" . - "64656e74696679436f6e666967225c0a054572726f7212230a0764657461" . - "696c7318012001280b32122e676f6f676c652e7270632e53746174757312" . - "2e0a0a74696d657374616d707318022003280b321a2e676f6f676c652e70" . - "726f746f6275662e54696d657374616d7022db040a0a4a6f625472696767" . - "6572120c0a046e616d6518012001280912140a0c646973706c61795f6e61" . - "6d6518022001280912130a0b6465736372697074696f6e18032001280912" . - "3e0a0b696e73706563745f6a6f6218042001280b32272e676f6f676c652e" . - "707269766163792e646c702e76322e496e73706563744a6f62436f6e6669" . - "674800123b0a08747269676765727318052003280b32292e676f6f676c65" . - "2e707269766163792e646c702e76322e4a6f62547269676765722e547269" . - "67676572122c0a066572726f727318062003280b321c2e676f6f676c652e" . - "707269766163792e646c702e76322e4572726f72122f0a0b637265617465" . - "5f74696d6518072001280b321a2e676f6f676c652e70726f746f6275662e" . - "54696d657374616d70122f0a0b7570646174655f74696d6518082001280b" . - "321a2e676f6f676c652e70726f746f6275662e54696d657374616d701231" . - "0a0d6c6173745f72756e5f74696d6518092001280b321a2e676f6f676c65" . - "2e70726f746f6275662e54696d657374616d7012380a0673746174757318" . - "0a2001280e32282e676f6f676c652e707269766163792e646c702e76322e" . - "4a6f62547269676765722e5374617475731a490a07547269676765721233" . - "0a087363686564756c6518012001280b321f2e676f6f676c652e70726976" . - "6163792e646c702e76322e5363686564756c65480042090a077472696767" . - "657222480a0653746174757312160a125354415455535f554e5350454349" . - "464945441000120b0a074845414c5448591001120a0a0650415553454410" . - "02120d0a0943414e43454c4c4544100342050a036a6f62228e020a064163" . - "74696f6e12430a0d736176655f66696e64696e677318012001280b322a2e" . - "676f6f676c652e707269766163792e646c702e76322e416374696f6e2e53" . - "61766546696e64696e6773480012400a077075625f73756218022001280b" . - "322d2e676f6f676c652e707269766163792e646c702e76322e416374696f" . - "6e2e5075626c697368546f50756253756248001a510a0c5361766546696e" . - "64696e677312410a0d6f75747075745f636f6e66696718012001280b322a" . - "2e676f6f676c652e707269766163792e646c702e76322e4f757470757453" . - "746f72616765436f6e6669671a200a0f5075626c697368546f5075625375" . - "62120d0a05746f70696318012001280942080a06616374696f6e2285010a" . - "1c437265617465496e737065637454656d706c6174655265717565737412" . - "0e0a06706172656e7418012001280912400a10696e73706563745f74656d" . - "706c61746518022001280b32262e676f6f676c652e707269766163792e64" . - "6c702e76322e496e737065637454656d706c61746512130a0b74656d706c" . - "6174655f6964180320012809229f010a1c557064617465496e7370656374" . - "54656d706c61746552657175657374120c0a046e616d6518012001280912" . - "400a10696e73706563745f74656d706c61746518022001280b32262e676f" . - "6f676c652e707269766163792e646c702e76322e496e737065637454656d" . - "706c617465122f0a0b7570646174655f6d61736b18032001280b321a2e67" . - "6f6f676c652e70726f746f6275662e4669656c644d61736b22290a194765" . - "74496e737065637454656d706c61746552657175657374120c0a046e616d" . - "6518012001280922540a1b4c697374496e737065637454656d706c617465" . - "7352657175657374120e0a06706172656e7418012001280912120a0a7061" . - "67655f746f6b656e18022001280912110a09706167655f73697a65180320" . - "012805227a0a1c4c697374496e737065637454656d706c61746573526573" . - "706f6e736512410a11696e73706563745f74656d706c6174657318012003" . - "280b32262e676f6f676c652e707269766163792e646c702e76322e496e73" . - "7065637454656d706c61746512170a0f6e6578745f706167655f746f6b65" . - "6e180220012809222c0a1c44656c657465496e737065637454656d706c61" . - "746552657175657374120c0a046e616d6518012001280922750a17437265" . - "6174654a6f625472696767657252657175657374120e0a06706172656e74" . - "18012001280912360a0b6a6f625f7472696767657218022001280b32212e" . + "2e56616c756512130a0b6275636b65745f73697a6518032001280122eb01" . + "0a0f4275636b6574696e67436f6e666967123e0a076275636b6574731801" . + "2003280b322d2e676f6f676c652e707269766163792e646c702e76322e42" . + "75636b6574696e67436f6e6669672e4275636b65741a97010a064275636b" . + "657412290a036d696e18012001280b321c2e676f6f676c652e7072697661" . + "63792e646c702e76322e56616c756512290a036d617818022001280b321c" . + "2e676f6f676c652e707269766163792e646c702e76322e56616c75651237" . + "0a117265706c6163656d656e745f76616c756518032001280b321c2e676f" . + "6f676c652e707269766163792e646c702e76322e56616c756522f4030a19" . + "43727970746f5265706c616365466678467065436f6e66696712340a0a63" . + "727970746f5f6b657918012001280b32202e676f6f676c652e7072697661" . + "63792e646c702e76322e43727970746f4b6579122f0a07636f6e74657874" . + "18022001280b321e2e676f6f676c652e707269766163792e646c702e7632" . + "2e4669656c64496412630a0f636f6d6d6f6e5f616c706861626574180420" . + "01280e32482e676f6f676c652e707269766163792e646c702e76322e4372" . + "7970746f5265706c616365466678467065436f6e6669672e466678436f6d" . + "6d6f6e4e6174697665416c706861626574480012190a0f637573746f6d5f" . + "616c7068616265741805200128094800120f0a0572616469781806200128" . + "054800123c0a13737572726f676174655f696e666f5f7479706518082001" . + "280b321f2e676f6f676c652e707269766163792e646c702e76322e496e66" . + "6f547970652294010a17466678436f6d6d6f6e4e6174697665416c706861" . + "626574122a0a264646585f434f4d4d4f4e5f4e41544956455f414c504841" . + "4245545f554e5350454349464945441000120b0a074e554d455249431001" . + "120f0a0b48455841444543494d414c1002121c0a1855505045525f434153" . + "455f414c5048415f4e554d45524943100312110a0d414c5048415f4e554d" . + "455249431004420a0a08616c70686162657422d8010a0943727970746f4b" . + "6579123e0a097472616e7369656e7418012001280b32292e676f6f676c65" . + "2e707269766163792e646c702e76322e5472616e7369656e744372797074" . + "6f4b65794800123e0a09756e7772617070656418022001280b32292e676f" . + "6f676c652e707269766163792e646c702e76322e556e7772617070656443" . + "727970746f4b6579480012410a0b6b6d735f777261707065641803200128" . + "0b322a2e676f6f676c652e707269766163792e646c702e76322e4b6d7357" . + "72617070656443727970746f4b6579480042080a06736f7572636522220a" . + "125472616e7369656e7443727970746f4b6579120c0a046e616d65180120" . + "01280922210a12556e7772617070656443727970746f4b6579120b0a036b" . + "657918012001280c22430a134b6d735772617070656443727970746f4b65" . + "7912130a0b777261707065645f6b657918012001280c12170a0f63727970" . + "746f5f6b65795f6e616d6518022001280922b8010a0f4461746553686966" . + "74436f6e66696712180a1075707065725f626f756e645f64617973180120" . + "01280512180a106c6f7765725f626f756e645f6461797318022001280512" . + "2f0a07636f6e7465787418032001280b321e2e676f6f676c652e70726976" . + "6163792e646c702e76322e4669656c64496412360a0a63727970746f5f6b" . + "657918042001280b32202e676f6f676c652e707269766163792e646c702e" . + "76322e43727970746f4b6579480042080a066d6574686f64229b020a1749" . + "6e666f547970655472616e73666f726d6174696f6e73125e0a0f7472616e" . + "73666f726d6174696f6e7318012003280b32452e676f6f676c652e707269" . + "766163792e646c702e76322e496e666f547970655472616e73666f726d61" . + "74696f6e732e496e666f547970655472616e73666f726d6174696f6e1a9f" . + "010a16496e666f547970655472616e73666f726d6174696f6e12330a0a69" . + "6e666f5f747970657318012003280b321f2e676f6f676c652e7072697661" . + "63792e646c702e76322e496e666f5479706512500a187072696d69746976" . + "655f7472616e73666f726d6174696f6e18022001280b322e2e676f6f676c" . + "652e707269766163792e646c702e76322e5072696d69746976655472616e" . + "73666f726d6174696f6e22bb020a134669656c645472616e73666f726d61" . + "74696f6e122e0a066669656c647318012003280b321e2e676f6f676c652e" . + "707269766163792e646c702e76322e4669656c64496412390a09636f6e64" . + "6974696f6e18032001280b32262e676f6f676c652e707269766163792e64" . + "6c702e76322e5265636f7264436f6e646974696f6e12520a187072696d69" . + "746976655f7472616e73666f726d6174696f6e18042001280b322e2e676f" . + "6f676c652e707269766163792e646c702e76322e5072696d697469766554" . + "72616e73666f726d6174696f6e480012530a19696e666f5f747970655f74" . + "72616e73666f726d6174696f6e7318052001280b322e2e676f6f676c652e" . + "707269766163792e646c702e76322e496e666f547970655472616e73666f" . + "726d6174696f6e73480042100a0e7472616e73666f726d6174696f6e22a9" . + "010a155265636f72645472616e73666f726d6174696f6e7312490a156669" . + "656c645f7472616e73666f726d6174696f6e7318012003280b322a2e676f" . + "6f676c652e707269766163792e646c702e76322e4669656c645472616e73" . + "666f726d6174696f6e12450a137265636f72645f7375707072657373696f" . + "6e7318022003280b32282e676f6f676c652e707269766163792e646c702e" . + "76322e5265636f72645375707072657373696f6e224e0a115265636f7264" . + "5375707072657373696f6e12390a09636f6e646974696f6e18012001280b" . + "32262e676f6f676c652e707269766163792e646c702e76322e5265636f72" . + "64436f6e646974696f6e22d2040a0f5265636f7264436f6e646974696f6e" . + "12470a0b65787072657373696f6e7318032001280b32322e676f6f676c65" . + "2e707269766163792e646c702e76322e5265636f7264436f6e646974696f" . + "6e2e45787072657373696f6e731aa4010a09436f6e646974696f6e122d0a" . + "056669656c6418012001280b321e2e676f6f676c652e707269766163792e" . + "646c702e76322e4669656c644964123b0a086f70657261746f7218032001" . + "280e32292e676f6f676c652e707269766163792e646c702e76322e52656c" . + "6174696f6e616c4f70657261746f72122b0a0576616c756518042001280b" . + "321c2e676f6f676c652e707269766163792e646c702e76322e56616c7565" . + "1a520a0a436f6e646974696f6e7312440a0a636f6e646974696f6e731801" . + "2003280b32302e676f6f676c652e707269766163792e646c702e76322e52" . + "65636f7264436f6e646974696f6e2e436f6e646974696f6e1afa010a0b45" . + "787072657373696f6e73125c0a106c6f676963616c5f6f70657261746f72" . + "18012001280e32422e676f6f676c652e707269766163792e646c702e7632" . + "2e5265636f7264436f6e646974696f6e2e45787072657373696f6e732e4c" . + "6f676963616c4f70657261746f7212470a0a636f6e646974696f6e731803" . + "2001280b32312e676f6f676c652e707269766163792e646c702e76322e52" . + "65636f7264436f6e646974696f6e2e436f6e646974696f6e734800223c0a" . + "0f4c6f676963616c4f70657261746f7212200a1c4c4f474943414c5f4f50" . + "455241544f525f554e535045434946494544100012070a03414e44100142" . + "060a04747970652283010a165472616e73666f726d6174696f6e4f766572" . + "7669657712190a117472616e73666f726d65645f62797465731802200128" . + "03124e0a187472616e73666f726d6174696f6e5f73756d6d617269657318" . + "032003280b322c2e676f6f676c652e707269766163792e646c702e76322e" . + "5472616e73666f726d6174696f6e53756d6d617279229f050a155472616e" . + "73666f726d6174696f6e53756d6d61727912320a09696e666f5f74797065" . + "18012001280b321f2e676f6f676c652e707269766163792e646c702e7632" . + "2e496e666f54797065122d0a056669656c6418022001280b321e2e676f6f" . + "676c652e707269766163792e646c702e76322e4669656c64496412460a0e" . + "7472616e73666f726d6174696f6e18032001280b322e2e676f6f676c652e" . + "707269766163792e646c702e76322e5072696d69746976655472616e7366" . + "6f726d6174696f6e12490a156669656c645f7472616e73666f726d617469" . + "6f6e7318052003280b322a2e676f6f676c652e707269766163792e646c70" . + "2e76322e4669656c645472616e73666f726d6174696f6e12410a0f726563" . + "6f72645f737570707265737318062001280b32282e676f6f676c652e7072" . + "69766163792e646c702e76322e5265636f72645375707072657373696f6e" . + "124b0a07726573756c747318042003280b323a2e676f6f676c652e707269" . + "766163792e646c702e76322e5472616e73666f726d6174696f6e53756d6d" . + "6172792e53756d6d617279526573756c7412190a117472616e73666f726d" . + "65645f62797465731807200128031a84010a0d53756d6d61727952657375" . + "6c74120d0a05636f756e7418012001280312530a04636f64651802200128" . + "0e32452e676f6f676c652e707269766163792e646c702e76322e5472616e" . + "73666f726d6174696f6e53756d6d6172792e5472616e73666f726d617469" . + "6f6e526573756c74436f6465120f0a0764657461696c7318032001280922" . + "5e0a185472616e73666f726d6174696f6e526573756c74436f6465122a0a" . + "265452414e53464f524d4154494f4e5f524553554c545f434f44455f554e" . + "5350454349464945441000120b0a0753554343455353100112090a054552" . + "524f52100222550a085363686564756c65123f0a1a726563757272656e63" . + "655f706572696f645f6475726174696f6e18012001280b32192e676f6f67" . + "6c652e70726f746f6275662e4475726174696f6e480042080a066f707469" . + "6f6e22ea010a0f496e737065637454656d706c617465120c0a046e616d65" . + "18012001280912140a0c646973706c61795f6e616d651802200128091213" . + "0a0b6465736372697074696f6e180320012809122f0a0b6372656174655f" . + "74696d6518042001280b321a2e676f6f676c652e70726f746f6275662e54" . + "696d657374616d70122f0a0b7570646174655f74696d6518052001280b32" . + "1a2e676f6f676c652e70726f746f6275662e54696d657374616d70123c0a" . + "0e696e73706563745f636f6e66696718062001280b32242e676f6f676c65" . + "2e707269766163792e646c702e76322e496e7370656374436f6e66696722" . + "f3010a1244656964656e7469667954656d706c617465120c0a046e616d65" . + "18012001280912140a0c646973706c61795f6e616d651802200128091213" . + "0a0b6465736372697074696f6e180320012809122f0a0b6372656174655f" . + "74696d6518042001280b321a2e676f6f676c652e70726f746f6275662e54" . + "696d657374616d70122f0a0b7570646174655f74696d6518052001280b32" . + "1a2e676f6f676c652e70726f746f6275662e54696d657374616d7012420a" . + "1164656964656e746966795f636f6e66696718062001280b32272e676f6f" . + "676c652e707269766163792e646c702e76322e44656964656e7469667943" . + "6f6e666967225c0a054572726f7212230a0764657461696c731801200128" . + "0b32122e676f6f676c652e7270632e537461747573122e0a0a74696d6573" . + "74616d707318022003280b321a2e676f6f676c652e70726f746f6275662e" . + "54696d657374616d7022db040a0a4a6f6254726967676572120c0a046e61" . + "6d6518012001280912140a0c646973706c61795f6e616d65180220012809" . + "12130a0b6465736372697074696f6e180320012809123e0a0b696e737065" . + "63745f6a6f6218042001280b32272e676f6f676c652e707269766163792e" . + "646c702e76322e496e73706563744a6f62436f6e6669674800123b0a0874" . + "7269676765727318052003280b32292e676f6f676c652e70726976616379" . + "2e646c702e76322e4a6f62547269676765722e54726967676572122c0a06" . + "6572726f727318062003280b321c2e676f6f676c652e707269766163792e" . + "646c702e76322e4572726f72122f0a0b6372656174655f74696d65180720" . + "01280b321a2e676f6f676c652e70726f746f6275662e54696d657374616d" . + "70122f0a0b7570646174655f74696d6518082001280b321a2e676f6f676c" . + "652e70726f746f6275662e54696d657374616d7012310a0d6c6173745f72" . + "756e5f74696d6518092001280b321a2e676f6f676c652e70726f746f6275" . + "662e54696d657374616d7012380a06737461747573180a2001280e32282e" . "676f6f676c652e707269766163792e646c702e76322e4a6f625472696767" . - "657212120a0a747269676765725f69641803200128092290010a17557064" . - "6174654a6f625472696767657252657175657374120c0a046e616d651801" . - "2001280912360a0b6a6f625f7472696767657218022001280b32212e676f" . - "6f676c652e707269766163792e646c702e76322e4a6f6254726967676572" . - "122f0a0b7570646174655f6d61736b18032001280b321a2e676f6f676c65" . - "2e70726f746f6275662e4669656c644d61736b22240a144765744a6f6254" . - "72696767657252657175657374120c0a046e616d6518012001280922be01" . - "0a13437265617465446c704a6f6252657175657374120e0a06706172656e" . - "74180120012809123e0a0b696e73706563745f6a6f6218022001280b3227" . - "2e676f6f676c652e707269766163792e646c702e76322e496e7370656374" . - "4a6f62436f6e666967480012400a087269736b5f6a6f6218032001280b32" . - "2c2e676f6f676c652e707269766163792e646c702e76322e5269736b416e" . - "616c797369734a6f62436f6e6669674800120e0a066a6f625f6964180420" . - "01280942050a036a6f6222610a164c6973744a6f62547269676765727352" . - "657175657374120e0a06706172656e7418012001280912120a0a70616765" . - "5f746f6b656e18022001280912110a09706167655f73697a651803200128" . - "0512100a086f726465725f6279180420012809226b0a174c6973744a6f62" . - "5472696767657273526573706f6e736512370a0c6a6f625f747269676765" . - "727318012003280b32212e676f6f676c652e707269766163792e646c702e" . - "76322e4a6f625472696767657212170a0f6e6578745f706167655f746f6b" . - "656e18022001280922270a1744656c6574654a6f62547269676765725265" . - "7175657374120c0a046e616d6518012001280922dd010a10496e73706563" . - "744a6f62436f6e666967123c0a0e73746f726167655f636f6e6669671801" . - "2001280b32242e676f6f676c652e707269766163792e646c702e76322e53" . - "746f72616765436f6e666967123c0a0e696e73706563745f636f6e666967" . - "18022001280b32242e676f6f676c652e707269766163792e646c702e7632" . - "2e496e7370656374436f6e666967121d0a15696e73706563745f74656d70" . - "6c6174655f6e616d65180320012809122e0a07616374696f6e7318042003" . - "280b321d2e676f6f676c652e707269766163792e646c702e76322e416374" . - "696f6e22de040a06446c704a6f62120c0a046e616d65180120012809122f" . - "0a047479706518022001280e32212e676f6f676c652e707269766163792e" . - "646c702e76322e446c704a6f625479706512350a05737461746518032001" . - "280e32262e676f6f676c652e707269766163792e646c702e76322e446c70" . - "4a6f622e4a6f625374617465124b0a0c7269736b5f64657461696c731804" . - "2001280b32332e676f6f676c652e707269766163792e646c702e76322e41" . - "6e616c797a6544617461536f757263655269736b44657461696c73480012" . - "4a0a0f696e73706563745f64657461696c7318052001280b322f2e676f6f" . - "676c652e707269766163792e646c702e76322e496e737065637444617461" . - "536f7572636544657461696c734800122f0a0b6372656174655f74696d65" . - "18062001280b321a2e676f6f676c652e70726f746f6275662e54696d6573" . - "74616d70122e0a0a73746172745f74696d6518072001280b321a2e676f6f" . - "676c652e70726f746f6275662e54696d657374616d70122c0a08656e645f" . - "74696d6518082001280b321a2e676f6f676c652e70726f746f6275662e54" . - "696d657374616d7012180a106a6f625f747269676765725f6e616d65180a" . - "20012809122c0a066572726f7273180b2003280b321c2e676f6f676c652e" . - "707269766163792e646c702e76322e4572726f7222630a084a6f62537461" . - "746512190a154a4f425f53544154455f554e535045434946494544100012" . - "0b0a0750454e44494e471001120b0a0752554e4e494e47100212080a0444" . - "4f4e451003120c0a0843414e43454c45441004120a0a064641494c454410" . - "0542090a0764657461696c7322200a10476574446c704a6f625265717565" . - "7374120c0a046e616d65180120012809228c010a124c697374446c704a6f" . - "627352657175657374120e0a06706172656e74180420012809120e0a0666" . - "696c74657218012001280912110a09706167655f73697a65180220012805" . - "12120a0a706167655f746f6b656e180320012809122f0a04747970651805" . - "2001280e32212e676f6f676c652e707269766163792e646c702e76322e44" . - "6c704a6f6254797065225b0a134c697374446c704a6f6273526573706f6e" . - "7365122b0a046a6f627318012003280b321d2e676f6f676c652e70726976" . - "6163792e646c702e76322e446c704a6f6212170a0f6e6578745f70616765" . - "5f746f6b656e18022001280922230a1343616e63656c446c704a6f625265" . - "7175657374120c0a046e616d6518012001280922230a1344656c65746544" . - "6c704a6f6252657175657374120c0a046e616d65180120012809228e010a" . - "1f43726561746544656964656e7469667954656d706c6174655265717565" . - "7374120e0a06706172656e7418012001280912460a1364656964656e7469" . - "66795f74656d706c61746518022001280b32292e676f6f676c652e707269" . - "766163792e646c702e76322e44656964656e7469667954656d706c617465" . - "12130a0b74656d706c6174655f696418032001280922a8010a1f55706461" . - "746544656964656e7469667954656d706c61746552657175657374120c0a" . - "046e616d6518012001280912460a1364656964656e746966795f74656d70" . - "6c61746518022001280b32292e676f6f676c652e707269766163792e646c" . - "702e76322e44656964656e7469667954656d706c617465122f0a0b757064" . - "6174655f6d61736b18032001280b321a2e676f6f676c652e70726f746f62" . - "75662e4669656c644d61736b222c0a1c47657444656964656e7469667954" . - "656d706c61746552657175657374120c0a046e616d651801200128092257" . - "0a1e4c69737444656964656e7469667954656d706c617465735265717565" . - "7374120e0a06706172656e7418012001280912120a0a706167655f746f6b" . - "656e18022001280912110a09706167655f73697a65180320012805228301" . - "0a1f4c69737444656964656e7469667954656d706c61746573526573706f" . - "6e736512470a1464656964656e746966795f74656d706c61746573180120" . - "03280b32292e676f6f676c652e707269766163792e646c702e76322e4465" . - "6964656e7469667954656d706c61746512170a0f6e6578745f706167655f" . - "746f6b656e180220012809222f0a1f44656c65746544656964656e746966" . - "7954656d706c61746552657175657374120c0a046e616d65180120012809" . - "2a4d0a0d436f6e74656e744f7074696f6e12170a13434f4e54454e545f55" . - "4e535045434946494544100012100a0c434f4e54454e545f544558541001" . - "12110a0d434f4e54454e545f494d41474510022a500a13496e666f547970" . - "65537570706f72746564427912190a15454e554d5f545950455f554e5350" . - "454349464945441000120b0a07494e5350454354100112110a0d5249534b" . - "5f414e414c5953495310022abb010a1252656c6174696f6e616c4f706572" . - "61746f7212230a1f52454c4154494f4e414c5f4f50455241544f525f554e" . - "5350454349464945441000120c0a08455155414c5f544f100112100a0c4e" . - "4f545f455155414c5f544f100212100a0c475245415445525f5448414e10" . - "03120d0a094c4553535f5448414e1004121a0a16475245415445525f5448" . - "414e5f4f525f455155414c53100512170a134c4553535f5448414e5f4f52" . - "5f455155414c531006120a0a0645584953545310072a520a0a446c704a6f" . - "6254797065121c0a18444c505f4a4f425f545950455f554e535045434946" . - "4945441000120f0a0b494e53504543545f4a4f42100112150a115249534b" . - "5f414e414c595349535f4a4f42100232fe220a0a446c7053657276696365" . - "12a1010a0e496e7370656374436f6e74656e74122c2e676f6f676c652e70" . - "7269766163792e646c702e76322e496e7370656374436f6e74656e745265" . - "71756573741a2d2e676f6f676c652e707269766163792e646c702e76322e" . - "496e7370656374436f6e74656e74526573706f6e7365223282d3e493022c" . - "22272f76322f7b706172656e743d70726f6a656374732f2a7d2f636f6e74" . - "656e743a696e73706563743a012a1295010a0b526564616374496d616765" . - "12292e676f6f676c652e707269766163792e646c702e76322e5265646163" . - "74496d616765526571756573741a2a2e676f6f676c652e70726976616379" . - "2e646c702e76322e526564616374496d616765526573706f6e7365222f82" . - "d3e493022922242f76322f7b706172656e743d70726f6a656374732f2a7d" . - "2f696d6167653a7265646163743a012a12ad010a1144656964656e746966" . - "79436f6e74656e74122f2e676f6f676c652e707269766163792e646c702e" . - "76322e44656964656e74696679436f6e74656e74526571756573741a302e" . - "676f6f676c652e707269766163792e646c702e76322e44656964656e7469" . - "6679436f6e74656e74526573706f6e7365223582d3e493022f222a2f7632" . - "2f7b706172656e743d70726f6a656374732f2a7d2f636f6e74656e743a64" . - "656964656e746966793a012a12ad010a1152656964656e74696679436f6e" . - "74656e74122f2e676f6f676c652e707269766163792e646c702e76322e52" . - "656964656e74696679436f6e74656e74526571756573741a302e676f6f67" . - "6c652e707269766163792e646c702e76322e52656964656e74696679436f" . - "6e74656e74526573706f6e7365223582d3e493022f222a2f76322f7b7061" . - "72656e743d70726f6a656374732f2a7d2f636f6e74656e743a7265696465" . - "6e746966793a012a1281010a0d4c697374496e666f5479706573122b2e67" . - "6f6f676c652e707269766163792e646c702e76322e4c697374496e666f54" . - "79706573526571756573741a2c2e676f6f676c652e707269766163792e64" . - "6c702e76322e4c697374496e666f5479706573526573706f6e7365221582" . - "d3e493020f120d2f76322f696e666f547970657312dd010a154372656174" . - "65496e737065637454656d706c61746512332e676f6f676c652e70726976" . - "6163792e646c702e76322e437265617465496e737065637454656d706c61" . - "7465526571756573741a262e676f6f676c652e707269766163792e646c70" . - "2e76322e496e737065637454656d706c617465226782d3e4930261222d2f" . - "76322f7b706172656e743d6f7267616e697a6174696f6e732f2a7d2f696e" . - "737065637454656d706c617465733a012a5a2d22282f76322f7b70617265" . - "6e743d70726f6a656374732f2a7d2f696e737065637454656d706c617465" . - "733a012a12dd010a15557064617465496e737065637454656d706c617465" . - "12332e676f6f676c652e707269766163792e646c702e76322e5570646174" . - "65496e737065637454656d706c617465526571756573741a262e676f6f67" . - "6c652e707269766163792e646c702e76322e496e737065637454656d706c" . - "617465226782d3e4930261322d2f76322f7b6e616d653d6f7267616e697a" . - "6174696f6e732f2a2f696e737065637454656d706c617465732f2a7d3a01" . - "2a5a2d32282f76322f7b6e616d653d70726f6a656374732f2a2f696e7370" . - "65637454656d706c617465732f2a7d3a012a12d1010a12476574496e7370" . - "65637454656d706c61746512302e676f6f676c652e707269766163792e64" . - "6c702e76322e476574496e737065637454656d706c617465526571756573" . - "741a262e676f6f676c652e707269766163792e646c702e76322e496e7370" . - "65637454656d706c617465226182d3e493025b122d2f76322f7b6e616d65" . - "3d6f7267616e697a6174696f6e732f2a2f696e737065637454656d706c61" . - "7465732f2a7d5a2a12282f76322f7b6e616d653d70726f6a656374732f2a" . - "2f696e737065637454656d706c617465732f2a7d12e2010a144c69737449" . - "6e737065637454656d706c6174657312322e676f6f676c652e7072697661" . - "63792e646c702e76322e4c697374496e737065637454656d706c61746573" . - "526571756573741a332e676f6f676c652e707269766163792e646c702e76" . - "322e4c697374496e737065637454656d706c61746573526573706f6e7365" . - "226182d3e493025b122d2f76322f7b706172656e743d6f7267616e697a61" . - "74696f6e732f2a7d2f696e737065637454656d706c617465735a2a12282f" . - "76322f7b706172656e743d70726f6a656374732f2a7d2f696e7370656374" . - "54656d706c6174657312c7010a1544656c657465496e737065637454656d" . - "706c61746512332e676f6f676c652e707269766163792e646c702e76322e" . - "44656c657465496e737065637454656d706c617465526571756573741a16" . - "2e676f6f676c652e70726f746f6275662e456d707479226182d3e493025b" . - "2a2d2f76322f7b6e616d653d6f7267616e697a6174696f6e732f2a2f696e" . - "737065637454656d706c617465732f2a7d5a2a2a282f76322f7b6e616d65" . - "3d70726f6a656374732f2a2f696e737065637454656d706c617465732f2a" . - "7d12ec010a1843726561746544656964656e7469667954656d706c617465" . - "12362e676f6f676c652e707269766163792e646c702e76322e4372656174" . - "6544656964656e7469667954656d706c617465526571756573741a292e67" . - "6f6f676c652e707269766163792e646c702e76322e44656964656e746966" . - "7954656d706c617465226d82d3e493026722302f76322f7b706172656e74" . - "3d6f7267616e697a6174696f6e732f2a7d2f64656964656e746966795465" . - "6d706c617465733a012a5a30222b2f76322f7b706172656e743d70726f6a" . - "656374732f2a7d2f64656964656e7469667954656d706c617465733a012a" . - "12ec010a1855706461746544656964656e7469667954656d706c61746512" . - "362e676f6f676c652e707269766163792e646c702e76322e557064617465" . - "44656964656e7469667954656d706c617465526571756573741a292e676f" . - "6f676c652e707269766163792e646c702e76322e44656964656e74696679" . - "54656d706c617465226d82d3e493026732302f76322f7b6e616d653d6f72" . - "67616e697a6174696f6e732f2a2f64656964656e7469667954656d706c61" . - "7465732f2a7d3a012a5a30322b2f76322f7b6e616d653d70726f6a656374" . - "732f2a2f64656964656e7469667954656d706c617465732f2a7d3a012a12" . - "e0010a1547657444656964656e7469667954656d706c61746512332e676f" . - "6f676c652e707269766163792e646c702e76322e47657444656964656e74" . - "69667954656d706c617465526571756573741a292e676f6f676c652e7072" . - "69766163792e646c702e76322e44656964656e7469667954656d706c6174" . - "65226782d3e493026112302f76322f7b6e616d653d6f7267616e697a6174" . - "696f6e732f2a2f64656964656e7469667954656d706c617465732f2a7d5a" . - "2d122b2f76322f7b6e616d653d70726f6a656374732f2a2f64656964656e" . - "7469667954656d706c617465732f2a7d12f1010a174c6973744465696465" . - "6e7469667954656d706c6174657312352e676f6f676c652e707269766163" . - "792e646c702e76322e4c69737444656964656e7469667954656d706c6174" . - "6573526571756573741a362e676f6f676c652e707269766163792e646c70" . - "2e76322e4c69737444656964656e7469667954656d706c61746573526573" . - "706f6e7365226782d3e493026112302f76322f7b706172656e743d6f7267" . - "616e697a6174696f6e732f2a7d2f64656964656e7469667954656d706c61" . - "7465735a2d122b2f76322f7b706172656e743d70726f6a656374732f2a7d" . - "2f64656964656e7469667954656d706c6174657312d3010a1844656c6574" . - "6544656964656e7469667954656d706c61746512362e676f6f676c652e70" . - "7269766163792e646c702e76322e44656c65746544656964656e74696679" . - "54656d706c617465526571756573741a162e676f6f676c652e70726f746f" . - "6275662e456d707479226782d3e49302612a302f76322f7b6e616d653d6f" . - "7267616e697a6174696f6e732f2a2f64656964656e7469667954656d706c" . - "617465732f2a7d5a2d2a2b2f76322f7b6e616d653d70726f6a656374732f" . - "2a2f64656964656e7469667954656d706c617465732f2a7d1295010a1043" . - "72656174654a6f6254726967676572122e2e676f6f676c652e7072697661" . - "63792e646c702e76322e4372656174654a6f625472696767657252657175" . - "6573741a212e676f6f676c652e707269766163792e646c702e76322e4a6f" . - "6254726967676572222e82d3e493022822232f76322f7b706172656e743d" . - "70726f6a656374732f2a7d2f6a6f6254726967676572733a012a1295010a" . - "105570646174654a6f6254726967676572122e2e676f6f676c652e707269" . - "766163792e646c702e76322e5570646174654a6f62547269676765725265" . - "71756573741a212e676f6f676c652e707269766163792e646c702e76322e" . - "4a6f6254726967676572222e82d3e493022832232f76322f7b6e616d653d" . - "70726f6a656374732f2a2f6a6f6254726967676572732f2a7d3a012a128c" . - "010a0d4765744a6f6254726967676572122b2e676f6f676c652e70726976" . - "6163792e646c702e76322e4765744a6f6254726967676572526571756573" . - "741a212e676f6f676c652e707269766163792e646c702e76322e4a6f6254" . - "726967676572222b82d3e493022512232f76322f7b6e616d653d70726f6a" . - "656374732f2a2f6a6f6254726967676572732f2a7d129d010a0f4c697374" . - "4a6f625472696767657273122d2e676f6f676c652e707269766163792e64" . - "6c702e76322e4c6973744a6f625472696767657273526571756573741a2e" . - "2e676f6f676c652e707269766163792e646c702e76322e4c6973744a6f62" . - "5472696767657273526573706f6e7365222b82d3e493022512232f76322f" . - "7b706172656e743d70726f6a656374732f2a7d2f6a6f6254726967676572" . - "731287010a1044656c6574654a6f6254726967676572122e2e676f6f676c" . - "652e707269766163792e646c702e76322e44656c6574654a6f6254726967" . - "676572526571756573741a162e676f6f676c652e70726f746f6275662e45" . - "6d707479222b82d3e49302252a232f76322f7b6e616d653d70726f6a6563" . - "74732f2a2f6a6f6254726967676572732f2a7d1285010a0c437265617465" . - "446c704a6f62122a2e676f6f676c652e707269766163792e646c702e7632" . - "2e437265617465446c704a6f62526571756573741a1d2e676f6f676c652e" . - "707269766163792e646c702e76322e446c704a6f62222a82d3e493022422" . - "1f2f76322f7b706172656e743d70726f6a656374732f2a7d2f646c704a6f" . - "62733a012a128d010a0b4c697374446c704a6f627312292e676f6f676c65" . - "2e707269766163792e646c702e76322e4c697374446c704a6f6273526571" . - "756573741a2a2e676f6f676c652e707269766163792e646c702e76322e4c" . - "697374446c704a6f6273526573706f6e7365222782d3e4930221121f2f76" . - "322f7b706172656e743d70726f6a656374732f2a7d2f646c704a6f627312" . - "7c0a09476574446c704a6f6212272e676f6f676c652e707269766163792e" . - "646c702e76322e476574446c704a6f62526571756573741a1d2e676f6f67" . - "6c652e707269766163792e646c702e76322e446c704a6f62222782d3e493" . - "0221121f2f76322f7b6e616d653d70726f6a656374732f2a2f646c704a6f" . - "62732f2a7d127b0a0c44656c657465446c704a6f62122a2e676f6f676c65" . - "2e707269766163792e646c702e76322e44656c657465446c704a6f625265" . - "71756573741a162e676f6f676c652e70726f746f6275662e456d70747922" . - "2782d3e49302212a1f2f76322f7b6e616d653d70726f6a656374732f2a2f" . - "646c704a6f62732f2a7d1285010a0c43616e63656c446c704a6f62122a2e" . - "676f6f676c652e707269766163792e646c702e76322e43616e63656c446c" . - "704a6f62526571756573741a162e676f6f676c652e70726f746f6275662e" . - "456d707479223182d3e493022b22262f76322f7b6e616d653d70726f6a65" . - "6374732f2a2f646c704a6f62732f2a7d3a63616e63656c3a012a428d010a" . - "19636f6d2e676f6f676c652e707269766163792e646c702e76324208446c" . - "7050726f746f50015a38676f6f676c652e676f6c616e672e6f72672f6765" . - "6e70726f746f2f676f6f676c65617069732f707269766163792f646c702f" . - "76323b646c70aa0213476f6f676c652e436c6f75642e446c702e5632ca02" . - "13476f6f676c655c436c6f75645c446c705c5632620670726f746f33" + "65722e5374617475731a490a075472696767657212330a08736368656475" . + "6c6518012001280b321f2e676f6f676c652e707269766163792e646c702e" . + "76322e5363686564756c65480042090a077472696767657222480a065374" . + "6174757312160a125354415455535f554e5350454349464945441000120b" . + "0a074845414c5448591001120a0a065041555345441002120d0a0943414e" . + "43454c4c4544100342050a036a6f6222fd020a06416374696f6e12430a0d" . + "736176655f66696e64696e677318012001280b322a2e676f6f676c652e70" . + "7269766163792e646c702e76322e416374696f6e2e5361766546696e6469" . + "6e6773480012400a077075625f73756218022001280b322d2e676f6f676c" . + "652e707269766163792e646c702e76322e416374696f6e2e5075626c6973" . + "68546f507562537562480012550a177075626c6973685f73756d6d617279" . + "5f746f5f6373636318032001280b32322e676f6f676c652e707269766163" . + "792e646c702e76322e416374696f6e2e5075626c69736853756d6d617279" . + "546f4373636348001a510a0c5361766546696e64696e677312410a0d6f75" . + "747075745f636f6e66696718012001280b322a2e676f6f676c652e707269" . + "766163792e646c702e76322e4f757470757453746f72616765436f6e6669" . + "671a200a0f5075626c697368546f507562537562120d0a05746f70696318" . + "01200128091a160a145075626c69736853756d6d617279546f4373636342" . + "080a06616374696f6e2285010a1c437265617465496e737065637454656d" . + "706c61746552657175657374120e0a06706172656e741801200128091240" . + "0a10696e73706563745f74656d706c61746518022001280b32262e676f6f" . + "676c652e707269766163792e646c702e76322e496e737065637454656d70" . + "6c61746512130a0b74656d706c6174655f6964180320012809229f010a1c" . + "557064617465496e737065637454656d706c61746552657175657374120c" . + "0a046e616d6518012001280912400a10696e73706563745f74656d706c61" . + "746518022001280b32262e676f6f676c652e707269766163792e646c702e" . + "76322e496e737065637454656d706c617465122f0a0b7570646174655f6d" . + "61736b18032001280b321a2e676f6f676c652e70726f746f6275662e4669" . + "656c644d61736b22290a19476574496e737065637454656d706c61746552" . + "657175657374120c0a046e616d6518012001280922540a1b4c697374496e" . + "737065637454656d706c6174657352657175657374120e0a06706172656e" . + "7418012001280912120a0a706167655f746f6b656e18022001280912110a" . + "09706167655f73697a65180320012805227a0a1c4c697374496e73706563" . + "7454656d706c61746573526573706f6e736512410a11696e73706563745f" . + "74656d706c6174657318012003280b32262e676f6f676c652e7072697661" . + "63792e646c702e76322e496e737065637454656d706c61746512170a0f6e" . + "6578745f706167655f746f6b656e180220012809222c0a1c44656c657465" . + "496e737065637454656d706c61746552657175657374120c0a046e616d65" . + "18012001280922750a174372656174654a6f625472696767657252657175" . + "657374120e0a06706172656e7418012001280912360a0b6a6f625f747269" . + "6767657218022001280b32212e676f6f676c652e707269766163792e646c" . + "702e76322e4a6f625472696767657212120a0a747269676765725f696418" . + "03200128092290010a175570646174654a6f625472696767657252657175" . + "657374120c0a046e616d6518012001280912360a0b6a6f625f7472696767" . + "657218022001280b32212e676f6f676c652e707269766163792e646c702e" . + "76322e4a6f6254726967676572122f0a0b7570646174655f6d61736b1803" . + "2001280b321a2e676f6f676c652e70726f746f6275662e4669656c644d61" . + "736b22240a144765744a6f625472696767657252657175657374120c0a04" . + "6e616d6518012001280922be010a13437265617465446c704a6f62526571" . + "75657374120e0a06706172656e74180120012809123e0a0b696e73706563" . + "745f6a6f6218022001280b32272e676f6f676c652e707269766163792e64" . + "6c702e76322e496e73706563744a6f62436f6e666967480012400a087269" . + "736b5f6a6f6218032001280b322c2e676f6f676c652e707269766163792e" . + "646c702e76322e5269736b416e616c797369734a6f62436f6e6669674800" . + "120e0a066a6f625f696418042001280942050a036a6f6222610a164c6973" . + "744a6f62547269676765727352657175657374120e0a06706172656e7418" . + "012001280912120a0a706167655f746f6b656e18022001280912110a0970" . + "6167655f73697a6518032001280512100a086f726465725f627918042001" . + "2809226b0a174c6973744a6f625472696767657273526573706f6e736512" . + "370a0c6a6f625f747269676765727318012003280b32212e676f6f676c65" . + "2e707269766163792e646c702e76322e4a6f625472696767657212170a0f" . + "6e6578745f706167655f746f6b656e18022001280922270a1744656c6574" . + "654a6f625472696767657252657175657374120c0a046e616d6518012001" . + "280922dd010a10496e73706563744a6f62436f6e666967123c0a0e73746f" . + "726167655f636f6e66696718012001280b32242e676f6f676c652e707269" . + "766163792e646c702e76322e53746f72616765436f6e666967123c0a0e69" . + "6e73706563745f636f6e66696718022001280b32242e676f6f676c652e70" . + "7269766163792e646c702e76322e496e7370656374436f6e666967121d0a" . + "15696e73706563745f74656d706c6174655f6e616d65180320012809122e" . + "0a07616374696f6e7318042003280b321d2e676f6f676c652e7072697661" . + "63792e646c702e76322e416374696f6e22de040a06446c704a6f62120c0a" . + "046e616d65180120012809122f0a047479706518022001280e32212e676f" . + "6f676c652e707269766163792e646c702e76322e446c704a6f6254797065" . + "12350a05737461746518032001280e32262e676f6f676c652e7072697661" . + "63792e646c702e76322e446c704a6f622e4a6f625374617465124b0a0c72" . + "69736b5f64657461696c7318042001280b32332e676f6f676c652e707269" . + "766163792e646c702e76322e416e616c797a6544617461536f7572636552" . + "69736b44657461696c734800124a0a0f696e73706563745f64657461696c" . + "7318052001280b322f2e676f6f676c652e707269766163792e646c702e76" . + "322e496e737065637444617461536f7572636544657461696c734800122f" . + "0a0b6372656174655f74696d6518062001280b321a2e676f6f676c652e70" . + "726f746f6275662e54696d657374616d70122e0a0a73746172745f74696d" . + "6518072001280b321a2e676f6f676c652e70726f746f6275662e54696d65" . + "7374616d70122c0a08656e645f74696d6518082001280b321a2e676f6f67" . + "6c652e70726f746f6275662e54696d657374616d7012180a106a6f625f74" . + "7269676765725f6e616d65180a20012809122c0a066572726f7273180b20" . + "03280b321c2e676f6f676c652e707269766163792e646c702e76322e4572" . + "726f7222630a084a6f62537461746512190a154a4f425f53544154455f55" . + "4e5350454349464945441000120b0a0750454e44494e471001120b0a0752" . + "554e4e494e47100212080a04444f4e451003120c0a0843414e43454c4544" . + "1004120a0a064641494c4544100542090a0764657461696c7322200a1047" . + "6574446c704a6f6252657175657374120c0a046e616d6518012001280922" . + "8c010a124c697374446c704a6f627352657175657374120e0a0670617265" . + "6e74180420012809120e0a0666696c74657218012001280912110a097061" . + "67655f73697a6518022001280512120a0a706167655f746f6b656e180320" . + "012809122f0a047479706518052001280e32212e676f6f676c652e707269" . + "766163792e646c702e76322e446c704a6f6254797065225b0a134c697374" . + "446c704a6f6273526573706f6e7365122b0a046a6f627318012003280b32" . + "1d2e676f6f676c652e707269766163792e646c702e76322e446c704a6f62" . + "12170a0f6e6578745f706167655f746f6b656e18022001280922230a1343" . + "616e63656c446c704a6f6252657175657374120c0a046e616d6518012001" . + "280922230a1344656c657465446c704a6f6252657175657374120c0a046e" . + "616d65180120012809228e010a1f43726561746544656964656e74696679" . + "54656d706c61746552657175657374120e0a06706172656e741801200128" . + "0912460a1364656964656e746966795f74656d706c61746518022001280b" . + "32292e676f6f676c652e707269766163792e646c702e76322e4465696465" . + "6e7469667954656d706c61746512130a0b74656d706c6174655f69641803" . + "2001280922a8010a1f55706461746544656964656e7469667954656d706c" . + "61746552657175657374120c0a046e616d6518012001280912460a136465" . + "6964656e746966795f74656d706c61746518022001280b32292e676f6f67" . + "6c652e707269766163792e646c702e76322e44656964656e746966795465" . + "6d706c617465122f0a0b7570646174655f6d61736b18032001280b321a2e" . + "676f6f676c652e70726f746f6275662e4669656c644d61736b222c0a1c47" . + "657444656964656e7469667954656d706c61746552657175657374120c0a" . + "046e616d6518012001280922570a1e4c69737444656964656e7469667954" . + "656d706c6174657352657175657374120e0a06706172656e741801200128" . + "0912120a0a706167655f746f6b656e18022001280912110a09706167655f" . + "73697a651803200128052283010a1f4c69737444656964656e7469667954" . + "656d706c61746573526573706f6e736512470a1464656964656e74696679" . + "5f74656d706c6174657318012003280b32292e676f6f676c652e70726976" . + "6163792e646c702e76322e44656964656e7469667954656d706c61746512" . + "170a0f6e6578745f706167655f746f6b656e180220012809222f0a1f4465" . + "6c65746544656964656e7469667954656d706c6174655265717565737412" . + "0c0a046e616d651801200128092a4d0a0d436f6e74656e744f7074696f6e" . + "12170a13434f4e54454e545f554e535045434946494544100012100a0c43" . + "4f4e54454e545f54455854100112110a0d434f4e54454e545f494d414745" . + "10022a500a13496e666f54797065537570706f72746564427912190a1545" . + "4e554d5f545950455f554e5350454349464945441000120b0a07494e5350" . + "454354100112110a0d5249534b5f414e414c5953495310022abb010a1252" . + "656c6174696f6e616c4f70657261746f7212230a1f52454c4154494f4e41" . + "4c5f4f50455241544f525f554e5350454349464945441000120c0a084551" . + "55414c5f544f100112100a0c4e4f545f455155414c5f544f100212100a0c" . + "475245415445525f5448414e1003120d0a094c4553535f5448414e100412" . + "1a0a16475245415445525f5448414e5f4f525f455155414c53100512170a" . + "134c4553535f5448414e5f4f525f455155414c531006120a0a0645584953" . + "545310072a520a0a446c704a6f6254797065121c0a18444c505f4a4f425f" . + "545950455f554e5350454349464945441000120f0a0b494e53504543545f" . + "4a4f42100112150a115249534b5f414e414c595349535f4a4f42100232fe" . + "220a0a446c705365727669636512a1010a0e496e7370656374436f6e7465" . + "6e74122c2e676f6f676c652e707269766163792e646c702e76322e496e73" . + "70656374436f6e74656e74526571756573741a2d2e676f6f676c652e7072" . + "69766163792e646c702e76322e496e7370656374436f6e74656e74526573" . + "706f6e7365223282d3e493022c22272f76322f7b706172656e743d70726f" . + "6a656374732f2a7d2f636f6e74656e743a696e73706563743a012a129501" . + "0a0b526564616374496d61676512292e676f6f676c652e70726976616379" . + "2e646c702e76322e526564616374496d616765526571756573741a2a2e67" . + "6f6f676c652e707269766163792e646c702e76322e526564616374496d61" . + "6765526573706f6e7365222f82d3e493022922242f76322f7b706172656e" . + "743d70726f6a656374732f2a7d2f696d6167653a7265646163743a012a12" . + "ad010a1144656964656e74696679436f6e74656e74122f2e676f6f676c65" . + "2e707269766163792e646c702e76322e44656964656e74696679436f6e74" . + "656e74526571756573741a302e676f6f676c652e707269766163792e646c" . + "702e76322e44656964656e74696679436f6e74656e74526573706f6e7365" . + "223582d3e493022f222a2f76322f7b706172656e743d70726f6a65637473" . + "2f2a7d2f636f6e74656e743a64656964656e746966793a012a12ad010a11" . + "52656964656e74696679436f6e74656e74122f2e676f6f676c652e707269" . + "766163792e646c702e76322e52656964656e74696679436f6e74656e7452" . + "6571756573741a302e676f6f676c652e707269766163792e646c702e7632" . + "2e52656964656e74696679436f6e74656e74526573706f6e7365223582d3" . + "e493022f222a2f76322f7b706172656e743d70726f6a656374732f2a7d2f" . + "636f6e74656e743a72656964656e746966793a012a1281010a0d4c697374" . + "496e666f5479706573122b2e676f6f676c652e707269766163792e646c70" . + "2e76322e4c697374496e666f5479706573526571756573741a2c2e676f6f" . + "676c652e707269766163792e646c702e76322e4c697374496e666f547970" . + "6573526573706f6e7365221582d3e493020f120d2f76322f696e666f5479" . + "70657312dd010a15437265617465496e737065637454656d706c61746512" . + "332e676f6f676c652e707269766163792e646c702e76322e437265617465" . + "496e737065637454656d706c617465526571756573741a262e676f6f676c" . + "652e707269766163792e646c702e76322e496e737065637454656d706c61" . + "7465226782d3e4930261222d2f76322f7b706172656e743d6f7267616e69" . + "7a6174696f6e732f2a7d2f696e737065637454656d706c617465733a012a" . + "5a2d22282f76322f7b706172656e743d70726f6a656374732f2a7d2f696e" . + "737065637454656d706c617465733a012a12dd010a15557064617465496e" . + "737065637454656d706c61746512332e676f6f676c652e70726976616379" . + "2e646c702e76322e557064617465496e737065637454656d706c61746552" . + "6571756573741a262e676f6f676c652e707269766163792e646c702e7632" . + "2e496e737065637454656d706c617465226782d3e4930261322d2f76322f" . + "7b6e616d653d6f7267616e697a6174696f6e732f2a2f696e737065637454" . + "656d706c617465732f2a7d3a012a5a2d32282f76322f7b6e616d653d7072" . + "6f6a656374732f2a2f696e737065637454656d706c617465732f2a7d3a01" . + "2a12d1010a12476574496e737065637454656d706c61746512302e676f6f" . + "676c652e707269766163792e646c702e76322e476574496e737065637454" . + "656d706c617465526571756573741a262e676f6f676c652e707269766163" . + "792e646c702e76322e496e737065637454656d706c617465226182d3e493" . + "025b122d2f76322f7b6e616d653d6f7267616e697a6174696f6e732f2a2f" . + "696e737065637454656d706c617465732f2a7d5a2a12282f76322f7b6e61" . + "6d653d70726f6a656374732f2a2f696e737065637454656d706c61746573" . + "2f2a7d12e2010a144c697374496e737065637454656d706c617465731232" . + "2e676f6f676c652e707269766163792e646c702e76322e4c697374496e73" . + "7065637454656d706c61746573526571756573741a332e676f6f676c652e" . + "707269766163792e646c702e76322e4c697374496e737065637454656d70" . + "6c61746573526573706f6e7365226182d3e493025b122d2f76322f7b7061" . + "72656e743d6f7267616e697a6174696f6e732f2a7d2f696e737065637454" . + "656d706c617465735a2a12282f76322f7b706172656e743d70726f6a6563" . + "74732f2a7d2f696e737065637454656d706c6174657312c7010a1544656c" . + "657465496e737065637454656d706c61746512332e676f6f676c652e7072" . + "69766163792e646c702e76322e44656c657465496e737065637454656d70" . + "6c617465526571756573741a162e676f6f676c652e70726f746f6275662e" . + "456d707479226182d3e493025b2a2d2f76322f7b6e616d653d6f7267616e" . + "697a6174696f6e732f2a2f696e737065637454656d706c617465732f2a7d" . + "5a2a2a282f76322f7b6e616d653d70726f6a656374732f2a2f696e737065" . + "637454656d706c617465732f2a7d12ec010a184372656174654465696465" . + "6e7469667954656d706c61746512362e676f6f676c652e70726976616379" . + "2e646c702e76322e43726561746544656964656e7469667954656d706c61" . + "7465526571756573741a292e676f6f676c652e707269766163792e646c70" . + "2e76322e44656964656e7469667954656d706c617465226d82d3e4930267" . + "22302f76322f7b706172656e743d6f7267616e697a6174696f6e732f2a7d" . + "2f64656964656e7469667954656d706c617465733a012a5a30222b2f7632" . + "2f7b706172656e743d70726f6a656374732f2a7d2f64656964656e746966" . + "7954656d706c617465733a012a12ec010a1855706461746544656964656e" . + "7469667954656d706c61746512362e676f6f676c652e707269766163792e" . + "646c702e76322e55706461746544656964656e7469667954656d706c6174" . + "65526571756573741a292e676f6f676c652e707269766163792e646c702e" . + "76322e44656964656e7469667954656d706c617465226d82d3e493026732" . + "302f76322f7b6e616d653d6f7267616e697a6174696f6e732f2a2f646569" . + "64656e7469667954656d706c617465732f2a7d3a012a5a30322b2f76322f" . + "7b6e616d653d70726f6a656374732f2a2f64656964656e7469667954656d" . + "706c617465732f2a7d3a012a12e0010a1547657444656964656e74696679" . + "54656d706c61746512332e676f6f676c652e707269766163792e646c702e" . + "76322e47657444656964656e7469667954656d706c617465526571756573" . + "741a292e676f6f676c652e707269766163792e646c702e76322e44656964" . + "656e7469667954656d706c617465226782d3e493026112302f76322f7b6e" . + "616d653d6f7267616e697a6174696f6e732f2a2f64656964656e74696679" . + "54656d706c617465732f2a7d5a2d122b2f76322f7b6e616d653d70726f6a" . + "656374732f2a2f64656964656e7469667954656d706c617465732f2a7d12" . + "f1010a174c69737444656964656e7469667954656d706c6174657312352e" . + "676f6f676c652e707269766163792e646c702e76322e4c69737444656964" . + "656e7469667954656d706c61746573526571756573741a362e676f6f676c" . + "652e707269766163792e646c702e76322e4c69737444656964656e746966" . + "7954656d706c61746573526573706f6e7365226782d3e493026112302f76" . + "322f7b706172656e743d6f7267616e697a6174696f6e732f2a7d2f646569" . + "64656e7469667954656d706c617465735a2d122b2f76322f7b706172656e" . + "743d70726f6a656374732f2a7d2f64656964656e7469667954656d706c61" . + "74657312d3010a1844656c65746544656964656e7469667954656d706c61" . + "746512362e676f6f676c652e707269766163792e646c702e76322e44656c" . + "65746544656964656e7469667954656d706c617465526571756573741a16" . + "2e676f6f676c652e70726f746f6275662e456d707479226782d3e4930261" . + "2a302f76322f7b6e616d653d6f7267616e697a6174696f6e732f2a2f6465" . + "6964656e7469667954656d706c617465732f2a7d5a2d2a2b2f76322f7b6e" . + "616d653d70726f6a656374732f2a2f64656964656e7469667954656d706c" . + "617465732f2a7d1295010a104372656174654a6f6254726967676572122e" . + "2e676f6f676c652e707269766163792e646c702e76322e4372656174654a" . + "6f6254726967676572526571756573741a212e676f6f676c652e70726976" . + "6163792e646c702e76322e4a6f6254726967676572222e82d3e493022822" . + "232f76322f7b706172656e743d70726f6a656374732f2a7d2f6a6f625472" . + "6967676572733a012a1295010a105570646174654a6f6254726967676572" . + "122e2e676f6f676c652e707269766163792e646c702e76322e5570646174" . + "654a6f6254726967676572526571756573741a212e676f6f676c652e7072" . + "69766163792e646c702e76322e4a6f6254726967676572222e82d3e49302" . + "2832232f76322f7b6e616d653d70726f6a656374732f2a2f6a6f62547269" . + "67676572732f2a7d3a012a128c010a0d4765744a6f625472696767657212" . + "2b2e676f6f676c652e707269766163792e646c702e76322e4765744a6f62" . + "54726967676572526571756573741a212e676f6f676c652e707269766163" . + "792e646c702e76322e4a6f6254726967676572222b82d3e493022512232f" . + "76322f7b6e616d653d70726f6a656374732f2a2f6a6f6254726967676572" . + "732f2a7d129d010a0f4c6973744a6f625472696767657273122d2e676f6f" . + "676c652e707269766163792e646c702e76322e4c6973744a6f6254726967" . + "67657273526571756573741a2e2e676f6f676c652e707269766163792e64" . + "6c702e76322e4c6973744a6f625472696767657273526573706f6e736522" . + "2b82d3e493022512232f76322f7b706172656e743d70726f6a656374732f" . + "2a7d2f6a6f6254726967676572731287010a1044656c6574654a6f625472" . + "6967676572122e2e676f6f676c652e707269766163792e646c702e76322e" . + "44656c6574654a6f6254726967676572526571756573741a162e676f6f67" . + "6c652e70726f746f6275662e456d707479222b82d3e49302252a232f7632" . + "2f7b6e616d653d70726f6a656374732f2a2f6a6f6254726967676572732f" . + "2a7d1285010a0c437265617465446c704a6f62122a2e676f6f676c652e70" . + "7269766163792e646c702e76322e437265617465446c704a6f6252657175" . + "6573741a1d2e676f6f676c652e707269766163792e646c702e76322e446c" . + "704a6f62222a82d3e4930224221f2f76322f7b706172656e743d70726f6a" . + "656374732f2a7d2f646c704a6f62733a012a128d010a0b4c697374446c70" . + "4a6f627312292e676f6f676c652e707269766163792e646c702e76322e4c" . + "697374446c704a6f6273526571756573741a2a2e676f6f676c652e707269" . + "766163792e646c702e76322e4c697374446c704a6f6273526573706f6e73" . + "65222782d3e4930221121f2f76322f7b706172656e743d70726f6a656374" . + "732f2a7d2f646c704a6f6273127c0a09476574446c704a6f6212272e676f" . + "6f676c652e707269766163792e646c702e76322e476574446c704a6f6252" . + "6571756573741a1d2e676f6f676c652e707269766163792e646c702e7632" . + "2e446c704a6f62222782d3e4930221121f2f76322f7b6e616d653d70726f" . + "6a656374732f2a2f646c704a6f62732f2a7d127b0a0c44656c657465446c" . + "704a6f62122a2e676f6f676c652e707269766163792e646c702e76322e44" . + "656c657465446c704a6f62526571756573741a162e676f6f676c652e7072" . + "6f746f6275662e456d707479222782d3e49302212a1f2f76322f7b6e616d" . + "653d70726f6a656374732f2a2f646c704a6f62732f2a7d1285010a0c4361" . + "6e63656c446c704a6f62122a2e676f6f676c652e707269766163792e646c" . + "702e76322e43616e63656c446c704a6f62526571756573741a162e676f6f" . + "676c652e70726f746f6275662e456d707479223182d3e493022b22262f76" . + "322f7b6e616d653d70726f6a656374732f2a2f646c704a6f62732f2a7d3a" . + "63616e63656c3a012a428d010a19636f6d2e676f6f676c652e7072697661" . + "63792e646c702e76324208446c7050726f746f50015a38676f6f676c652e" . + "676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561706973" . + "2f707269766163792f646c702f76323b646c70aa0213476f6f676c652e43" . + "6c6f75642e446c702e5632ca0213476f6f676c655c436c6f75645c446c70" . + "5c5632620670726f746f33" )); static::$is_initialized = true; diff --git a/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Storage.php b/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Storage.php index 04d86faf3..f52a734f8 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Storage.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/GPBMetadata/Google/Privacy/Dlp/V2/Storage.php @@ -17,11 +17,11 @@ public static function initOnce() { \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0a8e1a0a23676f6f676c652f707269766163792f646c702f76322f73746f" . + "0ac61b0a23676f6f676c652f707269766163792f646c702f76322f73746f" . "726167652e70726f746f1215676f6f676c652e707269766163792e646c70" . "2e76321a1f676f6f676c652f70726f746f6275662f74696d657374616d70" . "2e70726f746f22180a08496e666f54797065120c0a046e616d6518012001" . - "28092296090a0e437573746f6d496e666f5479706512320a09696e666f5f" . + "280922dd090a0e437573746f6d496e666f5479706512320a09696e666f5f" . "7479706518012001280b321f2e676f6f676c652e707269766163792e646c" . "702e76322e496e666f5479706512350a0a6c696b656c69686f6f64180620" . "01280e32212e676f6f676c652e707269766163792e646c702e76322e4c69" . @@ -35,100 +35,106 @@ public static function initOnce() { "6f67617465547970654800124c0a0f646574656374696f6e5f72756c6573" . "18072003280b32332e676f6f676c652e707269766163792e646c702e7632" . "2e437573746f6d496e666f547970652e446574656374696f6e52756c651a" . - "81010a0a44696374696f6e617279124e0a09776f72645f6c697374180120" . + "c8010a0a44696374696f6e617279124e0a09776f72645f6c697374180120" . "01280b32392e676f6f676c652e707269766163792e646c702e76322e4375" . "73746f6d496e666f547970652e44696374696f6e6172792e576f72644c69" . - "737448001a190a08576f72644c697374120d0a05776f7264731801200328" . - "0942080a06736f757263651a180a055265676578120f0a07706174746572" . - "6e1801200128091a0f0a0d537572726f67617465547970651abe040a0d44" . - "6574656374696f6e52756c6512570a0c686f74776f72645f72756c651801" . - "2001280b323f2e676f6f676c652e707269766163792e646c702e76322e43" . - "7573746f6d496e666f547970652e446574656374696f6e52756c652e486f" . - "74776f726452756c6548001a380a0950726f78696d69747912150a0d7769" . - "6e646f775f6265666f726518012001280512140a0c77696e646f775f6166" . - "7465721802200128051a82010a144c696b656c69686f6f6441646a757374" . - "6d656e74123d0a1066697865645f6c696b656c69686f6f6418012001280e" . - "32212e676f6f676c652e707269766163792e646c702e76322e4c696b656c" . - "69686f6f644800121d0a1372656c61746976655f6c696b656c69686f6f64" . - "1802200128054800420c0a0a61646a7573746d656e741a8c020a0b486f74" . - "776f726452756c6512420a0d686f74776f72645f72656765781801200128" . - "0b322b2e676f6f676c652e707269766163792e646c702e76322e43757374" . - "6f6d496e666f547970652e526567657812500a0970726f78696d69747918" . - "022001280b323d2e676f6f676c652e707269766163792e646c702e76322e" . - "437573746f6d496e666f547970652e446574656374696f6e52756c652e50" . - "726f78696d69747912670a156c696b656c69686f6f645f61646a7573746d" . - "656e7418032001280b32482e676f6f676c652e707269766163792e646c70" . - "2e76322e437573746f6d496e666f547970652e446574656374696f6e5275" . - "6c652e4c696b656c69686f6f6441646a7573746d656e7442060a04747970" . - "6542060a047479706522170a074669656c644964120c0a046e616d651801" . - "2001280922370a0b506172746974696f6e496412120a0a70726f6a656374" . - "5f696418022001280912140a0c6e616d6573706163655f69641804200128" . - "09221e0a0e4b696e6445787072657373696f6e120c0a046e616d65180120" . - "0128092281010a104461746173746f72654f7074696f6e7312380a0c7061" . - "72746974696f6e5f696418012001280b32222e676f6f676c652e70726976" . - "6163792e646c702e76322e506172746974696f6e496412330a046b696e64" . - "18022001280b32252e676f6f676c652e707269766163792e646c702e7632" . - "2e4b696e6445787072657373696f6e22c6010a13436c6f756453746f7261" . - "67654f7074696f6e7312440a0866696c655f73657418012001280b32322e" . - "676f6f676c652e707269766163792e646c702e76322e436c6f756453746f" . - "726167654f7074696f6e732e46696c65536574121c0a1462797465735f6c" . - "696d69745f7065725f66696c6518042001280312330a0a66696c655f7479" . - "70657318052003280e321f2e676f6f676c652e707269766163792e646c70" . - "2e76322e46696c65547970651a160a0746696c65536574120b0a0375726c" . - "180120012809228c010a0f42696751756572794f7074696f6e73123d0a0f" . - "7461626c655f7265666572656e636518012001280b32242e676f6f676c65" . - "2e707269766163792e646c702e76322e42696751756572795461626c6512" . - "3a0a126964656e74696679696e675f6669656c647318022003280b321e2e" . - "676f6f676c652e707269766163792e646c702e76322e4669656c64496422" . - "9a040a0d53746f72616765436f6e66696712440a116461746173746f7265" . - "5f6f7074696f6e7318022001280b32272e676f6f676c652e707269766163" . - "792e646c702e76322e4461746173746f72654f7074696f6e734800124b0a" . - "15636c6f75645f73746f726167655f6f7074696f6e7318032001280b322a" . - "2e676f6f676c652e707269766163792e646c702e76322e436c6f75645374" . - "6f726167654f7074696f6e73480012430a116269675f71756572795f6f70" . - "74696f6e7318042001280b32262e676f6f676c652e707269766163792e64" . - "6c702e76322e42696751756572794f7074696f6e734800124c0a0f74696d" . - "657370616e5f636f6e66696718062001280b32332e676f6f676c652e7072" . - "69766163792e646c702e76322e53746f72616765436f6e6669672e54696d" . - "657370616e436f6e6669671ada010a0e54696d657370616e436f6e666967" . - "122e0a0a73746172745f74696d6518012001280b321a2e676f6f676c652e" . - "70726f746f6275662e54696d657374616d70122c0a08656e645f74696d65" . - "18022001280b321a2e676f6f676c652e70726f746f6275662e54696d6573" . - "74616d7012370a0f74696d657374616d705f6669656c6418032001280b32" . - "1e2e676f6f676c652e707269766163792e646c702e76322e4669656c6449" . - "6412310a29656e61626c655f6175746f5f706f70756c6174696f6e5f6f66" . - "5f74696d657370616e5f636f6e66696718042001280842060a0474797065" . - "22600a0b42696751756572794b6579123d0a0f7461626c655f7265666572" . - "656e636518012001280b32242e676f6f676c652e707269766163792e646c" . - "702e76322e42696751756572795461626c6512120a0a726f775f6e756d62" . - "6572180220012803223e0a0c4461746173746f72654b6579122e0a0a656e" . - "746974795f6b657918012001280b321a2e676f6f676c652e707269766163" . - "792e646c702e76322e4b657922bb010a034b657912380a0c706172746974" . - "696f6e5f696418012001280b32222e676f6f676c652e707269766163792e" . - "646c702e76322e506172746974696f6e496412340a047061746818022003" . - "280b32262e676f6f676c652e707269766163792e646c702e76322e4b6579" . - "2e50617468456c656d656e741a440a0b50617468456c656d656e74120c0a" . - "046b696e64180120012809120c0a0269641802200128034800120e0a046e" . - "616d65180320012809480042090a0769645f74797065228e010a09526563" . - "6f72644b6579123c0a0d6461746173746f72655f6b657918022001280b32" . - "232e676f6f676c652e707269766163792e646c702e76322e446174617374" . - "6f72654b65794800123b0a0d6269675f71756572795f6b65791803200128" . - "0b32222e676f6f676c652e707269766163792e646c702e76322e42696751" . - "756572794b6579480042060a047479706522490a0d426967517565727954" . - "61626c6512120a0a70726f6a6563745f696418012001280912120a0a6461" . - "74617365745f696418022001280912100a087461626c655f696418032001" . - "28092a740a0a4c696b656c69686f6f64121a0a164c494b454c49484f4f44" . - "5f554e535045434946494544100012110a0d564552595f554e4c494b454c" . - "591001120c0a08554e4c494b454c591002120c0a08504f535349424c4510" . - "03120a0a064c494b454c591004120f0a0b564552595f4c494b454c591005" . - "2a450a0846696c655479706512190a1546494c455f545950455f554e5350" . - "454349464945441000120f0a0b42494e4152595f46494c451001120d0a09" . - "544558545f46494c451002428f010a19636f6d2e676f6f676c652e707269" . - "766163792e646c702e7632420a446c7053746f7261676550015a38676f6f" . - "676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65" . - "617069732f707269766163792f646c702f76323b646c70aa0213476f6f67" . - "6c652e436c6f75642e446c702e5632ca0213476f6f676c655c436c6f7564" . - "5c446c705c5632620670726f746f33" + "7374480012450a12636c6f75645f73746f726167655f7061746818032001" . + "280b32272e676f6f676c652e707269766163792e646c702e76322e436c6f" . + "756453746f726167655061746848001a190a08576f72644c697374120d0a" . + "05776f72647318012003280942080a06736f757263651a180a0552656765" . + "78120f0a077061747465726e1801200128091a0f0a0d537572726f676174" . + "65547970651abe040a0d446574656374696f6e52756c6512570a0c686f74" . + "776f72645f72756c6518012001280b323f2e676f6f676c652e7072697661" . + "63792e646c702e76322e437573746f6d496e666f547970652e4465746563" . + "74696f6e52756c652e486f74776f726452756c6548001a380a0950726f78" . + "696d69747912150a0d77696e646f775f6265666f72651801200128051214" . + "0a0c77696e646f775f61667465721802200128051a82010a144c696b656c" . + "69686f6f6441646a7573746d656e74123d0a1066697865645f6c696b656c" . + "69686f6f6418012001280e32212e676f6f676c652e707269766163792e64" . + "6c702e76322e4c696b656c69686f6f644800121d0a1372656c6174697665" . + "5f6c696b656c69686f6f641802200128054800420c0a0a61646a7573746d" . + "656e741a8c020a0b486f74776f726452756c6512420a0d686f74776f7264" . + "5f726567657818012001280b322b2e676f6f676c652e707269766163792e" . + "646c702e76322e437573746f6d496e666f547970652e526567657812500a" . + "0970726f78696d69747918022001280b323d2e676f6f676c652e70726976" . + "6163792e646c702e76322e437573746f6d496e666f547970652e44657465" . + "6374696f6e52756c652e50726f78696d69747912670a156c696b656c6968" . + "6f6f645f61646a7573746d656e7418032001280b32482e676f6f676c652e" . + "707269766163792e646c702e76322e437573746f6d496e666f547970652e" . + "446574656374696f6e52756c652e4c696b656c69686f6f6441646a757374" . + "6d656e7442060a047479706542060a047479706522170a074669656c6449" . + "64120c0a046e616d6518012001280922370a0b506172746974696f6e4964" . + "12120a0a70726f6a6563745f696418022001280912140a0c6e616d657370" . + "6163655f6964180420012809221e0a0e4b696e6445787072657373696f6e" . + "120c0a046e616d651801200128092281010a104461746173746f72654f70" . + "74696f6e7312380a0c706172746974696f6e5f696418012001280b32222e" . + "676f6f676c652e707269766163792e646c702e76322e506172746974696f" . + "6e496412330a046b696e6418022001280b32252e676f6f676c652e707269" . + "766163792e646c702e76322e4b696e6445787072657373696f6e22c6010a" . + "13436c6f756453746f726167654f7074696f6e7312440a0866696c655f73" . + "657418012001280b32322e676f6f676c652e707269766163792e646c702e" . + "76322e436c6f756453746f726167654f7074696f6e732e46696c65536574" . + "121c0a1462797465735f6c696d69745f7065725f66696c65180420012803" . + "12330a0a66696c655f747970657318052003280e321f2e676f6f676c652e" . + "707269766163792e646c702e76322e46696c65547970651a160a0746696c" . + "65536574120b0a0375726c18012001280922200a10436c6f756453746f72" . + "61676550617468120c0a047061746818012001280922a0010a0f42696751" . + "756572794f7074696f6e73123d0a0f7461626c655f7265666572656e6365" . + "18012001280b32242e676f6f676c652e707269766163792e646c702e7632" . + "2e42696751756572795461626c65123a0a126964656e74696679696e675f" . + "6669656c647318022003280b321e2e676f6f676c652e707269766163792e" . + "646c702e76322e4669656c64496412120a0a726f77735f6c696d69741803" . + "20012803229a040a0d53746f72616765436f6e66696712440a1164617461" . + "73746f72655f6f7074696f6e7318022001280b32272e676f6f676c652e70" . + "7269766163792e646c702e76322e4461746173746f72654f7074696f6e73" . + "4800124b0a15636c6f75645f73746f726167655f6f7074696f6e73180320" . + "01280b322a2e676f6f676c652e707269766163792e646c702e76322e436c" . + "6f756453746f726167654f7074696f6e73480012430a116269675f717565" . + "72795f6f7074696f6e7318042001280b32262e676f6f676c652e70726976" . + "6163792e646c702e76322e42696751756572794f7074696f6e734800124c" . + "0a0f74696d657370616e5f636f6e66696718062001280b32332e676f6f67" . + "6c652e707269766163792e646c702e76322e53746f72616765436f6e6669" . + "672e54696d657370616e436f6e6669671ada010a0e54696d657370616e43" . + "6f6e666967122e0a0a73746172745f74696d6518012001280b321a2e676f" . + "6f676c652e70726f746f6275662e54696d657374616d70122c0a08656e64" . + "5f74696d6518022001280b321a2e676f6f676c652e70726f746f6275662e" . + "54696d657374616d7012370a0f74696d657374616d705f6669656c641803" . + "2001280b321e2e676f6f676c652e707269766163792e646c702e76322e46" . + "69656c64496412310a29656e61626c655f6175746f5f706f70756c617469" . + "6f6e5f6f665f74696d657370616e5f636f6e66696718042001280842060a" . + "047479706522600a0b42696751756572794b6579123d0a0f7461626c655f" . + "7265666572656e636518012001280b32242e676f6f676c652e7072697661" . + "63792e646c702e76322e42696751756572795461626c6512120a0a726f77" . + "5f6e756d626572180220012803223e0a0c4461746173746f72654b657912" . + "2e0a0a656e746974795f6b657918012001280b321a2e676f6f676c652e70" . + "7269766163792e646c702e76322e4b657922bb010a034b657912380a0c70" . + "6172746974696f6e5f696418012001280b32222e676f6f676c652e707269" . + "766163792e646c702e76322e506172746974696f6e496412340a04706174" . + "6818022003280b32262e676f6f676c652e707269766163792e646c702e76" . + "322e4b65792e50617468456c656d656e741a440a0b50617468456c656d65" . + "6e74120c0a046b696e64180120012809120c0a0269641802200128034800" . + "120e0a046e616d65180320012809480042090a0769645f74797065228e01" . + "0a095265636f72644b6579123c0a0d6461746173746f72655f6b65791802" . + "2001280b32232e676f6f676c652e707269766163792e646c702e76322e44" . + "61746173746f72654b65794800123b0a0d6269675f71756572795f6b6579" . + "18032001280b32222e676f6f676c652e707269766163792e646c702e7632" . + "2e42696751756572794b6579480042060a047479706522490a0d42696751" . + "756572795461626c6512120a0a70726f6a6563745f696418012001280912" . + "120a0a646174617365745f696418022001280912100a087461626c655f69" . + "6418032001280922390a08456e746974794964122d0a056669656c641801" . + "2001280b321e2e676f6f676c652e707269766163792e646c702e76322e46" . + "69656c6449642a740a0a4c696b656c69686f6f64121a0a164c494b454c49" . + "484f4f445f554e535045434946494544100012110a0d564552595f554e4c" . + "494b454c591001120c0a08554e4c494b454c591002120c0a08504f535349" . + "424c451003120a0a064c494b454c591004120f0a0b564552595f4c494b45" . + "4c5910052a450a0846696c655479706512190a1546494c455f545950455f" . + "554e5350454349464945441000120f0a0b42494e4152595f46494c451001" . + "120d0a09544558545f46494c451002428f010a19636f6d2e676f6f676c65" . + "2e707269766163792e646c702e7632420a446c7053746f7261676550015a" . + "38676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f" . + "6f676c65617069732f707269766163792f646c702f76323b646c70aa0213" . + "476f6f676c652e436c6f75642e446c702e5632ca0213476f6f676c655c43" . + "6c6f75645c446c705c5632620670726f746f33" )); static::$is_initialized = true; diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action.php index 7e5bcc187..b39f6a636 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action.php @@ -74,6 +74,32 @@ public function setPubSub($var) return $this; } + /** + * Publish summary to Cloud Security Command Center (Alpha). + * + * Generated from protobuf field .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return \Google\Cloud\Dlp\V2\Action_PublishSummaryToCscc + */ + public function getPublishSummaryToCscc() + { + return $this->readOneof(3); + } + + /** + * Publish summary to Cloud Security Command Center (Alpha). + * + * Generated from protobuf field .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @param \Google\Cloud\Dlp\V2\Action_PublishSummaryToCscc $var + * @return $this + */ + public function setPublishSummaryToCscc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Action_PublishSummaryToCscc::class); + $this->writeOneof(3, $var); + + return $this; + } + /** * @return string */ diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_PublishSummaryToCscc.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_PublishSummaryToCscc.php new file mode 100644 index 000000000..20e3838e2 --- /dev/null +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_PublishSummaryToCscc.php @@ -0,0 +1,34 @@ +google.privacy.dlp.v2.Action.PublishSummaryToCscc + */ +class Action_PublishSummaryToCscc extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce(); + parent::__construct(); + } + +} + diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_SaveFindings.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_SaveFindings.php index 346ca3c4a..604cacbd2 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_SaveFindings.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/Action_SaveFindings.php @@ -10,7 +10,9 @@ /** * If set, the detailed findings will be persisted to the specified - * OutputStorageConfig. Compatible with: Inspect + * OutputStorageConfig. Only a single instance of this action can be + * specified. + * Compatible with: Inspect * * Generated from protobuf message google.privacy.dlp.v2.Action.SaveFindings */ diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/BigQueryOptions.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/BigQueryOptions.php index 6a9f0fbec..df60ea375 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/BigQueryOptions.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/BigQueryOptions.php @@ -28,6 +28,14 @@ class BigQueryOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; */ private $identifying_fields; + /** + * Max number of rows to scan. If the table has more rows than this value, the + * rest of the rows are omitted. If not set, or if set to 0, all rows will be + * scanned. Cannot be used in conjunction with TimespanConfig. + * + * Generated from protobuf field int64 rows_limit = 3; + */ + private $rows_limit = 0; public function __construct() { \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce(); @@ -88,5 +96,35 @@ public function setIdentifyingFields($var) return $this; } + /** + * Max number of rows to scan. If the table has more rows than this value, the + * rest of the rows are omitted. If not set, or if set to 0, all rows will be + * scanned. Cannot be used in conjunction with TimespanConfig. + * + * Generated from protobuf field int64 rows_limit = 3; + * @return int|string + */ + public function getRowsLimit() + { + return $this->rows_limit; + } + + /** + * Max number of rows to scan. If the table has more rows than this value, the + * rest of the rows are omitted. If not set, or if set to 0, all rows will be + * scanned. Cannot be used in conjunction with TimespanConfig. + * + * Generated from protobuf field int64 rows_limit = 3; + * @param int|string $var + * @return $this + */ + public function setRowsLimit($var) + { + GPBUtil::checkInt64($var); + $this->rows_limit = $var; + + return $this; + } + } diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStoragePath.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CloudStoragePath.php similarity index 58% rename from generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStoragePath.php rename to generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CloudStoragePath.php index 5cfc525be..3ebe2b53d 100644 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStoragePath.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CloudStoragePath.php @@ -1,34 +1,36 @@ google.privacy.dlp.v2beta1.CloudStoragePath + * Generated from protobuf message google.privacy.dlp.v2.CloudStoragePath */ class CloudStoragePath extends \Google\Protobuf\Internal\Message { /** - * The url, in the format of `gs://bucket/`. + * A url representing a file or path (no wildcards) in Cloud Storage. + * Example: gs://[BUCKET_NAME]/dictionary.txt * * Generated from protobuf field string path = 1; */ private $path = ''; public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); + \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce(); parent::__construct(); } /** - * The url, in the format of `gs://bucket/`. + * A url representing a file or path (no wildcards) in Cloud Storage. + * Example: gs://[BUCKET_NAME]/dictionary.txt * * Generated from protobuf field string path = 1; * @return string @@ -39,7 +41,8 @@ public function getPath() } /** - * The url, in the format of `gs://bucket/`. + * A url representing a file or path (no wildcards) in Cloud Storage. + * Example: gs://[BUCKET_NAME]/dictionary.txt * * Generated from protobuf field string path = 1; * @param string $var diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CustomInfoType_Dictionary.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CustomInfoType_Dictionary.php index 0aff587ad..465a9ce01 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CustomInfoType_Dictionary.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/CustomInfoType_Dictionary.php @@ -64,6 +64,34 @@ public function setWordList($var) return $this; } + /** + * Newline-delimited file of words in Cloud Storage. Only a single file + * is accepted. + * + * Generated from protobuf field .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return \Google\Cloud\Dlp\V2\CloudStoragePath + */ + public function getCloudStoragePath() + { + return $this->readOneof(3); + } + + /** + * Newline-delimited file of words in Cloud Storage. Only a single file + * is accepted. + * + * Generated from protobuf field .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @param \Google\Cloud\Dlp\V2\CloudStoragePath $var + * @return $this + */ + public function setCloudStoragePath($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStoragePath::class); + $this->writeOneof(3, $var); + + return $this; + } + /** * @return string */ diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/EntityId.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/EntityId.php similarity index 64% rename from generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/EntityId.php rename to generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/EntityId.php index ba06d73c6..4d9e35a19 100644 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/EntityId.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/EntityId.php @@ -1,8 +1,8 @@ google.privacy.dlp.v2beta1.EntityId + * Generated from protobuf message google.privacy.dlp.v2.EntityId */ class EntityId extends \Google\Protobuf\Internal\Message { /** * Composite key indicating which field contains the entity identifier. * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; + * Generated from protobuf field .google.privacy.dlp.v2.FieldId field = 1; */ private $field = null; public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); + \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce(); parent::__construct(); } /** * Composite key indicating which field contains the entity identifier. * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @return \Google\Cloud\Dlp\V2beta1\FieldId + * Generated from protobuf field .google.privacy.dlp.v2.FieldId field = 1; + * @return \Google\Cloud\Dlp\V2\FieldId */ public function getField() { @@ -45,13 +45,13 @@ public function getField() /** * Composite key indicating which field contains the entity identifier. * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var + * Generated from protobuf field .google.privacy.dlp.v2.FieldId field = 1; + * @param \Google\Cloud\Dlp\V2\FieldId $var * @return $this */ public function setField($var) { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); + GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class); $this->field = $var; return $this; diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/FileType.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/FileType.php index 699ff5f86..5b19410ba 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/FileType.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/FileType.php @@ -18,18 +18,18 @@ class FileType */ const FILE_TYPE_UNSPECIFIED = 0; /** - * Includes all file extensions not covered by other types. + * Includes all file extensions not covered by text file types. * * Generated from protobuf enum BINARY_FILE = 1; */ const BINARY_FILE = 1; /** * Included file extensions: - * c, cc, cpp, cxx, c++, cs, css, dart, eml, go, h, hh, hpp, hxx, h++, hs, - * html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json, ocaml, md, mkd, - * markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, rb, rbw, rs, rc, - * scala, sh, sql, tex, txt, asc, text, brf, vcard, vcs, wml, xml, xsl, xsd, - * yml, yaml. + * asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp, + * hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json, + * ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, + * rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml, + * xml, xsl, xsd, yml, yaml. * * Generated from protobuf enum TEXT_FILE = 2; */ diff --git a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/PrivacyMetric_KAnonymityConfig.php b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/PrivacyMetric_KAnonymityConfig.php index ea779263e..b60f5b499 100644 --- a/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/PrivacyMetric_KAnonymityConfig.php +++ b/generated/php/google-cloud-dlp-v2/proto/src/Google/Cloud/Dlp/V2/PrivacyMetric_KAnonymityConfig.php @@ -25,6 +25,20 @@ class PrivacyMetric_KAnonymityConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; */ private $quasi_ids; + /** + * Optional message indicating that multiple rows might be associated to a + * single individual. If the same entity_id is associated to multiple + * quasi-identifier tuples over distict rows, we consider the entire + * collection of tuples as the composite quasi-identifier. This collection + * is a multiset: the order in which the different tuples appear in the + * dataset is ignored, but their frequency is taken into account. + * Important note: a maximum of 1000 rows can be associated to a single + * entity ID. If more rows are associated with the same entity ID, some + * might be ignored. + * + * Generated from protobuf field .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + private $entity_id = null; public function __construct() { \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce(); @@ -65,5 +79,47 @@ public function setQuasiIds($var) return $this; } + /** + * Optional message indicating that multiple rows might be associated to a + * single individual. If the same entity_id is associated to multiple + * quasi-identifier tuples over distict rows, we consider the entire + * collection of tuples as the composite quasi-identifier. This collection + * is a multiset: the order in which the different tuples appear in the + * dataset is ignored, but their frequency is taken into account. + * Important note: a maximum of 1000 rows can be associated to a single + * entity ID. If more rows are associated with the same entity ID, some + * might be ignored. + * + * Generated from protobuf field .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return \Google\Cloud\Dlp\V2\EntityId + */ + public function getEntityId() + { + return $this->entity_id; + } + + /** + * Optional message indicating that multiple rows might be associated to a + * single individual. If the same entity_id is associated to multiple + * quasi-identifier tuples over distict rows, we consider the entire + * collection of tuples as the composite quasi-identifier. This collection + * is a multiset: the order in which the different tuples appear in the + * dataset is ignored, but their frequency is taken into account. + * Important note: a maximum of 1000 rows can be associated to a single + * entity ID. If more rows are associated with the same entity ID, some + * might be ignored. + * + * Generated from protobuf field .google.privacy.dlp.v2.EntityId entity_id = 2; + * @param \Google\Cloud\Dlp\V2\EntityId $var + * @return $this + */ + public function setEntityId($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\EntityId::class); + $this->entity_id = $var; + + return $this; + } + } diff --git a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/DlpServiceClient.php b/generated/php/google-cloud-dlp-v2/src/V2/DlpServiceClient.php similarity index 94% rename from generated/php/google-cloud-dlp-v2/src/Dlp/V2/DlpServiceClient.php rename to generated/php/google-cloud-dlp-v2/src/V2/DlpServiceClient.php index 3076f82ec..015953a20 100644 --- a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/DlpServiceClient.php +++ b/generated/php/google-cloud-dlp-v2/src/V2/DlpServiceClient.php @@ -38,5 +38,5 @@ class DlpServiceClient extends DlpServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see DlpServiceClientImpl} class. + // additions to the generated {@see DlpServiceGapicClient} class. } diff --git a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/Gapic/DlpServiceGapicClient.php b/generated/php/google-cloud-dlp-v2/src/V2/Gapic/DlpServiceGapicClient.php similarity index 94% rename from generated/php/google-cloud-dlp-v2/src/Dlp/V2/Gapic/DlpServiceGapicClient.php rename to generated/php/google-cloud-dlp-v2/src/V2/Gapic/DlpServiceGapicClient.php index 6aeca73d8..55fa73059 100644 --- a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/Gapic/DlpServiceGapicClient.php +++ b/generated/php/google-cloud-dlp-v2/src/V2/Gapic/DlpServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Dlp\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Dlp\V2\ByteContentItem; use Google\Cloud\Dlp\V2\CancelDlpJobRequest; use Google\Cloud\Dlp\V2\ContentItem; @@ -86,8 +86,6 @@ use Google\Cloud\Dlp\V2\UpdateJobTriggerRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients @@ -146,10 +144,11 @@ class DlpServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $organizationNameTemplate; private static $organizationDeidentifyTemplateNameTemplate; private static $projectDeidentifyTemplateNameTemplate; @@ -164,15 +163,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/dlp_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/dlp_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/dlp_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/dlp_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/dlp_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -460,57 +462,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dlp.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Data Loss Prevention (DLP) API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dlp.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_client_config.json b/generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_client_config.json similarity index 100% rename from generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_client_config.json rename to generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_client_config.json diff --git a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_descriptor_config.php b/generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_descriptor_config.php rename to generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_descriptor_config.php diff --git a/generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_rest_client_config.php b/generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-dlp-v2/src/Dlp/V2/resources/dlp_service_rest_client_config.php rename to generated/php/google-cloud-dlp-v2/src/V2/resources/dlp_service_rest_client_config.php diff --git a/generated/php/google-cloud-dlp-v2/tests/unit/Dlp/V2/DlpServiceClientTest.php b/generated/php/google-cloud-dlp-v2/tests/Unit/V2/DlpServiceClientTest.php similarity index 96% rename from generated/php/google-cloud-dlp-v2/tests/unit/Dlp/V2/DlpServiceClientTest.php rename to generated/php/google-cloud-dlp-v2/tests/Unit/V2/DlpServiceClientTest.php index 2aea8a628..3314db755 100644 --- a/generated/php/google-cloud-dlp-v2/tests/unit/Dlp/V2/DlpServiceClientTest.php +++ b/generated/php/google-cloud-dlp-v2/tests/Unit/V2/DlpServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Dlp\V2; +namespace Google\Cloud\Dlp\Tests\Unit\V2; use Google\Cloud\Dlp\V2\DlpServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Dlp\V2\DeidentifyContentResponse; @@ -41,7 +42,7 @@ use Google\Cloud\Dlp\V2\ReidentifyContentResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -63,6 +64,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new DlpServiceClient($options); } @@ -109,12 +116,12 @@ public function inspectContentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -184,12 +191,12 @@ public function redactImageExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -255,12 +262,12 @@ public function deidentifyContentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -326,12 +333,12 @@ public function reidentifyContentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -390,12 +397,12 @@ public function listInfoTypesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -464,12 +471,12 @@ public function createInspectTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -541,12 +548,12 @@ public function updateInspectTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -611,12 +618,12 @@ public function getInspectTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -687,12 +694,12 @@ public function listInspectTemplatesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -757,12 +764,12 @@ public function deleteInspectTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -834,12 +841,12 @@ public function createDeidentifyTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -911,12 +918,12 @@ public function updateDeidentifyTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -988,12 +995,12 @@ public function getDeidentifyTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1067,12 +1074,12 @@ public function listDeidentifyTemplatesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1137,12 +1144,12 @@ public function deleteDeidentifyTemplateExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1212,12 +1219,12 @@ public function createDlpJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1291,12 +1298,12 @@ public function listDlpJobsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1366,12 +1373,12 @@ public function getDlpJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1436,12 +1443,12 @@ public function deleteDlpJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1506,12 +1513,12 @@ public function cancelDlpJobExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1585,12 +1592,12 @@ public function listJobTriggersExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1662,12 +1669,12 @@ public function getJobTriggerExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1732,12 +1739,12 @@ public function deleteJobTriggerExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1809,12 +1816,12 @@ public function updateJobTriggerExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1886,12 +1893,12 @@ public function createJobTriggerExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-dlp-v2beta1/composer.json b/generated/php/google-cloud-dlp-v2beta1/composer.json deleted file mode 100644 index 95892e260..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "dlp/dlp", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "DLP API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Dlp.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Dlp.php deleted file mode 100644 index f4afdc0f6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Dlp.php +++ /dev/null @@ -1,572 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0af47e0a24676f6f676c652f707269766163792f646c702f763262657461" . - "312f646c702e70726f746f121a676f6f676c652e707269766163792e646c" . - "702e763262657461311a23676f6f676c652f6c6f6e6772756e6e696e672f" . - "6f7065726174696f6e732e70726f746f1a28676f6f676c652f7072697661" . - "63792f646c702f763262657461312f73746f726167652e70726f746f1a1b" . - "676f6f676c652f70726f746f6275662f656d7074792e70726f746f1a1f67" . - "6f6f676c652f70726f746f6275662f74696d657374616d702e70726f746f" . - "1a16676f6f676c652f747970652f646174652e70726f746f1a1b676f6f67" . - "6c652f747970652f74696d656f666461792e70726f746f22c7030a0d496e" . - "7370656374436f6e66696712380a0a696e666f5f74797065731801200328" . - "0b32242e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e496e666f54797065123e0a0e6d696e5f6c696b656c69686f6f64180220" . - "01280e32262e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e4c696b656c69686f6f6412140a0c6d61785f66696e64696e677318" . - "032001280512150a0d696e636c7564655f71756f74651804200128081215" . - "0a0d6578636c7564655f747970657318062001280812510a10696e666f5f" . - "747970655f6c696d69747318072003280b32372e676f6f676c652e707269" . - "766163792e646c702e763262657461312e496e7370656374436f6e666967" . - "2e496e666f547970654c696d697412450a11637573746f6d5f696e666f5f" . - "747970657318082003280b322a2e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e437573746f6d496e666f547970651a5e0a0d49" . - "6e666f547970654c696d697412370a09696e666f5f747970651801200128" . - "0b32242e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e496e666f5479706512140a0c6d61785f66696e64696e67731802200128" . - "05222c0a0f4f7065726174696f6e436f6e66696712190a116d61785f6974" . - "656d5f66696e64696e6773180120012803227d0a0b436f6e74656e744974" . - "656d120c0a0474797065180120012809120e0a046461746118022001280c" . - "4800120f0a0576616c7565180320012809480012320a057461626c651804" . - "2001280b32212e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e5461626c654800420b0a09646174615f6974656d22ac010a0554" . - "61626c6512340a076865616465727318012003280b32232e676f6f676c65" . - "2e707269766163792e646c702e763262657461312e4669656c6449641233" . - "0a04726f777318022003280b32252e676f6f676c652e707269766163792e" . - "646c702e763262657461312e5461626c652e526f771a380a03526f771231" . - "0a0676616c75657318012003280b32212e676f6f676c652e707269766163" . - "792e646c702e763262657461312e56616c756522620a0d496e7370656374" . - "526573756c7412350a0866696e64696e677318012003280b32232e676f6f" . - "676c652e707269766163792e646c702e763262657461312e46696e64696e" . - "67121a0a1266696e64696e67735f7472756e636174656418022001280822" . - "f6010a0746696e64696e67120d0a0571756f746518012001280912370a09" . - "696e666f5f7479706518022001280b32242e676f6f676c652e7072697661" . - "63792e646c702e763262657461312e496e666f54797065123a0a0a6c696b" . - "656c69686f6f6418032001280e32262e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e4c696b656c69686f6f6412360a086c6f63" . - "6174696f6e18042001280b32242e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e4c6f636174696f6e122f0a0b6372656174655f" . - "74696d6518062001280b321a2e676f6f676c652e70726f746f6275662e54" . - "696d657374616d7022f2020a084c6f636174696f6e12350a0a627974655f" . - "72616e676518012001280b32212e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e52616e6765123a0a0f636f6465706f696e745f" . - "72616e676518022001280b32212e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e52616e6765123e0a0b696d6167655f626f7865" . - "7318032003280b32292e676f6f676c652e707269766163792e646c702e76" . - "3262657461312e496d6167654c6f636174696f6e12390a0a7265636f7264" . - "5f6b657918042001280b32252e676f6f676c652e707269766163792e646c" . - "702e763262657461312e5265636f72644b657912350a086669656c645f69" . - "6418052001280b32232e676f6f676c652e707269766163792e646c702e76" . - "3262657461312e4669656c64496412410a0e7461626c655f6c6f63617469" . - "6f6e18062001280b32292e676f6f676c652e707269766163792e646c702e" . - "763262657461312e5461626c654c6f636174696f6e22220a0d5461626c65" . - "4c6f636174696f6e12110a09726f775f696e64657818012001280322230a" . - "0552616e6765120d0a057374617274180120012803120b0a03656e641802" . - "2001280322490a0d496d6167654c6f636174696f6e120b0a03746f701801" . - "20012805120c0a046c656674180220012805120d0a057769647468180320" . - "012805120e0a0668656967687418042001280522e7040a14526564616374" . - "436f6e74656e745265717565737412410a0e696e73706563745f636f6e66" . - "696718012001280b32292e676f6f676c652e707269766163792e646c702e" . - "763262657461312e496e7370656374436f6e66696712360a056974656d73" . - "18022003280b32272e676f6f676c652e707269766163792e646c702e7632" . - "62657461312e436f6e74656e744974656d12570a0f7265706c6163655f63" . - "6f6e6669677318032003280b323e2e676f6f676c652e707269766163792e" . - "646c702e763262657461312e526564616374436f6e74656e745265717565" . - "73742e5265706c616365436f6e66696712660a17696d6167655f72656461" . - "6374696f6e5f636f6e6669677318042003280b32452e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e526564616374436f6e7465" . - "6e74526571756573742e496d616765526564616374696f6e436f6e666967" . - "1a5e0a0d5265706c616365436f6e66696712370a09696e666f5f74797065" . - "18012001280b32242e676f6f676c652e707269766163792e646c702e7632" . - "62657461312e496e666f5479706512140a0c7265706c6163655f77697468" . - "1802200128091ab2010a14496d616765526564616374696f6e436f6e6669" . - "6712390a09696e666f5f7479706518012001280b32242e676f6f676c652e" . - "707269766163792e646c702e763262657461312e496e666f547970654800" . - "12190a0f7265646163745f616c6c5f746578741802200128084800123a0a" . - "0f726564616374696f6e5f636f6c6f7218032001280b32212e676f6f676c" . - "652e707269766163792e646c702e763262657461312e436f6c6f7242080a" . - "0674617267657422310a05436f6c6f72120b0a0372656418012001280212" . - "0d0a05677265656e180220012802120c0a04626c7565180320012802224f" . - "0a15526564616374436f6e74656e74526573706f6e736512360a05697465" . - "6d7318012003280b32272e676f6f676c652e707269766163792e646c702e" . - "763262657461312e436f6e74656e744974656d22de010a1844656964656e" . - "74696679436f6e74656e745265717565737412470a1164656964656e7469" . - "66795f636f6e66696718012001280b322c2e676f6f676c652e7072697661" . - "63792e646c702e763262657461312e44656964656e74696679436f6e6669" . - "6712410a0e696e73706563745f636f6e66696718022001280b32292e676f" . - "6f676c652e707269766163792e646c702e763262657461312e496e737065" . - "6374436f6e66696712360a056974656d7318032003280b32272e676f6f67" . - "6c652e707269766163792e646c702e763262657461312e436f6e74656e74" . - "4974656d229b010a1944656964656e74696679436f6e74656e7452657370" . - "6f6e736512360a056974656d7318012003280b32272e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e436f6e74656e744974656d" . - "12460a0973756d6d617269657318022003280b32332e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e44656964656e7469666963" . - "6174696f6e53756d6d6172792292010a15496e7370656374436f6e74656e" . - "745265717565737412410a0e696e73706563745f636f6e66696718012001" . - "280b32292e676f6f676c652e707269766163792e646c702e763262657461" . - "312e496e7370656374436f6e66696712360a056974656d7318022003280b" . - "32272e676f6f676c652e707269766163792e646c702e763262657461312e" . - "436f6e74656e744974656d22540a16496e7370656374436f6e74656e7452" . - "6573706f6e7365123a0a07726573756c747318012003280b32292e676f6f" . - "676c652e707269766163792e646c702e763262657461312e496e73706563" . - "74526573756c7422b4020a1d437265617465496e73706563744f70657261" . - "74696f6e5265717565737412410a0e696e73706563745f636f6e66696718" . - "012001280b32292e676f6f676c652e707269766163792e646c702e763262" . - "657461312e496e7370656374436f6e66696712410a0e73746f726167655f" . - "636f6e66696718022001280b32292e676f6f676c652e707269766163792e" . - "646c702e763262657461312e53746f72616765436f6e66696712460a0d6f" . - "75747075745f636f6e66696718032001280b322f2e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e4f757470757453746f726167" . - "65436f6e66696712450a106f7065726174696f6e5f636f6e666967180520" . - "01280b322b2e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e4f7065726174696f6e436f6e666967229f010a134f757470757453" . - "746f72616765436f6e666967123a0a057461626c6518012001280b32292e" . - "676f6f676c652e707269766163792e646c702e763262657461312e426967" . - "51756572795461626c65480012440a0c73746f726167655f706174681802" . - "2001280b322c2e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e436c6f756453746f7261676550617468480042060a0474797065" . - "225c0a12496e666f547970655374617469737469637312370a09696e666f" . - "5f7479706518012001280b32242e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e496e666f54797065120d0a05636f756e741802" . - "2001280322b2030a18496e73706563744f7065726174696f6e4d65746164" . - "61746112170a0f70726f6365737365645f6279746573180120012803121d" . - "0a15746f74616c5f657374696d617465645f627974657318042001280312" . - "470a0f696e666f5f747970655f737461747318022003280b322e2e676f6f" . - "676c652e707269766163792e646c702e763262657461312e496e666f5479" . - "706553746174697374696373122f0a0b6372656174655f74696d65180320" . - "01280b321a2e676f6f676c652e70726f746f6275662e54696d657374616d" . - "7012490a16726571756573745f696e73706563745f636f6e666967180520" . - "01280b32292e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e496e7370656374436f6e66696712490a16726571756573745f7374" . - "6f726167655f636f6e66696718062001280b32292e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e53746f72616765436f6e6669" . - "67124e0a15726571756573745f6f75747075745f636f6e66696718072001" . - "280b322f2e676f6f676c652e707269766163792e646c702e763262657461" . - "312e4f757470757453746f72616765436f6e66696722260a16496e737065" . - "63744f7065726174696f6e526573756c74120c0a046e616d651801200128" . - "0922610a1a4c697374496e737065637446696e64696e6773526571756573" . - "74120c0a046e616d6518012001280912110a09706167655f73697a651802" . - "2001280512120a0a706167655f746f6b656e180320012809120e0a066669" . - "6c74657218042001280922710a1b4c697374496e737065637446696e6469" . - "6e6773526573706f6e736512390a06726573756c7418012001280b32292e" . - "676f6f676c652e707269766163792e646c702e763262657461312e496e73" . - "70656374526573756c7412170a0f6e6578745f706167655f746f6b656e18" . - "0220012809227e0a13496e666f547970654465736372697074696f6e120c" . - "0a046e616d6518012001280912140a0c646973706c61795f6e616d651802" . - "2001280912430a0a63617465676f7269657318032003280b322f2e676f6f" . - "676c652e707269766163792e646c702e763262657461312e43617465676f" . - "72794465736372697074696f6e223f0a144c697374496e666f5479706573" . - "5265717565737412100a0863617465676f727918012001280912150a0d6c" . - "616e67756167655f636f6465180220012809225c0a154c697374496e666f" . - "5479706573526573706f6e736512430a0a696e666f5f7479706573180120" . - "03280b322f2e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e496e666f547970654465736372697074696f6e22390a1343617465" . - "676f72794465736372697074696f6e120c0a046e616d6518012001280912" . - "140a0c646973706c61795f6e616d6518022001280922320a194c69737452" . - "6f6f7443617465676f726965735265717565737412150a0d6c616e677561" . - "67655f636f646518012001280922610a1a4c697374526f6f744361746567" . - "6f72696573526573706f6e736512430a0a63617465676f72696573180120" . - "03280b322f2e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e43617465676f72794465736372697074696f6e22a2010a1c416e61" . - "6c797a6544617461536f757263655269736b5265717565737412410a0e70" . - "7269766163795f6d657472696318012001280b32292e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e507269766163794d657472" . - "6963123f0a0c736f757263655f7461626c6518032001280b32292e676f6f" . - "676c652e707269766163792e646c702e763262657461312e426967517565" . - "72795461626c6522c2060a0d507269766163794d657472696312600a166e" . - "756d65726963616c5f73746174735f636f6e66696718012001280b323e2e" . - "676f6f676c652e707269766163792e646c702e763262657461312e507269" . - "766163794d65747269632e4e756d65726963616c5374617473436f6e6669" . - "67480012640a1863617465676f726963616c5f73746174735f636f6e6669" . - "6718022001280b32402e676f6f676c652e707269766163792e646c702e76" . - "3262657461312e507269766163794d65747269632e43617465676f726963" . - "616c5374617473436f6e666967480012580a126b5f616e6f6e796d697479" . - "5f636f6e66696718032001280b323a2e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e507269766163794d65747269632e4b416e" . - "6f6e796d697479436f6e666967480012580a126c5f646976657273697479" . - "5f636f6e66696718042001280b323a2e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e507269766163794d65747269632e4c4469" . - "76657273697479436f6e66696748001a4a0a144e756d65726963616c5374" . - "617473436f6e66696712320a056669656c6418012001280b32232e676f6f" . - "676c652e707269766163792e646c702e763262657461312e4669656c6449" . - "641a4c0a1643617465676f726963616c5374617473436f6e66696712320a" . - "056669656c6418012001280b32232e676f6f676c652e707269766163792e" . - "646c702e763262657461312e4669656c6449641a83010a104b416e6f6e79" . - "6d697479436f6e66696712360a0971756173695f69647318012003280b32" . - "232e676f6f676c652e707269766163792e646c702e763262657461312e46" . - "69656c64496412370a09656e746974795f696418022001280b32242e676f" . - "6f676c652e707269766163792e646c702e763262657461312e456e746974" . - "7949641a8c010a104c446976657273697479436f6e66696712360a097175" . - "6173695f69647318012003280b32232e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e4669656c64496412400a1373656e736974" . - "6976655f61747472696275746518022001280b32232e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e4669656c64496442060a04" . - "7479706522e8010a1d5269736b416e616c797369734f7065726174696f6e" . - "4d65746164617461122f0a0b6372656174655f74696d6518012001280b32" . - "1a2e676f6f676c652e70726f746f6275662e54696d657374616d70124b0a" . - "187265717565737465645f707269766163795f6d65747269631802200128" . - "0b32292e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e507269766163794d657472696312490a167265717565737465645f736f" . - "757263655f7461626c6518032001280b32292e676f6f676c652e70726976" . - "6163792e646c702e763262657461312e42696751756572795461626c6522" . - "eb110a1b5269736b416e616c797369734f7065726174696f6e526573756c" . - "74126e0a166e756d65726963616c5f73746174735f726573756c74180320" . - "01280b324c2e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e5269736b416e616c797369734f7065726174696f6e526573756c74" . - "2e4e756d65726963616c5374617473526573756c74480012720a18636174" . - "65676f726963616c5f73746174735f726573756c7418042001280b324e2e" . - "676f6f676c652e707269766163792e646c702e763262657461312e526973" . - "6b416e616c797369734f7065726174696f6e526573756c742e4361746567" . - "6f726963616c5374617473526573756c74480012660a126b5f616e6f6e79" . - "6d6974795f726573756c7418052001280b32482e676f6f676c652e707269" . - "766163792e646c702e763262657461312e5269736b416e616c797369734f" . - "7065726174696f6e526573756c742e4b416e6f6e796d697479526573756c" . - "74480012660a126c5f6469766572736974795f726573756c741806200128" . - "0b32482e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e5269736b416e616c797369734f7065726174696f6e526573756c742e4c" . - "446976657273697479526573756c7448001abe010a144e756d6572696361" . - "6c5374617473526573756c7412340a096d696e5f76616c75651801200128" . - "0b32212e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e56616c756512340a096d61785f76616c756518022001280b32212e676f" . - "6f676c652e707269766163792e646c702e763262657461312e56616c7565" . - "123a0a0f7175616e74696c655f76616c75657318042003280b32212e676f" . - "6f676c652e707269766163792e646c702e763262657461312e56616c7565" . - "1afa020a1643617465676f726963616c5374617473526573756c74129901" . - "0a2176616c75655f6672657175656e63795f686973746f6772616d5f6275" . - "636b65747318052003280b326e2e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e5269736b416e616c797369734f706572617469" . - "6f6e526573756c742e43617465676f726963616c5374617473526573756c" . - "742e43617465676f726963616c5374617473486973746f6772616d427563" . - "6b65741ac3010a1f43617465676f726963616c5374617473486973746f67" . - "72616d4275636b657412230a1b76616c75655f6672657175656e63795f6c" . - "6f7765725f626f756e6418012001280312230a1b76616c75655f66726571" . - "75656e63795f75707065725f626f756e6418022001280312130a0b627563" . - "6b65745f73697a6518032001280312410a0d6275636b65745f76616c7565" . - "7318042003280b322a2e676f6f676c652e707269766163792e646c702e76" . - "3262657461312e56616c75654672657175656e63791aa6040a104b416e6f" . - "6e796d697479526573756c74128f010a236571756976616c656e63655f63" . - "6c6173735f686973746f6772616d5f6275636b65747318052003280b3262" . - "2e676f6f676c652e707269766163792e646c702e763262657461312e5269" . - "736b416e616c797369734f7065726174696f6e526573756c742e4b416e6f" . - "6e796d697479526573756c742e4b416e6f6e796d697479486973746f6772" . - "616d4275636b65741a790a1a4b416e6f6e796d6974794571756976616c65" . - "6e6365436c617373123b0a1071756173695f6964735f76616c7565731801" . - "2003280b32212e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e56616c7565121e0a166571756976616c656e63655f636c617373" . - "5f73697a651802200128031a84020a194b416e6f6e796d69747948697374" . - "6f6772616d4275636b6574122a0a226571756976616c656e63655f636c61" . - "73735f73697a655f6c6f7765725f626f756e64180120012803122a0a2265" . - "71756976616c656e63655f636c6173735f73697a655f75707065725f626f" . - "756e6418022001280312130a0b6275636b65745f73697a65180320012803" . - "127a0a0d6275636b65745f76616c75657318042003280b32632e676f6f67" . - "6c652e707269766163792e646c702e763262657461312e5269736b416e61" . - "6c797369734f7065726174696f6e526573756c742e4b416e6f6e796d6974" . - "79526573756c742e4b416e6f6e796d6974794571756976616c656e636543" . - "6c6173731aa6050a104c446976657273697479526573756c741297010a2b" . - "73656e7369746976655f76616c75655f6672657175656e63795f68697374" . - "6f6772616d5f6275636b65747318052003280b32622e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e5269736b416e616c797369" . - "734f7065726174696f6e526573756c742e4c446976657273697479526573" . - "756c742e4c446976657273697479486973746f6772616d4275636b65741a" . - "ea010a1a4c4469766572736974794571756976616c656e6365436c617373" . - "123b0a1071756173695f6964735f76616c75657318012003280b32212e67" . - "6f6f676c652e707269766163792e646c702e763262657461312e56616c75" . - "65121e0a166571756976616c656e63655f636c6173735f73697a65180220" . - "01280312250a1d6e756d5f64697374696e63745f73656e7369746976655f" . - "76616c75657318032001280312480a14746f705f73656e7369746976655f" . - "76616c75657318042003280b322a2e676f6f676c652e707269766163792e" . - "646c702e763262657461312e56616c75654672657175656e63791a8a020a" . - "194c446976657273697479486973746f6772616d4275636b6574122d0a25" . - "73656e7369746976655f76616c75655f6672657175656e63795f6c6f7765" . - "725f626f756e64180120012803122d0a2573656e7369746976655f76616c" . - "75655f6672657175656e63795f75707065725f626f756e64180220012803" . - "12130a0b6275636b65745f73697a65180320012803127a0a0d6275636b65" . - "745f76616c75657318042003280b32632e676f6f676c652e707269766163" . - "792e646c702e763262657461312e5269736b416e616c797369734f706572" . - "6174696f6e526573756c742e4c446976657273697479526573756c742e4c" . - "4469766572736974794571756976616c656e6365436c61737342080a0672" . - "6573756c7422510a0e56616c75654672657175656e637912300a0576616c" . - "756518012001280b32212e676f6f676c652e707269766163792e646c702e" . - "763262657461312e56616c7565120d0a05636f756e7418022001280322fe" . - "010a0556616c756512170a0d696e74656765725f76616c75651801200128" . - "03480012150a0b666c6f61745f76616c7565180220012801480012160a0c" . - "737472696e675f76616c7565180320012809480012170a0d626f6f6c6561" . - "6e5f76616c7565180420012808480012350a0f74696d657374616d705f76" . - "616c756518052001280b321a2e676f6f676c652e70726f746f6275662e54" . - "696d657374616d704800122c0a0a74696d655f76616c756518062001280b" . - "32162e676f6f676c652e747970652e54696d654f66446179480012270a0a" . - "646174655f76616c756518072001280b32112e676f6f676c652e74797065" . - "2e44617465480042060a047479706522d3010a1044656964656e74696679" . - "436f6e66696712580a19696e666f5f747970655f7472616e73666f726d61" . - "74696f6e7318012001280b32332e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e496e666f547970655472616e73666f726d6174" . - "696f6e73480012530a167265636f72645f7472616e73666f726d6174696f" . - "6e7318022001280b32312e676f6f676c652e707269766163792e646c702e" . - "763262657461312e5265636f72645472616e73666f726d6174696f6e7348" . - "0042100a0e7472616e73666f726d6174696f6e2284060a175072696d6974" . - "6976655472616e73666f726d6174696f6e12480a0e7265706c6163655f63" . - "6f6e66696718012001280b322e2e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e5265706c61636556616c7565436f6e66696748" . - "0012410a0d7265646163745f636f6e66696718022001280b32282e676f6f" . - "676c652e707269766163792e646c702e763262657461312e526564616374" . - "436f6e666967480012500a156368617261637465725f6d61736b5f636f6e" . - "66696718032001280b322f2e676f6f676c652e707269766163792e646c70" . - "2e763262657461312e4368617261637465724d61736b436f6e6669674800" . - "125e0a1d63727970746f5f7265706c6163655f6666785f6670655f636f6e" . - "66696718042001280b32352e676f6f676c652e707269766163792e646c70" . - "2e763262657461312e43727970746f5265706c616365466678467065436f" . - "6e6669674800125b0a1b66697865645f73697a655f6275636b6574696e67" . - "5f636f6e66696718052001280b32342e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e466978656453697a654275636b6574696e" . - "67436f6e666967480012470a106275636b6574696e675f636f6e66696718" . - "062001280b322b2e676f6f676c652e707269766163792e646c702e763262" . - "657461312e4275636b6574696e67436f6e6669674800125e0a1d7265706c" . - "6163655f776974685f696e666f5f747970655f636f6e6669671807200128" . - "0b32352e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e5265706c61636557697468496e666f54797065436f6e66696748001246" . - "0a1074696d655f706172745f636f6e66696718082001280b322a2e676f6f" . - "676c652e707269766163792e646c702e763262657461312e54696d655061" . - "7274436f6e6669674800124a0a1263727970746f5f686173685f636f6e66" . - "696718092001280b322c2e676f6f676c652e707269766163792e646c702e" . - "763262657461312e43727970746f48617368436f6e666967480042100a0e" . - "7472616e73666f726d6174696f6e22e1010a0e54696d6550617274436f6e" . - "666967124c0a0f706172745f746f5f6578747261637418012001280e3233" . - "2e676f6f676c652e707269766163792e646c702e763262657461312e5469" . - "6d6550617274436f6e6669672e54696d65506172742280010a0854696d65" . - "5061727412190a1554494d455f504152545f554e53504543494649454410" . - "0012080a0459454152100112090a054d4f4e5448100212100a0c4441595f" . - "4f465f4d4f4e54481003120f0a0b4441595f4f465f5745454b100412100a" . - "0c5745454b5f4f465f594541521005120f0a0b484f55525f4f465f444159" . - "1006224d0a1043727970746f48617368436f6e66696712390a0a63727970" . - "746f5f6b657918012001280b32252e676f6f676c652e707269766163792e" . - "646c702e763262657461312e43727970746f4b6579224a0a125265706c61" . - "636556616c7565436f6e66696712340a096e65775f76616c756518012001" . - "280b32212e676f6f676c652e707269766163792e646c702e763262657461" . - "312e56616c7565221b0a195265706c61636557697468496e666f54797065" . - "436f6e666967220e0a0c526564616374436f6e66696722aa020a0d436861" . - "7273546f49676e6f7265121c0a12636861726163746572735f746f5f736b" . - "69701801200128094800125f0a1b636f6d6d6f6e5f636861726163746572" . - "735f746f5f69676e6f726518022001280e32382e676f6f676c652e707269" . - "766163792e646c702e763262657461312e4368617273546f49676e6f7265" . - "2e43686172616374657247726f75704800228b010a0e4368617261637465" . - "7247726f7570121f0a1b4348415241435445525f47524f55505f554e5350" . - "454349464945441000120b0a074e554d45524943100112140a10414c5048" . - "415f55505045525f43415345100212140a10414c5048415f4c4f5745525f" . - "434153451003120f0a0b50554e4354554154494f4e1004120e0a0a574849" . - "544553504143451005420c0a0a6368617261637465727322a8010a134368" . - "617261637465724d61736b436f6e66696712190a116d61736b696e675f63" . - "686172616374657218012001280912160a0e6e756d6265725f746f5f6d61" . - "736b18022001280512150a0d726576657273655f6f726465721803200128" . - "0812470a14636861726163746572735f746f5f69676e6f72651804200328" . - "0b32292e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e4368617273546f49676e6f7265229f010a18466978656453697a654275" . - "636b6574696e67436f6e66696712360a0b6c6f7765725f626f756e641801" . - "2001280b32212e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e56616c756512360a0b75707065725f626f756e6418022001280b" . - "32212e676f6f676c652e707269766163792e646c702e763262657461312e" . - "56616c756512130a0b6275636b65745f73697a6518032001280122ff010a" . - "0f4275636b6574696e67436f6e66696712430a076275636b657473180120" . - "03280b32322e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e4275636b6574696e67436f6e6669672e4275636b65741aa6010a06" . - "4275636b6574122e0a036d696e18012001280b32212e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e56616c7565122e0a036d61" . - "7818022001280b32212e676f6f676c652e707269766163792e646c702e76" . - "3262657461312e56616c7565123c0a117265706c6163656d656e745f7661" . - "6c756518032001280b32212e676f6f676c652e707269766163792e646c70" . - "2e763262657461312e56616c756522c5030a1943727970746f5265706c61" . - "6365466678467065436f6e66696712390a0a63727970746f5f6b65791801" . - "2001280b32252e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e43727970746f4b657912340a07636f6e7465787418022001280b" . - "32232e676f6f676c652e707269766163792e646c702e763262657461312e" . - "4669656c64496412680a0f636f6d6d6f6e5f616c70686162657418042001" . - "280e324d2e676f6f676c652e707269766163792e646c702e763262657461" . - "312e43727970746f5265706c616365466678467065436f6e6669672e4666" . - "78436f6d6d6f6e4e6174697665416c706861626574480012190a0f637573" . - "746f6d5f616c7068616265741805200128094800120f0a05726164697818" . - "062001280548002294010a17466678436f6d6d6f6e4e6174697665416c70" . - "6861626574122a0a264646585f434f4d4d4f4e5f4e41544956455f414c50" . - "48414245545f554e5350454349464945441000120b0a074e554d45524943" . - "1001120f0a0b48455841444543494d414c1002121c0a1855505045525f43" . - "4153455f414c5048415f4e554d45524943100312110a0d414c5048415f4e" . - "554d455249431004420a0a08616c70686162657422e7010a094372797074" . - "6f4b657912430a097472616e7369656e7418012001280b322e2e676f6f67" . - "6c652e707269766163792e646c702e763262657461312e5472616e736965" . - "6e7443727970746f4b6579480012430a09756e7772617070656418022001" . - "280b322e2e676f6f676c652e707269766163792e646c702e763262657461" . - "312e556e7772617070656443727970746f4b6579480012460a0b6b6d735f" . - "7772617070656418032001280b322f2e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e4b6d735772617070656443727970746f4b" . - "6579480042080a06736f7572636522220a125472616e7369656e74437279" . - "70746f4b6579120c0a046e616d6518012001280922210a12556e77726170" . - "70656443727970746f4b6579120b0a036b657918012001280c22430a134b" . - "6d735772617070656443727970746f4b657912130a0b777261707065645f" . - "6b657918012001280c12170a0f63727970746f5f6b65795f6e616d651802" . - "2001280922aa020a17496e666f547970655472616e73666f726d6174696f" . - "6e7312630a0f7472616e73666f726d6174696f6e7318012003280b324a2e" . - "676f6f676c652e707269766163792e646c702e763262657461312e496e66" . - "6f547970655472616e73666f726d6174696f6e732e496e666f5479706554" . - "72616e73666f726d6174696f6e1aa9010a16496e666f547970655472616e" . - "73666f726d6174696f6e12380a0a696e666f5f747970657318012003280b" . - "32242e676f6f676c652e707269766163792e646c702e763262657461312e" . - "496e666f5479706512550a187072696d69746976655f7472616e73666f72" . - "6d6174696f6e18022001280b32332e676f6f676c652e707269766163792e" . - "646c702e763262657461312e5072696d69746976655472616e73666f726d" . - "6174696f6e22cf020a134669656c645472616e73666f726d6174696f6e12" . - "330a066669656c647318012003280b32232e676f6f676c652e7072697661" . - "63792e646c702e763262657461312e4669656c644964123e0a09636f6e64" . - "6974696f6e18032001280b322b2e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e5265636f7264436f6e646974696f6e12570a18" . - "7072696d69746976655f7472616e73666f726d6174696f6e18042001280b" . - "32332e676f6f676c652e707269766163792e646c702e763262657461312e" . - "5072696d69746976655472616e73666f726d6174696f6e480012580a1969" . - "6e666f5f747970655f7472616e73666f726d6174696f6e7318052001280b" . - "32332e676f6f676c652e707269766163792e646c702e763262657461312e" . - "496e666f547970655472616e73666f726d6174696f6e73480042100a0e74" . - "72616e73666f726d6174696f6e22b3010a155265636f72645472616e7366" . - "6f726d6174696f6e73124e0a156669656c645f7472616e73666f726d6174" . - "696f6e7318012003280b322f2e676f6f676c652e707269766163792e646c" . - "702e763262657461312e4669656c645472616e73666f726d6174696f6e12" . - "4a0a137265636f72645f7375707072657373696f6e7318022003280b322d" . - "2e676f6f676c652e707269766163792e646c702e763262657461312e5265" . - "636f72645375707072657373696f6e22530a115265636f72645375707072" . - "657373696f6e123e0a09636f6e646974696f6e18012001280b322b2e676f" . - "6f676c652e707269766163792e646c702e763262657461312e5265636f72" . - "64436f6e646974696f6e22f5040a0f5265636f7264436f6e646974696f6e" . - "124c0a0b65787072657373696f6e7318032001280b32372e676f6f676c65" . - "2e707269766163792e646c702e763262657461312e5265636f7264436f6e" . - "646974696f6e2e45787072657373696f6e731ab3010a09436f6e64697469" . - "6f6e12320a056669656c6418012001280b32232e676f6f676c652e707269" . - "766163792e646c702e763262657461312e4669656c64496412400a086f70" . - "657261746f7218032001280e322e2e676f6f676c652e707269766163792e" . - "646c702e763262657461312e52656c6174696f6e616c4f70657261746f72" . - "12300a0576616c756518042001280b32212e676f6f676c652e7072697661" . - "63792e646c702e763262657461312e56616c75651a570a0a436f6e646974" . - "696f6e7312490a0a636f6e646974696f6e7318012003280b32352e676f6f" . - "676c652e707269766163792e646c702e763262657461312e5265636f7264" . - "436f6e646974696f6e2e436f6e646974696f6e1a84020a0b457870726573" . - "73696f6e7312610a106c6f676963616c5f6f70657261746f721801200128" . - "0e32472e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e5265636f7264436f6e646974696f6e2e45787072657373696f6e732e4c" . - "6f676963616c4f70657261746f72124c0a0a636f6e646974696f6e731803" . - "2001280b32362e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e5265636f7264436f6e646974696f6e2e436f6e646974696f6e73" . - "4800223c0a0f4c6f676963616c4f70657261746f7212200a1c4c4f474943" . - "414c5f4f50455241544f525f554e535045434946494544100012070a0341" . - "4e44100142060a04747970652289010a1744656964656e74696669636174" . - "696f6e53756d6d61727912190a117472616e73666f726d65645f62797465" . - "7318022001280312530a187472616e73666f726d6174696f6e5f73756d6d" . - "617269657318032003280b32312e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e5472616e73666f726d6174696f6e53756d6d61" . - "727922a7050a155472616e73666f726d6174696f6e53756d6d6172791237" . - "0a09696e666f5f7479706518012001280b32242e676f6f676c652e707269" . - "766163792e646c702e763262657461312e496e666f5479706512320a0566" . - "69656c6418022001280b32232e676f6f676c652e707269766163792e646c" . - "702e763262657461312e4669656c644964124b0a0e7472616e73666f726d" . - "6174696f6e18032001280b32332e676f6f676c652e707269766163792e64" . - "6c702e763262657461312e5072696d69746976655472616e73666f726d61" . - "74696f6e124e0a156669656c645f7472616e73666f726d6174696f6e7318" . - "052003280b322f2e676f6f676c652e707269766163792e646c702e763262" . - "657461312e4669656c645472616e73666f726d6174696f6e12460a0f7265" . - "636f72645f737570707265737318062001280b322d2e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e5265636f72645375707072" . - "657373696f6e12500a07726573756c747318042003280b323f2e676f6f67" . - "6c652e707269766163792e646c702e763262657461312e5472616e73666f" . - "726d6174696f6e53756d6d6172792e53756d6d617279526573756c741a89" . - "010a0d53756d6d617279526573756c74120d0a05636f756e741801200128" . - "0312580a04636f646518022001280e324a2e676f6f676c652e7072697661" . - "63792e646c702e763262657461312e5472616e73666f726d6174696f6e53" . - "756d6d6172792e5472616e73666f726d6174696f6e526573756c74436f64" . - "65120f0a0764657461696c73180320012809225e0a185472616e73666f72" . - "6d6174696f6e526573756c74436f6465122a0a265452414e53464f524d41" . - "54494f4e5f524553554c545f434f44455f554e5350454349464945441000" . - "120b0a0753554343455353100112090a054552524f5210022a740a0a4c69" . - "6b656c69686f6f64121a0a164c494b454c49484f4f445f554e5350454349" . - "46494544100012110a0d564552595f554e4c494b454c591001120c0a0855" . - "4e4c494b454c591002120c0a08504f535349424c451003120a0a064c494b" . - "454c591004120f0a0b564552595f4c494b454c5910052abb010a1252656c" . - "6174696f6e616c4f70657261746f7212230a1f52454c4154494f4e414c5f" . - "4f50455241544f525f554e5350454349464945441000120c0a0845515541" . - "4c5f544f100112100a0c4e4f545f455155414c5f544f100212100a0c4752" . - "45415445525f5448414e1003120d0a094c4553535f5448414e1004121a0a" . - "16475245415445525f5448414e5f4f525f455155414c53100512170a134c" . - "4553535f5448414e5f4f525f455155414c531006120a0a06455849535453" . - "100732bc0a0a0a446c7053657276696365129c010a0e496e737065637443" . - "6f6e74656e7412312e676f6f676c652e707269766163792e646c702e7632" . - "62657461312e496e7370656374436f6e74656e74526571756573741a322e" . - "676f6f676c652e707269766163792e646c702e763262657461312e496e73" . - "70656374436f6e74656e74526573706f6e7365222382d3e493021d22182f" . - "763262657461312f636f6e74656e743a696e73706563743a012a1298010a" . - "0d526564616374436f6e74656e7412302e676f6f676c652e707269766163" . - "792e646c702e763262657461312e526564616374436f6e74656e74526571" . - "756573741a312e676f6f676c652e707269766163792e646c702e76326265" . - "7461312e526564616374436f6e74656e74526573706f6e7365222282d3e4" . - "93021c22172f763262657461312f636f6e74656e743a7265646163743a01" . - "2a12a8010a1144656964656e74696679436f6e74656e7412342e676f6f67" . - "6c652e707269766163792e646c702e763262657461312e44656964656e74" . - "696679436f6e74656e74526571756573741a352e676f6f676c652e707269" . - "766163792e646c702e763262657461312e44656964656e74696679436f6e" . - "74656e74526573706f6e7365222682d3e4930220221b2f76326265746131" . - "2f636f6e74656e743a64656964656e746966793a012a129a010a16437265" . - "617465496e73706563744f7065726174696f6e12392e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e437265617465496e737065" . - "63744f7065726174696f6e526571756573741a1d2e676f6f676c652e6c6f" . - "6e6772756e6e696e672e4f7065726174696f6e222682d3e4930220221b2f" . - "763262657461312f696e73706563742f6f7065726174696f6e733a012a12" . - "98010a15416e616c797a6544617461536f757263655269736b12382e676f" . - "6f676c652e707269766163792e646c702e763262657461312e416e616c79" . - "7a6544617461536f757263655269736b526571756573741a1d2e676f6f67" . - "6c652e6c6f6e6772756e6e696e672e4f7065726174696f6e222682d3e493" . - "0220221b2f763262657461312f64617461536f757263653a616e616c797a" . - "653a012a12ba010a134c697374496e737065637446696e64696e67731236" . - "2e676f6f676c652e707269766163792e646c702e763262657461312e4c69" . - "7374496e737065637446696e64696e6773526571756573741a372e676f6f" . - "676c652e707269766163792e646c702e763262657461312e4c697374496e" . - "737065637446696e64696e6773526573706f6e7365223282d3e493022c12" . - "2a2f763262657461312f7b6e616d653d696e73706563742f726573756c74" . - "732f2a7d2f66696e64696e677312ac010a0d4c697374496e666f54797065" . - "7312302e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e4c697374496e666f5479706573526571756573741a312e676f6f676c65" . - "2e707269766163792e646c702e763262657461312e4c697374496e666f54" . - "79706573526573706f6e7365223682d3e4930230122e2f76326265746131" . - "2f726f6f7443617465676f726965732f7b63617465676f72793d2a7d2f69" . - "6e666f547970657312a4010a124c697374526f6f7443617465676f726965" . - "7312352e676f6f676c652e707269766163792e646c702e76326265746131" . - "2e4c697374526f6f7443617465676f72696573526571756573741a362e67" . - "6f6f676c652e707269766163792e646c702e763262657461312e4c697374" . - "526f6f7443617465676f72696573526573706f6e7365221f82d3e4930219" . - "12172f763262657461312f726f6f7443617465676f7269657342a1010a1e" . - "636f6d2e676f6f676c652e707269766163792e646c702e76326265746131" . - "4208446c7050726f746f50015a3d676f6f676c652e676f6c616e672e6f72" . - "672f67656e70726f746f2f676f6f676c65617069732f707269766163792f" . - "646c702f763262657461313b646c70aa0218476f6f676c652e436c6f7564" . - "2e446c702e56324265746131ca0218476f6f676c655c436c6f75645c446c" . - "705c56326265746131620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Storage.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Storage.php deleted file mode 100644 index 9973047e4..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/GPBMetadata/Google/Privacy/Dlp/V2Beta1/Storage.php +++ /dev/null @@ -1,100 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0abb110a28676f6f676c652f707269766163792f646c702f763262657461" . - "312f73746f726167652e70726f746f121a676f6f676c652e707269766163" . - "792e646c702e763262657461311a1f676f6f676c652f70726f746f627566" . - "2f74696d657374616d702e70726f746f22180a08496e666f54797065120c" . - "0a046e616d6518012001280922a7020a0e437573746f6d496e666f547970" . - "6512370a09696e666f5f7479706518012001280b32242e676f6f676c652e" . - "707269766163792e646c702e763262657461312e496e666f54797065124b" . - "0a0a64696374696f6e61727918022001280b32352e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e437573746f6d496e666f5479" . - "70652e44696374696f6e61727948001a86010a0a44696374696f6e617279" . - "12530a09776f72645f6c69737418012001280b323e2e676f6f676c652e70" . - "7269766163792e646c702e763262657461312e437573746f6d496e666f54" . - "7970652e44696374696f6e6172792e576f72644c69737448001a190a0857" . - "6f72644c697374120d0a05776f72647318012003280942080a06736f7572" . - "636542060a0474797065221e0a074669656c64496412130a0b636f6c756d" . - "6e5f6e616d6518012001280922370a0b506172746974696f6e496412120a" . - "0a70726f6a6563745f696418022001280912140a0c6e616d657370616365" . - "5f6964180420012809221e0a0e4b696e6445787072657373696f6e120c0a" . - "046e616d6518012001280922210a1150726f70657274795265666572656e" . - "6365120c0a046e616d65180220012809224d0a0a50726f6a656374696f6e" . - "123f0a0870726f706572747918012001280b322d2e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e50726f706572747952656665" . - "72656e636522c7010a104461746173746f72654f7074696f6e73123d0a0c" . - "706172746974696f6e5f696418012001280b32272e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e506172746974696f6e496412" . - "380a046b696e6418022001280b322a2e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e4b696e6445787072657373696f6e123a0a" . - "0a70726f6a656374696f6e18032003280b32262e676f6f676c652e707269" . - "766163792e646c702e763262657461312e50726f6a656374696f6e22780a" . - "13436c6f756453746f726167654f7074696f6e7312490a0866696c655f73" . - "657418012001280b32372e676f6f676c652e707269766163792e646c702e" . - "763262657461312e436c6f756453746f726167654f7074696f6e732e4669" . - "6c655365741a160a0746696c65536574120b0a0375726c18012001280922" . - "200a10436c6f756453746f7261676550617468120c0a0470617468180120" . - "0128092296010a0f42696751756572794f7074696f6e7312420a0f746162" . - "6c655f7265666572656e636518012001280b32292e676f6f676c652e7072" . - "69766163792e646c702e763262657461312e42696751756572795461626c" . - "65123f0a126964656e74696679696e675f6669656c647318022003280b32" . - "232e676f6f676c652e707269766163792e646c702e763262657461312e46" . - "69656c64496422fe010a0d53746f72616765436f6e66696712490a116461" . - "746173746f72655f6f7074696f6e7318022001280b322c2e676f6f676c65" . - "2e707269766163792e646c702e763262657461312e4461746173746f7265" . - "4f7074696f6e73480012500a15636c6f75645f73746f726167655f6f7074" . - "696f6e7318032001280b322f2e676f6f676c652e707269766163792e646c" . - "702e763262657461312e436c6f756453746f726167654f7074696f6e7348" . - "0012480a116269675f71756572795f6f7074696f6e7318042001280b322b" . - "2e676f6f676c652e707269766163792e646c702e763262657461312e4269" . - "6751756572794f7074696f6e73480042060a0474797065223a0a0f436c6f" . - "756453746f726167654b657912110a0966696c655f706174681801200128" . - "0912140a0c73746172745f6f666673657418022001280322430a0c446174" . - "6173746f72654b657912330a0a656e746974795f6b657918012001280b32" . - "1f2e676f6f676c652e707269766163792e646c702e763262657461312e4b" . - "657922c5010a034b6579123d0a0c706172746974696f6e5f696418012001" . - "280b32272e676f6f676c652e707269766163792e646c702e763262657461" . - "312e506172746974696f6e496412390a047061746818022003280b322b2e" . - "676f6f676c652e707269766163792e646c702e763262657461312e4b6579" . - "2e50617468456c656d656e741a440a0b50617468456c656d656e74120c0a" . - "046b696e64180120012809120c0a0269641802200128034800120e0a046e" . - "616d65180320012809480042090a0769645f7479706522a0010a09526563" . - "6f72644b657912480a11636c6f75645f73746f726167655f6b6579180120" . - "01280b322b2e676f6f676c652e707269766163792e646c702e7632626574" . - "61312e436c6f756453746f726167654b6579480012410a0d646174617374" . - "6f72655f6b657918022001280b32282e676f6f676c652e70726976616379" . - "2e646c702e763262657461312e4461746173746f72654b6579480042060a" . - "047479706522490a0d42696751756572795461626c6512120a0a70726f6a" . - "6563745f696418012001280912120a0a646174617365745f696418022001" . - "280912100a087461626c655f6964180320012809223e0a08456e74697479" . - "496412320a056669656c6418012001280b32232e676f6f676c652e707269" . - "766163792e646c702e763262657461312e4669656c64496442a3010a1e63" . - "6f6d2e676f6f676c652e707269766163792e646c702e7632626574613142" . - "0a446c7053746f7261676550015a3d676f6f676c652e676f6c616e672e6f" . - "72672f67656e70726f746f2f676f6f676c65617069732f70726976616379" . - "2f646c702f763262657461313b646c70aa0218476f6f676c652e436c6f75" . - "642e446c702e56324265746131ca0218476f6f676c655c436c6f75645c44" . - "6c705c56326265746131620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/AnalyzeDataSourceRiskRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/AnalyzeDataSourceRiskRequest.php deleted file mode 100644 index a5aa51f7c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/AnalyzeDataSourceRiskRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.AnalyzeDataSourceRiskRequest - */ -class AnalyzeDataSourceRiskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric privacy_metric = 1; - */ - private $privacy_metric = null; - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable source_table = 3; - */ - private $source_table = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric privacy_metric = 1; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric - */ - public function getPrivacyMetric() - { - return $this->privacy_metric; - } - - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric privacy_metric = 1; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric $var - * @return $this - */ - public function setPrivacyMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric::class); - $this->privacy_metric = $var; - - return $this; - } - - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable source_table = 3; - * @return \Google\Cloud\Dlp\V2beta1\BigQueryTable - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable source_table = 3; - * @param \Google\Cloud\Dlp\V2beta1\BigQueryTable $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryTable::class); - $this->source_table = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryOptions.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryOptions.php deleted file mode 100644 index 16977446e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryOptions.php +++ /dev/null @@ -1,92 +0,0 @@ -google.privacy.dlp.v2beta1.BigQueryOptions - */ -class BigQueryOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Complete BigQuery table reference. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable table_reference = 1; - */ - private $table_reference = null; - /** - * References to fields uniquely identifying rows within the table. - * Nested fields in the format, like `person.birthdate.year`, are allowed. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId identifying_fields = 2; - */ - private $identifying_fields; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Complete BigQuery table reference. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable table_reference = 1; - * @return \Google\Cloud\Dlp\V2beta1\BigQueryTable - */ - public function getTableReference() - { - return $this->table_reference; - } - - /** - * Complete BigQuery table reference. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable table_reference = 1; - * @param \Google\Cloud\Dlp\V2beta1\BigQueryTable $var - * @return $this - */ - public function setTableReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryTable::class); - $this->table_reference = $var; - - return $this; - } - - /** - * References to fields uniquely identifying rows within the table. - * Nested fields in the format, like `person.birthdate.year`, are allowed. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId identifying_fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIdentifyingFields() - { - return $this->identifying_fields; - } - - /** - * References to fields uniquely identifying rows within the table. - * Nested fields in the format, like `person.birthdate.year`, are allowed. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId identifying_fields = 2; - * @param \Google\Cloud\Dlp\V2beta1\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIdentifyingFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->identifying_fields = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryTable.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryTable.php deleted file mode 100644 index db4de7238..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BigQueryTable.php +++ /dev/null @@ -1,128 +0,0 @@ -:.` or - * `..`. - * - * Generated from protobuf message google.privacy.dlp.v2beta1.BigQueryTable - */ -class BigQueryTable extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Platform project ID of the project containing the table. - * If omitted, project ID is inferred from the API call. - * - * Generated from protobuf field string project_id = 1; - */ - private $project_id = ''; - /** - * Dataset ID of the table. - * - * Generated from protobuf field string dataset_id = 2; - */ - private $dataset_id = ''; - /** - * Name of the table. - * - * Generated from protobuf field string table_id = 3; - */ - private $table_id = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The Google Cloud Platform project ID of the project containing the table. - * If omitted, project ID is inferred from the API call. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The Google Cloud Platform project ID of the project containing the table. - * If omitted, project ID is inferred from the API call. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Dataset ID of the table. - * - * Generated from protobuf field string dataset_id = 2; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Dataset ID of the table. - * - * Generated from protobuf field string dataset_id = 2; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Name of the table. - * - * Generated from protobuf field string table_id = 3; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Name of the table. - * - * Generated from protobuf field string table_id = 3; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig.php deleted file mode 100644 index b774f5813..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig.php +++ /dev/null @@ -1,58 +0,0 @@ - LOW 31-65 -> MEDIUM 66-100 -> HIGH - * This can be used on - * data of type: number, long, string, timestamp. - * If the bound `Value` type differs from the type of data being transformed, we - * will first attempt converting the type of the data to be transformed to match - * the type of the bound before comparing. - * - * Generated from protobuf message google.privacy.dlp.v2beta1.BucketingConfig - */ -class BucketingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.BucketingConfig.Bucket buckets = 1; - */ - private $buckets; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.BucketingConfig.Bucket buckets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.BucketingConfig.Bucket buckets = 1; - * @param \Google\Cloud\Dlp\V2beta1\BucketingConfig_Bucket[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\BucketingConfig_Bucket::class); - $this->buckets = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig_Bucket.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig_Bucket.php deleted file mode 100644 index e13973a10..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/BucketingConfig_Bucket.php +++ /dev/null @@ -1,128 +0,0 @@ -google.privacy.dlp.v2beta1.BucketingConfig.Bucket - */ -class BucketingConfig_Bucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound of the range, inclusive. Type should be the same as max if - * used. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min = 1; - */ - private $min = null; - /** - * Upper bound of the range, exclusive; type must match min. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max = 2; - */ - private $max = null; - /** - * Replacement value for this bucket. If not provided - * the default behavior will be to hyphenate the min-max range. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value replacement_value = 3; - */ - private $replacement_value = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Lower bound of the range, inclusive. Type should be the same as max if - * used. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min = 1; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getMin() - { - return $this->min; - } - - /** - * Lower bound of the range, inclusive. Type should be the same as max if - * used. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->min = $var; - - return $this; - } - - /** - * Upper bound of the range, exclusive; type must match min. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max = 2; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getMax() - { - return $this->max; - } - - /** - * Upper bound of the range, exclusive; type must match min. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max = 2; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->max = $var; - - return $this; - } - - /** - * Replacement value for this bucket. If not provided - * the default behavior will be to hyphenate the min-max range. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value replacement_value = 3; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getReplacementValue() - { - return $this->replacement_value; - } - - /** - * Replacement value for this bucket. If not provided - * the default behavior will be to hyphenate the min-max range. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value replacement_value = 3; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setReplacementValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->replacement_value = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CategoryDescription.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CategoryDescription.php deleted file mode 100644 index b4ee3f668..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CategoryDescription.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.CategoryDescription - */ -class CategoryDescription extends \Google\Protobuf\Internal\Message -{ - /** - * Internal name of the category. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * Human readable form of the category name. - * - * Generated from protobuf field string display_name = 2; - */ - private $display_name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Internal name of the category. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Internal name of the category. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Human readable form of the category name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human readable form of the category name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharacterMaskConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharacterMaskConfig.php deleted file mode 100644 index d996b7664..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharacterMaskConfig.php +++ /dev/null @@ -1,188 +0,0 @@ -google.privacy.dlp.v2beta1.CharacterMaskConfig - */ -class CharacterMaskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Character to mask the sensitive values—for example, "*" for an - * alphabetic string such as name, or "0" for a numeric string such as ZIP - * code or credit card number. String must have length 1. If not supplied, we - * will default to "*" for strings, 0 for digits. - * - * Generated from protobuf field string masking_character = 1; - */ - private $masking_character = ''; - /** - * Number of characters to mask. If not set, all matching chars will be - * masked. Skipped characters do not count towards this tally. - * - * Generated from protobuf field int32 number_to_mask = 2; - */ - private $number_to_mask = 0; - /** - * Mask characters in reverse order. For example, if `masking_character` is - * '0', number_to_mask is 14, and `reverse_order` is false, then - * 1234-5678-9012-3456 -> 00000000000000-3456 - * If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` - * is true, then 12345 -> 12*** - * - * Generated from protobuf field bool reverse_order = 3; - */ - private $reverse_order = false; - /** - * When masking a string, items in this list will be skipped when replacing. - * For example, if your string is 555-555-5555 and you ask us to skip `-` and - * mask 5 chars with * we would produce ***-*55-5555. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CharsToIgnore characters_to_ignore = 4; - */ - private $characters_to_ignore; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Character to mask the sensitive values—for example, "*" for an - * alphabetic string such as name, or "0" for a numeric string such as ZIP - * code or credit card number. String must have length 1. If not supplied, we - * will default to "*" for strings, 0 for digits. - * - * Generated from protobuf field string masking_character = 1; - * @return string - */ - public function getMaskingCharacter() - { - return $this->masking_character; - } - - /** - * Character to mask the sensitive values—for example, "*" for an - * alphabetic string such as name, or "0" for a numeric string such as ZIP - * code or credit card number. String must have length 1. If not supplied, we - * will default to "*" for strings, 0 for digits. - * - * Generated from protobuf field string masking_character = 1; - * @param string $var - * @return $this - */ - public function setMaskingCharacter($var) - { - GPBUtil::checkString($var, True); - $this->masking_character = $var; - - return $this; - } - - /** - * Number of characters to mask. If not set, all matching chars will be - * masked. Skipped characters do not count towards this tally. - * - * Generated from protobuf field int32 number_to_mask = 2; - * @return int - */ - public function getNumberToMask() - { - return $this->number_to_mask; - } - - /** - * Number of characters to mask. If not set, all matching chars will be - * masked. Skipped characters do not count towards this tally. - * - * Generated from protobuf field int32 number_to_mask = 2; - * @param int $var - * @return $this - */ - public function setNumberToMask($var) - { - GPBUtil::checkInt32($var); - $this->number_to_mask = $var; - - return $this; - } - - /** - * Mask characters in reverse order. For example, if `masking_character` is - * '0', number_to_mask is 14, and `reverse_order` is false, then - * 1234-5678-9012-3456 -> 00000000000000-3456 - * If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` - * is true, then 12345 -> 12*** - * - * Generated from protobuf field bool reverse_order = 3; - * @return bool - */ - public function getReverseOrder() - { - return $this->reverse_order; - } - - /** - * Mask characters in reverse order. For example, if `masking_character` is - * '0', number_to_mask is 14, and `reverse_order` is false, then - * 1234-5678-9012-3456 -> 00000000000000-3456 - * If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` - * is true, then 12345 -> 12*** - * - * Generated from protobuf field bool reverse_order = 3; - * @param bool $var - * @return $this - */ - public function setReverseOrder($var) - { - GPBUtil::checkBool($var); - $this->reverse_order = $var; - - return $this; - } - - /** - * When masking a string, items in this list will be skipped when replacing. - * For example, if your string is 555-555-5555 and you ask us to skip `-` and - * mask 5 chars with * we would produce ***-*55-5555. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CharsToIgnore characters_to_ignore = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCharactersToIgnore() - { - return $this->characters_to_ignore; - } - - /** - * When masking a string, items in this list will be skipped when replacing. - * For example, if your string is 555-555-5555 and you ask us to skip `-` and - * mask 5 chars with * we would produce ***-*55-5555. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CharsToIgnore characters_to_ignore = 4; - * @param \Google\Cloud\Dlp\V2beta1\CharsToIgnore[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCharactersToIgnore($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\CharsToIgnore::class); - $this->characters_to_ignore = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore.php deleted file mode 100644 index 503c99e72..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore.php +++ /dev/null @@ -1,79 +0,0 @@ -google.privacy.dlp.v2beta1.CharsToIgnore - */ -class CharsToIgnore extends \Google\Protobuf\Internal\Message -{ - protected $characters; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field string characters_to_skip = 1; - * @return string - */ - public function getCharactersToSkip() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field string characters_to_skip = 1; - * @param string $var - * @return $this - */ - public function setCharactersToSkip($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CharsToIgnore.CharacterGroup common_characters_to_ignore = 2; - * @return int - */ - public function getCommonCharactersToIgnore() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CharsToIgnore.CharacterGroup common_characters_to_ignore = 2; - * @param int $var - * @return $this - */ - public function setCommonCharactersToIgnore($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\CharsToIgnore_CharacterGroup::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getCharacters() - { - return $this->whichOneof("characters"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore_CharacterGroup.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore_CharacterGroup.php deleted file mode 100644 index 64c06d75c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CharsToIgnore_CharacterGroup.php +++ /dev/null @@ -1,47 +0,0 @@ -Google\Privacy\Dlp\V2beta1\CharsToIgnore\CharacterGroup - */ -class CharsToIgnore_CharacterGroup -{ - /** - * Generated from protobuf enum CHARACTER_GROUP_UNSPECIFIED = 0; - */ - const CHARACTER_GROUP_UNSPECIFIED = 0; - /** - * 0-9 - * - * Generated from protobuf enum NUMERIC = 1; - */ - const NUMERIC = 1; - /** - * A-Z - * - * Generated from protobuf enum ALPHA_UPPER_CASE = 2; - */ - const ALPHA_UPPER_CASE = 2; - /** - * a-z - * - * Generated from protobuf enum ALPHA_LOWER_CASE = 3; - */ - const ALPHA_LOWER_CASE = 3; - /** - * US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ - * - * Generated from protobuf enum PUNCTUATION = 4; - */ - const PUNCTUATION = 4; - /** - * Whitespace character, one of [ \t\n\x0B\f\r] - * - * Generated from protobuf enum WHITESPACE = 5; - */ - const WHITESPACE = 5; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageKey.php deleted file mode 100644 index e15aeea26..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageKey.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.CloudStorageKey - */ -class CloudStorageKey extends \Google\Protobuf\Internal\Message -{ - /** - * Path to the file. - * - * Generated from protobuf field string file_path = 1; - */ - private $file_path = ''; - /** - * Byte offset of the referenced data in the file. - * - * Generated from protobuf field int64 start_offset = 2; - */ - private $start_offset = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Path to the file. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * Path to the file. - * - * Generated from protobuf field string file_path = 1; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * Byte offset of the referenced data in the file. - * - * Generated from protobuf field int64 start_offset = 2; - * @return int|string - */ - public function getStartOffset() - { - return $this->start_offset; - } - - /** - * Byte offset of the referenced data in the file. - * - * Generated from protobuf field int64 start_offset = 2; - * @param int|string $var - * @return $this - */ - public function setStartOffset($var) - { - GPBUtil::checkInt64($var); - $this->start_offset = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions.php deleted file mode 100644 index fb380ae5a..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions.php +++ /dev/null @@ -1,52 +0,0 @@ -google.privacy.dlp.v2beta1.CloudStorageOptions - */ -class CloudStorageOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1; - */ - private $file_set = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1; - * @return \Google\Cloud\Dlp\V2beta1\CloudStorageOptions_FileSet - */ - public function getFileSet() - { - return $this->file_set; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1; - * @param \Google\Cloud\Dlp\V2beta1\CloudStorageOptions_FileSet $var - * @return $this - */ - public function setFileSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CloudStorageOptions_FileSet::class); - $this->file_set = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions_FileSet.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions_FileSet.php deleted file mode 100644 index a40ffe925..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CloudStorageOptions_FileSet.php +++ /dev/null @@ -1,60 +0,0 @@ -google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet - */ -class CloudStorageOptions_FileSet extends \Google\Protobuf\Internal\Message -{ - /** - * The url, in the format `gs:///`. Trailing wildcard in the - * path is allowed. - * - * Generated from protobuf field string url = 1; - */ - private $url = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The url, in the format `gs:///`. Trailing wildcard in the - * path is allowed. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The url, in the format `gs:///`. Trailing wildcard in the - * path is allowed. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Color.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Color.php deleted file mode 100644 index 955fcfacc..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Color.php +++ /dev/null @@ -1,121 +0,0 @@ -google.privacy.dlp.v2beta1.Color - */ -class Color extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of red in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float red = 1; - */ - private $red = 0.0; - /** - * The amount of green in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float green = 2; - */ - private $green = 0.0; - /** - * The amount of blue in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float blue = 3; - */ - private $blue = 0.0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The amount of red in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float red = 1; - * @return float - */ - public function getRed() - { - return $this->red; - } - - /** - * The amount of red in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float red = 1; - * @param float $var - * @return $this - */ - public function setRed($var) - { - GPBUtil::checkFloat($var); - $this->red = $var; - - return $this; - } - - /** - * The amount of green in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float green = 2; - * @return float - */ - public function getGreen() - { - return $this->green; - } - - /** - * The amount of green in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float green = 2; - * @param float $var - * @return $this - */ - public function setGreen($var) - { - GPBUtil::checkFloat($var); - $this->green = $var; - - return $this; - } - - /** - * The amount of blue in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float blue = 3; - * @return float - */ - public function getBlue() - { - return $this->blue; - } - - /** - * The amount of blue in the color as a value in the interval [0, 1]. - * - * Generated from protobuf field float blue = 3; - * @param float $var - * @return $this - */ - public function setBlue($var) - { - GPBUtil::checkFloat($var); - $this->blue = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ContentItem.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ContentItem.php deleted file mode 100644 index 3627013e9..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ContentItem.php +++ /dev/null @@ -1,150 +0,0 @@ -google.privacy.dlp.v2beta1.ContentItem - */ -class ContentItem extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the content, as defined in Content-Type HTTP header. - * Supported types are: all "text" types, octet streams, PNG images, - * JPEG images. - * - * Generated from protobuf field string type = 1; - */ - private $type = ''; - protected $data_item; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Type of the content, as defined in Content-Type HTTP header. - * Supported types are: all "text" types, octet streams, PNG images, - * JPEG images. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the content, as defined in Content-Type HTTP header. - * Supported types are: all "text" types, octet streams, PNG images, - * JPEG images. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Content data to inspect or redact. - * - * Generated from protobuf field bytes data = 2; - * @return string - */ - public function getData() - { - return $this->readOneof(2); - } - - /** - * Content data to inspect or redact. - * - * Generated from protobuf field bytes data = 2; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * String data to inspect or redact. - * - * Generated from protobuf field string value = 3; - * @return string - */ - public function getValue() - { - return $this->readOneof(3); - } - - /** - * String data to inspect or redact. - * - * Generated from protobuf field string value = 3; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Structured content for inspection. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Table table = 4; - * @return \Google\Cloud\Dlp\V2beta1\Table - */ - public function getTable() - { - return $this->readOneof(4); - } - - /** - * Structured content for inspection. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Table table = 4; - * @param \Google\Cloud\Dlp\V2beta1\Table $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Table::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataItem() - { - return $this->whichOneof("data_item"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CreateInspectOperationRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CreateInspectOperationRequest.php deleted file mode 100644 index e5d99fcfc..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CreateInspectOperationRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.privacy.dlp.v2beta1.CreateInspectOperationRequest - */ -class CreateInspectOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - */ - private $inspect_config = null; - /** - * Specification of the data set to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig storage_config = 2; - */ - private $storage_config = null; - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig output_config = 3; - */ - private $output_config = null; - /** - * Additional configuration settings for long running operations. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OperationConfig operation_config = 5; - */ - private $operation_config = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\InspectConfig - */ - public function getInspectConfig() - { - return $this->inspect_config; - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig $var - * @return $this - */ - public function setInspectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectConfig::class); - $this->inspect_config = $var; - - return $this; - } - - /** - * Specification of the data set to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig storage_config = 2; - * @return \Google\Cloud\Dlp\V2beta1\StorageConfig - */ - public function getStorageConfig() - { - return $this->storage_config; - } - - /** - * Specification of the data set to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig storage_config = 2; - * @param \Google\Cloud\Dlp\V2beta1\StorageConfig $var - * @return $this - */ - public function setStorageConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\StorageConfig::class); - $this->storage_config = $var; - - return $this; - } - - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig output_config = 3; - * @return \Google\Cloud\Dlp\V2beta1\OutputStorageConfig - */ - public function getOutputConfig() - { - return $this->output_config; - } - - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig output_config = 3; - * @param \Google\Cloud\Dlp\V2beta1\OutputStorageConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\OutputStorageConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * Additional configuration settings for long running operations. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OperationConfig operation_config = 5; - * @return \Google\Cloud\Dlp\V2beta1\OperationConfig - */ - public function getOperationConfig() - { - return $this->operation_config; - } - - /** - * Additional configuration settings for long running operations. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OperationConfig operation_config = 5; - * @param \Google\Cloud\Dlp\V2beta1\OperationConfig $var - * @return $this - */ - public function setOperationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\OperationConfig::class); - $this->operation_config = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoHashConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoHashConfig.php deleted file mode 100644 index 5212dca2e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoHashConfig.php +++ /dev/null @@ -1,61 +0,0 @@ -google.privacy.dlp.v2beta1.CryptoHashConfig - */ -class CryptoHashConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The key used by the hash function. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - */ - private $crypto_key = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The key used by the hash function. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - * @return \Google\Cloud\Dlp\V2beta1\CryptoKey - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - /** - * The key used by the hash function. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - * @param \Google\Cloud\Dlp\V2beta1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoKey.php deleted file mode 100644 index 6d4eb6295..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoKey.php +++ /dev/null @@ -1,104 +0,0 @@ -google.privacy.dlp.v2beta1.CryptoKey - */ -class CryptoKey extends \Google\Protobuf\Internal\Message -{ - protected $source; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TransientCryptoKey transient = 1; - * @return \Google\Cloud\Dlp\V2beta1\TransientCryptoKey - */ - public function getTransient() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TransientCryptoKey transient = 1; - * @param \Google\Cloud\Dlp\V2beta1\TransientCryptoKey $var - * @return $this - */ - public function setTransient($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\TransientCryptoKey::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.UnwrappedCryptoKey unwrapped = 2; - * @return \Google\Cloud\Dlp\V2beta1\UnwrappedCryptoKey - */ - public function getUnwrapped() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.UnwrappedCryptoKey unwrapped = 2; - * @param \Google\Cloud\Dlp\V2beta1\UnwrappedCryptoKey $var - * @return $this - */ - public function setUnwrapped($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\UnwrappedCryptoKey::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.KmsWrappedCryptoKey kms_wrapped = 3; - * @return \Google\Cloud\Dlp\V2beta1\KmsWrappedCryptoKey - */ - public function getKmsWrapped() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.KmsWrappedCryptoKey kms_wrapped = 3; - * @param \Google\Cloud\Dlp\V2beta1\KmsWrappedCryptoKey $var - * @return $this - */ - public function setKmsWrapped($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\KmsWrappedCryptoKey::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig.php deleted file mode 100644 index 85ae8310c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig.php +++ /dev/null @@ -1,244 +0,0 @@ -google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig - */ -class CryptoReplaceFfxFpeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The key used by the encryption algorithm. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - */ - private $crypto_key = null; - /** - * A context may be used for higher security since the same - * identifier in two different contexts likely will be given a distinct - * surrogate. The principle is that the likeliness is inversely related - * to the ratio of the number of distinct identifiers per context over the - * number of possible surrogates: As long as this ratio is small, the - * likehood is large. - * If the context is not set, a default tweak will be used. - * If the context is set but: - * 1. there is no record present when transforming a given value or - * 1. the field is not present when transforming a given value, - * a default tweak will be used. - * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. - * Currently, the referenced field may be of value type integer or string. - * The tweak is constructed as a sequence of bytes in big endian byte order - * such that: - * - a 64 bit integer is encoded followed by a single byte of value 1 - * - a string is encoded in UTF-8 format followed by a single byte of value 2 - * This is also known as the 'tweak', as in tweakable encryption. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId context = 2; - */ - private $context = null; - protected $alphabet; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The key used by the encryption algorithm. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - * @return \Google\Cloud\Dlp\V2beta1\CryptoKey - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - /** - * The key used by the encryption algorithm. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoKey crypto_key = 1; - * @param \Google\Cloud\Dlp\V2beta1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - - /** - * A context may be used for higher security since the same - * identifier in two different contexts likely will be given a distinct - * surrogate. The principle is that the likeliness is inversely related - * to the ratio of the number of distinct identifiers per context over the - * number of possible surrogates: As long as this ratio is small, the - * likehood is large. - * If the context is not set, a default tweak will be used. - * If the context is set but: - * 1. there is no record present when transforming a given value or - * 1. the field is not present when transforming a given value, - * a default tweak will be used. - * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. - * Currently, the referenced field may be of value type integer or string. - * The tweak is constructed as a sequence of bytes in big endian byte order - * such that: - * - a 64 bit integer is encoded followed by a single byte of value 1 - * - a string is encoded in UTF-8 format followed by a single byte of value 2 - * This is also known as the 'tweak', as in tweakable encryption. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId context = 2; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getContext() - { - return $this->context; - } - - /** - * A context may be used for higher security since the same - * identifier in two different contexts likely will be given a distinct - * surrogate. The principle is that the likeliness is inversely related - * to the ratio of the number of distinct identifiers per context over the - * number of possible surrogates: As long as this ratio is small, the - * likehood is large. - * If the context is not set, a default tweak will be used. - * If the context is set but: - * 1. there is no record present when transforming a given value or - * 1. the field is not present when transforming a given value, - * a default tweak will be used. - * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. - * Currently, the referenced field may be of value type integer or string. - * The tweak is constructed as a sequence of bytes in big endian byte order - * such that: - * - a 64 bit integer is encoded followed by a single byte of value 1 - * - a string is encoded in UTF-8 format followed by a single byte of value 2 - * This is also known as the 'tweak', as in tweakable encryption. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId context = 2; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->context = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return int - */ - public function getCommonAlphabet() - { - return $this->readOneof(4); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @param int $var - * @return $this - */ - public function setCommonAlphabet($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * This is supported by mapping these to the alphanumeric characters - * that the FFX mode natively supports. This happens before/after - * encryption/decryption. - * Each character listed must appear only once. - * Number of characters must be in the range [2, 62]. - * This must be encoded as ASCII. - * The order of characters does not matter. - * - * Generated from protobuf field string custom_alphabet = 5; - * @return string - */ - public function getCustomAlphabet() - { - return $this->readOneof(5); - } - - /** - * This is supported by mapping these to the alphanumeric characters - * that the FFX mode natively supports. This happens before/after - * encryption/decryption. - * Each character listed must appear only once. - * Number of characters must be in the range [2, 62]. - * This must be encoded as ASCII. - * The order of characters does not matter. - * - * Generated from protobuf field string custom_alphabet = 5; - * @param string $var - * @return $this - */ - public function setCustomAlphabet($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The native way to select the alphabet. Must be in the range [2, 62]. - * - * Generated from protobuf field int32 radix = 6; - * @return int - */ - public function getRadix() - { - return $this->readOneof(6); - } - - /** - * The native way to select the alphabet. Must be in the range [2, 62]. - * - * Generated from protobuf field int32 radix = 6; - * @param int $var - * @return $this - */ - public function setRadix($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAlphabet() - { - return $this->whichOneof("alphabet"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet.php deleted file mode 100644 index 8e2839aed..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet.php +++ /dev/null @@ -1,45 +0,0 @@ -Google\Privacy\Dlp\V2beta1\CryptoReplaceFfxFpeConfig\FfxCommonNativeAlphabet - */ -class CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet -{ - /** - * Generated from protobuf enum FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; - */ - const FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; - /** - * [0-9] (radix of 10) - * - * Generated from protobuf enum NUMERIC = 1; - */ - const NUMERIC = 1; - /** - * [0-9A-F] (radix of 16) - * - * Generated from protobuf enum HEXADECIMAL = 2; - */ - const HEXADECIMAL = 2; - /** - * [0-9A-Z] (radix of 36) - * - * Generated from protobuf enum UPPER_CASE_ALPHA_NUMERIC = 3; - */ - const UPPER_CASE_ALPHA_NUMERIC = 3; - /** - * [0-9A-Za-z] (radix of 62) - * - * Generated from protobuf enum ALPHA_NUMERIC = 4; - */ - const ALPHA_NUMERIC = 4; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType.php deleted file mode 100644 index 1e4300fbd..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType.php +++ /dev/null @@ -1,96 +0,0 @@ -google.privacy.dlp.v2beta1.CustomInfoType - */ -class CustomInfoType extends \Google\Protobuf\Internal\Message -{ - /** - * Info type configuration. All custom info types must have configurations - * that do not conflict with built-in info types or other custom info types. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - */ - private $info_type = null; - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Info type configuration. All custom info types must have configurations - * that do not conflict with built-in info types or other custom info types. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * Info type configuration. All custom info types must have configurations - * that do not conflict with built-in info types or other custom info types. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Dictionary-based custom info type. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CustomInfoType.Dictionary dictionary = 2; - * @return \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary - */ - public function getDictionary() - { - return $this->readOneof(2); - } - - /** - * Dictionary-based custom info type. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CustomInfoType.Dictionary dictionary = 2; - * @param \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary $var - * @return $this - */ - public function setDictionary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary.php deleted file mode 100644 index c9e5f094e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary.php +++ /dev/null @@ -1,76 +0,0 @@ -google.privacy.dlp.v2beta1.CustomInfoType.Dictionary - */ -class CustomInfoType_Dictionary extends \Google\Protobuf\Internal\Message -{ - protected $source; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * List of words or phrases to search for. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CustomInfoType.Dictionary.WordList word_list = 1; - * @return \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary_WordList - */ - public function getWordList() - { - return $this->readOneof(1); - } - - /** - * List of words or phrases to search for. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CustomInfoType.Dictionary.WordList word_list = 1; - * @param \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary_WordList $var - * @return $this - */ - public function setWordList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary_WordList::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary_WordList.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary_WordList.php deleted file mode 100644 index c41c2911d..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/CustomInfoType_Dictionary_WordList.php +++ /dev/null @@ -1,63 +0,0 @@ -google.privacy.dlp.v2beta1.CustomInfoType.Dictionary.WordList - */ -class CustomInfoType_Dictionary_WordList extends \Google\Protobuf\Internal\Message -{ - /** - * Words or phrases defining the dictionary. The dictionary must contain - * at least one phrase and every phrase must contain at least 2 characters - * that are letters or digits. [required] - * - * Generated from protobuf field repeated string words = 1; - */ - private $words; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Words or phrases defining the dictionary. The dictionary must contain - * at least one phrase and every phrase must contain at least 2 characters - * that are letters or digits. [required] - * - * Generated from protobuf field repeated string words = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWords() - { - return $this->words; - } - - /** - * Words or phrases defining the dictionary. The dictionary must contain - * at least one phrase and every phrase must contain at least 2 characters - * that are letters or digits. [required] - * - * Generated from protobuf field repeated string words = 1; - * @param string[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->words = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreKey.php deleted file mode 100644 index f69de304f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreKey.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.DatastoreKey - */ -class DatastoreKey extends \Google\Protobuf\Internal\Message -{ - /** - * Datastore entity key. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Key entity_key = 1; - */ - private $entity_key = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Datastore entity key. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Key entity_key = 1; - * @return \Google\Cloud\Dlp\V2beta1\Key - */ - public function getEntityKey() - { - return $this->entity_key; - } - - /** - * Datastore entity key. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Key entity_key = 1; - * @param \Google\Cloud\Dlp\V2beta1\Key $var - * @return $this - */ - public function setEntityKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Key::class); - $this->entity_key = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreOptions.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreOptions.php deleted file mode 100644 index cc8272e3d..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DatastoreOptions.php +++ /dev/null @@ -1,127 +0,0 @@ -google.privacy.dlp.v2beta1.DatastoreOptions - */ -class DatastoreOptions extends \Google\Protobuf\Internal\Message -{ - /** - * A partition ID identifies a grouping of entities. The grouping is always - * by project and namespace, however the namespace ID may be empty. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - */ - private $partition_id = null; - /** - * The kind to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.KindExpression kind = 2; - */ - private $kind = null; - /** - * Properties to scan. If none are specified, all properties will be scanned - * by default. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Projection projection = 3; - */ - private $projection; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * A partition ID identifies a grouping of entities. The grouping is always - * by project and namespace, however the namespace ID may be empty. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - * @return \Google\Cloud\Dlp\V2beta1\PartitionId - */ - public function getPartitionId() - { - return $this->partition_id; - } - - /** - * A partition ID identifies a grouping of entities. The grouping is always - * by project and namespace, however the namespace ID may be empty. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - * @param \Google\Cloud\Dlp\V2beta1\PartitionId $var - * @return $this - */ - public function setPartitionId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PartitionId::class); - $this->partition_id = $var; - - return $this; - } - - /** - * The kind to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.KindExpression kind = 2; - * @return \Google\Cloud\Dlp\V2beta1\KindExpression - */ - public function getKind() - { - return $this->kind; - } - - /** - * The kind to process. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.KindExpression kind = 2; - * @param \Google\Cloud\Dlp\V2beta1\KindExpression $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\KindExpression::class); - $this->kind = $var; - - return $this; - } - - /** - * Properties to scan. If none are specified, all properties will be scanned - * by default. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Projection projection = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjection() - { - return $this->projection; - } - - /** - * Properties to scan. If none are specified, all properties will be scanned - * by default. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Projection projection = 3; - * @param \Google\Cloud\Dlp\V2beta1\Projection[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjection($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Projection::class); - $this->projection = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentificationSummary.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentificationSummary.php deleted file mode 100644 index 0d26ba076..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentificationSummary.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.DeidentificationSummary - */ -class DeidentificationSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Total size in bytes that were transformed in some way. - * - * Generated from protobuf field int64 transformed_bytes = 2; - */ - private $transformed_bytes = 0; - /** - * Transformations applied to the dataset. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary transformation_summaries = 3; - */ - private $transformation_summaries; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Total size in bytes that were transformed in some way. - * - * Generated from protobuf field int64 transformed_bytes = 2; - * @return int|string - */ - public function getTransformedBytes() - { - return $this->transformed_bytes; - } - - /** - * Total size in bytes that were transformed in some way. - * - * Generated from protobuf field int64 transformed_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setTransformedBytes($var) - { - GPBUtil::checkInt64($var); - $this->transformed_bytes = $var; - - return $this; - } - - /** - * Transformations applied to the dataset. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary transformation_summaries = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransformationSummaries() - { - return $this->transformation_summaries; - } - - /** - * Transformations applied to the dataset. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary transformation_summaries = 3; - * @param \Google\Cloud\Dlp\V2beta1\TransformationSummary[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransformationSummaries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\TransformationSummary::class); - $this->transformation_summaries = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyConfig.php deleted file mode 100644 index 39e612554..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyConfig.php +++ /dev/null @@ -1,92 +0,0 @@ -google.privacy.dlp.v2beta1.DeidentifyConfig - */ -class DeidentifyConfig extends \Google\Protobuf\Internal\Message -{ - protected $transformation; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Treat the dataset as free-form text and apply the same free text - * transformation everywhere. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoTypeTransformations info_type_transformations = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations - */ - public function getInfoTypeTransformations() - { - return $this->readOneof(1); - } - - /** - * Treat the dataset as free-form text and apply the same free text - * transformation everywhere. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoTypeTransformations info_type_transformations = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations $var - * @return $this - */ - public function setInfoTypeTransformations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Treat the dataset as structured. Transformations can be applied to - * specific locations within structured datasets, such as transforming - * a column within a table. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordTransformations record_transformations = 2; - * @return \Google\Cloud\Dlp\V2beta1\RecordTransformations - */ - public function getRecordTransformations() - { - return $this->readOneof(2); - } - - /** - * Treat the dataset as structured. Transformations can be applied to - * specific locations within structured datasets, such as transforming - * a column within a table. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordTransformations record_transformations = 2; - * @param \Google\Cloud\Dlp\V2beta1\RecordTransformations $var - * @return $this - */ - public function setRecordTransformations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordTransformations::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformation() - { - return $this->whichOneof("transformation"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentRequest.php deleted file mode 100644 index 12a6ec7ba..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.privacy.dlp.v2beta1.DeidentifyContentRequest - */ -class DeidentifyContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for the de-identification of the list of content items. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.DeidentifyConfig deidentify_config = 1; - */ - private $deidentify_config = null; - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 2; - */ - private $inspect_config = null; - /** - * The list of items to inspect. Up to 100 are allowed per request. - * All items will be treated as text/*. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 3; - */ - private $items; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Configuration for the de-identification of the list of content items. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.DeidentifyConfig deidentify_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\DeidentifyConfig - */ - public function getDeidentifyConfig() - { - return $this->deidentify_config; - } - - /** - * Configuration for the de-identification of the list of content items. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.DeidentifyConfig deidentify_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\DeidentifyConfig $var - * @return $this - */ - public function setDeidentifyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\DeidentifyConfig::class); - $this->deidentify_config = $var; - - return $this; - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 2; - * @return \Google\Cloud\Dlp\V2beta1\InspectConfig - */ - public function getInspectConfig() - { - return $this->inspect_config; - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 2; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig $var - * @return $this - */ - public function setInspectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectConfig::class); - $this->inspect_config = $var; - - return $this; - } - - /** - * The list of items to inspect. Up to 100 are allowed per request. - * All items will be treated as text/*. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The list of items to inspect. Up to 100 are allowed per request. - * All items will be treated as text/*. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 3; - * @param \Google\Cloud\Dlp\V2beta1\ContentItem[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ContentItem::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentResponse.php deleted file mode 100644 index afacb421e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DeidentifyContentResponse.php +++ /dev/null @@ -1,83 +0,0 @@ -google.privacy.dlp.v2beta1.DeidentifyContentResponse - */ -class DeidentifyContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - */ - private $items; - /** - * A review of the transformations that took place for each item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.DeidentificationSummary summaries = 2; - */ - private $summaries; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - * @param \Google\Cloud\Dlp\V2beta1\ContentItem[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ContentItem::class); - $this->items = $arr; - - return $this; - } - - /** - * A review of the transformations that took place for each item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.DeidentificationSummary summaries = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSummaries() - { - return $this->summaries; - } - - /** - * A review of the transformations that took place for each item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.DeidentificationSummary summaries = 2; - * @param \Google\Cloud\Dlp\V2beta1\DeidentificationSummary[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSummaries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\DeidentificationSummary::class); - $this->summaries = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DlpServiceGrpcClient.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DlpServiceGrpcClient.php deleted file mode 100644 index 9787f8d62..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/DlpServiceGrpcClient.php +++ /dev/null @@ -1,157 +0,0 @@ -_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/InspectContent', - $argument, - ['\Google\Cloud\Dlp\V2beta1\InspectContentResponse', 'decode'], - $metadata, $options); - } - - /** - * Redacts potentially sensitive info from a list of strings. - * This method has limits on input size, processing time, and output size. - * @param \Google\Cloud\Dlp\V2beta1\RedactContentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function RedactContent(\Google\Cloud\Dlp\V2beta1\RedactContentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/RedactContent', - $argument, - ['\Google\Cloud\Dlp\V2beta1\RedactContentResponse', 'decode'], - $metadata, $options); - } - - /** - * De-identifies potentially sensitive info from a list of strings. - * This method has limits on input size and output size. - * @param \Google\Cloud\Dlp\V2beta1\DeidentifyContentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function DeidentifyContent(\Google\Cloud\Dlp\V2beta1\DeidentifyContentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/DeidentifyContent', - $argument, - ['\Google\Cloud\Dlp\V2beta1\DeidentifyContentResponse', 'decode'], - $metadata, $options); - } - - /** - * Schedules a job scanning content in a Google Cloud Platform data - * repository. - * @param \Google\Cloud\Dlp\V2beta1\CreateInspectOperationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function CreateInspectOperation(\Google\Cloud\Dlp\V2beta1\CreateInspectOperationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/CreateInspectOperation', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Schedules a job to compute risk analysis metrics over content in a Google - * Cloud Platform repository. - * @param \Google\Cloud\Dlp\V2beta1\AnalyzeDataSourceRiskRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function AnalyzeDataSourceRisk(\Google\Cloud\Dlp\V2beta1\AnalyzeDataSourceRiskRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/AnalyzeDataSourceRisk', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Returns list of results for given inspect operation result set id. - * @param \Google\Cloud\Dlp\V2beta1\ListInspectFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function ListInspectFindings(\Google\Cloud\Dlp\V2beta1\ListInspectFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/ListInspectFindings', - $argument, - ['\Google\Cloud\Dlp\V2beta1\ListInspectFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns sensitive information types for given category. - * @param \Google\Cloud\Dlp\V2beta1\ListInfoTypesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function ListInfoTypes(\Google\Cloud\Dlp\V2beta1\ListInfoTypesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/ListInfoTypes', - $argument, - ['\Google\Cloud\Dlp\V2beta1\ListInfoTypesResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the list of root categories of sensitive information. - * @param \Google\Cloud\Dlp\V2beta1\ListRootCategoriesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function ListRootCategories(\Google\Cloud\Dlp\V2beta1\ListRootCategoriesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.privacy.dlp.v2beta1.DlpService/ListRootCategories', - $argument, - ['\Google\Cloud\Dlp\V2beta1\ListRootCategoriesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldId.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldId.php deleted file mode 100644 index 3412e627f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldId.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.FieldId - */ -class FieldId extends \Google\Protobuf\Internal\Message -{ - /** - * Name describing the field. - * - * Generated from protobuf field string column_name = 1; - */ - private $column_name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Name describing the field. - * - * Generated from protobuf field string column_name = 1; - * @return string - */ - public function getColumnName() - { - return $this->column_name; - } - - /** - * Name describing the field. - * - * Generated from protobuf field string column_name = 1; - * @param string $var - * @return $this - */ - public function setColumnName($var) - { - GPBUtil::checkString($var, True); - $this->column_name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldTransformation.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldTransformation.php deleted file mode 100644 index ebab3ef36..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FieldTransformation.php +++ /dev/null @@ -1,170 +0,0 @@ -google.privacy.dlp.v2beta1.FieldTransformation - */ -class FieldTransformation extends \Google\Protobuf\Internal\Message -{ - /** - * Input field(s) to apply the transformation to. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId fields = 1; - */ - private $fields; - /** - * Only apply the transformation if the condition evaluates to true for the - * given `RecordCondition`. The conditions are allowed to reference fields - * that are not used in the actual transformation. [optional] - * Example Use Cases: - * - Apply a different bucket transformation to an age column if the zip code - * column for the same record is within a specific range. - * - Redact a field if the date of birth field is greater than 85. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 3; - */ - private $condition = null; - protected $transformation; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Input field(s) to apply the transformation to. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Input field(s) to apply the transformation to. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId fields = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->fields = $arr; - - return $this; - } - - /** - * Only apply the transformation if the condition evaluates to true for the - * given `RecordCondition`. The conditions are allowed to reference fields - * that are not used in the actual transformation. [optional] - * Example Use Cases: - * - Apply a different bucket transformation to an age column if the zip code - * column for the same record is within a specific range. - * - Redact a field if the date of birth field is greater than 85. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 3; - * @return \Google\Cloud\Dlp\V2beta1\RecordCondition - */ - public function getCondition() - { - return $this->condition; - } - - /** - * Only apply the transformation if the condition evaluates to true for the - * given `RecordCondition`. The conditions are allowed to reference fields - * that are not used in the actual transformation. [optional] - * Example Use Cases: - * - Apply a different bucket transformation to an age column if the zip code - * column for the same record is within a specific range. - * - Redact a field if the date of birth field is greater than 85. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 3; - * @param \Google\Cloud\Dlp\V2beta1\RecordCondition $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordCondition::class); - $this->condition = $var; - - return $this; - } - - /** - * Apply the transformation to the entire field. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 4; - * @return \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation - */ - public function getPrimitiveTransformation() - { - return $this->readOneof(4); - } - - /** - * Apply the transformation to the entire field. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 4; - * @param \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation $var - * @return $this - */ - public function setPrimitiveTransformation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Treat the contents of the field as free text, and selectively - * transform content that matches an `InfoType`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoTypeTransformations info_type_transformations = 5; - * @return \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations - */ - public function getInfoTypeTransformations() - { - return $this->readOneof(5); - } - - /** - * Treat the contents of the field as free text, and selectively - * transform content that matches an `InfoType`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoTypeTransformations info_type_transformations = 5; - * @param \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations $var - * @return $this - */ - public function setInfoTypeTransformations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformation() - { - return $this->whichOneof("transformation"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Finding.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Finding.php deleted file mode 100644 index 5e12680f9..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Finding.php +++ /dev/null @@ -1,185 +0,0 @@ -google.privacy.dlp.v2beta1.Finding - */ -class Finding extends \Google\Protobuf\Internal\Message -{ - /** - * The specific string that may be potentially sensitive info. - * - * Generated from protobuf field string quote = 1; - */ - private $quote = ''; - /** - * The specific type of info the string might be. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 2; - */ - private $info_type = null; - /** - * Estimate of how likely it is that the info_type is correct. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood likelihood = 3; - */ - private $likelihood = 0; - /** - * Location of the info found. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Location location = 4; - */ - private $location = null; - /** - * Timestamp when finding was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - private $create_time = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The specific string that may be potentially sensitive info. - * - * Generated from protobuf field string quote = 1; - * @return string - */ - public function getQuote() - { - return $this->quote; - } - - /** - * The specific string that may be potentially sensitive info. - * - * Generated from protobuf field string quote = 1; - * @param string $var - * @return $this - */ - public function setQuote($var) - { - GPBUtil::checkString($var, True); - $this->quote = $var; - - return $this; - } - - /** - * The specific type of info the string might be. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 2; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * The specific type of info the string might be. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 2; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Estimate of how likely it is that the info_type is correct. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood likelihood = 3; - * @return int - */ - public function getLikelihood() - { - return $this->likelihood; - } - - /** - * Estimate of how likely it is that the info_type is correct. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood likelihood = 3; - * @param int $var - * @return $this - */ - public function setLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\Likelihood::class); - $this->likelihood = $var; - - return $this; - } - - /** - * Location of the info found. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Location location = 4; - * @return \Google\Cloud\Dlp\V2beta1\Location - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location of the info found. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Location location = 4; - * @param \Google\Cloud\Dlp\V2beta1\Location $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Location::class); - $this->location = $var; - - return $this; - } - - /** - * Timestamp when finding was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @return \Google\Protobuf\Timestamp - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Timestamp when finding was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FixedSizeBucketingConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FixedSizeBucketingConfig.php deleted file mode 100644 index b6be29b1e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/FixedSizeBucketingConfig.php +++ /dev/null @@ -1,154 +0,0 @@ -google.privacy.dlp.v2beta1.FixedSizeBucketingConfig - */ -class FixedSizeBucketingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound value of buckets. All values less than `lower_bound` are - * grouped together into a single bucket; for example if `lower_bound` = 10, - * then all values less than 10 are replaced with the value “-10”. [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value lower_bound = 1; - */ - private $lower_bound = null; - /** - * Upper bound value of buckets. All values greater than upper_bound are - * grouped together into a single bucket; for example if `upper_bound` = 89, - * then all values greater than 89 are replaced with the value “89+”. - * [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value upper_bound = 2; - */ - private $upper_bound = null; - /** - * Size of each bucket (except for minimum and maximum buckets). So if - * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the - * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required]. - * - * Generated from protobuf field double bucket_size = 3; - */ - private $bucket_size = 0.0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Lower bound value of buckets. All values less than `lower_bound` are - * grouped together into a single bucket; for example if `lower_bound` = 10, - * then all values less than 10 are replaced with the value “-10”. [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value lower_bound = 1; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getLowerBound() - { - return $this->lower_bound; - } - - /** - * Lower bound value of buckets. All values less than `lower_bound` are - * grouped together into a single bucket; for example if `lower_bound` = 10, - * then all values less than 10 are replaced with the value “-10”. [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value lower_bound = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setLowerBound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->lower_bound = $var; - - return $this; - } - - /** - * Upper bound value of buckets. All values greater than upper_bound are - * grouped together into a single bucket; for example if `upper_bound` = 89, - * then all values greater than 89 are replaced with the value “89+”. - * [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value upper_bound = 2; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getUpperBound() - { - return $this->upper_bound; - } - - /** - * Upper bound value of buckets. All values greater than upper_bound are - * grouped together into a single bucket; for example if `upper_bound` = 89, - * then all values greater than 89 are replaced with the value “89+”. - * [Required]. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value upper_bound = 2; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setUpperBound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->upper_bound = $var; - - return $this; - } - - /** - * Size of each bucket (except for minimum and maximum buckets). So if - * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the - * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required]. - * - * Generated from protobuf field double bucket_size = 3; - * @return float - */ - public function getBucketSize() - { - return $this->bucket_size; - } - - /** - * Size of each bucket (except for minimum and maximum buckets). So if - * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the - * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required]. - * - * Generated from protobuf field double bucket_size = 3; - * @param float $var - * @return $this - */ - public function setBucketSize($var) - { - GPBUtil::checkDouble($var); - $this->bucket_size = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ImageLocation.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ImageLocation.php deleted file mode 100644 index 03fbc5de6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ImageLocation.php +++ /dev/null @@ -1,153 +0,0 @@ -google.privacy.dlp.v2beta1.ImageLocation - */ -class ImageLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Top coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 top = 1; - */ - private $top = 0; - /** - * Left coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 left = 2; - */ - private $left = 0; - /** - * Width of the bounding box in pixels. - * - * Generated from protobuf field int32 width = 3; - */ - private $width = 0; - /** - * Height of the bounding box in pixels. - * - * Generated from protobuf field int32 height = 4; - */ - private $height = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Top coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 top = 1; - * @return int - */ - public function getTop() - { - return $this->top; - } - - /** - * Top coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 top = 1; - * @param int $var - * @return $this - */ - public function setTop($var) - { - GPBUtil::checkInt32($var); - $this->top = $var; - - return $this; - } - - /** - * Left coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 left = 2; - * @return int - */ - public function getLeft() - { - return $this->left; - } - - /** - * Left coordinate of the bounding box. (0,0) is upper left. - * - * Generated from protobuf field int32 left = 2; - * @param int $var - * @return $this - */ - public function setLeft($var) - { - GPBUtil::checkInt32($var); - $this->left = $var; - - return $this; - } - - /** - * Width of the bounding box in pixels. - * - * Generated from protobuf field int32 width = 3; - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Width of the bounding box in pixels. - * - * Generated from protobuf field int32 width = 3; - * @param int $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkInt32($var); - $this->width = $var; - - return $this; - } - - /** - * Height of the bounding box in pixels. - * - * Generated from protobuf field int32 height = 4; - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Height of the bounding box in pixels. - * - * Generated from protobuf field int32 height = 4; - * @param int $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkInt32($var); - $this->height = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoType.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoType.php deleted file mode 100644 index 35d4f914b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.InfoType - */ -class InfoType extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the information type. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Name of the information type. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the information type. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeDescription.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeDescription.php deleted file mode 100644 index dc4c376a1..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeDescription.php +++ /dev/null @@ -1,121 +0,0 @@ -google.privacy.dlp.v2beta1.InfoTypeDescription - */ -class InfoTypeDescription extends \Google\Protobuf\Internal\Message -{ - /** - * Internal name of the infoType. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * Human readable form of the infoType name. - * - * Generated from protobuf field string display_name = 2; - */ - private $display_name = ''; - /** - * List of categories this infoType belongs to. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 3; - */ - private $categories; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Internal name of the infoType. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Internal name of the infoType. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Human readable form of the infoType name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human readable form of the infoType name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * List of categories this infoType belongs to. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * List of categories this infoType belongs to. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 3; - * @param \Google\Cloud\Dlp\V2beta1\CategoryDescription[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\CategoryDescription::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeStatistics.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeStatistics.php deleted file mode 100644 index 8b08c90a1..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeStatistics.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.InfoTypeStatistics - */ -class InfoTypeStatistics extends \Google\Protobuf\Internal\Message -{ - /** - * The type of finding this stat is for. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - */ - private $info_type = null; - /** - * Number of findings for this info type. - * - * Generated from protobuf field int64 count = 2; - */ - private $count = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The type of finding this stat is for. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * The type of finding this stat is for. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Number of findings for this info type. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Number of findings for this info type. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations.php deleted file mode 100644 index 40c6e59b9..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations.php +++ /dev/null @@ -1,63 +0,0 @@ -google.privacy.dlp.v2beta1.InfoTypeTransformations - */ -class InfoTypeTransformations extends \Google\Protobuf\Internal\Message -{ - /** - * Transformation for each info type. Cannot specify more than one - * for a given info type. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation transformations = 1; - */ - private $transformations; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Transformation for each info type. Cannot specify more than one - * for a given info type. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation transformations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransformations() - { - return $this->transformations; - } - - /** - * Transformation for each info type. Cannot specify more than one - * for a given info type. [required] - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation transformations = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations_InfoTypeTransformation[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransformations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoTypeTransformations_InfoTypeTransformation::class); - $this->transformations = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations_InfoTypeTransformation.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations_InfoTypeTransformation.php deleted file mode 100644 index b14fb3ab6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InfoTypeTransformations_InfoTypeTransformation.php +++ /dev/null @@ -1,93 +0,0 @@ -google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation - */ -class InfoTypeTransformations_InfoTypeTransformation extends \Google\Protobuf\Internal\Message -{ - /** - * Info types to apply the transformation to. Empty list will match all - * available info types for this transformation. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - */ - private $info_types; - /** - * Primitive transformation to apply to the info type. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2; - */ - private $primitive_transformation = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Info types to apply the transformation to. Empty list will match all - * available info types for this transformation. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInfoTypes() - { - return $this->info_types; - } - - /** - * Info types to apply the transformation to. Empty list will match all - * available info types for this transformation. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInfoTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_types = $arr; - - return $this; - } - - /** - * Primitive transformation to apply to the info type. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2; - * @return \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation - */ - public function getPrimitiveTransformation() - { - return $this->primitive_transformation; - } - - /** - * Primitive transformation to apply to the info type. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2; - * @param \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation $var - * @return $this - */ - public function setPrimitiveTransformation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation::class); - $this->primitive_transformation = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig.php deleted file mode 100644 index edd939723..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig.php +++ /dev/null @@ -1,260 +0,0 @@ -google.privacy.dlp.v2beta1.InspectConfig - */ -class InspectConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Restricts what info_types to look for. The values must correspond to - * InfoType values returned by ListInfoTypes or found in documentation. - * Empty info_types runs all enabled detectors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - */ - private $info_types; - /** - * Only returns findings equal or above this threshold. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood min_likelihood = 2; - */ - private $min_likelihood = 0; - /** - * Limits the number of findings per content item or long running operation. - * - * Generated from protobuf field int32 max_findings = 3; - */ - private $max_findings = 0; - /** - * When true, a contextual quote from the data that triggered a finding is - * included in the response; see Finding.quote. - * - * Generated from protobuf field bool include_quote = 4; - */ - private $include_quote = false; - /** - * When true, excludes type information of the findings. - * - * Generated from protobuf field bool exclude_types = 6; - */ - private $exclude_types = false; - /** - * Configuration of findings limit given for specified info types. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectConfig.InfoTypeLimit info_type_limits = 7; - */ - private $info_type_limits; - /** - * Custom info types provided by the user. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CustomInfoType custom_info_types = 8; - */ - private $custom_info_types; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Restricts what info_types to look for. The values must correspond to - * InfoType values returned by ListInfoTypes or found in documentation. - * Empty info_types runs all enabled detectors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInfoTypes() - { - return $this->info_types; - } - - /** - * Restricts what info_types to look for. The values must correspond to - * InfoType values returned by ListInfoTypes or found in documentation. - * Empty info_types runs all enabled detectors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInfoTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_types = $arr; - - return $this; - } - - /** - * Only returns findings equal or above this threshold. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood min_likelihood = 2; - * @return int - */ - public function getMinLikelihood() - { - return $this->min_likelihood; - } - - /** - * Only returns findings equal or above this threshold. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Likelihood min_likelihood = 2; - * @param int $var - * @return $this - */ - public function setMinLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\Likelihood::class); - $this->min_likelihood = $var; - - return $this; - } - - /** - * Limits the number of findings per content item or long running operation. - * - * Generated from protobuf field int32 max_findings = 3; - * @return int - */ - public function getMaxFindings() - { - return $this->max_findings; - } - - /** - * Limits the number of findings per content item or long running operation. - * - * Generated from protobuf field int32 max_findings = 3; - * @param int $var - * @return $this - */ - public function setMaxFindings($var) - { - GPBUtil::checkInt32($var); - $this->max_findings = $var; - - return $this; - } - - /** - * When true, a contextual quote from the data that triggered a finding is - * included in the response; see Finding.quote. - * - * Generated from protobuf field bool include_quote = 4; - * @return bool - */ - public function getIncludeQuote() - { - return $this->include_quote; - } - - /** - * When true, a contextual quote from the data that triggered a finding is - * included in the response; see Finding.quote. - * - * Generated from protobuf field bool include_quote = 4; - * @param bool $var - * @return $this - */ - public function setIncludeQuote($var) - { - GPBUtil::checkBool($var); - $this->include_quote = $var; - - return $this; - } - - /** - * When true, excludes type information of the findings. - * - * Generated from protobuf field bool exclude_types = 6; - * @return bool - */ - public function getExcludeTypes() - { - return $this->exclude_types; - } - - /** - * When true, excludes type information of the findings. - * - * Generated from protobuf field bool exclude_types = 6; - * @param bool $var - * @return $this - */ - public function setExcludeTypes($var) - { - GPBUtil::checkBool($var); - $this->exclude_types = $var; - - return $this; - } - - /** - * Configuration of findings limit given for specified info types. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectConfig.InfoTypeLimit info_type_limits = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInfoTypeLimits() - { - return $this->info_type_limits; - } - - /** - * Configuration of findings limit given for specified info types. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectConfig.InfoTypeLimit info_type_limits = 7; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig_InfoTypeLimit[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInfoTypeLimits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InspectConfig_InfoTypeLimit::class); - $this->info_type_limits = $arr; - - return $this; - } - - /** - * Custom info types provided by the user. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CustomInfoType custom_info_types = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomInfoTypes() - { - return $this->custom_info_types; - } - - /** - * Custom info types provided by the user. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CustomInfoType custom_info_types = 8; - * @param \Google\Cloud\Dlp\V2beta1\CustomInfoType[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomInfoTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\CustomInfoType::class); - $this->custom_info_types = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig_InfoTypeLimit.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig_InfoTypeLimit.php deleted file mode 100644 index 946b78630..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectConfig_InfoTypeLimit.php +++ /dev/null @@ -1,99 +0,0 @@ -google.privacy.dlp.v2beta1.InspectConfig.InfoTypeLimit - */ -class InspectConfig_InfoTypeLimit extends \Google\Protobuf\Internal\Message -{ - /** - * Type of information the findings limit applies to. Only one limit per - * info_type should be provided. If InfoTypeLimit does not have an - * info_type, the DLP API applies the limit against all info_types that are - * found but not specified in another InfoTypeLimit. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - */ - private $info_type = null; - /** - * Max findings limit for the given infoType. - * - * Generated from protobuf field int32 max_findings = 2; - */ - private $max_findings = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Type of information the findings limit applies to. Only one limit per - * info_type should be provided. If InfoTypeLimit does not have an - * info_type, the DLP API applies the limit against all info_types that are - * found but not specified in another InfoTypeLimit. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * Type of information the findings limit applies to. Only one limit per - * info_type should be provided. If InfoTypeLimit does not have an - * info_type, the DLP API applies the limit against all info_types that are - * found but not specified in another InfoTypeLimit. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Max findings limit for the given infoType. - * - * Generated from protobuf field int32 max_findings = 2; - * @return int - */ - public function getMaxFindings() - { - return $this->max_findings; - } - - /** - * Max findings limit for the given infoType. - * - * Generated from protobuf field int32 max_findings = 2; - * @param int $var - * @return $this - */ - public function setMaxFindings($var) - { - GPBUtil::checkInt32($var); - $this->max_findings = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentRequest.php deleted file mode 100644 index 308edf825..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentRequest.php +++ /dev/null @@ -1,95 +0,0 @@ -google.privacy.dlp.v2beta1.InspectContentRequest - */ -class InspectContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - */ - private $inspect_config = null; - /** - * The list of items to inspect. Items in a single request are - * considered "related" unless inspect_config.independent_inputs is true. - * Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - */ - private $items; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\InspectConfig - */ - public function getInspectConfig() - { - return $this->inspect_config; - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig $var - * @return $this - */ - public function setInspectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectConfig::class); - $this->inspect_config = $var; - - return $this; - } - - /** - * The list of items to inspect. Items in a single request are - * considered "related" unless inspect_config.independent_inputs is true. - * Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The list of items to inspect. Items in a single request are - * considered "related" unless inspect_config.independent_inputs is true. - * Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - * @param \Google\Cloud\Dlp\V2beta1\ContentItem[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ContentItem::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentResponse.php deleted file mode 100644 index 6a190218b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectContentResponse.php +++ /dev/null @@ -1,60 +0,0 @@ -google.privacy.dlp.v2beta1.InspectContentResponse - */ -class InspectContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Each content_item from the request has a result in this list, in the - * same order as the request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectResult results = 1; - */ - private $results; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Each content_item from the request has a result in this list, in the - * same order as the request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * Each content_item from the request has a result in this list, in the - * same order as the request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InspectResult results = 1; - * @param \Google\Cloud\Dlp\V2beta1\InspectResult[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InspectResult::class); - $this->results = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationMetadata.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationMetadata.php deleted file mode 100644 index 0a01f9d2c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationMetadata.php +++ /dev/null @@ -1,243 +0,0 @@ -google.privacy.dlp.v2beta1.InspectOperationMetadata - */ -class InspectOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Total size in bytes that were processed. - * - * Generated from protobuf field int64 processed_bytes = 1; - */ - private $processed_bytes = 0; - /** - * Estimate of the number of bytes to process. - * - * Generated from protobuf field int64 total_estimated_bytes = 4; - */ - private $total_estimated_bytes = 0; - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeStatistics info_type_stats = 2; - */ - private $info_type_stats; - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - private $create_time = null; - /** - * The inspect config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig request_inspect_config = 5; - */ - private $request_inspect_config = null; - /** - * The storage config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig request_storage_config = 6; - */ - private $request_storage_config = null; - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig request_output_config = 7; - */ - private $request_output_config = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Total size in bytes that were processed. - * - * Generated from protobuf field int64 processed_bytes = 1; - * @return int|string - */ - public function getProcessedBytes() - { - return $this->processed_bytes; - } - - /** - * Total size in bytes that were processed. - * - * Generated from protobuf field int64 processed_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setProcessedBytes($var) - { - GPBUtil::checkInt64($var); - $this->processed_bytes = $var; - - return $this; - } - - /** - * Estimate of the number of bytes to process. - * - * Generated from protobuf field int64 total_estimated_bytes = 4; - * @return int|string - */ - public function getTotalEstimatedBytes() - { - return $this->total_estimated_bytes; - } - - /** - * Estimate of the number of bytes to process. - * - * Generated from protobuf field int64 total_estimated_bytes = 4; - * @param int|string $var - * @return $this - */ - public function setTotalEstimatedBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_estimated_bytes = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeStatistics info_type_stats = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInfoTypeStats() - { - return $this->info_type_stats; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeStatistics info_type_stats = 2; - * @param \Google\Cloud\Dlp\V2beta1\InfoTypeStatistics[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInfoTypeStats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoTypeStatistics::class); - $this->info_type_stats = $arr; - - return $this; - } - - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The inspect config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig request_inspect_config = 5; - * @return \Google\Cloud\Dlp\V2beta1\InspectConfig - */ - public function getRequestInspectConfig() - { - return $this->request_inspect_config; - } - - /** - * The inspect config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig request_inspect_config = 5; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig $var - * @return $this - */ - public function setRequestInspectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectConfig::class); - $this->request_inspect_config = $var; - - return $this; - } - - /** - * The storage config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig request_storage_config = 6; - * @return \Google\Cloud\Dlp\V2beta1\StorageConfig - */ - public function getRequestStorageConfig() - { - return $this->request_storage_config; - } - - /** - * The storage config used to create the Operation. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.StorageConfig request_storage_config = 6; - * @param \Google\Cloud\Dlp\V2beta1\StorageConfig $var - * @return $this - */ - public function setRequestStorageConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\StorageConfig::class); - $this->request_storage_config = $var; - - return $this; - } - - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig request_output_config = 7; - * @return \Google\Cloud\Dlp\V2beta1\OutputStorageConfig - */ - public function getRequestOutputConfig() - { - return $this->request_output_config; - } - - /** - * Optional location to store findings. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.OutputStorageConfig request_output_config = 7; - * @param \Google\Cloud\Dlp\V2beta1\OutputStorageConfig $var - * @return $this - */ - public function setRequestOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\OutputStorageConfig::class); - $this->request_output_config = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationResult.php deleted file mode 100644 index 66c4113e7..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectOperationResult.php +++ /dev/null @@ -1,63 +0,0 @@ -google.privacy.dlp.v2beta1.InspectOperationResult - */ -class InspectOperationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should have the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should have the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should have the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectResult.php deleted file mode 100644 index b0ec39d6a..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/InspectResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.privacy.dlp.v2beta1.InspectResult - */ -class InspectResult extends \Google\Protobuf\Internal\Message -{ - /** - * List of findings for an item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Finding findings = 1; - */ - private $findings; - /** - * If true, then this item might have more findings than were returned, - * and the findings returned are an arbitrary subset of all findings. - * The findings list might be truncated because the input items were too - * large, or because the server reached the maximum amount of resources - * allowed for a single API call. For best results, divide the input into - * smaller batches. - * - * Generated from protobuf field bool findings_truncated = 2; - */ - private $findings_truncated = false; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * List of findings for an item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Finding findings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFindings() - { - return $this->findings; - } - - /** - * List of findings for an item. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Finding findings = 1; - * @param \Google\Cloud\Dlp\V2beta1\Finding[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Finding::class); - $this->findings = $arr; - - return $this; - } - - /** - * If true, then this item might have more findings than were returned, - * and the findings returned are an arbitrary subset of all findings. - * The findings list might be truncated because the input items were too - * large, or because the server reached the maximum amount of resources - * allowed for a single API call. For best results, divide the input into - * smaller batches. - * - * Generated from protobuf field bool findings_truncated = 2; - * @return bool - */ - public function getFindingsTruncated() - { - return $this->findings_truncated; - } - - /** - * If true, then this item might have more findings than were returned, - * and the findings returned are an arbitrary subset of all findings. - * The findings list might be truncated because the input items were too - * large, or because the server reached the maximum amount of resources - * allowed for a single API call. For best results, divide the input into - * smaller batches. - * - * Generated from protobuf field bool findings_truncated = 2; - * @param bool $var - * @return $this - */ - public function setFindingsTruncated($var) - { - GPBUtil::checkBool($var); - $this->findings_truncated = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key.php deleted file mode 100644 index 647dc89e3..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key.php +++ /dev/null @@ -1,119 +0,0 @@ -google.privacy.dlp.v2beta1.Key - */ -class Key extends \Google\Protobuf\Internal\Message -{ - /** - * Entities are partitioned into subsets, currently identified by a project - * ID and namespace ID. - * Queries are scoped to a single partition. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - */ - private $partition_id = null; - /** - * The entity path. - * An entity path consists of one or more elements composed of a kind and a - * string or numerical identifier, which identify entities. The first - * element identifies a _root entity_, the second element identifies - * a _child_ of the root entity, the third element identifies a child of the - * second entity, and so forth. The entities identified by all prefixes of - * the path are called the element's _ancestors_. - * A path can never be empty, and a path can have at most 100 elements. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Key.PathElement path = 2; - */ - private $path; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Entities are partitioned into subsets, currently identified by a project - * ID and namespace ID. - * Queries are scoped to a single partition. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - * @return \Google\Cloud\Dlp\V2beta1\PartitionId - */ - public function getPartitionId() - { - return $this->partition_id; - } - - /** - * Entities are partitioned into subsets, currently identified by a project - * ID and namespace ID. - * Queries are scoped to a single partition. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PartitionId partition_id = 1; - * @param \Google\Cloud\Dlp\V2beta1\PartitionId $var - * @return $this - */ - public function setPartitionId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PartitionId::class); - $this->partition_id = $var; - - return $this; - } - - /** - * The entity path. - * An entity path consists of one or more elements composed of a kind and a - * string or numerical identifier, which identify entities. The first - * element identifies a _root entity_, the second element identifies - * a _child_ of the root entity, the third element identifies a child of the - * second entity, and so forth. The entities identified by all prefixes of - * the path are called the element's _ancestors_. - * A path can never be empty, and a path can have at most 100 elements. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Key.PathElement path = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPath() - { - return $this->path; - } - - /** - * The entity path. - * An entity path consists of one or more elements composed of a kind and a - * string or numerical identifier, which identify entities. The first - * element identifies a _root entity_, the second element identifies - * a _child_ of the root entity, the third element identifies a child of the - * second entity, and so forth. The entities identified by all prefixes of - * the path are called the element's _ancestors_. - * A path can never be empty, and a path can have at most 100 elements. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Key.PathElement path = 2; - * @param \Google\Cloud\Dlp\V2beta1\Key_PathElement[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPath($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Key_PathElement::class); - $this->path = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key_PathElement.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key_PathElement.php deleted file mode 100644 index d98a8ff73..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Key_PathElement.php +++ /dev/null @@ -1,139 +0,0 @@ -google.privacy.dlp.v2beta1.Key.PathElement - */ -class Key_PathElement extends \Google\Protobuf\Internal\Message -{ - /** - * The kind of the entity. - * A kind matching regex `__.*__` is reserved/read-only. - * A kind must not contain more than 1500 bytes when UTF-8 encoded. - * Cannot be `""`. - * - * Generated from protobuf field string kind = 1; - */ - private $kind = ''; - protected $id_type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The kind of the entity. - * A kind matching regex `__.*__` is reserved/read-only. - * A kind must not contain more than 1500 bytes when UTF-8 encoded. - * Cannot be `""`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * The kind of the entity. - * A kind matching regex `__.*__` is reserved/read-only. - * A kind must not contain more than 1500 bytes when UTF-8 encoded. - * Cannot be `""`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The auto-allocated ID of the entity. - * Never equal to zero. Values less than zero are discouraged and may not - * be supported in the future. - * - * Generated from protobuf field int64 id = 2; - * @return int|string - */ - public function getId() - { - return $this->readOneof(2); - } - - /** - * The auto-allocated ID of the entity. - * Never equal to zero. Values less than zero are discouraged and may not - * be supported in the future. - * - * Generated from protobuf field int64 id = 2; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The name of the entity. - * A name matching regex `__.*__` is reserved/read-only. - * A name must not be more than 1500 bytes when UTF-8 encoded. - * Cannot be `""`. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->readOneof(3); - } - - /** - * The name of the entity. - * A name matching regex `__.*__` is reserved/read-only. - * A name must not be more than 1500 bytes when UTF-8 encoded. - * Cannot be `""`. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getIdType() - { - return $this->whichOneof("id_type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KindExpression.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KindExpression.php deleted file mode 100644 index d5ee06df6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KindExpression.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.KindExpression - */ -class KindExpression extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the kind. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The name of the kind. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the kind. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KmsWrappedCryptoKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KmsWrappedCryptoKey.php deleted file mode 100644 index 670e83ba0..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/KmsWrappedCryptoKey.php +++ /dev/null @@ -1,92 +0,0 @@ -google.privacy.dlp.v2beta1.KmsWrappedCryptoKey - */ -class KmsWrappedCryptoKey extends \Google\Protobuf\Internal\Message -{ - /** - * The wrapped data crypto key. [required] - * - * Generated from protobuf field bytes wrapped_key = 1; - */ - private $wrapped_key = ''; - /** - * The resource name of the KMS CryptoKey to use for unwrapping. [required] - * - * Generated from protobuf field string crypto_key_name = 2; - */ - private $crypto_key_name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The wrapped data crypto key. [required] - * - * Generated from protobuf field bytes wrapped_key = 1; - * @return string - */ - public function getWrappedKey() - { - return $this->wrapped_key; - } - - /** - * The wrapped data crypto key. [required] - * - * Generated from protobuf field bytes wrapped_key = 1; - * @param string $var - * @return $this - */ - public function setWrappedKey($var) - { - GPBUtil::checkString($var, False); - $this->wrapped_key = $var; - - return $this; - } - - /** - * The resource name of the KMS CryptoKey to use for unwrapping. [required] - * - * Generated from protobuf field string crypto_key_name = 2; - * @return string - */ - public function getCryptoKeyName() - { - return $this->crypto_key_name; - } - - /** - * The resource name of the KMS CryptoKey to use for unwrapping. [required] - * - * Generated from protobuf field string crypto_key_name = 2; - * @param string $var - * @return $this - */ - public function setCryptoKeyName($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Likelihood.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Likelihood.php deleted file mode 100644 index b674680ce..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Likelihood.php +++ /dev/null @@ -1,48 +0,0 @@ -Google\Privacy\Dlp\V2beta1\Likelihood - */ -class Likelihood -{ - /** - * Default value; information with all likelihoods is included. - * - * Generated from protobuf enum LIKELIHOOD_UNSPECIFIED = 0; - */ - const LIKELIHOOD_UNSPECIFIED = 0; - /** - * Few matching elements. - * - * Generated from protobuf enum VERY_UNLIKELY = 1; - */ - const VERY_UNLIKELY = 1; - /** - * Generated from protobuf enum UNLIKELY = 2; - */ - const UNLIKELY = 2; - /** - * Some matching elements. - * - * Generated from protobuf enum POSSIBLE = 3; - */ - const POSSIBLE = 3; - /** - * Generated from protobuf enum LIKELY = 4; - */ - const LIKELY = 4; - /** - * Many matching elements. - * - * Generated from protobuf enum VERY_LIKELY = 5; - */ - const VERY_LIKELY = 5; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesRequest.php deleted file mode 100644 index a9a85a8f1..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.privacy.dlp.v2beta1.ListInfoTypesRequest - */ -class ListInfoTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Category name as returned by ListRootCategories. - * - * Generated from protobuf field string category = 1; - */ - private $category = ''; - /** - * Optional BCP-47 language code for localized info type friendly - * names. If omitted, or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 2; - */ - private $language_code = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Category name as returned by ListRootCategories. - * - * Generated from protobuf field string category = 1; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Category name as returned by ListRootCategories. - * - * Generated from protobuf field string category = 1; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * Optional BCP-47 language code for localized info type friendly - * names. If omitted, or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional BCP-47 language code for localized info type friendly - * names. If omitted, or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesResponse.php deleted file mode 100644 index c84a9548d..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInfoTypesResponse.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.ListInfoTypesResponse - */ -class ListInfoTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Set of sensitive info types belonging to a category. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeDescription info_types = 1; - */ - private $info_types; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Set of sensitive info types belonging to a category. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeDescription info_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInfoTypes() - { - return $this->info_types; - } - - /** - * Set of sensitive info types belonging to a category. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.InfoTypeDescription info_types = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoTypeDescription[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInfoTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoTypeDescription::class); - $this->info_types = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsRequest.php deleted file mode 100644 index 7bda7b073..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsRequest.php +++ /dev/null @@ -1,186 +0,0 @@ -google.privacy.dlp.v2beta1.ListInspectFindingsRequest - */ -class ListInspectFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier of the results set returned as metadata of - * the longrunning operation created by a call to InspectDataSource. - * Should be in the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * Maximum number of results to return. - * If 0, the implementation selects a reasonable value. - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * The value returned by the last `ListInspectFindingsResponse`; indicates - * that this is a continuation of a prior `ListInspectFindings` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - /** - * Restricts findings to items that match. Supports info_type and likelihood. - * Examples: - * - info_type=EMAIL_ADDRESS - * - info_type=PHONE_NUMBER,EMAIL_ADDRESS - * - likelihood=VERY_LIKELY - * - likelihood=VERY_LIKELY,LIKELY - * - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY - * - * Generated from protobuf field string filter = 4; - */ - private $filter = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Identifier of the results set returned as metadata of - * the longrunning operation created by a call to InspectDataSource. - * Should be in the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier of the results set returned as metadata of - * the longrunning operation created by a call to InspectDataSource. - * Should be in the format of `inspect/results/{id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Maximum number of results to return. - * If 0, the implementation selects a reasonable value. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results to return. - * If 0, the implementation selects a reasonable value. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListInspectFindingsResponse`; indicates - * that this is a continuation of a prior `ListInspectFindings` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListInspectFindingsResponse`; indicates - * that this is a continuation of a prior `ListInspectFindings` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Restricts findings to items that match. Supports info_type and likelihood. - * Examples: - * - info_type=EMAIL_ADDRESS - * - info_type=PHONE_NUMBER,EMAIL_ADDRESS - * - likelihood=VERY_LIKELY - * - likelihood=VERY_LIKELY,LIKELY - * - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Restricts findings to items that match. Supports info_type and likelihood. - * Examples: - * - info_type=EMAIL_ADDRESS - * - info_type=PHONE_NUMBER,EMAIL_ADDRESS - * - likelihood=VERY_LIKELY - * - likelihood=VERY_LIKELY,LIKELY - * - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsResponse.php deleted file mode 100644 index 73872c071..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListInspectFindingsResponse.php +++ /dev/null @@ -1,92 +0,0 @@ -google.privacy.dlp.v2beta1.ListInspectFindingsResponse - */ -class ListInspectFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The results. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectResult result = 1; - */ - private $result = null; - /** - * If not empty, indicates that there may be more results that match the - * request; this value should be passed in a new `ListInspectFindingsRequest`. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The results. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectResult result = 1; - * @return \Google\Cloud\Dlp\V2beta1\InspectResult - */ - public function getResult() - { - return $this->result; - } - - /** - * The results. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectResult result = 1; - * @param \Google\Cloud\Dlp\V2beta1\InspectResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectResult::class); - $this->result = $var; - - return $this; - } - - /** - * If not empty, indicates that there may be more results that match the - * request; this value should be passed in a new `ListInspectFindingsRequest`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If not empty, indicates that there may be more results that match the - * request; this value should be passed in a new `ListInspectFindingsRequest`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesRequest.php deleted file mode 100644 index ab0eec33d..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesRequest.php +++ /dev/null @@ -1,64 +0,0 @@ -google.privacy.dlp.v2beta1.ListRootCategoriesRequest - */ -class ListRootCategoriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional language code for localized friendly category names. - * If omitted or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 1; - */ - private $language_code = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Optional language code for localized friendly category names. - * If omitted or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional language code for localized friendly category names. - * If omitted or if localized strings are not available, - * en-US strings will be returned. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesResponse.php deleted file mode 100644 index 067a1e2b0..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ListRootCategoriesResponse.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.ListRootCategoriesResponse - */ -class ListRootCategoriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all into type categories supported by the API. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 1; - */ - private $categories; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * List of all into type categories supported by the API. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * List of all into type categories supported by the API. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.CategoryDescription categories = 1; - * @param \Google\Cloud\Dlp\V2beta1\CategoryDescription[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\CategoryDescription::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Location.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Location.php deleted file mode 100644 index 41087fd9f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Location.php +++ /dev/null @@ -1,220 +0,0 @@ -google.privacy.dlp.v2beta1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * Zero-based byte offsets within a content item. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range byte_range = 1; - */ - private $byte_range = null; - /** - * Character offsets within a content item, included when content type - * is a text. Default charset assumed to be UTF-8. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range codepoint_range = 2; - */ - private $codepoint_range = null; - /** - * Location within an image's pixels. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3; - */ - private $image_boxes; - /** - * Key of the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordKey record_key = 4; - */ - private $record_key = null; - /** - * Field id of the field containing the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field_id = 5; - */ - private $field_id = null; - /** - * Location within a `ContentItem.Table`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.TableLocation table_location = 6; - */ - private $table_location = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Zero-based byte offsets within a content item. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range byte_range = 1; - * @return \Google\Cloud\Dlp\V2beta1\Range - */ - public function getByteRange() - { - return $this->byte_range; - } - - /** - * Zero-based byte offsets within a content item. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range byte_range = 1; - * @param \Google\Cloud\Dlp\V2beta1\Range $var - * @return $this - */ - public function setByteRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Range::class); - $this->byte_range = $var; - - return $this; - } - - /** - * Character offsets within a content item, included when content type - * is a text. Default charset assumed to be UTF-8. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range codepoint_range = 2; - * @return \Google\Cloud\Dlp\V2beta1\Range - */ - public function getCodepointRange() - { - return $this->codepoint_range; - } - - /** - * Character offsets within a content item, included when content type - * is a text. Default charset assumed to be UTF-8. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Range codepoint_range = 2; - * @param \Google\Cloud\Dlp\V2beta1\Range $var - * @return $this - */ - public function setCodepointRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Range::class); - $this->codepoint_range = $var; - - return $this; - } - - /** - * Location within an image's pixels. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImageBoxes() - { - return $this->image_boxes; - } - - /** - * Location within an image's pixels. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3; - * @param \Google\Cloud\Dlp\V2beta1\ImageLocation[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImageBoxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ImageLocation::class); - $this->image_boxes = $arr; - - return $this; - } - - /** - * Key of the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordKey record_key = 4; - * @return \Google\Cloud\Dlp\V2beta1\RecordKey - */ - public function getRecordKey() - { - return $this->record_key; - } - - /** - * Key of the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordKey record_key = 4; - * @param \Google\Cloud\Dlp\V2beta1\RecordKey $var - * @return $this - */ - public function setRecordKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordKey::class); - $this->record_key = $var; - - return $this; - } - - /** - * Field id of the field containing the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field_id = 5; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getFieldId() - { - return $this->field_id; - } - - /** - * Field id of the field containing the finding. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field_id = 5; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setFieldId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->field_id = $var; - - return $this; - } - - /** - * Location within a `ContentItem.Table`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.TableLocation table_location = 6; - * @return \Google\Cloud\Dlp\V2beta1\TableLocation - */ - public function getTableLocation() - { - return $this->table_location; - } - - /** - * Location within a `ContentItem.Table`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.TableLocation table_location = 6; - * @param \Google\Cloud\Dlp\V2beta1\TableLocation $var - * @return $this - */ - public function setTableLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\TableLocation::class); - $this->table_location = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OperationConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OperationConfig.php deleted file mode 100644 index 6c2e3195b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OperationConfig.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.OperationConfig - */ -class OperationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Max number of findings per file, Datastore entity, or database row. - * - * Generated from protobuf field int64 max_item_findings = 1; - */ - private $max_item_findings = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Max number of findings per file, Datastore entity, or database row. - * - * Generated from protobuf field int64 max_item_findings = 1; - * @return int|string - */ - public function getMaxItemFindings() - { - return $this->max_item_findings; - } - - /** - * Max number of findings per file, Datastore entity, or database row. - * - * Generated from protobuf field int64 max_item_findings = 1; - * @param int|string $var - * @return $this - */ - public function setMaxItemFindings($var) - { - GPBUtil::checkInt64($var); - $this->max_item_findings = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OutputStorageConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OutputStorageConfig.php deleted file mode 100644 index 9f60b43e9..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/OutputStorageConfig.php +++ /dev/null @@ -1,146 +0,0 @@ -google.privacy.dlp.v2beta1.OutputStorageConfig - */ -class OutputStorageConfig extends \Google\Protobuf\Internal\Message -{ - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Store findings in a new table in the dataset. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable table = 1; - * @return \Google\Cloud\Dlp\V2beta1\BigQueryTable - */ - public function getTable() - { - return $this->readOneof(1); - } - - /** - * Store findings in a new table in the dataset. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable table = 1; - * @param \Google\Cloud\Dlp\V2beta1\BigQueryTable $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryTable::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The path to a Google Cloud Storage location to store output. - * The bucket must already exist and - * the Google APIs service account for DLP must have write permission to - * write to the given bucket. - * Results are split over multiple csv files with each file name matching - * the pattern "[operation_id]_[count].csv", for example - * `3094877188788974909_1.csv`. The `operation_id` matches the - * identifier for the Operation, and the `count` is a counter used for - * tracking the number of files written. - * The CSV file(s) contain the following columns regardless of storage type - * scanned: - * - id - * - info_type - * - likelihood - * - byte size of finding - * - quote - * - timestamp - * For Cloud Storage the next columns are: - * - file_path - * - start_offset - * For Cloud Datastore the next columns are: - * - project_id - * - namespace_id - * - path - * - column_name - * - offset - * For BigQuery the next columns are: - * - row_number - * - project_id - * - dataset_id - * - table_id - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStoragePath storage_path = 2; - * @return \Google\Cloud\Dlp\V2beta1\CloudStoragePath - */ - public function getStoragePath() - { - return $this->readOneof(2); - } - - /** - * The path to a Google Cloud Storage location to store output. - * The bucket must already exist and - * the Google APIs service account for DLP must have write permission to - * write to the given bucket. - * Results are split over multiple csv files with each file name matching - * the pattern "[operation_id]_[count].csv", for example - * `3094877188788974909_1.csv`. The `operation_id` matches the - * identifier for the Operation, and the `count` is a counter used for - * tracking the number of files written. - * The CSV file(s) contain the following columns regardless of storage type - * scanned: - * - id - * - info_type - * - likelihood - * - byte size of finding - * - quote - * - timestamp - * For Cloud Storage the next columns are: - * - file_path - * - start_offset - * For Cloud Datastore the next columns are: - * - project_id - * - namespace_id - * - path - * - column_name - * - offset - * For BigQuery the next columns are: - * - row_number - * - project_id - * - dataset_id - * - table_id - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStoragePath storage_path = 2; - * @param \Google\Cloud\Dlp\V2beta1\CloudStoragePath $var - * @return $this - */ - public function setStoragePath($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CloudStoragePath::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PartitionId.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PartitionId.php deleted file mode 100644 index 62dfed4ae..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PartitionId.php +++ /dev/null @@ -1,93 +0,0 @@ -google.privacy.dlp.v2beta1.PartitionId - */ -class PartitionId extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the project to which the entities belong. - * - * Generated from protobuf field string project_id = 2; - */ - private $project_id = ''; - /** - * If not empty, the ID of the namespace to which the entities belong. - * - * Generated from protobuf field string namespace_id = 4; - */ - private $namespace_id = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The ID of the project to which the entities belong. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the project to which the entities belong. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * If not empty, the ID of the namespace to which the entities belong. - * - * Generated from protobuf field string namespace_id = 4; - * @return string - */ - public function getNamespaceId() - { - return $this->namespace_id; - } - - /** - * If not empty, the ID of the namespace to which the entities belong. - * - * Generated from protobuf field string namespace_id = 4; - * @param string $var - * @return $this - */ - public function setNamespaceId($var) - { - GPBUtil::checkString($var, True); - $this->namespace_id = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrimitiveTransformation.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrimitiveTransformation.php deleted file mode 100644 index 7f985fc8d..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrimitiveTransformation.php +++ /dev/null @@ -1,232 +0,0 @@ -google.privacy.dlp.v2beta1.PrimitiveTransformation - */ -class PrimitiveTransformation extends \Google\Protobuf\Internal\Message -{ - protected $transformation; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.ReplaceValueConfig replace_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\ReplaceValueConfig - */ - public function getReplaceConfig() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.ReplaceValueConfig replace_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\ReplaceValueConfig $var - * @return $this - */ - public function setReplaceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\ReplaceValueConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RedactConfig redact_config = 2; - * @return \Google\Cloud\Dlp\V2beta1\RedactConfig - */ - public function getRedactConfig() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RedactConfig redact_config = 2; - * @param \Google\Cloud\Dlp\V2beta1\RedactConfig $var - * @return $this - */ - public function setRedactConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RedactConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CharacterMaskConfig character_mask_config = 3; - * @return \Google\Cloud\Dlp\V2beta1\CharacterMaskConfig - */ - public function getCharacterMaskConfig() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CharacterMaskConfig character_mask_config = 3; - * @param \Google\Cloud\Dlp\V2beta1\CharacterMaskConfig $var - * @return $this - */ - public function setCharacterMaskConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CharacterMaskConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return \Google\Cloud\Dlp\V2beta1\CryptoReplaceFfxFpeConfig - */ - public function getCryptoReplaceFfxFpeConfig() - { - return $this->readOneof(4); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @param \Google\Cloud\Dlp\V2beta1\CryptoReplaceFfxFpeConfig $var - * @return $this - */ - public function setCryptoReplaceFfxFpeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CryptoReplaceFfxFpeConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return \Google\Cloud\Dlp\V2beta1\FixedSizeBucketingConfig - */ - public function getFixedSizeBucketingConfig() - { - return $this->readOneof(5); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @param \Google\Cloud\Dlp\V2beta1\FixedSizeBucketingConfig $var - * @return $this - */ - public function setFixedSizeBucketingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FixedSizeBucketingConfig::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.BucketingConfig bucketing_config = 6; - * @return \Google\Cloud\Dlp\V2beta1\BucketingConfig - */ - public function getBucketingConfig() - { - return $this->readOneof(6); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.BucketingConfig bucketing_config = 6; - * @param \Google\Cloud\Dlp\V2beta1\BucketingConfig $var - * @return $this - */ - public function setBucketingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BucketingConfig::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return \Google\Cloud\Dlp\V2beta1\ReplaceWithInfoTypeConfig - */ - public function getReplaceWithInfoTypeConfig() - { - return $this->readOneof(7); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @param \Google\Cloud\Dlp\V2beta1\ReplaceWithInfoTypeConfig $var - * @return $this - */ - public function setReplaceWithInfoTypeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\ReplaceWithInfoTypeConfig::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TimePartConfig time_part_config = 8; - * @return \Google\Cloud\Dlp\V2beta1\TimePartConfig - */ - public function getTimePartConfig() - { - return $this->readOneof(8); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TimePartConfig time_part_config = 8; - * @param \Google\Cloud\Dlp\V2beta1\TimePartConfig $var - * @return $this - */ - public function setTimePartConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\TimePartConfig::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoHashConfig crypto_hash_config = 9; - * @return \Google\Cloud\Dlp\V2beta1\CryptoHashConfig - */ - public function getCryptoHashConfig() - { - return $this->readOneof(9); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CryptoHashConfig crypto_hash_config = 9; - * @param \Google\Cloud\Dlp\V2beta1\CryptoHashConfig $var - * @return $this - */ - public function setCryptoHashConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CryptoHashConfig::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformation() - { - return $this->whichOneof("transformation"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric.php deleted file mode 100644 index 150a7b44f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric.php +++ /dev/null @@ -1,122 +0,0 @@ -google.privacy.dlp.v2beta1.PrivacyMetric - */ -class PrivacyMetric extends \Google\Protobuf\Internal\Message -{ - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric_NumericalStatsConfig - */ - public function getNumericalStatsConfig() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric_NumericalStatsConfig $var - * @return $this - */ - public function setNumericalStatsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric_NumericalStatsConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric_CategoricalStatsConfig - */ - public function getCategoricalStatsConfig() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric_CategoricalStatsConfig $var - * @return $this - */ - public function setCategoricalStatsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric_CategoricalStatsConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric_KAnonymityConfig - */ - public function getKAnonymityConfig() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric_KAnonymityConfig $var - * @return $this - */ - public function setKAnonymityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric_KAnonymityConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric_LDiversityConfig - */ - public function getLDiversityConfig() - { - return $this->readOneof(4); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric_LDiversityConfig $var - * @return $this - */ - public function setLDiversityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric_LDiversityConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_CategoricalStatsConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_CategoricalStatsConfig.php deleted file mode 100644 index 2a3d4348f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_CategoricalStatsConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.privacy.dlp.v2beta1.PrivacyMetric.CategoricalStatsConfig - */ -class PrivacyMetric_CategoricalStatsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Field to compute categorical stats on. All column types are - * supported except for arrays and structs. However, it may be more - * informative to use NumericalStats when the field type is supported, - * depending on the data. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - */ - private $field = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Field to compute categorical stats on. All column types are - * supported except for arrays and structs. However, it may be more - * informative to use NumericalStats when the field type is supported, - * depending on the data. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getField() - { - return $this->field; - } - - /** - * Field to compute categorical stats on. All column types are - * supported except for arrays and structs. However, it may be more - * informative to use NumericalStats when the field type is supported, - * depending on the data. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_KAnonymityConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_KAnonymityConfig.php deleted file mode 100644 index fa8d3bad7..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_KAnonymityConfig.php +++ /dev/null @@ -1,104 +0,0 @@ -google.privacy.dlp.v2beta1.PrivacyMetric.KAnonymityConfig - */ -class PrivacyMetric_KAnonymityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Set of fields to compute k-anonymity over. When multiple fields are - * specified, they are considered a single composite key. Structs and - * repeated data types are not supported; however, nested fields are - * supported so long as they are not structs themselves or nested within - * a repeated field. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - */ - private $quasi_ids; - /** - * Optional message indicating that each distinct `EntityId` should not - * contribute to the k-anonymity count more than once per equivalence class. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.EntityId entity_id = 2; - */ - private $entity_id = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Set of fields to compute k-anonymity over. When multiple fields are - * specified, they are considered a single composite key. Structs and - * repeated data types are not supported; however, nested fields are - * supported so long as they are not structs themselves or nested within - * a repeated field. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuasiIds() - { - return $this->quasi_ids; - } - - /** - * Set of fields to compute k-anonymity over. When multiple fields are - * specified, they are considered a single composite key. Structs and - * repeated data types are not supported; however, nested fields are - * supported so long as they are not structs themselves or nested within - * a repeated field. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuasiIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->quasi_ids = $arr; - - return $this; - } - - /** - * Optional message indicating that each distinct `EntityId` should not - * contribute to the k-anonymity count more than once per equivalence class. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.EntityId entity_id = 2; - * @return \Google\Cloud\Dlp\V2beta1\EntityId - */ - public function getEntityId() - { - return $this->entity_id; - } - - /** - * Optional message indicating that each distinct `EntityId` should not - * contribute to the k-anonymity count more than once per equivalence class. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.EntityId entity_id = 2; - * @param \Google\Cloud\Dlp\V2beta1\EntityId $var - * @return $this - */ - public function setEntityId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\EntityId::class); - $this->entity_id = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_LDiversityConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_LDiversityConfig.php deleted file mode 100644 index 6738bbbd3..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_LDiversityConfig.php +++ /dev/null @@ -1,95 +0,0 @@ -google.privacy.dlp.v2beta1.PrivacyMetric.LDiversityConfig - */ -class PrivacyMetric_LDiversityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Set of quasi-identifiers indicating how equivalence classes are - * defined for the l-diversity computation. When multiple fields are - * specified, they are considered a single composite key. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - */ - private $quasi_ids; - /** - * Sensitive field for computing the l-value. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId sensitive_attribute = 2; - */ - private $sensitive_attribute = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Set of quasi-identifiers indicating how equivalence classes are - * defined for the l-diversity computation. When multiple fields are - * specified, they are considered a single composite key. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuasiIds() - { - return $this->quasi_ids; - } - - /** - * Set of quasi-identifiers indicating how equivalence classes are - * defined for the l-diversity computation. When multiple fields are - * specified, they are considered a single composite key. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId quasi_ids = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuasiIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->quasi_ids = $arr; - - return $this; - } - - /** - * Sensitive field for computing the l-value. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId sensitive_attribute = 2; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getSensitiveAttribute() - { - return $this->sensitive_attribute; - } - - /** - * Sensitive field for computing the l-value. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId sensitive_attribute = 2; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setSensitiveAttribute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->sensitive_attribute = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_NumericalStatsConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_NumericalStatsConfig.php deleted file mode 100644 index beab49da4..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PrivacyMetric_NumericalStatsConfig.php +++ /dev/null @@ -1,61 +0,0 @@ -google.privacy.dlp.v2beta1.PrivacyMetric.NumericalStatsConfig - */ -class PrivacyMetric_NumericalStatsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Field to compute numerical stats on. Supported types are - * integer, float, date, datetime, timestamp, time. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - */ - private $field = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Field to compute numerical stats on. Supported types are - * integer, float, date, datetime, timestamp, time. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getField() - { - return $this->field; - } - - /** - * Field to compute numerical stats on. Supported types are - * integer, float, date, datetime, timestamp, time. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Projection.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Projection.php deleted file mode 100644 index e418cc28b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Projection.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.Projection - */ -class Projection extends \Google\Protobuf\Internal\Message -{ - /** - * The property to project. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PropertyReference property = 1; - */ - private $property = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The property to project. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PropertyReference property = 1; - * @return \Google\Cloud\Dlp\V2beta1\PropertyReference - */ - public function getProperty() - { - return $this->property; - } - - /** - * The property to project. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PropertyReference property = 1; - * @param \Google\Cloud\Dlp\V2beta1\PropertyReference $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PropertyReference::class); - $this->property = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PropertyReference.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PropertyReference.php deleted file mode 100644 index 58faa245a..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/PropertyReference.php +++ /dev/null @@ -1,60 +0,0 @@ -google.privacy.dlp.v2beta1.PropertyReference - */ -class PropertyReference extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the property. - * If name includes "."s, it may be interpreted as a property name path. - * - * Generated from protobuf field string name = 2; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * The name of the property. - * If name includes "."s, it may be interpreted as a property name path. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the property. - * If name includes "."s, it may be interpreted as a property name path. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Range.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Range.php deleted file mode 100644 index f9bf1ea6c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Range.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.Range - */ -class Range extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the first character of the range (inclusive). - * - * Generated from protobuf field int64 start = 1; - */ - private $start = 0; - /** - * Index of the last character of the range (exclusive). - * - * Generated from protobuf field int64 end = 2; - */ - private $end = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Index of the first character of the range (inclusive). - * - * Generated from protobuf field int64 start = 1; - * @return int|string - */ - public function getStart() - { - return $this->start; - } - - /** - * Index of the first character of the range (inclusive). - * - * Generated from protobuf field int64 start = 1; - * @param int|string $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkInt64($var); - $this->start = $var; - - return $this; - } - - /** - * Index of the last character of the range (exclusive). - * - * Generated from protobuf field int64 end = 2; - * @return int|string - */ - public function getEnd() - { - return $this->end; - } - - /** - * Index of the last character of the range (exclusive). - * - * Generated from protobuf field int64 end = 2; - * @param int|string $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkInt64($var); - $this->end = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition.php deleted file mode 100644 index 181dacfd8..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition.php +++ /dev/null @@ -1,52 +0,0 @@ -google.privacy.dlp.v2beta1.RecordCondition - */ -class RecordCondition extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions expressions = 3; - */ - private $expressions = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions expressions = 3; - * @return \Google\Cloud\Dlp\V2beta1\RecordCondition_Expressions - */ - public function getExpressions() - { - return $this->expressions; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions expressions = 3; - * @param \Google\Cloud\Dlp\V2beta1\RecordCondition_Expressions $var - * @return $this - */ - public function setExpressions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordCondition_Expressions::class); - $this->expressions = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Condition.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Condition.php deleted file mode 100644 index 84df4c946..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Condition.php +++ /dev/null @@ -1,135 +0,0 @@ -google.privacy.dlp.v2beta1.RecordCondition.Condition - */ -class RecordCondition_Condition extends \Google\Protobuf\Internal\Message -{ - /** - * Field within the record this condition is evaluated against. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - */ - private $field = null; - /** - * Operator used to compare the field or info type to the value. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RelationalOperator operator = 3; - */ - private $operator = 0; - /** - * Value to compare against. [Required, except for `EXISTS` tests.] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 4; - */ - private $value = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Field within the record this condition is evaluated against. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getField() - { - return $this->field; - } - - /** - * Field within the record this condition is evaluated against. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->field = $var; - - return $this; - } - - /** - * Operator used to compare the field or info type to the value. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RelationalOperator operator = 3; - * @return int - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Operator used to compare the field or info type to the value. [required] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RelationalOperator operator = 3; - * @param int $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\RelationalOperator::class); - $this->operator = $var; - - return $this; - } - - /** - * Value to compare against. [Required, except for `EXISTS` tests.] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 4; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getValue() - { - return $this->value; - } - - /** - * Value to compare against. [Required, except for `EXISTS` tests.] - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 4; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Conditions.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Conditions.php deleted file mode 100644 index e19435ffc..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Conditions.php +++ /dev/null @@ -1,49 +0,0 @@ -google.privacy.dlp.v2beta1.RecordCondition.Conditions - */ -class RecordCondition_Conditions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordCondition.Condition conditions = 1; - */ - private $conditions; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordCondition.Condition conditions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordCondition.Condition conditions = 1; - * @param \Google\Cloud\Dlp\V2beta1\RecordCondition_Condition[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RecordCondition_Condition::class); - $this->conditions = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions.php deleted file mode 100644 index 0cd3cb961..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions.php +++ /dev/null @@ -1,91 +0,0 @@ -google.privacy.dlp.v2beta1.RecordCondition.Expressions - */ -class RecordCondition_Expressions extends \Google\Protobuf\Internal\Message -{ - /** - * The operator to apply to the result of conditions. Default and currently - * only supported value is `AND`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - */ - private $logical_operator = 0; - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The operator to apply to the result of conditions. Default and currently - * only supported value is `AND`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return int - */ - public function getLogicalOperator() - { - return $this->logical_operator; - } - - /** - * The operator to apply to the result of conditions. Default and currently - * only supported value is `AND`. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @param int $var - * @return $this - */ - public function setLogicalOperator($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\RecordCondition_Expressions_LogicalOperator::class); - $this->logical_operator = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Conditions conditions = 3; - * @return \Google\Cloud\Dlp\V2beta1\RecordCondition_Conditions - */ - public function getConditions() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition.Conditions conditions = 3; - * @param \Google\Cloud\Dlp\V2beta1\RecordCondition_Conditions $var - * @return $this - */ - public function setConditions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordCondition_Conditions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions_LogicalOperator.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions_LogicalOperator.php deleted file mode 100644 index 5dbbe8c8f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordCondition_Expressions_LogicalOperator.php +++ /dev/null @@ -1,21 +0,0 @@ -Google\Privacy\Dlp\V2beta1\RecordCondition\Expressions\LogicalOperator - */ -class RecordCondition_Expressions_LogicalOperator -{ - /** - * Generated from protobuf enum LOGICAL_OPERATOR_UNSPECIFIED = 0; - */ - const LOGICAL_OPERATOR_UNSPECIFIED = 0; - /** - * Generated from protobuf enum AND = 1; - */ - const AND = 1; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordKey.php deleted file mode 100644 index d163b958e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordKey.php +++ /dev/null @@ -1,78 +0,0 @@ -google.privacy.dlp.v2beta1.RecordKey - */ -class RecordKey extends \Google\Protobuf\Internal\Message -{ - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageKey cloud_storage_key = 1; - * @return \Google\Cloud\Dlp\V2beta1\CloudStorageKey - */ - public function getCloudStorageKey() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageKey cloud_storage_key = 1; - * @param \Google\Cloud\Dlp\V2beta1\CloudStorageKey $var - * @return $this - */ - public function setCloudStorageKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CloudStorageKey::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.DatastoreKey datastore_key = 2; - * @return \Google\Cloud\Dlp\V2beta1\DatastoreKey - */ - public function getDatastoreKey() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.DatastoreKey datastore_key = 2; - * @param \Google\Cloud\Dlp\V2beta1\DatastoreKey $var - * @return $this - */ - public function setDatastoreKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\DatastoreKey::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordSuppression.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordSuppression.php deleted file mode 100644 index 9ec80e925..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordSuppression.php +++ /dev/null @@ -1,52 +0,0 @@ -google.privacy.dlp.v2beta1.RecordSuppression - */ -class RecordSuppression extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 1; - */ - private $condition = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 1; - * @return \Google\Cloud\Dlp\V2beta1\RecordCondition - */ - public function getCondition() - { - return $this->condition; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordCondition condition = 1; - * @param \Google\Cloud\Dlp\V2beta1\RecordCondition $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordCondition::class); - $this->condition = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordTransformations.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordTransformations.php deleted file mode 100644 index 6baf3cf4f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RecordTransformations.php +++ /dev/null @@ -1,93 +0,0 @@ -google.privacy.dlp.v2beta1.RecordTransformations - */ -class RecordTransformations extends \Google\Protobuf\Internal\Message -{ - /** - * Transform the record by applying various field transformations. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 1; - */ - private $field_transformations; - /** - * Configuration defining which records get suppressed entirely. Records that - * match any suppression rule are omitted from the output [optional]. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordSuppression record_suppressions = 2; - */ - private $record_suppressions; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Transform the record by applying various field transformations. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldTransformations() - { - return $this->field_transformations; - } - - /** - * Transform the record by applying various field transformations. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldTransformation[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldTransformations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldTransformation::class); - $this->field_transformations = $arr; - - return $this; - } - - /** - * Configuration defining which records get suppressed entirely. Records that - * match any suppression rule are omitted from the output [optional]. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordSuppression record_suppressions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecordSuppressions() - { - return $this->record_suppressions; - } - - /** - * Configuration defining which records get suppressed entirely. Records that - * match any suppression rule are omitted from the output [optional]. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RecordSuppression record_suppressions = 2; - * @param \Google\Cloud\Dlp\V2beta1\RecordSuppression[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecordSuppressions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RecordSuppression::class); - $this->record_suppressions = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactConfig.php deleted file mode 100644 index 576e7aeed..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactConfig.php +++ /dev/null @@ -1,27 +0,0 @@ -google.privacy.dlp.v2beta1.RedactConfig - */ -class RedactConfig extends \Google\Protobuf\Internal\Message -{ - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest.php deleted file mode 100644 index c05c16409..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.privacy.dlp.v2beta1.RedactContentRequest - */ -class RedactContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - */ - private $inspect_config = null; - /** - * The list of items to inspect. Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - */ - private $items; - /** - * The strings to replace findings text findings with. Must specify at least - * one of these or one ImageRedactionConfig if redacting images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig replace_configs = 3; - */ - private $replace_configs; - /** - * The configuration for specifying what content to redact from images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig image_redaction_configs = 4; - */ - private $image_redaction_configs; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @return \Google\Cloud\Dlp\V2beta1\InspectConfig - */ - public function getInspectConfig() - { - return $this->inspect_config; - } - - /** - * Configuration for the inspector. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InspectConfig inspect_config = 1; - * @param \Google\Cloud\Dlp\V2beta1\InspectConfig $var - * @return $this - */ - public function setInspectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InspectConfig::class); - $this->inspect_config = $var; - - return $this; - } - - /** - * The list of items to inspect. Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The list of items to inspect. Up to 100 are allowed per request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 2; - * @param \Google\Cloud\Dlp\V2beta1\ContentItem[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ContentItem::class); - $this->items = $arr; - - return $this; - } - - /** - * The strings to replace findings text findings with. Must specify at least - * one of these or one ImageRedactionConfig if redacting images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig replace_configs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplaceConfigs() - { - return $this->replace_configs; - } - - /** - * The strings to replace findings text findings with. Must specify at least - * one of these or one ImageRedactionConfig if redacting images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig replace_configs = 3; - * @param \Google\Cloud\Dlp\V2beta1\RedactContentRequest_ReplaceConfig[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplaceConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RedactContentRequest_ReplaceConfig::class); - $this->replace_configs = $arr; - - return $this; - } - - /** - * The configuration for specifying what content to redact from images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig image_redaction_configs = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImageRedactionConfigs() - { - return $this->image_redaction_configs; - } - - /** - * The configuration for specifying what content to redact from images. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig image_redaction_configs = 4; - * @param \Google\Cloud\Dlp\V2beta1\RedactContentRequest_ImageRedactionConfig[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImageRedactionConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RedactContentRequest_ImageRedactionConfig::class); - $this->image_redaction_configs = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ImageRedactionConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ImageRedactionConfig.php deleted file mode 100644 index 056ac61d4..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ImageRedactionConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig - */ -class RedactContentRequest_ImageRedactionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The color to use when redacting content from an image. If not specified, - * the default is black. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Color redaction_color = 3; - */ - private $redaction_color = null; - protected $target; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Only one per info_type should be provided per request. If not - * specified, and redact_all_text is false, the DLP API will redact all - * text that it matches against all info_types that are found, but not - * specified in another ImageRedactionConfig. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->readOneof(1); - } - - /** - * Only one per info_type should be provided per request. If not - * specified, and redact_all_text is false, the DLP API will redact all - * text that it matches against all info_types that are found, but not - * specified in another ImageRedactionConfig. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If true, all text found in the image, regardless whether it matches an - * info_type, is redacted. - * - * Generated from protobuf field bool redact_all_text = 2; - * @return bool - */ - public function getRedactAllText() - { - return $this->readOneof(2); - } - - /** - * If true, all text found in the image, regardless whether it matches an - * info_type, is redacted. - * - * Generated from protobuf field bool redact_all_text = 2; - * @param bool $var - * @return $this - */ - public function setRedactAllText($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The color to use when redacting content from an image. If not specified, - * the default is black. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Color redaction_color = 3; - * @return \Google\Cloud\Dlp\V2beta1\Color - */ - public function getRedactionColor() - { - return $this->redaction_color; - } - - /** - * The color to use when redacting content from an image. If not specified, - * the default is black. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Color redaction_color = 3; - * @param \Google\Cloud\Dlp\V2beta1\Color $var - * @return $this - */ - public function setRedactionColor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Color::class); - $this->redaction_color = $var; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ReplaceConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ReplaceConfig.php deleted file mode 100644 index fef15413c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentRequest_ReplaceConfig.php +++ /dev/null @@ -1,96 +0,0 @@ -google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig - */ -class RedactContentRequest_ReplaceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Type of information to replace. Only one ReplaceConfig per info_type - * should be provided. If ReplaceConfig does not have an info_type, the DLP - * API matches it against all info_types that are found but not specified in - * another ReplaceConfig. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - */ - private $info_type = null; - /** - * Content replacing sensitive information of given type. Max 256 chars. - * - * Generated from protobuf field string replace_with = 2; - */ - private $replace_with = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Type of information to replace. Only one ReplaceConfig per info_type - * should be provided. If ReplaceConfig does not have an info_type, the DLP - * API matches it against all info_types that are found but not specified in - * another ReplaceConfig. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * Type of information to replace. Only one ReplaceConfig per info_type - * should be provided. If ReplaceConfig does not have an info_type, the DLP - * API matches it against all info_types that are found but not specified in - * another ReplaceConfig. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Content replacing sensitive information of given type. Max 256 chars. - * - * Generated from protobuf field string replace_with = 2; - * @return string - */ - public function getReplaceWith() - { - return $this->replace_with; - } - - /** - * Content replacing sensitive information of given type. Max 256 chars. - * - * Generated from protobuf field string replace_with = 2; - * @param string $var - * @return $this - */ - public function setReplaceWith($var) - { - GPBUtil::checkString($var, True); - $this->replace_with = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentResponse.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentResponse.php deleted file mode 100644 index 9370cbc76..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RedactContentResponse.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.RedactContentResponse - */ -class RedactContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The redacted content. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - */ - private $items; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The redacted content. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The redacted content. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ContentItem items = 1; - * @param \Google\Cloud\Dlp\V2beta1\ContentItem[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ContentItem::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RelationalOperator.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RelationalOperator.php deleted file mode 100644 index 90689bf81..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RelationalOperator.php +++ /dev/null @@ -1,61 +0,0 @@ -Google\Privacy\Dlp\V2beta1\RelationalOperator - */ -class RelationalOperator -{ - /** - * Generated from protobuf enum RELATIONAL_OPERATOR_UNSPECIFIED = 0; - */ - const RELATIONAL_OPERATOR_UNSPECIFIED = 0; - /** - * Equal. - * - * Generated from protobuf enum EQUAL_TO = 1; - */ - const EQUAL_TO = 1; - /** - * Not equal to. - * - * Generated from protobuf enum NOT_EQUAL_TO = 2; - */ - const NOT_EQUAL_TO = 2; - /** - * Greater than. - * - * Generated from protobuf enum GREATER_THAN = 3; - */ - const GREATER_THAN = 3; - /** - * Less than. - * - * Generated from protobuf enum LESS_THAN = 4; - */ - const LESS_THAN = 4; - /** - * Greater than or equals. - * - * Generated from protobuf enum GREATER_THAN_OR_EQUALS = 5; - */ - const GREATER_THAN_OR_EQUALS = 5; - /** - * Less than or equals. - * - * Generated from protobuf enum LESS_THAN_OR_EQUALS = 6; - */ - const LESS_THAN_OR_EQUALS = 6; - /** - * Exists - * - * Generated from protobuf enum EXISTS = 7; - */ - const EXISTS = 7; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceValueConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceValueConfig.php deleted file mode 100644 index ebcaa84ff..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceValueConfig.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.ReplaceValueConfig - */ -class ReplaceValueConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Value to replace it with. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value new_value = 1; - */ - private $new_value = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Value to replace it with. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value new_value = 1; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getNewValue() - { - return $this->new_value; - } - - /** - * Value to replace it with. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value new_value = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setNewValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->new_value = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceWithInfoTypeConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceWithInfoTypeConfig.php deleted file mode 100644 index a69250512..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ReplaceWithInfoTypeConfig.php +++ /dev/null @@ -1,25 +0,0 @@ -google.privacy.dlp.v2beta1.ReplaceWithInfoTypeConfig - */ -class ReplaceWithInfoTypeConfig extends \Google\Protobuf\Internal\Message -{ - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationMetadata.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationMetadata.php deleted file mode 100644 index f743069eb..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationMetadata.php +++ /dev/null @@ -1,123 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationMetadata - */ -class RiskAnalysisOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - private $create_time = null; - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric requested_privacy_metric = 2; - */ - private $requested_privacy_metric = null; - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable requested_source_table = 3; - */ - private $requested_source_table = null; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * The time which this request was started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric requested_privacy_metric = 2; - * @return \Google\Cloud\Dlp\V2beta1\PrivacyMetric - */ - public function getRequestedPrivacyMetric() - { - return $this->requested_privacy_metric; - } - - /** - * Privacy metric to compute. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrivacyMetric requested_privacy_metric = 2; - * @param \Google\Cloud\Dlp\V2beta1\PrivacyMetric $var - * @return $this - */ - public function setRequestedPrivacyMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrivacyMetric::class); - $this->requested_privacy_metric = $var; - - return $this; - } - - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable requested_source_table = 3; - * @return \Google\Cloud\Dlp\V2beta1\BigQueryTable - */ - public function getRequestedSourceTable() - { - return $this->requested_source_table; - } - - /** - * Input dataset to compute metrics over. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryTable requested_source_table = 3; - * @param \Google\Cloud\Dlp\V2beta1\BigQueryTable $var - * @return $this - */ - public function setRequestedSourceTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryTable::class); - $this->requested_source_table = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult.php deleted file mode 100644 index 7bbe488f8..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult.php +++ /dev/null @@ -1,124 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult - */ -class RiskAnalysisOperationResult extends \Google\Protobuf\Internal\Message -{ - protected $result; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.NumericalStatsResult numerical_stats_result = 3; - * @return \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_NumericalStatsResult - */ - public function getNumericalStatsResult() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.NumericalStatsResult numerical_stats_result = 3; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_NumericalStatsResult $var - * @return $this - */ - public function setNumericalStatsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_NumericalStatsResult::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult categorical_stats_result = 4; - * @return \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_CategoricalStatsResult - */ - public function getCategoricalStatsResult() - { - return $this->readOneof(4); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult categorical_stats_result = 4; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_CategoricalStatsResult $var - * @return $this - */ - public function setCategoricalStatsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_CategoricalStatsResult::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult k_anonymity_result = 5; - * @return \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult - */ - public function getKAnonymityResult() - { - return $this->readOneof(5); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult k_anonymity_result = 5; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult $var - * @return $this - */ - public function setKAnonymityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult l_diversity_result = 6; - * @return \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult - */ - public function getLDiversityResult() - { - return $this->readOneof(6); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult l_diversity_result = 6; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult $var - * @return $this - */ - public function setLDiversityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult.php deleted file mode 100644 index 093157d90..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult - */ -class RiskAnalysisOperationResult_CategoricalStatsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Histogram of value frequencies in the column. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - private $value_frequency_histogram_buckets; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Histogram of value frequencies in the column. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValueFrequencyHistogramBuckets() - { - return $this->value_frequency_histogram_buckets; - } - - /** - * Histogram of value frequencies in the column. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValueFrequencyHistogramBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket::class); - $this->value_frequency_histogram_buckets = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket.php deleted file mode 100644 index 42f48061b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket.php +++ /dev/null @@ -1,156 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket - */ -class RiskAnalysisOperationResult_CategoricalStatsResult_CategoricalStatsHistogramBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_lower_bound = 1; - */ - private $value_frequency_lower_bound = 0; - /** - * Upper bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_upper_bound = 2; - */ - private $value_frequency_upper_bound = 0; - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - */ - private $bucket_size = 0; - /** - * Sample of value frequencies in this bucket. The total number of - * values returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency bucket_values = 4; - */ - private $bucket_values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Lower bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_lower_bound = 1; - * @return int|string - */ - public function getValueFrequencyLowerBound() - { - return $this->value_frequency_lower_bound; - } - - /** - * Lower bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_lower_bound = 1; - * @param int|string $var - * @return $this - */ - public function setValueFrequencyLowerBound($var) - { - GPBUtil::checkInt64($var); - $this->value_frequency_lower_bound = $var; - - return $this; - } - - /** - * Upper bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_upper_bound = 2; - * @return int|string - */ - public function getValueFrequencyUpperBound() - { - return $this->value_frequency_upper_bound; - } - - /** - * Upper bound on the value frequency of the values in this bucket. - * - * Generated from protobuf field int64 value_frequency_upper_bound = 2; - * @param int|string $var - * @return $this - */ - public function setValueFrequencyUpperBound($var) - { - GPBUtil::checkInt64($var); - $this->value_frequency_upper_bound = $var; - - return $this; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @return int|string - */ - public function getBucketSize() - { - return $this->bucket_size; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @param int|string $var - * @return $this - */ - public function setBucketSize($var) - { - GPBUtil::checkInt64($var); - $this->bucket_size = $var; - - return $this; - } - - /** - * Sample of value frequencies in this bucket. The total number of - * values returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency bucket_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBucketValues() - { - return $this->bucket_values; - } - - /** - * Sample of value frequencies in this bucket. The total number of - * values returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency bucket_values = 4; - * @param \Google\Cloud\Dlp\V2beta1\ValueFrequency[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBucketValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ValueFrequency::class); - $this->bucket_values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult.php deleted file mode 100644 index ad363c8df..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult - */ -class RiskAnalysisOperationResult_KAnonymityResult extends \Google\Protobuf\Internal\Message -{ - /** - * Histogram of k-anonymity equivalence classes. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - private $equivalence_class_histogram_buckets; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Histogram of k-anonymity equivalence classes. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEquivalenceClassHistogramBuckets() - { - return $this->equivalence_class_histogram_buckets; - } - - /** - * Histogram of k-anonymity equivalence classes. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEquivalenceClassHistogramBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket::class); - $this->equivalence_class_histogram_buckets = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass.php deleted file mode 100644 index 3af01f7fa..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass.php +++ /dev/null @@ -1,98 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass - */ -class RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass extends \Google\Protobuf\Internal\Message -{ - /** - * Set of values defining the equivalence class. One value per - * quasi-identifier column in the original KAnonymity metric message. - * The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - */ - private $quasi_ids_values; - /** - * Size of the equivalence class, for example number of rows with the - * above set of values. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - */ - private $equivalence_class_size = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Set of values defining the equivalence class. One value per - * quasi-identifier column in the original KAnonymity metric message. - * The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuasiIdsValues() - { - return $this->quasi_ids_values; - } - - /** - * Set of values defining the equivalence class. One value per - * quasi-identifier column in the original KAnonymity metric message. - * The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuasiIdsValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->quasi_ids_values = $arr; - - return $this; - } - - /** - * Size of the equivalence class, for example number of rows with the - * above set of values. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - * @return int|string - */ - public function getEquivalenceClassSize() - { - return $this->equivalence_class_size; - } - - /** - * Size of the equivalence class, for example number of rows with the - * above set of values. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - * @param int|string $var - * @return $this - */ - public function setEquivalenceClassSize($var) - { - GPBUtil::checkInt64($var); - $this->equivalence_class_size = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket.php deleted file mode 100644 index da89b6c5f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket.php +++ /dev/null @@ -1,156 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket - */ -class RiskAnalysisOperationResult_KAnonymityResult_KAnonymityHistogramBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_lower_bound = 1; - */ - private $equivalence_class_size_lower_bound = 0; - /** - * Upper bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_upper_bound = 2; - */ - private $equivalence_class_size_upper_bound = 0; - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - */ - private $bucket_size = 0; - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - private $bucket_values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Lower bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_lower_bound = 1; - * @return int|string - */ - public function getEquivalenceClassSizeLowerBound() - { - return $this->equivalence_class_size_lower_bound; - } - - /** - * Lower bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_lower_bound = 1; - * @param int|string $var - * @return $this - */ - public function setEquivalenceClassSizeLowerBound($var) - { - GPBUtil::checkInt64($var); - $this->equivalence_class_size_lower_bound = $var; - - return $this; - } - - /** - * Upper bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_upper_bound = 2; - * @return int|string - */ - public function getEquivalenceClassSizeUpperBound() - { - return $this->equivalence_class_size_upper_bound; - } - - /** - * Upper bound on the size of the equivalence classes in this bucket. - * - * Generated from protobuf field int64 equivalence_class_size_upper_bound = 2; - * @param int|string $var - * @return $this - */ - public function setEquivalenceClassSizeUpperBound($var) - { - GPBUtil::checkInt64($var); - $this->equivalence_class_size_upper_bound = $var; - - return $this; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @return int|string - */ - public function getBucketSize() - { - return $this->bucket_size; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @param int|string $var - * @return $this - */ - public function setBucketSize($var) - { - GPBUtil::checkInt64($var); - $this->bucket_size = $var; - - return $this; - } - - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBucketValues() - { - return $this->bucket_values; - } - - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBucketValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_KAnonymityResult_KAnonymityEquivalenceClass::class); - $this->bucket_values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult.php deleted file mode 100644 index 95734cb58..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult - */ -class RiskAnalysisOperationResult_LDiversityResult extends \Google\Protobuf\Internal\Message -{ - /** - * Histogram of l-diversity equivalence class sensitive value frequencies. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - private $sensitive_value_frequency_histogram_buckets; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Histogram of l-diversity equivalence class sensitive value frequencies. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSensitiveValueFrequencyHistogramBuckets() - { - return $this->sensitive_value_frequency_histogram_buckets; - } - - /** - * Histogram of l-diversity equivalence class sensitive value frequencies. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSensitiveValueFrequencyHistogramBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket::class); - $this->sensitive_value_frequency_histogram_buckets = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass.php deleted file mode 100644 index 154322662..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass.php +++ /dev/null @@ -1,156 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass - */ -class RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass extends \Google\Protobuf\Internal\Message -{ - /** - * Quasi-identifier values defining the k-anonymity equivalence - * class. The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - */ - private $quasi_ids_values; - /** - * Size of the k-anonymity equivalence class. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - */ - private $equivalence_class_size = 0; - /** - * Number of distinct sensitive values in this equivalence class. - * - * Generated from protobuf field int64 num_distinct_sensitive_values = 3; - */ - private $num_distinct_sensitive_values = 0; - /** - * Estimated frequencies of top sensitive values. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency top_sensitive_values = 4; - */ - private $top_sensitive_values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Quasi-identifier values defining the k-anonymity equivalence - * class. The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuasiIdsValues() - { - return $this->quasi_ids_values; - } - - /** - * Quasi-identifier values defining the k-anonymity equivalence - * class. The order is always the same as the original request. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quasi_ids_values = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuasiIdsValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->quasi_ids_values = $arr; - - return $this; - } - - /** - * Size of the k-anonymity equivalence class. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - * @return int|string - */ - public function getEquivalenceClassSize() - { - return $this->equivalence_class_size; - } - - /** - * Size of the k-anonymity equivalence class. - * - * Generated from protobuf field int64 equivalence_class_size = 2; - * @param int|string $var - * @return $this - */ - public function setEquivalenceClassSize($var) - { - GPBUtil::checkInt64($var); - $this->equivalence_class_size = $var; - - return $this; - } - - /** - * Number of distinct sensitive values in this equivalence class. - * - * Generated from protobuf field int64 num_distinct_sensitive_values = 3; - * @return int|string - */ - public function getNumDistinctSensitiveValues() - { - return $this->num_distinct_sensitive_values; - } - - /** - * Number of distinct sensitive values in this equivalence class. - * - * Generated from protobuf field int64 num_distinct_sensitive_values = 3; - * @param int|string $var - * @return $this - */ - public function setNumDistinctSensitiveValues($var) - { - GPBUtil::checkInt64($var); - $this->num_distinct_sensitive_values = $var; - - return $this; - } - - /** - * Estimated frequencies of top sensitive values. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency top_sensitive_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTopSensitiveValues() - { - return $this->top_sensitive_values; - } - - /** - * Estimated frequencies of top sensitive values. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.ValueFrequency top_sensitive_values = 4; - * @param \Google\Cloud\Dlp\V2beta1\ValueFrequency[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTopSensitiveValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\ValueFrequency::class); - $this->top_sensitive_values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket.php deleted file mode 100644 index bda6cba45..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket.php +++ /dev/null @@ -1,162 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket - */ -class RiskAnalysisOperationResult_LDiversityResult_LDiversityHistogramBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_lower_bound = 1; - */ - private $sensitive_value_frequency_lower_bound = 0; - /** - * Upper bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_upper_bound = 2; - */ - private $sensitive_value_frequency_upper_bound = 0; - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - */ - private $bucket_size = 0; - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - private $bucket_values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Lower bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_lower_bound = 1; - * @return int|string - */ - public function getSensitiveValueFrequencyLowerBound() - { - return $this->sensitive_value_frequency_lower_bound; - } - - /** - * Lower bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_lower_bound = 1; - * @param int|string $var - * @return $this - */ - public function setSensitiveValueFrequencyLowerBound($var) - { - GPBUtil::checkInt64($var); - $this->sensitive_value_frequency_lower_bound = $var; - - return $this; - } - - /** - * Upper bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_upper_bound = 2; - * @return int|string - */ - public function getSensitiveValueFrequencyUpperBound() - { - return $this->sensitive_value_frequency_upper_bound; - } - - /** - * Upper bound on the sensitive value frequencies of the equivalence - * classes in this bucket. - * - * Generated from protobuf field int64 sensitive_value_frequency_upper_bound = 2; - * @param int|string $var - * @return $this - */ - public function setSensitiveValueFrequencyUpperBound($var) - { - GPBUtil::checkInt64($var); - $this->sensitive_value_frequency_upper_bound = $var; - - return $this; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @return int|string - */ - public function getBucketSize() - { - return $this->bucket_size; - } - - /** - * Total number of records in this bucket. - * - * Generated from protobuf field int64 bucket_size = 3; - * @param int|string $var - * @return $this - */ - public function setBucketSize($var) - { - GPBUtil::checkInt64($var); - $this->bucket_size = $var; - - return $this; - } - - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBucketValues() - { - return $this->bucket_values; - } - - /** - * Sample of equivalence classes in this bucket. The total number of - * classes returned per bucket is capped at 20. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - * @param \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBucketValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult_LDiversityResult_LDiversityEquivalenceClass::class); - $this->bucket_values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_NumericalStatsResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_NumericalStatsResult.php deleted file mode 100644 index 2703e2d0b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/RiskAnalysisOperationResult_NumericalStatsResult.php +++ /dev/null @@ -1,124 +0,0 @@ -google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.NumericalStatsResult - */ -class RiskAnalysisOperationResult_NumericalStatsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Minimum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min_value = 1; - */ - private $min_value = null; - /** - * Maximum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max_value = 2; - */ - private $max_value = null; - /** - * List of 99 values that partition the set of field values into 100 equal - * sized buckets. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quantile_values = 4; - */ - private $quantile_values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Minimum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min_value = 1; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getMinValue() - { - return $this->min_value; - } - - /** - * Minimum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value min_value = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->min_value = $var; - - return $this; - } - - /** - * Maximum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max_value = 2; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getMaxValue() - { - return $this->max_value; - } - - /** - * Maximum value appearing in the column. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value max_value = 2; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->max_value = $var; - - return $this; - } - - /** - * List of 99 values that partition the set of field values into 100 equal - * sized buckets. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quantile_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuantileValues() - { - return $this->quantile_values; - } - - /** - * List of 99 values that partition the set of field values into 100 equal - * sized buckets. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value quantile_values = 4; - * @param \Google\Cloud\Dlp\V2beta1\Value[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuantileValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->quantile_values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/StorageConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/StorageConfig.php deleted file mode 100644 index c017927eb..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/StorageConfig.php +++ /dev/null @@ -1,112 +0,0 @@ -google.privacy.dlp.v2beta1.StorageConfig - */ -class StorageConfig extends \Google\Protobuf\Internal\Message -{ - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); - parent::__construct(); - } - - /** - * Google Cloud Datastore options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.DatastoreOptions datastore_options = 2; - * @return \Google\Cloud\Dlp\V2beta1\DatastoreOptions - */ - public function getDatastoreOptions() - { - return $this->readOneof(2); - } - - /** - * Google Cloud Datastore options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.DatastoreOptions datastore_options = 2; - * @param \Google\Cloud\Dlp\V2beta1\DatastoreOptions $var - * @return $this - */ - public function setDatastoreOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\DatastoreOptions::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Google Cloud Storage options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageOptions cloud_storage_options = 3; - * @return \Google\Cloud\Dlp\V2beta1\CloudStorageOptions - */ - public function getCloudStorageOptions() - { - return $this->readOneof(3); - } - - /** - * Google Cloud Storage options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.CloudStorageOptions cloud_storage_options = 3; - * @param \Google\Cloud\Dlp\V2beta1\CloudStorageOptions $var - * @return $this - */ - public function setCloudStorageOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CloudStorageOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * BigQuery options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryOptions big_query_options = 4; - * @return \Google\Cloud\Dlp\V2beta1\BigQueryOptions - */ - public function getBigQueryOptions() - { - return $this->readOneof(4); - } - - /** - * BigQuery options specification. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.BigQueryOptions big_query_options = 4; - * @param \Google\Cloud\Dlp\V2beta1\BigQueryOptions $var - * @return $this - */ - public function setBigQueryOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryOptions::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table.php deleted file mode 100644 index b87ef39cf..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table.php +++ /dev/null @@ -1,77 +0,0 @@ -google.privacy.dlp.v2beta1.Table - */ -class Table extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId headers = 1; - */ - private $headers; - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Table.Row rows = 2; - */ - private $rows; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId headers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldId headers = 1; - * @param \Google\Cloud\Dlp\V2beta1\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->headers = $arr; - - return $this; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Table.Row rows = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRows() - { - return $this->rows; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Table.Row rows = 2; - * @param \Google\Cloud\Dlp\V2beta1\Table_Row[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Table_Row::class); - $this->rows = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TableLocation.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TableLocation.php deleted file mode 100644 index d984974ec..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TableLocation.php +++ /dev/null @@ -1,57 +0,0 @@ -google.privacy.dlp.v2beta1.TableLocation - */ -class TableLocation extends \Google\Protobuf\Internal\Message -{ - /** - * The zero-based index of the row where the finding is located. - * - * Generated from protobuf field int64 row_index = 1; - */ - private $row_index = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The zero-based index of the row where the finding is located. - * - * Generated from protobuf field int64 row_index = 1; - * @return int|string - */ - public function getRowIndex() - { - return $this->row_index; - } - - /** - * The zero-based index of the row where the finding is located. - * - * Generated from protobuf field int64 row_index = 1; - * @param int|string $var - * @return $this - */ - public function setRowIndex($var) - { - GPBUtil::checkInt64($var); - $this->row_index = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table_Row.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table_Row.php deleted file mode 100644 index c75491d80..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Table_Row.php +++ /dev/null @@ -1,49 +0,0 @@ -google.privacy.dlp.v2beta1.Table.Row - */ -class Table_Row extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value values = 1; - */ - private $values; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.Value values = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig.php deleted file mode 100644 index a6f198037..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig.php +++ /dev/null @@ -1,52 +0,0 @@ -google.privacy.dlp.v2beta1.TimePartConfig - */ -class TimePartConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TimePartConfig.TimePart part_to_extract = 1; - */ - private $part_to_extract = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TimePartConfig.TimePart part_to_extract = 1; - * @return int - */ - public function getPartToExtract() - { - return $this->part_to_extract; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TimePartConfig.TimePart part_to_extract = 1; - * @param int $var - * @return $this - */ - public function setPartToExtract($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\TimePartConfig_TimePart::class); - $this->part_to_extract = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig_TimePart.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig_TimePart.php deleted file mode 100644 index 79484fbca..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TimePartConfig_TimePart.php +++ /dev/null @@ -1,53 +0,0 @@ -Google\Privacy\Dlp\V2beta1\TimePartConfig\TimePart - */ -class TimePartConfig_TimePart -{ - /** - * Generated from protobuf enum TIME_PART_UNSPECIFIED = 0; - */ - const TIME_PART_UNSPECIFIED = 0; - /** - * [000-9999] - * - * Generated from protobuf enum YEAR = 1; - */ - const YEAR = 1; - /** - * [1-12] - * - * Generated from protobuf enum MONTH = 2; - */ - const MONTH = 2; - /** - * [1-31] - * - * Generated from protobuf enum DAY_OF_MONTH = 3; - */ - const DAY_OF_MONTH = 3; - /** - * [1-7] - * - * Generated from protobuf enum DAY_OF_WEEK = 4; - */ - const DAY_OF_WEEK = 4; - /** - * [1-52] - * - * Generated from protobuf enum WEEK_OF_YEAR = 5; - */ - const WEEK_OF_YEAR = 5; - /** - * [0-24] - * - * Generated from protobuf enum HOUR_OF_DAY = 6; - */ - const HOUR_OF_DAY = 6; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary.php deleted file mode 100644 index c06246bcf..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary.php +++ /dev/null @@ -1,214 +0,0 @@ -google.privacy.dlp.v2beta1.TransformationSummary - */ -class TransformationSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Set if the transformation was limited to a specific info_type. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - */ - private $info_type = null; - /** - * Set if the transformation was limited to a specific FieldId. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 2; - */ - private $field = null; - /** - * The specific transformation these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation transformation = 3; - */ - private $transformation = null; - /** - * The field transformation that was applied. This list will contain - * multiple only in the case of errors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 5; - */ - private $field_transformations; - /** - * The specific suppression option these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordSuppression record_suppress = 6; - */ - private $record_suppress = null; - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary.SummaryResult results = 4; - */ - private $results; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Set if the transformation was limited to a specific info_type. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @return \Google\Cloud\Dlp\V2beta1\InfoType - */ - public function getInfoType() - { - return $this->info_type; - } - - /** - * Set if the transformation was limited to a specific info_type. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.InfoType info_type = 1; - * @param \Google\Cloud\Dlp\V2beta1\InfoType $var - * @return $this - */ - public function setInfoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class); - $this->info_type = $var; - - return $this; - } - - /** - * Set if the transformation was limited to a specific FieldId. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 2; - * @return \Google\Cloud\Dlp\V2beta1\FieldId - */ - public function getField() - { - return $this->field; - } - - /** - * Set if the transformation was limited to a specific FieldId. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.FieldId field = 2; - * @param \Google\Cloud\Dlp\V2beta1\FieldId $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\FieldId::class); - $this->field = $var; - - return $this; - } - - /** - * The specific transformation these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation transformation = 3; - * @return \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation - */ - public function getTransformation() - { - return $this->transformation; - } - - /** - * The specific transformation these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.PrimitiveTransformation transformation = 3; - * @param \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation $var - * @return $this - */ - public function setTransformation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation::class); - $this->transformation = $var; - - return $this; - } - - /** - * The field transformation that was applied. This list will contain - * multiple only in the case of errors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldTransformations() - { - return $this->field_transformations; - } - - /** - * The field transformation that was applied. This list will contain - * multiple only in the case of errors. - * - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.FieldTransformation field_transformations = 5; - * @param \Google\Cloud\Dlp\V2beta1\FieldTransformation[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldTransformations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\FieldTransformation::class); - $this->field_transformations = $arr; - - return $this; - } - - /** - * The specific suppression option these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordSuppression record_suppress = 6; - * @return \Google\Cloud\Dlp\V2beta1\RecordSuppression - */ - public function getRecordSuppress() - { - return $this->record_suppress; - } - - /** - * The specific suppression option these stats apply to. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.RecordSuppression record_suppress = 6; - * @param \Google\Cloud\Dlp\V2beta1\RecordSuppression $var - * @return $this - */ - public function setRecordSuppress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\RecordSuppression::class); - $this->record_suppress = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary.SummaryResult results = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * Generated from protobuf field repeated .google.privacy.dlp.v2beta1.TransformationSummary.SummaryResult results = 4; - * @param \Google\Cloud\Dlp\V2beta1\TransformationSummary_SummaryResult[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\TransformationSummary_SummaryResult::class); - $this->results = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_SummaryResult.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_SummaryResult.php deleted file mode 100644 index 1c533c20a..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_SummaryResult.php +++ /dev/null @@ -1,113 +0,0 @@ -google.privacy.dlp.v2beta1.TransformationSummary.SummaryResult - */ -class TransformationSummary_SummaryResult extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field int64 count = 1; - */ - private $count = 0; - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TransformationSummary.TransformationResultCode code = 2; - */ - private $code = 0; - /** - * A place for warnings or errors to show up if a transformation didn't - * work as expected. - * - * Generated from protobuf field string details = 3; - */ - private $details = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field int64 count = 1; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Generated from protobuf field int64 count = 1; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TransformationSummary.TransformationResultCode code = 2; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Generated from protobuf field .google.privacy.dlp.v2beta1.TransformationSummary.TransformationResultCode code = 2; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2beta1\TransformationSummary_TransformationResultCode::class); - $this->code = $var; - - return $this; - } - - /** - * A place for warnings or errors to show up if a transformation didn't - * work as expected. - * - * Generated from protobuf field string details = 3; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * A place for warnings or errors to show up if a transformation didn't - * work as expected. - * - * Generated from protobuf field string details = 3; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_TransformationResultCode.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_TransformationResultCode.php deleted file mode 100644 index ef1bb197e..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransformationSummary_TransformationResultCode.php +++ /dev/null @@ -1,27 +0,0 @@ -Google\Privacy\Dlp\V2beta1\TransformationSummary\TransformationResultCode - */ -class TransformationSummary_TransformationResultCode -{ - /** - * Generated from protobuf enum TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; - */ - const TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum SUCCESS = 1; - */ - const SUCCESS = 1; - /** - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransientCryptoKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransientCryptoKey.php deleted file mode 100644 index d549b7e8f..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/TransientCryptoKey.php +++ /dev/null @@ -1,73 +0,0 @@ -google.privacy.dlp.v2beta1.TransientCryptoKey - */ -class TransientCryptoKey extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the key. [required] - * This is an arbitrary string used to differentiate different keys. - * A unique key is generated per name: two separate `TransientCryptoKey` - * protos share the same generated key if their names are the same. - * When the data crypto key is generated, this name is not used in any way - * (repeating the api call will result in a different key being generated). - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Name of the key. [required] - * This is an arbitrary string used to differentiate different keys. - * A unique key is generated per name: two separate `TransientCryptoKey` - * protos share the same generated key if their names are the same. - * When the data crypto key is generated, this name is not used in any way - * (repeating the api call will result in a different key being generated). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the key. [required] - * This is an arbitrary string used to differentiate different keys. - * A unique key is generated per name: two separate `TransientCryptoKey` - * protos share the same generated key if their names are the same. - * When the data crypto key is generated, this name is not used in any way - * (repeating the api call will result in a different key being generated). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/UnwrappedCryptoKey.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/UnwrappedCryptoKey.php deleted file mode 100644 index e6323c6ee..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/UnwrappedCryptoKey.php +++ /dev/null @@ -1,58 +0,0 @@ -google.privacy.dlp.v2beta1.UnwrappedCryptoKey - */ -class UnwrappedCryptoKey extends \Google\Protobuf\Internal\Message -{ - /** - * The AES 128/192/256 bit key. [required] - * - * Generated from protobuf field bytes key = 1; - */ - private $key = ''; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * The AES 128/192/256 bit key. [required] - * - * Generated from protobuf field bytes key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The AES 128/192/256 bit key. [required] - * - * Generated from protobuf field bytes key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, False); - $this->key = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Value.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Value.php deleted file mode 100644 index 3971de7f5..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/Value.php +++ /dev/null @@ -1,188 +0,0 @@ -google.privacy.dlp.v2beta1.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - protected $type; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * Generated from protobuf field int64 integer_value = 1; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(1); - } - - /** - * Generated from protobuf field int64 integer_value = 1; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field double float_value = 2; - * @return float - */ - public function getFloatValue() - { - return $this->readOneof(2); - } - - /** - * Generated from protobuf field double float_value = 2; - * @param float $var - * @return $this - */ - public function setFloatValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Generated from protobuf field string string_value = 3; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(3); - } - - /** - * Generated from protobuf field string string_value = 3; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generated from protobuf field bool boolean_value = 4; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(4); - } - - /** - * Generated from protobuf field bool boolean_value = 4; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; - * @return \Google\Protobuf\Timestamp - */ - public function getTimestampValue() - { - return $this->readOneof(5); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.type.TimeOfDay time_value = 6; - * @return \Google\Type\TimeOfDay - */ - public function getTimeValue() - { - return $this->readOneof(6); - } - - /** - * Generated from protobuf field .google.type.TimeOfDay time_value = 6; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setTimeValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.type.Date date_value = 7; - * @return \Google\Type\Date - */ - public function getDateValue() - { - return $this->readOneof(7); - } - - /** - * Generated from protobuf field .google.type.Date date_value = 7; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDateValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ValueFrequency.php b/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ValueFrequency.php deleted file mode 100644 index 00d44fe51..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Cloud/Dlp/V2beta1/ValueFrequency.php +++ /dev/null @@ -1,89 +0,0 @@ -google.privacy.dlp.v2beta1.ValueFrequency - */ -class ValueFrequency extends \Google\Protobuf\Internal\Message -{ - /** - * A value contained in the field in question. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 1; - */ - private $value = null; - /** - * How many times the value is contained in the field. - * - * Generated from protobuf field int64 count = 2; - */ - private $count = 0; - - public function __construct() { - \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce(); - parent::__construct(); - } - - /** - * A value contained in the field in question. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 1; - * @return \Google\Cloud\Dlp\V2beta1\Value - */ - public function getValue() - { - return $this->value; - } - - /** - * A value contained in the field in question. - * - * Generated from protobuf field .google.privacy.dlp.v2beta1.Value value = 1; - * @param \Google\Cloud\Dlp\V2beta1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Value::class); - $this->value = $var; - - return $this; - } - - /** - * How many times the value is contained in the field. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * How many times the value is contained in the field. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/DlpServiceClient.php b/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/DlpServiceClient.php deleted file mode 100644 index 9cc5b66a6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/DlpServiceClient.php +++ /dev/null @@ -1,42 +0,0 @@ -setName($name); - * $infoTypes = [$infoTypesElement]; - * $inspectConfig = new InspectConfig(); - * $inspectConfig->setInfoTypes($infoTypes); - * $type = 'text/plain'; - * $value = 'My email is example@example.com.'; - * $itemsElement = new ContentItem(); - * $itemsElement->setType($type); - * $itemsElement->setValue($value); - * $items = [$itemsElement]; - * $response = $dlpServiceClient->inspectContent($inspectConfig, $items); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To assist - * with these names, this class includes a format method for each type of name, and additionally - * a parseName method to extract the individual identifiers contained within formatted names - * that are returned by the API. - * - * @experimental - */ -class DlpServiceGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.privacy.dlp.v2beta1.DlpService'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'dlp.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The code generator version, to be included in the agent header. - */ - const CODEGEN_VERSION = '0.0.5'; - - private static $resultNameTemplate; - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/dlp_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/dlp_service_rest_client_config.php', - 'descriptorsConfigPath' => __DIR__.'/../resources/dlp_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', - ]; - } - - private static function getResultNameTemplate() - { - if (self::$resultNameTemplate == null) { - self::$resultNameTemplate = new PathTemplate('inspect/results/{result}'); - } - - return self::$resultNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'result' => self::getResultNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent - * a result resource. - * - * @param string $result - * - * @return string The formatted result resource. - * @experimental - */ - public static function resultName($result) - { - return self::getResultNameTemplate()->render([ - 'result' => $result, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - result: inspect/results/{result}. - * - * The optional $template argument can be supplied to specify a particular pattern, and must - * match one of the templates listed above. If no $template argument is provided, or if the - * $template argument does not match one of the templates listed, then parseName will check - * each of the supported templates, and return the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * @experimental - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started - * by a long running API method. If $methodName is not provided, or does - * not match a long running API method, then the operation can still be - * resumed, but the OperationResponse object will not deserialize the - * final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) - ? $this->descriptors[$methodName]['longRunning'] - : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'dlp.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the DLP API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. - * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. - * } - * @experimental - */ - public function __construct($options = []) - { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); - } - - /** - * Finds potentially sensitive info in a list of strings. - * This method has limits on input size, processing time, and output size. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $name = 'EMAIL_ADDRESS'; - * $infoTypesElement = new InfoType(); - * $infoTypesElement->setName($name); - * $infoTypes = [$infoTypesElement]; - * $inspectConfig = new InspectConfig(); - * $inspectConfig->setInfoTypes($infoTypes); - * $type = 'text/plain'; - * $value = 'My email is example@example.com.'; - * $itemsElement = new ContentItem(); - * $itemsElement->setType($type); - * $itemsElement->setValue($value); - * $items = [$itemsElement]; - * $response = $dlpServiceClient->inspectContent($inspectConfig, $items); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param InspectConfig $inspectConfig Configuration for the inspector. - * @param ContentItem[] $items The list of items to inspect. Items in a single request are - * considered "related" unless inspect_config.independent_inputs is true. - * Up to 100 are allowed per request. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\InspectContentResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function inspectContent($inspectConfig, $items, $optionalArgs = []) - { - $request = new InspectContentRequest(); - $request->setInspectConfig($inspectConfig); - $request->setItems($items); - - return $this->startCall( - 'InspectContent', - InspectContentResponse::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Redacts potentially sensitive info from a list of strings. - * This method has limits on input size, processing time, and output size. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $name = 'EMAIL_ADDRESS'; - * $infoTypesElement = new InfoType(); - * $infoTypesElement->setName($name); - * $infoTypes = [$infoTypesElement]; - * $inspectConfig = new InspectConfig(); - * $inspectConfig->setInfoTypes($infoTypes); - * $type = 'text/plain'; - * $value = 'My email is example@example.com.'; - * $itemsElement = new ContentItem(); - * $itemsElement->setType($type); - * $itemsElement->setValue($value); - * $items = [$itemsElement]; - * $name2 = 'EMAIL_ADDRESS'; - * $infoType = new InfoType(); - * $infoType->setName($name2); - * $replaceWith = 'REDACTED'; - * $replaceConfigsElement = new RedactContentRequest_ReplaceConfig(); - * $replaceConfigsElement->setInfoType($infoType); - * $replaceConfigsElement->setReplaceWith($replaceWith); - * $replaceConfigs = [$replaceConfigsElement]; - * $response = $dlpServiceClient->redactContent($inspectConfig, $items, ['replaceConfigs' => $replaceConfigs]); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param InspectConfig $inspectConfig Configuration for the inspector. - * @param ContentItem[] $items The list of items to inspect. Up to 100 are allowed per request. - * @param array $optionalArgs { - * Optional. - * - * @type RedactContentRequest_ReplaceConfig[] $replaceConfigs - * The strings to replace findings text findings with. Must specify at least - * one of these or one ImageRedactionConfig if redacting images. - * @type RedactContentRequest_ImageRedactionConfig[] $imageRedactionConfigs - * The configuration for specifying what content to redact from images. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\RedactContentResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function redactContent($inspectConfig, $items, $optionalArgs = []) - { - $request = new RedactContentRequest(); - $request->setInspectConfig($inspectConfig); - $request->setItems($items); - if (isset($optionalArgs['replaceConfigs'])) { - $request->setReplaceConfigs($optionalArgs['replaceConfigs']); - } - if (isset($optionalArgs['imageRedactionConfigs'])) { - $request->setImageRedactionConfigs($optionalArgs['imageRedactionConfigs']); - } - - return $this->startCall( - 'RedactContent', - RedactContentResponse::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * De-identifies potentially sensitive info from a list of strings. - * This method has limits on input size and output size. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $deidentifyConfig = new DeidentifyConfig(); - * $inspectConfig = new InspectConfig(); - * $items = []; - * $response = $dlpServiceClient->deidentifyContent($deidentifyConfig, $inspectConfig, $items); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param DeidentifyConfig $deidentifyConfig Configuration for the de-identification of the list of content items. - * @param InspectConfig $inspectConfig Configuration for the inspector. - * @param ContentItem[] $items The list of items to inspect. Up to 100 are allowed per request. - * All items will be treated as text/*. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\DeidentifyContentResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function deidentifyContent($deidentifyConfig, $inspectConfig, $items, $optionalArgs = []) - { - $request = new DeidentifyContentRequest(); - $request->setDeidentifyConfig($deidentifyConfig); - $request->setInspectConfig($inspectConfig); - $request->setItems($items); - - return $this->startCall( - 'DeidentifyContent', - DeidentifyContentResponse::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Schedules a job to compute risk analysis metrics over content in a Google - * Cloud Platform repository. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $privacyMetric = new PrivacyMetric(); - * $sourceTable = new BigQueryTable(); - * $operationResponse = $dlpServiceClient->analyzeDataSourceRisk($privacyMetric, $sourceTable); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * - * // OR start the operation, keep the operation name, and resume later - * $operationResponse = $dlpServiceClient->analyzeDataSourceRisk($privacyMetric, $sourceTable); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dlpServiceClient->resumeOperation($operationName, 'analyzeDataSourceRisk'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param PrivacyMetric $privacyMetric Privacy metric to compute. - * @param BigQueryTable $sourceTable Input dataset to compute metrics over. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function analyzeDataSourceRisk($privacyMetric, $sourceTable, $optionalArgs = []) - { - $request = new AnalyzeDataSourceRiskRequest(); - $request->setPrivacyMetric($privacyMetric); - $request->setSourceTable($sourceTable); - - return $this->startOperationsCall( - 'AnalyzeDataSourceRisk', - $optionalArgs, - $request, - $this->getOperationsClient() - )->wait(); - } - - /** - * Schedules a job scanning content in a Google Cloud Platform data - * repository. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $name = 'EMAIL_ADDRESS'; - * $infoTypesElement = new InfoType(); - * $infoTypesElement->setName($name); - * $infoTypes = [$infoTypesElement]; - * $inspectConfig = new InspectConfig(); - * $inspectConfig->setInfoTypes($infoTypes); - * $url = 'gs://example_bucket/example_file.png'; - * $fileSet = new CloudStorageOptions_FileSet(); - * $fileSet->setUrl($url); - * $cloudStorageOptions = new CloudStorageOptions(); - * $cloudStorageOptions->setFileSet($fileSet); - * $storageConfig = new StorageConfig(); - * $storageConfig->setCloudStorageOptions($cloudStorageOptions); - * $outputConfig = new OutputStorageConfig(); - * $operationResponse = $dlpServiceClient->createInspectOperation($inspectConfig, $storageConfig, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * - * // OR start the operation, keep the operation name, and resume later - * $operationResponse = $dlpServiceClient->createInspectOperation($inspectConfig, $storageConfig, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dlpServiceClient->resumeOperation($operationName, 'createInspectOperation'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param InspectConfig $inspectConfig Configuration for the inspector. - * @param StorageConfig $storageConfig Specification of the data set to process. - * @param OutputStorageConfig $outputConfig Optional location to store findings. - * @param array $optionalArgs { - * Optional. - * - * @type OperationConfig $operationConfig - * Additional configuration settings for long running operations. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function createInspectOperation($inspectConfig, $storageConfig, $outputConfig, $optionalArgs = []) - { - $request = new CreateInspectOperationRequest(); - $request->setInspectConfig($inspectConfig); - $request->setStorageConfig($storageConfig); - $request->setOutputConfig($outputConfig); - if (isset($optionalArgs['operationConfig'])) { - $request->setOperationConfig($optionalArgs['operationConfig']); - } - - return $this->startOperationsCall( - 'CreateInspectOperation', - $optionalArgs, - $request, - $this->getOperationsClient() - )->wait(); - } - - /** - * Returns list of results for given inspect operation result set id. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $formattedName = $dlpServiceClient->resultName('[RESULT]'); - * $response = $dlpServiceClient->listInspectFindings($formattedName); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param string $name Identifier of the results set returned as metadata of - * the longrunning operation created by a call to InspectDataSource. - * Should be in the format of `inspect/results/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * Maximum number of results to return. - * If 0, the implementation selects a reasonable value. - * @type string $pageToken - * The value returned by the last `ListInspectFindingsResponse`; indicates - * that this is a continuation of a prior `ListInspectFindings` call, and that - * the system should return the next page of data. - * @type string $filter - * Restricts findings to items that match. Supports info_type and likelihood. - * - * Examples: - * - * - info_type=EMAIL_ADDRESS - * - info_type=PHONE_NUMBER,EMAIL_ADDRESS - * - likelihood=VERY_LIKELY - * - likelihood=VERY_LIKELY,LIKELY - * - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\ListInspectFindingsResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function listInspectFindings($name, $optionalArgs = []) - { - $request = new ListInspectFindingsRequest(); - $request->setName($name); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - return $this->startCall( - 'ListInspectFindings', - ListInspectFindingsResponse::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Returns sensitive information types for given category. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $category = 'PII'; - * $languageCode = 'en'; - * $response = $dlpServiceClient->listInfoTypes($category, $languageCode); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param string $category Category name as returned by ListRootCategories. - * @param string $languageCode Optional BCP-47 language code for localized info type friendly - * names. If omitted, or if localized strings are not available, - * en-US strings will be returned. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\ListInfoTypesResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function listInfoTypes($category, $languageCode, $optionalArgs = []) - { - $request = new ListInfoTypesRequest(); - $request->setCategory($category); - $request->setLanguageCode($languageCode); - - return $this->startCall( - 'ListInfoTypes', - ListInfoTypesResponse::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Returns the list of root categories of sensitive information. - * - * Sample code: - * ``` - * $dlpServiceClient = new DlpServiceClient(); - * try { - * $languageCode = 'en'; - * $response = $dlpServiceClient->listRootCategories($languageCode); - * } finally { - * $dlpServiceClient->close(); - * } - * ``` - * - * @param string $languageCode Optional language code for localized friendly category names. - * If omitted or if localized strings are not available, - * en-US strings will be returned. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dlp\V2beta1\ListRootCategoriesResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function listRootCategories($languageCode, $optionalArgs = []) - { - $request = new ListRootCategoriesRequest(); - $request->setLanguageCode($languageCode); - - return $this->startCall( - 'ListRootCategories', - ListRootCategoriesResponse::class, - $optionalArgs, - $request - )->wait(); - } -} diff --git a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_client_config.json b/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_client_config.json deleted file mode 100644 index e42a2ad8c..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_client_config.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "interfaces": { - "google.privacy.dlp.v2beta1.DlpService": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "InspectContent": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RedactContent": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeidentifyContent": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "AnalyzeDataSourceRisk": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateInspectOperation": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListInspectFindings": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListInfoTypes": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListRootCategories": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_descriptor_config.php b/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_descriptor_config.php deleted file mode 100644 index 121ef2d9b..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_descriptor_config.php +++ /dev/null @@ -1,20 +0,0 @@ - [ - 'google.privacy.dlp.v2beta1.DlpService' => [ - 'AnalyzeDataSourceRisk' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationResult', - 'metadataReturnType' => '\Google\Cloud\Dlp\V2beta1\RiskAnalysisOperationMetadata', - ], - ], - 'CreateInspectOperation' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dlp\V2beta1\InspectOperationResult', - 'metadataReturnType' => '\Google\Cloud\Dlp\V2beta1\InspectOperationMetadata', - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_rest_client_config.php b/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_rest_client_config.php deleted file mode 100644 index bb68d9bf6..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/src/Dlp/V2beta1/resources/dlp_service_rest_client_config.php +++ /dev/null @@ -1,131 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/{name=inspect/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations}', - ], - ] - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ] - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}', - ], - ] - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ] - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}', - ], - ] - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ] - ], - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}:cancel', - 'body' => '*', - ], - ] - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ] - ], - ], - 'google.privacy.dlp.v2beta1.DlpService' => [ - 'InspectContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/content:inspect', - 'body' => '*', - ], - 'RedactContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/content:redact', - 'body' => '*', - ], - 'DeidentifyContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/content:deidentify', - 'body' => '*', - ], - 'AnalyzeDataSourceRisk' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/dataSource:analyze', - 'body' => '*', - ], - 'CreateInspectOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta1/inspect/operations', - 'body' => '*', - ], - 'ListInspectFindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/{name=inspect/results/*}/findings', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ] - ], - 'ListInfoTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/rootCategories/{category=*}/infoTypes', - 'placeholders' => [ - 'category' => [ - 'getters' => [ - 'getCategory', - ], - ], - ] - ], - 'ListRootCategories' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta1/rootCategories', - ], - ], - ] -]; diff --git a/generated/php/google-cloud-dlp-v2beta1/tests/system/Dlp/V2beta1/DlpServiceSmokeTest.php b/generated/php/google-cloud-dlp-v2beta1/tests/system/Dlp/V2beta1/DlpServiceSmokeTest.php deleted file mode 100644 index 950742e0a..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/tests/system/Dlp/V2beta1/DlpServiceSmokeTest.php +++ /dev/null @@ -1,54 +0,0 @@ -setMinLikelihood($minLikelihood); - $type = 'text/plain'; - $value = 'my phone number is 215-512-1212'; - $itemsElement = new ContentItem(); - $itemsElement->setType($type); - $itemsElement->setValue($value); - $items = [$itemsElement]; - $dlpServiceClient->inspectContent($inspectConfig, $items); - } -} diff --git a/generated/php/google-cloud-dlp-v2beta1/tests/unit/Dlp/V2beta1/DlpServiceClientTest.php b/generated/php/google-cloud-dlp-v2beta1/tests/unit/Dlp/V2beta1/DlpServiceClientTest.php deleted file mode 100644 index 0a6ed3f48..000000000 --- a/generated/php/google-cloud-dlp-v2beta1/tests/unit/Dlp/V2beta1/DlpServiceClientTest.php +++ /dev/null @@ -1,896 +0,0 @@ -createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new InspectContentResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $type = 'text/plain'; - $value = 'My email is example@example.com.'; - $itemsElement = new ContentItem(); - $itemsElement->setType($type); - $itemsElement->setValue($value); - $items = [$itemsElement]; - - $response = $client->inspectContent($inspectConfig, $items); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/InspectContent', $actualFuncCall); - - $actualValue = $actualRequestObject->getInspectConfig(); - - $this->assertProtobufEquals($inspectConfig, $actualValue); - $actualValue = $actualRequestObject->getItems(); - - $this->assertProtobufEquals($items, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function inspectContentExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $type = 'text/plain'; - $value = 'My email is example@example.com.'; - $itemsElement = new ContentItem(); - $itemsElement->setType($type); - $itemsElement->setValue($value); - $items = [$itemsElement]; - - try { - $client->inspectContent($inspectConfig, $items); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function redactContentTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new RedactContentResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $type = 'text/plain'; - $value = 'My email is example@example.com.'; - $itemsElement = new ContentItem(); - $itemsElement->setType($type); - $itemsElement->setValue($value); - $items = [$itemsElement]; - $name2 = 'EMAIL_ADDRESS'; - $infoType = new InfoType(); - $infoType->setName($name2); - $replaceWith = 'REDACTED'; - $replaceConfigsElement = new RedactContentRequest_ReplaceConfig(); - $replaceConfigsElement->setInfoType($infoType); - $replaceConfigsElement->setReplaceWith($replaceWith); - $replaceConfigs = [$replaceConfigsElement]; - - $response = $client->redactContent($inspectConfig, $items, ['replaceConfigs' => $replaceConfigs]); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/RedactContent', $actualFuncCall); - - $actualValue = $actualRequestObject->getInspectConfig(); - - $this->assertProtobufEquals($inspectConfig, $actualValue); - $actualValue = $actualRequestObject->getItems(); - - $this->assertProtobufEquals($items, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function redactContentExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $type = 'text/plain'; - $value = 'My email is example@example.com.'; - $itemsElement = new ContentItem(); - $itemsElement->setType($type); - $itemsElement->setValue($value); - $items = [$itemsElement]; - $name2 = 'EMAIL_ADDRESS'; - $infoType = new InfoType(); - $infoType->setName($name2); - $replaceWith = 'REDACTED'; - $replaceConfigsElement = new RedactContentRequest_ReplaceConfig(); - $replaceConfigsElement->setInfoType($infoType); - $replaceConfigsElement->setReplaceWith($replaceWith); - $replaceConfigs = [$replaceConfigsElement]; - - try { - $client->redactContent($inspectConfig, $items, ['replaceConfigs' => $replaceConfigs]); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function deidentifyContentTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new DeidentifyContentResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $deidentifyConfig = new DeidentifyConfig(); - $inspectConfig = new InspectConfig(); - $items = []; - - $response = $client->deidentifyContent($deidentifyConfig, $inspectConfig, $items); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/DeidentifyContent', $actualFuncCall); - - $actualValue = $actualRequestObject->getDeidentifyConfig(); - - $this->assertProtobufEquals($deidentifyConfig, $actualValue); - $actualValue = $actualRequestObject->getInspectConfig(); - - $this->assertProtobufEquals($inspectConfig, $actualValue); - $actualValue = $actualRequestObject->getItems(); - - $this->assertProtobufEquals($items, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function deidentifyContentExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $deidentifyConfig = new DeidentifyConfig(); - $inspectConfig = new InspectConfig(); - $items = []; - - try { - $client->deidentifyContent($deidentifyConfig, $inspectConfig, $items); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function analyzeDataSourceRiskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'serviceAddress' => '', - 'scopes' => [], - 'transport' => $operationsTransport, - ]); - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/analyzeDataSourceRiskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RiskAnalysisOperationResult(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/analyzeDataSourceRiskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - - // Mock request - $privacyMetric = new PrivacyMetric(); - $sourceTable = new BigQueryTable(); - - $response = $client->analyzeDataSourceRisk($privacyMetric, $sourceTable); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/AnalyzeDataSourceRisk', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivacyMetric(); - - $this->assertProtobufEquals($privacyMetric, $actualValue); - $actualValue = $actualApiRequestObject->getSourceTable(); - - $this->assertProtobufEquals($sourceTable, $actualValue); - - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeDataSourceRiskTest'); - - $response->pollUntilComplete(); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** - * @test - */ - public function analyzeDataSourceRiskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'serviceAddress' => '', - 'scopes' => [], - 'transport' => $operationsTransport, - ]); - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/analyzeDataSourceRiskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - - // Mock request - $privacyMetric = new PrivacyMetric(); - $sourceTable = new BigQueryTable(); - - $response = $client->analyzeDataSourceRisk($privacyMetric, $sourceTable); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeDataSourceRiskTest'); - - try { - $response->pollUntilComplete(); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** - * @test - */ - public function createInspectOperationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'serviceAddress' => '', - 'scopes' => [], - 'transport' => $operationsTransport, - ]); - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInspectOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new InspectOperationResult(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInspectOperationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $url = 'gs://example_bucket/example_file.png'; - $fileSet = new CloudStorageOptions_FileSet(); - $fileSet->setUrl($url); - $cloudStorageOptions = new CloudStorageOptions(); - $cloudStorageOptions->setFileSet($fileSet); - $storageConfig = new StorageConfig(); - $storageConfig->setCloudStorageOptions($cloudStorageOptions); - $outputConfig = new OutputStorageConfig(); - - $response = $client->createInspectOperation($inspectConfig, $storageConfig, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/CreateInspectOperation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInspectConfig(); - - $this->assertProtobufEquals($inspectConfig, $actualValue); - $actualValue = $actualApiRequestObject->getStorageConfig(); - - $this->assertProtobufEquals($storageConfig, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - - $this->assertProtobufEquals($outputConfig, $actualValue); - - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInspectOperationTest'); - - $response->pollUntilComplete(); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** - * @test - */ - public function createInspectOperationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'serviceAddress' => '', - 'scopes' => [], - 'transport' => $operationsTransport, - ]); - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInspectOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - - // Mock request - $name = 'EMAIL_ADDRESS'; - $infoTypesElement = new InfoType(); - $infoTypesElement->setName($name); - $infoTypes = [$infoTypesElement]; - $inspectConfig = new InspectConfig(); - $inspectConfig->setInfoTypes($infoTypes); - $url = 'gs://example_bucket/example_file.png'; - $fileSet = new CloudStorageOptions_FileSet(); - $fileSet->setUrl($url); - $cloudStorageOptions = new CloudStorageOptions(); - $cloudStorageOptions->setFileSet($fileSet); - $storageConfig = new StorageConfig(); - $storageConfig->setCloudStorageOptions($cloudStorageOptions); - $outputConfig = new OutputStorageConfig(); - - $response = $client->createInspectOperation($inspectConfig, $storageConfig, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInspectOperationTest'); - - try { - $response->pollUntilComplete(); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** - * @test - */ - public function listInspectFindingsTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListInspectFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedName = $client->resultName('[RESULT]'); - - $response = $client->listInspectFindings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/ListInspectFindings', $actualFuncCall); - - $actualValue = $actualRequestObject->getName(); - - $this->assertProtobufEquals($formattedName, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listInspectFindingsExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedName = $client->resultName('[RESULT]'); - - try { - $client->listInspectFindings($formattedName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listInfoTypesTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new ListInfoTypesResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $category = 'PII'; - $languageCode = 'en'; - - $response = $client->listInfoTypes($category, $languageCode); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/ListInfoTypes', $actualFuncCall); - - $actualValue = $actualRequestObject->getCategory(); - - $this->assertProtobufEquals($category, $actualValue); - $actualValue = $actualRequestObject->getLanguageCode(); - - $this->assertProtobufEquals($languageCode, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listInfoTypesExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $category = 'PII'; - $languageCode = 'en'; - - try { - $client->listInfoTypes($category, $languageCode); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listRootCategoriesTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new ListRootCategoriesResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $languageCode = 'en'; - - $response = $client->listRootCategories($languageCode); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.privacy.dlp.v2beta1.DlpService/ListRootCategories', $actualFuncCall); - - $actualValue = $actualRequestObject->getLanguageCode(); - - $this->assertProtobufEquals($languageCode, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listRootCategoriesExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $languageCode = 'en'; - - try { - $client->listRootCategories($languageCode); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/generated/php/google-cloud-error-reporting-v1beta1/composer.json b/generated/php/google-cloud-error-reporting-v1beta1/composer.json index 803dd13dc..31163bdd5 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/composer.json +++ b/generated/php/google-cloud-error-reporting-v1beta1/composer.json @@ -1,30 +1,21 @@ { - "name": "errorreporting/errorreporting", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-errorreporting", "description": "Stackdriver Error Reporting API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\ErrorReporting\\": "src", + "Google\\Cloud\\ErrorReporting\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorGroupServiceClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorGroupServiceClient.php similarity index 94% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorGroupServiceClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorGroupServiceClient.php index e72aa5705..5ece71fae 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorGroupServiceClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorGroupServiceClient.php @@ -38,5 +38,5 @@ class ErrorGroupServiceClient extends ErrorGroupServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ErrorGroupServiceClientImpl} class. + // additions to the generated {@see ErrorGroupServiceGapicClient} class. } diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorStatsServiceClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorStatsServiceClient.php similarity index 94% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorStatsServiceClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorStatsServiceClient.php index cd4781b83..bcd980337 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ErrorStatsServiceClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ErrorStatsServiceClient.php @@ -38,5 +38,5 @@ class ErrorStatsServiceClient extends ErrorStatsServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ErrorStatsServiceClientImpl} class. + // additions to the generated {@see ErrorStatsServiceGapicClient} class. } diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorGroupServiceGapicClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php similarity index 69% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorGroupServiceGapicClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php index 6daa83727..0ded9f7f3 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorGroupServiceGapicClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php @@ -31,18 +31,16 @@ namespace Google\Cloud\ErrorReporting\V1beta1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\ErrorReporting\V1beta1\ErrorGroup; use Google\Cloud\ErrorReporting\V1beta1\GetGroupRequest; use Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for retrieving and updating individual error groups. @@ -96,10 +94,11 @@ class ErrorGroupServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $groupNameTemplate; private static $pathTemplateMap; @@ -107,15 +106,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/error_group_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/error_group_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/error_group_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/error_group_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/error_group_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -204,57 +206,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'clouderrorreporting.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Error Reporting API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php similarity index 81% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php index 63a9ebeaf..3783f2d0b 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\ErrorReporting\V1beta1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest; use Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse; use Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest; @@ -48,8 +48,6 @@ use Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter; use Google\Protobuf\Duration; use Google\Protobuf\Timestamp; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: An API for retrieving and managing error statistics as well as data for @@ -117,10 +115,11 @@ class ErrorStatsServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectNameTemplate; private static $pathTemplateMap; @@ -128,15 +127,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/error_stats_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/error_stats_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/error_stats_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/error_stats_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/error_stats_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -223,57 +225,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'clouderrorreporting.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Error Reporting API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php similarity index 68% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php index e9b30ed91..183947719 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php @@ -31,18 +31,16 @@ namespace Google\Cloud\ErrorReporting\V1beta1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventRequest; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse; use Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: An API for reporting error events. @@ -97,10 +95,11 @@ class ReportErrorsServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static $projectNameTemplate; private static $pathTemplateMap; @@ -108,15 +107,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/report_errors_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/report_errors_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/report_errors_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/report_errors_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/report_errors_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -203,57 +205,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'clouderrorreporting.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Error Reporting API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ReportErrorsServiceClient.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ReportErrorsServiceClient.php similarity index 94% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ReportErrorsServiceClient.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ReportErrorsServiceClient.php index f2afe5e5d..f0bdd5f91 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/ReportErrorsServiceClient.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/ReportErrorsServiceClient.php @@ -38,5 +38,5 @@ class ReportErrorsServiceClient extends ReportErrorsServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ReportErrorsServiceClientImpl} class. + // additions to the generated {@see ReportErrorsServiceGapicClient} class. } diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_client_config.json b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_client_config.json similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_client_config.json rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_client_config.json diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_descriptor_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_descriptor_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_rest_client_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_group_service_rest_client_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_client_config.json b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_client_config.json similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_client_config.json rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_client_config.json diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_descriptor_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_descriptor_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_rest_client_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/error_stats_service_rest_client_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_client_config.json b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_client_config.json similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_client_config.json rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_client_config.json diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_descriptor_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_descriptor_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_rest_client_config.php b/generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-error-reporting-v1beta1/src/ErrorReporting/V1beta1/resources/report_errors_service_rest_client_config.php rename to generated/php/google-cloud-error-reporting-v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php diff --git a/generated/php/google-cloud-error-reporting-v1beta1/tests/system/ErrorReporting/V1beta1/ReportErrorsServiceSmokeTest.php b/generated/php/google-cloud-error-reporting-v1beta1/tests/System/V1beta1/ReportErrorsServiceSmokeTest.php similarity index 96% rename from generated/php/google-cloud-error-reporting-v1beta1/tests/system/ErrorReporting/V1beta1/ReportErrorsServiceSmokeTest.php rename to generated/php/google-cloud-error-reporting-v1beta1/tests/System/V1beta1/ReportErrorsServiceSmokeTest.php index 9c8a911fd..bf6fd48c6 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/tests/system/ErrorReporting/V1beta1/ReportErrorsServiceSmokeTest.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/tests/System/V1beta1/ReportErrorsServiceSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\ErrorReporting\V1beta1; +namespace Google\Cloud\ErrorReporting\Tests\System\V1beta1; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; use Google\ApiCore\Testing\GeneratedTest; @@ -30,7 +30,7 @@ use Google\Cloud\ErrorReporting\V1beta1\SourceLocation; /** - * @group error_reporting + * @group error-reporting * @group grpc */ class ReportErrorsServiceSmokeTest extends GeneratedTest diff --git a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorGroupServiceClientTest.php b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php similarity index 92% rename from generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorGroupServiceClientTest.php rename to generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php index 8076e6d33..b2d123d15 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorGroupServiceClientTest.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php @@ -20,19 +20,20 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\ErrorReporting\V1beta1; +namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\ErrorReporting\V1beta1\ErrorGroup; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group error_reporting + * @group error-reporting * @group grpc */ class ErrorGroupServiceClientTest extends GeneratedTest @@ -50,6 +51,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ErrorGroupServiceClient($options); } @@ -100,12 +107,12 @@ public function getGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -175,12 +182,12 @@ public function updateGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorStatsServiceClientTest.php b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php similarity index 94% rename from generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorStatsServiceClientTest.php rename to generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php index fbaa6acfd..148e857ae 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ErrorStatsServiceClientTest.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\ErrorReporting\V1beta1; +namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; use Google\Cloud\ErrorReporting\V1beta1\ErrorStatsServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse; @@ -33,11 +34,11 @@ use Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse; use Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group error_reporting + * @group error-reporting * @group grpc */ class ErrorStatsServiceClientTest extends GeneratedTest @@ -55,6 +56,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ErrorStatsServiceClient($options); } @@ -113,12 +120,12 @@ public function listGroupStatsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -197,12 +204,12 @@ public function listEventsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -269,12 +276,12 @@ public function deleteEventsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ReportErrorsServiceClientTest.php b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php similarity index 90% rename from generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ReportErrorsServiceClientTest.php rename to generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php index 8cefd05b5..75a632226 100644 --- a/generated/php/google-cloud-error-reporting-v1beta1/tests/unit/ErrorReporting/V1beta1/ReportErrorsServiceClientTest.php +++ b/generated/php/google-cloud-error-reporting-v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php @@ -20,20 +20,21 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\ErrorReporting\V1beta1; +namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse; use Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group error_reporting + * @group error-reporting * @group grpc */ class ReportErrorsServiceClientTest extends GeneratedTest @@ -51,6 +52,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ReportErrorsServiceClient($options); } @@ -101,12 +108,12 @@ public function reportErrorEventExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-firestore-v1beta1/composer.json b/generated/php/google-cloud-firestore-v1beta1/composer.json index 9ff58bb6d..e91837006 100644 --- a/generated/php/google-cloud-firestore-v1beta1/composer.json +++ b/generated/php/google-cloud-firestore-v1beta1/composer.json @@ -1,30 +1,21 @@ { - "name": "firestore/firestore", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-firestore", "description": "Google Cloud Firestore API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Firestore\\": "src", + "Google\\Cloud\\Firestore\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-firestore-v1beta1/proto/src/Google/Cloud/Firestore/V1beta1/StructuredQuery_CompositeFilter_Operator.php b/generated/php/google-cloud-firestore-v1beta1/proto/src/Google/Cloud/Firestore/V1beta1/StructuredQuery_CompositeFilter_Operator.php index 85560f9c8..4cf2c2a08 100644 --- a/generated/php/google-cloud-firestore-v1beta1/proto/src/Google/Cloud/Firestore/V1beta1/StructuredQuery_CompositeFilter_Operator.php +++ b/generated/php/google-cloud-firestore-v1beta1/proto/src/Google/Cloud/Firestore/V1beta1/StructuredQuery_CompositeFilter_Operator.php @@ -22,6 +22,6 @@ class StructuredQuery_CompositeFilter_Operator * * Generated from protobuf enum AND = 1; */ - const AND = 1; + const PBAND = 1; } diff --git a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/FirestoreClient.php b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/FirestoreClient.php similarity index 95% rename from generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/FirestoreClient.php rename to generated/php/google-cloud-firestore-v1beta1/src/V1beta1/FirestoreClient.php index 8b9da3824..f6cb86fc5 100644 --- a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/FirestoreClient.php +++ b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/FirestoreClient.php @@ -38,5 +38,5 @@ class FirestoreClient extends FirestoreGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see FirestoreClientImpl} class. + // additions to the generated {@see FirestoreGapicClient} class. } diff --git a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/Gapic/FirestoreGapicClient.php b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/Gapic/FirestoreGapicClient.php similarity index 91% rename from generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/Gapic/FirestoreGapicClient.php rename to generated/php/google-cloud-firestore-v1beta1/src/V1beta1/Gapic/FirestoreGapicClient.php index 7ecbd58c5..9d3fc43ce 100644 --- a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/Gapic/FirestoreGapicClient.php +++ b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/Gapic/FirestoreGapicClient.php @@ -32,12 +32,13 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Firestore\V1beta1\BatchGetDocumentsRequest; use Google\Cloud\Firestore\V1beta1\BatchGetDocumentsResponse; use Google\Cloud\Firestore\V1beta1\BeginTransactionRequest; @@ -68,8 +69,6 @@ use Google\Cloud\Firestore\V1beta1\WriteResponse; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Cloud Firestore service. @@ -138,10 +137,12 @@ class FirestoreGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; private static $databaseRootNameTemplate; private static $documentRootNameTemplate; private static $documentPathNameTemplate; @@ -152,16 +153,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ], - 'clientConfigPath' => __DIR__.'/../resources/firestore_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/firestore_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/firestore_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/firestore_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/firestore_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -343,57 +346,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'firestore.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Firestore API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'firestore.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_client_config.json b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_client_config.json similarity index 100% rename from generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_client_config.json rename to generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_client_config.json diff --git a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_descriptor_config.php b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_descriptor_config.php rename to generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_descriptor_config.php diff --git a/generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_rest_client_config.php b/generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-firestore-v1beta1/src/Firestore/V1beta1/resources/firestore_rest_client_config.php rename to generated/php/google-cloud-firestore-v1beta1/src/V1beta1/resources/firestore_rest_client_config.php diff --git a/generated/php/google-cloud-firestore-v1beta1/tests/unit/Firestore/V1beta1/FirestoreClientTest.php b/generated/php/google-cloud-firestore-v1beta1/tests/Unit/V1beta1/FirestoreClientTest.php similarity index 96% rename from generated/php/google-cloud-firestore-v1beta1/tests/unit/Firestore/V1beta1/FirestoreClientTest.php rename to generated/php/google-cloud-firestore-v1beta1/tests/Unit/V1beta1/FirestoreClientTest.php index 30af9ba96..82fab0150 100644 --- a/generated/php/google-cloud-firestore-v1beta1/tests/unit/Firestore/V1beta1/FirestoreClientTest.php +++ b/generated/php/google-cloud-firestore-v1beta1/tests/Unit/V1beta1/FirestoreClientTest.php @@ -20,11 +20,12 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Firestore\V1beta1; +namespace Google\Cloud\Firestore\Tests\Unit\V1beta1; use Google\Cloud\Firestore\V1beta1\FirestoreClient; use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\ServerStream; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -43,7 +44,7 @@ use Google\Cloud\Firestore\V1beta1\WriteResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -65,6 +66,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new FirestoreClient($options); } @@ -113,12 +120,12 @@ public function getDocumentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -196,12 +203,12 @@ public function listDocumentsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -282,12 +289,12 @@ public function createDocumentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -362,12 +369,12 @@ public function updateDocumentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -433,12 +440,12 @@ public function deleteDocumentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -531,12 +538,12 @@ public function batchGetDocumentsExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -611,12 +618,12 @@ public function beginTransactionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -686,12 +693,12 @@ public function commitExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -761,12 +768,12 @@ public function rollbackExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -856,12 +863,12 @@ public function runQueryExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -979,12 +986,12 @@ public function writeExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1087,12 +1094,12 @@ public function listenExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1169,12 +1176,12 @@ public function listCollectionIdsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-iot-v1/composer.json b/generated/php/google-cloud-iot-v1/composer.json deleted file mode 100644 index d32e51560..000000000 --- a/generated/php/google-cloud-iot-v1/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "iot/iot", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "Google Cloud IoT API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php b/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php deleted file mode 100644 index dbb4b65a6..000000000 --- a/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php +++ /dev/null @@ -1,186 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0ad2240a28676f6f676c652f636c6f75642f696f742f76312f6465766963" . - "655f6d616e616765722e70726f746f1213676f6f676c652e636c6f75642e" . - "696f742e76311a23676f6f676c652f636c6f75642f696f742f76312f7265" . - "736f75726365732e70726f746f1a1e676f6f676c652f69616d2f76312f69" . - "616d5f706f6c6963792e70726f746f1a1a676f6f676c652f69616d2f7631" . - "2f706f6c6963792e70726f746f1a1b676f6f676c652f70726f746f627566" . - "2f656d7074792e70726f746f1a20676f6f676c652f70726f746f6275662f" . - "6669656c645f6d61736b2e70726f746f226b0a1b43726561746544657669" . - "6365526567697374727952657175657374120e0a06706172656e74180120" . - "012809123c0a0f6465766963655f726567697374727918022001280b3223" . - "2e676f6f676c652e636c6f75642e696f742e76312e446576696365526567" . - "697374727922280a18476574446576696365526567697374727952657175" . - "657374120c0a046e616d65180120012809222b0a1b44656c657465446576" . - "696365526567697374727952657175657374120c0a046e616d6518012001" . - "2809228c010a1b5570646174654465766963655265676973747279526571" . - "75657374123c0a0f6465766963655f726567697374727918012001280b32" . - "232e676f6f676c652e636c6f75642e696f742e76312e4465766963655265" . - "676973747279122f0a0b7570646174655f6d61736b18022001280b321a2e" . - "676f6f676c652e70726f746f6275662e4669656c644d61736b22540a1b4c" . - "6973744465766963655265676973747269657352657175657374120e0a06" . - "706172656e7418012001280912110a09706167655f73697a651802200128" . - "0512120a0a706167655f746f6b656e18032001280922770a1c4c69737444" . - "657669636552656769737472696573526573706f6e7365123e0a11646576" . - "6963655f7265676973747269657318012003280b32232e676f6f676c652e" . - "636c6f75642e696f742e76312e446576696365526567697374727912170a" . - "0f6e6578745f706167655f746f6b656e18022001280922520a1343726561" . - "746544657669636552657175657374120e0a06706172656e741801200128" . - "09122b0a0664657669636518022001280b321b2e676f6f676c652e636c6f" . - "75642e696f742e76312e44657669636522500a1047657444657669636552" . - "657175657374120c0a046e616d65180120012809122e0a0a6669656c645f" . - "6d61736b18022001280b321a2e676f6f676c652e70726f746f6275662e46" . - "69656c644d61736b22730a13557064617465446576696365526571756573" . - "74122b0a0664657669636518022001280b321b2e676f6f676c652e636c6f" . - "75642e696f742e76312e446576696365122f0a0b7570646174655f6d6173" . - "6b18032001280b321a2e676f6f676c652e70726f746f6275662e4669656c" . - "644d61736b22230a1344656c65746544657669636552657175657374120c" . - "0a046e616d6518012001280922a7010a124c697374446576696365735265" . - "7175657374120e0a06706172656e7418012001280912160a0e6465766963" . - "655f6e756d5f69647318022003280412120a0a6465766963655f69647318" . - "0320032809122e0a0a6669656c645f6d61736b18042001280b321a2e676f" . - "6f676c652e70726f746f6275662e4669656c644d61736b12110a09706167" . - "655f73697a6518642001280512120a0a706167655f746f6b656e18652001" . - "2809225c0a134c69737444657669636573526573706f6e7365122c0a0764" . - "65766963657318012003280b321b2e676f6f676c652e636c6f75642e696f" . - "742e76312e44657669636512170a0f6e6578745f706167655f746f6b656e" . - "18022001280922600a204d6f64696679436c6f7564546f44657669636543" . - "6f6e66696752657175657374120c0a046e616d6518012001280912190a11" . - "76657273696f6e5f746f5f75706461746518022001280312130a0b62696e" . - "6172795f6461746118032001280c22450a1f4c697374446576696365436f" . - "6e66696756657273696f6e7352657175657374120c0a046e616d65180120" . - "01280912140a0c6e756d5f76657273696f6e73180220012805225d0a204c" . - "697374446576696365436f6e66696756657273696f6e73526573706f6e73" . - "6512390a0e6465766963655f636f6e6669677318012003280b32212e676f" . - "6f676c652e636c6f75642e696f742e76312e446576696365436f6e666967" . - "223b0a174c69737444657669636553746174657352657175657374120c0a" . - "046e616d6518012001280912120a0a6e756d5f7374617465731802200128" . - "0522530a184c697374446576696365537461746573526573706f6e736512" . - "370a0d6465766963655f73746174657318012003280b32202e676f6f676c" . - "652e636c6f75642e696f742e76312e446576696365537461746532f8150a" . - "0d4465766963654d616e6167657212b6010a144372656174654465766963" . - "65526567697374727912302e676f6f676c652e636c6f75642e696f742e76" . - "312e4372656174654465766963655265676973747279526571756573741a" . - "232e676f6f676c652e636c6f75642e696f742e76312e4465766963655265" . - "676973747279224782d3e4930241222e2f76312f7b706172656e743d7072" . - "6f6a656374732f2a2f6c6f636174696f6e732f2a7d2f7265676973747269" . - "65733a0f6465766963655f7265676973747279129f010a11476574446576" . - "6963655265676973747279122d2e676f6f676c652e636c6f75642e696f74" . - "2e76312e4765744465766963655265676973747279526571756573741a23" . - "2e676f6f676c652e636c6f75642e696f742e76312e446576696365526567" . - "6973747279223682d3e4930230122e2f76312f7b6e616d653d70726f6a65" . - "6374732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a" . - "7d12c6010a14557064617465446576696365526567697374727912302e67" . - "6f6f676c652e636c6f75642e696f742e76312e5570646174654465766963" . - "655265676973747279526571756573741a232e676f6f676c652e636c6f75" . - "642e696f742e76312e4465766963655265676973747279225782d3e49302" . - "51323e2f76312f7b6465766963655f72656769737472792e6e616d653d70" . - "726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265676973747269" . - "65732f2a7d3a0f6465766963655f72656769737472791298010a1444656c" . - "657465446576696365526567697374727912302e676f6f676c652e636c6f" . - "75642e696f742e76312e44656c6574654465766963655265676973747279" . - "526571756573741a162e676f6f676c652e70726f746f6275662e456d7074" . - "79223682d3e49302302a2e2f76312f7b6e616d653d70726f6a656374732f" . - "2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a7d12b301" . - "0a144c6973744465766963655265676973747269657312302e676f6f676c" . - "652e636c6f75642e696f742e76312e4c6973744465766963655265676973" . - "7472696573526571756573741a312e676f6f676c652e636c6f75642e696f" . - "742e76312e4c69737444657669636552656769737472696573526573706f" . - "6e7365223682d3e4930230122e2f76312f7b706172656e743d70726f6a65" . - "6374732f2a2f6c6f636174696f6e732f2a7d2f7265676973747269657312" . - "9f010a0c43726561746544657669636512282e676f6f676c652e636c6f75" . - "642e696f742e76312e437265617465446576696365526571756573741a1b" . - "2e676f6f676c652e636c6f75642e696f742e76312e446576696365224882" . - "d3e493024222382f76312f7b706172656e743d70726f6a656374732f2a2f" . - "6c6f636174696f6e732f2a2f726567697374726965732f2a7d2f64657669" . - "6365733a066465766963651291010a0947657444657669636512252e676f" . - "6f676c652e636c6f75642e696f742e76312e476574446576696365526571" . - "756573741a1b2e676f6f676c652e636c6f75642e696f742e76312e446576" . - "696365224082d3e493023a12382f76312f7b6e616d653d70726f6a656374" . - "732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a2f64" . - "6576696365732f2a7d12a6010a0c55706461746544657669636512282e67" . - "6f6f676c652e636c6f75642e696f742e76312e5570646174654465766963" . - "65526571756573741a1b2e676f6f676c652e636c6f75642e696f742e7631" . - "2e446576696365224f82d3e4930249323f2f76312f7b6465766963652e6e" . - "616d653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f726567" . - "697374726965732f2a2f646576696365732f2a7d3a066465766963651292" . - "010a0c44656c65746544657669636512282e676f6f676c652e636c6f7564" . - "2e696f742e76312e44656c657465446576696365526571756573741a162e" . - "676f6f676c652e70726f746f6275662e456d707479224082d3e493023a2a" . - "382f76312f7b6e616d653d70726f6a656374732f2a2f6c6f636174696f6e" . - "732f2a2f726567697374726965732f2a2f646576696365732f2a7d12a201" . - "0a0b4c6973744465766963657312272e676f6f676c652e636c6f75642e69" . - "6f742e76312e4c69737444657669636573526571756573741a282e676f6f" . - "676c652e636c6f75642e696f742e76312e4c697374446576696365735265" . - "73706f6e7365224082d3e493023a12382f76312f7b706172656e743d7072" . - "6f6a656374732f2a2f6c6f636174696f6e732f2a2f726567697374726965" . - "732f2a7d2f6465766963657312d4010a194d6f64696679436c6f7564546f" . - "446576696365436f6e66696712352e676f6f676c652e636c6f75642e696f" . - "742e76312e4d6f64696679436c6f7564546f446576696365436f6e666967" . - "526571756573741a212e676f6f676c652e636c6f75642e696f742e76312e" . - "446576696365436f6e666967225d82d3e493025722522f76312f7b6e616d" . - "653d70726f6a656374732f2a2f6c6f636174696f6e732f2a2f7265676973" . - "74726965732f2a2f646576696365732f2a7d3a6d6f64696679436c6f7564" . - "546f446576696365436f6e6669673a012a12d8010a184c69737444657669" . - "6365436f6e66696756657273696f6e7312342e676f6f676c652e636c6f75" . - "642e696f742e76312e4c697374446576696365436f6e6669675665727369" . - "6f6e73526571756573741a352e676f6f676c652e636c6f75642e696f742e" . - "76312e4c697374446576696365436f6e66696756657273696f6e73526573" . - "706f6e7365224f82d3e493024912472f76312f7b6e616d653d70726f6a65" . - "6374732f2a2f6c6f636174696f6e732f2a2f726567697374726965732f2a" . - "2f646576696365732f2a7d2f636f6e66696756657273696f6e7312b8010a" . - "104c697374446576696365537461746573122c2e676f6f676c652e636c6f" . - "75642e696f742e76312e4c69737444657669636553746174657352657175" . - "6573741a2d2e676f6f676c652e636c6f75642e696f742e76312e4c697374" . - "446576696365537461746573526573706f6e7365224782d3e4930241123f" . - "2f76312f7b6e616d653d70726f6a656374732f2a2f6c6f636174696f6e73" . - "2f2a2f726567697374726965732f2a2f646576696365732f2a7d2f737461" . - "7465731295010a0c53657449616d506f6c69637912222e676f6f676c652e" . - "69616d2e76312e53657449616d506f6c696379526571756573741a152e67" . - "6f6f676c652e69616d2e76312e506f6c696379224a82d3e4930244223f2f" . - "76312f7b7265736f757263653d70726f6a656374732f2a2f6c6f63617469" . - "6f6e732f2a2f726567697374726965732f2a7d3a73657449616d506f6c69" . - "63793a012a1295010a0c47657449616d506f6c69637912222e676f6f676c" . - "652e69616d2e76312e47657449616d506f6c696379526571756573741a15" . - "2e676f6f676c652e69616d2e76312e506f6c696379224a82d3e493024422" . - "3f2f76312f7b7265736f757263653d70726f6a656374732f2a2f6c6f6361" . - "74696f6e732f2a2f726567697374726965732f2a7d3a67657449616d506f" . - "6c6963793a012a12bb010a125465737449616d5065726d697373696f6e73" . - "12282e676f6f676c652e69616d2e76312e5465737449616d5065726d6973" . - "73696f6e73526571756573741a292e676f6f676c652e69616d2e76312e54" . - "65737449616d5065726d697373696f6e73526573706f6e7365225082d3e4" . - "93024a22452f76312f7b7265736f757263653d70726f6a656374732f2a2f" . - "6c6f636174696f6e732f2a2f726567697374726965732f2a7d3a74657374" . - "49616d5065726d697373696f6e733a012a426a0a17636f6d2e676f6f676c" . - "652e636c6f75642e696f742e763142124465766963654d616e6167657250" . - "726f746f50015a36676f6f676c652e676f6c616e672e6f72672f67656e70" . - "726f746f2f676f6f676c65617069732f636c6f75642f696f742f76313b69" . - "6f74f80101620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php b/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php deleted file mode 100644 index 9d1fc9d01..000000000 --- a/generated/php/google-cloud-iot-v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php +++ /dev/null @@ -1,125 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0a89170a23676f6f676c652f636c6f75642f696f742f76312f7265736f75" . - "726365732e70726f746f1213676f6f676c652e636c6f75642e696f742e76" . - "311a1f676f6f676c652f70726f746f6275662f74696d657374616d702e70" . - "726f746f1a17676f6f676c652f7270632f7374617475732e70726f746f22" . - "cd050a06446576696365120a0a026964180120012809120c0a046e616d65" . - "180220012809120e0a066e756d5f6964180320012804123a0a0b63726564" . - "656e7469616c73180c2003280b32252e676f6f676c652e636c6f75642e69" . - "6f742e76312e44657669636543726564656e7469616c12370a136c617374" . - "5f6865617274626561745f74696d6518072001280b321a2e676f6f676c65" . - "2e70726f746f6275662e54696d657374616d7012330a0f6c6173745f6576" . - "656e745f74696d6518082001280b321a2e676f6f676c652e70726f746f62" . - "75662e54696d657374616d7012330a0f6c6173745f73746174655f74696d" . - "6518142001280b321a2e676f6f676c652e70726f746f6275662e54696d65" . - "7374616d7012380a146c6173745f636f6e6669675f61636b5f74696d6518" . - "0e2001280b321a2e676f6f676c652e70726f746f6275662e54696d657374" . - "616d7012390a156c6173745f636f6e6669675f73656e645f74696d651812" . - "2001280b321a2e676f6f676c652e70726f746f6275662e54696d65737461" . - "6d70120f0a07626c6f636b656418132001280812330a0f6c6173745f6572" . - "726f725f74696d65180a2001280b321a2e676f6f676c652e70726f746f62" . - "75662e54696d657374616d70122d0a116c6173745f6572726f725f737461" . - "747573180b2001280b32122e676f6f676c652e7270632e53746174757312" . - "310a06636f6e666967180d2001280b32212e676f6f676c652e636c6f7564" . - "2e696f742e76312e446576696365436f6e666967122f0a05737461746518" . - "102001280b32202e676f6f676c652e636c6f75642e696f742e76312e4465" . - "766963655374617465123b0a086d6574616461746118112003280b32292e" . - "676f6f676c652e636c6f75642e696f742e76312e4465766963652e4d6574" . - "6164617461456e7472791a2f0a0d4d65746164617461456e747279120b0a" . - "036b6579180120012809120d0a0576616c75651802200128093a02380122" . - "f7020a0e4465766963655265676973747279120a0a026964180120012809" . - "120c0a046e616d6518022001280912500a1a6576656e745f6e6f74696669" . - "636174696f6e5f636f6e66696773180a2003280b322c2e676f6f676c652e" . - "636c6f75642e696f742e76312e4576656e744e6f74696669636174696f6e" . - "436f6e666967124f0a1973746174655f6e6f74696669636174696f6e5f63" . - "6f6e66696718072001280b322c2e676f6f676c652e636c6f75642e696f74" . - "2e76312e53746174654e6f74696669636174696f6e436f6e66696712340a" . - "0b6d7174745f636f6e66696718042001280b321f2e676f6f676c652e636c" . - "6f75642e696f742e76312e4d717474436f6e66696712340a0b687474705f" . - "636f6e66696718092001280b321f2e676f6f676c652e636c6f75642e696f" . - "742e76312e48747470436f6e666967123c0a0b63726564656e7469616c73" . - "18082003280b32272e676f6f676c652e636c6f75642e696f742e76312e52" . - "6567697374727943726564656e7469616c22480a0a4d717474436f6e6669" . - "67123a0a126d7174745f656e61626c65645f737461746518012001280e32" . - "1e2e676f6f676c652e636c6f75642e696f742e76312e4d71747453746174" . - "6522480a0a48747470436f6e666967123a0a12687474705f656e61626c65" . - "645f737461746518012001280e321e2e676f6f676c652e636c6f75642e69" . - "6f742e76312e48747470537461746522340a174576656e744e6f74696669" . - "636174696f6e436f6e66696712190a117075627375625f746f7069635f6e" . - "616d6518012001280922340a1753746174654e6f74696669636174696f6e" . - "436f6e66696712190a117075627375625f746f7069635f6e616d65180120" . - "012809226f0a12526567697374727943726564656e7469616c124b0a1670" . - "75626c69635f6b65795f636572746966696361746518012001280b32292e" . - "676f6f676c652e636c6f75642e696f742e76312e5075626c69634b657943" . - "657274696669636174654800420c0a0a63726564656e7469616c22d0010a" . - "1658353039436572746966696361746544657461696c73120e0a06697373" . - "756572180120012809120f0a077375626a656374180220012809122e0a0a" . - "73746172745f74696d6518032001280b321a2e676f6f676c652e70726f74" . - "6f6275662e54696d657374616d70122f0a0b6578706972795f74696d6518" . - "042001280b321a2e676f6f676c652e70726f746f6275662e54696d657374" . - "616d70121b0a137369676e61747572655f616c676f726974686d18052001" . - "280912170a0f7075626c69635f6b65795f7479706518062001280922af01" . - "0a145075626c69634b65794365727469666963617465123f0a06666f726d" . - "617418012001280e322f2e676f6f676c652e636c6f75642e696f742e7631" . - "2e5075626c69634b65794365727469666963617465466f726d617412130a" . - "0b636572746966696361746518022001280912410a0c783530395f646574" . - "61696c7318032001280b322b2e676f6f676c652e636c6f75642e696f742e" . - "76312e58353039436572746966696361746544657461696c732295010a10" . - "44657669636543726564656e7469616c123e0a0a7075626c69635f6b6579" . - "18022001280b32282e676f6f676c652e636c6f75642e696f742e76312e50" . - "75626c69634b657943726564656e7469616c480012330a0f657870697261" . - "74696f6e5f74696d6518062001280b321a2e676f6f676c652e70726f746f" . - "6275662e54696d657374616d70420c0a0a63726564656e7469616c22580a" . - "135075626c69634b657943726564656e7469616c12340a06666f726d6174" . - "18012001280e32242e676f6f676c652e636c6f75642e696f742e76312e50" . - "75626c69634b6579466f726d6174120b0a036b657918022001280922a001" . - "0a0c446576696365436f6e666967120f0a0776657273696f6e1801200128" . - "0312350a11636c6f75645f7570646174655f74696d6518022001280b321a" . - "2e676f6f676c652e70726f746f6275662e54696d657374616d7012330a0f" . - "6465766963655f61636b5f74696d6518032001280b321a2e676f6f676c65" . - "2e70726f746f6275662e54696d657374616d7012130a0b62696e6172795f" . - "6461746118042001280c22530a0b4465766963655374617465122f0a0b75" . - "70646174655f74696d6518012001280b321a2e676f6f676c652e70726f74" . - "6f6275662e54696d657374616d7012130a0b62696e6172795f6461746118" . - "022001280c2a4c0a094d7174745374617465121a0a164d5154545f535441" . - "54455f554e535045434946494544100012100a0c4d5154545f454e41424c" . - "4544100112110a0d4d5154545f44495341424c454410022a4c0a09487474" . - "705374617465121a0a16485454505f53544154455f554e53504543494649" . - "4544100012100a0c485454505f454e41424c4544100112110a0d48545450" . - "5f44495341424c454410022a650a1a5075626c69634b6579436572746966" . - "6963617465466f726d6174122d0a29554e5350454349464945445f505542" . - "4c49435f4b45595f43455254494649434154455f464f524d415410001218" . - "0a14583530395f43455254494649434154455f50454d10012a760a0f5075" . - "626c69634b6579466f726d617412210a1d554e5350454349464945445f50" . - "55424c49435f4b45595f464f524d41541000120b0a075253415f50454d10" . - "0312100a0c5253415f583530395f50454d1001120d0a0945533235365f50" . - "454d100212120a0e45533235365f583530395f50454d100442660a17636f" . - "6d2e676f6f676c652e636c6f75642e696f742e7631420e5265736f757263" . - "657350726f746f50015a36676f6f676c652e676f6c616e672e6f72672f67" . - "656e70726f746f2f676f6f676c65617069732f636c6f75642f696f742f76" . - "313b696f74f80101620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php b/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php deleted file mode 100644 index c4b7dfdee..000000000 --- a/generated/php/google-cloud-iot-v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.iot.v1.EventNotificationConfig - */ -class EventNotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - */ - private $pubsub_topic_name = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct(); - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @return string - */ - public function getPubsubTopicName() - { - return $this->pubsub_topic_name; - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @param string $var - * @return $this - */ - public function setPubsubTopicName($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic_name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-language-v1/composer.json b/generated/php/google-cloud-language-v1/composer.json index c8ccb133a..021caebb0 100644 --- a/generated/php/google-cloud-language-v1/composer.json +++ b/generated/php/google-cloud-language-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "language/language", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-language", "description": "Google Cloud Natural Language API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Language\\": "src", + "Google\\Cloud\\Language\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-language-v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php b/generated/php/google-cloud-language-v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php index fcfab3cc9..2809f6ed1 100644 --- a/generated/php/google-cloud-language-v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php +++ b/generated/php/google-cloud-language-v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php @@ -436,7 +436,7 @@ class DependencyEdge_Label * * Generated from protobuf enum LIST = 70; */ - const LIST = 70; + const PBLIST = 70; /** * Nominalized clause * diff --git a/generated/php/google-cloud-language-v1/src/Language/V1/Gapic/LanguageServiceGapicClient.php b/generated/php/google-cloud-language-v1/src/V1/Gapic/LanguageServiceGapicClient.php similarity index 77% rename from generated/php/google-cloud-language-v1/src/Language/V1/Gapic/LanguageServiceGapicClient.php rename to generated/php/google-cloud-language-v1/src/V1/Gapic/LanguageServiceGapicClient.php index ecf6980a2..7d3244f28 100644 --- a/generated/php/google-cloud-language-v1/src/Language/V1/Gapic/LanguageServiceGapicClient.php +++ b/generated/php/google-cloud-language-v1/src/V1/Gapic/LanguageServiceGapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Language\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Language\V1\AnalyzeEntitiesRequest; use Google\Cloud\Language\V1\AnalyzeEntitiesResponse; use Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest; @@ -51,8 +52,6 @@ use Google\Cloud\Language\V1\ClassifyTextResponse; use Google\Cloud\Language\V1\Document; use Google\Cloud\Language\V1\EncodingType; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -102,23 +101,28 @@ class LanguageServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/language_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/language_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/language_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/language_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/language_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -128,57 +132,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'language.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Natural Language API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'language.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-language-v1/src/Language/V1/LanguageServiceClient.php b/generated/php/google-cloud-language-v1/src/V1/LanguageServiceClient.php similarity index 94% rename from generated/php/google-cloud-language-v1/src/Language/V1/LanguageServiceClient.php rename to generated/php/google-cloud-language-v1/src/V1/LanguageServiceClient.php index c65182179..94532a0ca 100644 --- a/generated/php/google-cloud-language-v1/src/Language/V1/LanguageServiceClient.php +++ b/generated/php/google-cloud-language-v1/src/V1/LanguageServiceClient.php @@ -38,5 +38,5 @@ class LanguageServiceClient extends LanguageServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see LanguageServiceClientImpl} class. + // additions to the generated {@see LanguageServiceGapicClient} class. } diff --git a/generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_client_config.json b/generated/php/google-cloud-language-v1/src/V1/resources/language_service_client_config.json similarity index 100% rename from generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_client_config.json rename to generated/php/google-cloud-language-v1/src/V1/resources/language_service_client_config.json diff --git a/generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_descriptor_config.php b/generated/php/google-cloud-language-v1/src/V1/resources/language_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_descriptor_config.php rename to generated/php/google-cloud-language-v1/src/V1/resources/language_service_descriptor_config.php diff --git a/generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_rest_client_config.php b/generated/php/google-cloud-language-v1/src/V1/resources/language_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-language-v1/src/Language/V1/resources/language_service_rest_client_config.php rename to generated/php/google-cloud-language-v1/src/V1/resources/language_service_rest_client_config.php diff --git a/generated/php/google-cloud-language-v1/tests/system/Language/V1/LanguageServiceSmokeTest.php b/generated/php/google-cloud-language-v1/tests/System/V1/LanguageServiceSmokeTest.php similarity index 96% rename from generated/php/google-cloud-language-v1/tests/system/Language/V1/LanguageServiceSmokeTest.php rename to generated/php/google-cloud-language-v1/tests/System/V1/LanguageServiceSmokeTest.php index 803c14705..d9040b543 100644 --- a/generated/php/google-cloud-language-v1/tests/system/Language/V1/LanguageServiceSmokeTest.php +++ b/generated/php/google-cloud-language-v1/tests/System/V1/LanguageServiceSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Language\V1; +namespace Google\Cloud\Language\Tests\System\V1; use Google\Cloud\Language\V1\LanguageServiceClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-language-v1/tests/unit/Language/V1/LanguageServiceClientTest.php b/generated/php/google-cloud-language-v1/tests/Unit/V1/LanguageServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-language-v1/tests/unit/Language/V1/LanguageServiceClientTest.php rename to generated/php/google-cloud-language-v1/tests/Unit/V1/LanguageServiceClientTest.php index 170bcedab..e3c7b1f85 100644 --- a/generated/php/google-cloud-language-v1/tests/unit/Language/V1/LanguageServiceClientTest.php +++ b/generated/php/google-cloud-language-v1/tests/Unit/V1/LanguageServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Language\V1; +namespace Google\Cloud\Language\Tests\Unit\V1; use Google\Cloud\Language\V1\LanguageServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Language\V1\AnalyzeEntitiesResponse; @@ -35,7 +36,7 @@ use Google\Cloud\Language\V1\ClassifyTextResponse; use Google\Cloud\Language\V1\Document; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -57,6 +58,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new LanguageServiceClient($options); } @@ -105,12 +112,12 @@ public function analyzeSentimentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -178,12 +185,12 @@ public function analyzeEntitiesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -251,12 +258,12 @@ public function analyzeEntitySentimentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -324,12 +331,12 @@ public function analyzeSyntaxExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -395,12 +402,12 @@ public function classifyTextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -472,12 +479,12 @@ public function annotateTextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-language-v1beta2/composer.json b/generated/php/google-cloud-language-v1beta2/composer.json index c8ccb133a..021caebb0 100644 --- a/generated/php/google-cloud-language-v1beta2/composer.json +++ b/generated/php/google-cloud-language-v1beta2/composer.json @@ -1,30 +1,21 @@ { - "name": "language/language", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-language", "description": "Google Cloud Natural Language API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Language\\": "src", + "Google\\Cloud\\Language\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-language-v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php b/generated/php/google-cloud-language-v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php index f848433b6..02d1bd624 100644 --- a/generated/php/google-cloud-language-v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php +++ b/generated/php/google-cloud-language-v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php @@ -436,7 +436,7 @@ class DependencyEdge_Label * * Generated from protobuf enum LIST = 70; */ - const LIST = 70; + const PBLIST = 70; /** * Nominalized clause * diff --git a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php b/generated/php/google-cloud-language-v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php similarity index 77% rename from generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php rename to generated/php/google-cloud-language-v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php index 01c3f74a5..451162caa 100644 --- a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php +++ b/generated/php/google-cloud-language-v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php @@ -31,11 +31,12 @@ namespace Google\Cloud\Language\V1beta2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Language\V1beta2\AnalyzeEntitiesRequest; use Google\Cloud\Language\V1beta2\AnalyzeEntitiesResponse; use Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentRequest; @@ -51,8 +52,6 @@ use Google\Cloud\Language\V1beta2\ClassifyTextResponse; use Google\Cloud\Language\V1beta2\Document; use Google\Cloud\Language\V1beta2\EncodingType; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -102,23 +101,28 @@ class LanguageServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/language_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/language_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/language_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/language_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/language_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -128,57 +132,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'language.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Natural Language API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'language.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/LanguageServiceClient.php b/generated/php/google-cloud-language-v1beta2/src/V1beta2/LanguageServiceClient.php similarity index 94% rename from generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/LanguageServiceClient.php rename to generated/php/google-cloud-language-v1beta2/src/V1beta2/LanguageServiceClient.php index 82e162e28..b4d49061c 100644 --- a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/LanguageServiceClient.php +++ b/generated/php/google-cloud-language-v1beta2/src/V1beta2/LanguageServiceClient.php @@ -38,5 +38,5 @@ class LanguageServiceClient extends LanguageServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see LanguageServiceClientImpl} class. + // additions to the generated {@see LanguageServiceGapicClient} class. } diff --git a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_client_config.json b/generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_client_config.json similarity index 100% rename from generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_client_config.json rename to generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_client_config.json diff --git a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_descriptor_config.php b/generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_descriptor_config.php rename to generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_descriptor_config.php diff --git a/generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_rest_client_config.php b/generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-language-v1beta2/src/Language/V1beta2/resources/language_service_rest_client_config.php rename to generated/php/google-cloud-language-v1beta2/src/V1beta2/resources/language_service_rest_client_config.php diff --git a/generated/php/google-cloud-language-v1beta2/tests/system/Language/V1beta2/LanguageServiceSmokeTest.php b/generated/php/google-cloud-language-v1beta2/tests/System/V1beta2/LanguageServiceSmokeTest.php similarity index 96% rename from generated/php/google-cloud-language-v1beta2/tests/system/Language/V1beta2/LanguageServiceSmokeTest.php rename to generated/php/google-cloud-language-v1beta2/tests/System/V1beta2/LanguageServiceSmokeTest.php index d9b8e0023..bbfde1156 100644 --- a/generated/php/google-cloud-language-v1beta2/tests/system/Language/V1beta2/LanguageServiceSmokeTest.php +++ b/generated/php/google-cloud-language-v1beta2/tests/System/V1beta2/LanguageServiceSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Language\V1beta2; +namespace Google\Cloud\Language\Tests\System\V1beta2; use Google\Cloud\Language\V1beta2\LanguageServiceClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-language-v1beta2/tests/unit/Language/V1beta2/LanguageServiceClientTest.php b/generated/php/google-cloud-language-v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-language-v1beta2/tests/unit/Language/V1beta2/LanguageServiceClientTest.php rename to generated/php/google-cloud-language-v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php index bab1baf66..7a7b16ed7 100644 --- a/generated/php/google-cloud-language-v1beta2/tests/unit/Language/V1beta2/LanguageServiceClientTest.php +++ b/generated/php/google-cloud-language-v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Language\V1beta2; +namespace Google\Cloud\Language\Tests\Unit\V1beta2; use Google\Cloud\Language\V1beta2\LanguageServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Language\V1beta2\AnalyzeEntitiesResponse; @@ -35,7 +36,7 @@ use Google\Cloud\Language\V1beta2\ClassifyTextResponse; use Google\Cloud\Language\V1beta2\Document; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -57,6 +58,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new LanguageServiceClient($options); } @@ -105,12 +112,12 @@ public function analyzeSentimentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -178,12 +185,12 @@ public function analyzeEntitiesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -251,12 +258,12 @@ public function analyzeEntitySentimentExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -324,12 +331,12 @@ public function analyzeSyntaxExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -395,12 +402,12 @@ public function classifyTextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -472,12 +479,12 @@ public function annotateTextExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-logging-v2/composer.json b/generated/php/google-cloud-logging-v2/composer.json index 52e36cbcd..865572fd7 100644 --- a/generated/php/google-cloud-logging-v2/composer.json +++ b/generated/php/google-cloud-logging-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "logging/logging", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-logging", "description": "Stackdriver Logging API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Logging\\": "src", + "Google\\Cloud\\Logging\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/ConfigServiceV2Client.php b/generated/php/google-cloud-logging-v2/src/V2/ConfigServiceV2Client.php similarity index 94% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/ConfigServiceV2Client.php rename to generated/php/google-cloud-logging-v2/src/V2/ConfigServiceV2Client.php index 747d3a96e..caa780c12 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/ConfigServiceV2Client.php +++ b/generated/php/google-cloud-logging-v2/src/V2/ConfigServiceV2Client.php @@ -38,5 +38,5 @@ class ConfigServiceV2Client extends ConfigServiceV2GapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ConfigServiceV2ClientImpl} class. + // additions to the generated {@see ConfigServiceV2GapicClient} class. } diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php b/generated/php/google-cloud-logging-v2/src/V2/Gapic/ConfigServiceV2GapicClient.php similarity index 88% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php rename to generated/php/google-cloud-logging-v2/src/V2/Gapic/ConfigServiceV2GapicClient.php index d8db18f8e..6ee76ae80 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php +++ b/generated/php/google-cloud-logging-v2/src/V2/Gapic/ConfigServiceV2GapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Logging\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Logging\V2\CreateExclusionRequest; use Google\Cloud\Logging\V2\CreateSinkRequest; use Google\Cloud\Logging\V2\DeleteExclusionRequest; @@ -54,8 +54,6 @@ use Google\Cloud\Logging\V2\UpdateSinkRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for configuring sinks used to export log entries outside of @@ -122,10 +120,15 @@ class ConfigServiceV2GapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; private static $projectNameTemplate; private static $sinkNameTemplate; private static $exclusionNameTemplate; @@ -135,19 +138,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/config_service_v2_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/config_service_v2_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/config_service_v2_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/config_service_v2_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/config_service_v2_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -292,57 +294,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'logging.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Logging API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php b/generated/php/google-cloud-logging-v2/src/V2/Gapic/LoggingServiceV2GapicClient.php similarity index 85% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php rename to generated/php/google-cloud-logging-v2/src/V2/Gapic/LoggingServiceV2GapicClient.php index 79a7b8789..589c25d52 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php +++ b/generated/php/google-cloud-logging-v2/src/V2/Gapic/LoggingServiceV2GapicClient.php @@ -31,14 +31,14 @@ namespace Google\Cloud\Logging\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Api\MonitoredResource; -use Google\Auth\CredentialsLoader; use Google\Cloud\Logging\V2\DeleteLogRequest; use Google\Cloud\Logging\V2\ListLogEntriesRequest; use Google\Cloud\Logging\V2\ListLogEntriesResponse; @@ -50,8 +50,6 @@ use Google\Cloud\Logging\V2\WriteLogEntriesRequest; use Google\Cloud\Logging\V2\WriteLogEntriesResponse; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for ingesting and querying logs. @@ -105,10 +103,15 @@ class LoggingServiceV2GapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; private static $projectNameTemplate; private static $logNameTemplate; private static $pathTemplateMap; @@ -117,19 +120,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/logging_service_v2_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/logging_service_v2_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/logging_service_v2_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/logging_service_v2_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/logging_service_v2_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -245,57 +247,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'logging.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Logging API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php b/generated/php/google-cloud-logging-v2/src/V2/Gapic/MetricsServiceV2GapicClient.php similarity index 79% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php rename to generated/php/google-cloud-logging-v2/src/V2/Gapic/MetricsServiceV2GapicClient.php index 87ab1f341..a2ab5ff29 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php +++ b/generated/php/google-cloud-logging-v2/src/V2/Gapic/MetricsServiceV2GapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Logging\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Logging\V2\CreateLogMetricRequest; use Google\Cloud\Logging\V2\DeleteLogMetricRequest; use Google\Cloud\Logging\V2\GetLogMetricRequest; @@ -46,8 +46,6 @@ use Google\Cloud\Logging\V2\LogMetric; use Google\Cloud\Logging\V2\UpdateLogMetricRequest; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service for configuring logs-based metrics. @@ -113,10 +111,15 @@ class MetricsServiceV2GapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; private static $projectNameTemplate; private static $metricNameTemplate; private static $pathTemplateMap; @@ -125,19 +128,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/metrics_service_v2_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/metrics_service_v2_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/metrics_service_v2_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/metrics_service_v2_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/metrics_service_v2_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -253,57 +255,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'logging.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Logging API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/LoggingServiceV2Client.php b/generated/php/google-cloud-logging-v2/src/V2/LoggingServiceV2Client.php similarity index 94% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/LoggingServiceV2Client.php rename to generated/php/google-cloud-logging-v2/src/V2/LoggingServiceV2Client.php index 35ffb6c2c..8f3c41904 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/LoggingServiceV2Client.php +++ b/generated/php/google-cloud-logging-v2/src/V2/LoggingServiceV2Client.php @@ -38,5 +38,5 @@ class LoggingServiceV2Client extends LoggingServiceV2GapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see LoggingServiceV2ClientImpl} class. + // additions to the generated {@see LoggingServiceV2GapicClient} class. } diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/MetricsServiceV2Client.php b/generated/php/google-cloud-logging-v2/src/V2/MetricsServiceV2Client.php similarity index 94% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/MetricsServiceV2Client.php rename to generated/php/google-cloud-logging-v2/src/V2/MetricsServiceV2Client.php index 3147ea492..f64bb05cf 100644 --- a/generated/php/google-cloud-logging-v2/src/Logging/V2/MetricsServiceV2Client.php +++ b/generated/php/google-cloud-logging-v2/src/V2/MetricsServiceV2Client.php @@ -38,5 +38,5 @@ class MetricsServiceV2Client extends MetricsServiceV2GapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see MetricsServiceV2ClientImpl} class. + // additions to the generated {@see MetricsServiceV2GapicClient} class. } diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_client_config.json b/generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_client_config.json similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_client_config.json rename to generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_client_config.json diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_descriptor_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_descriptor_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_descriptor_config.php diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_rest_client_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/config_service_v2_rest_client_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/config_service_v2_rest_client_config.php diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_client_config.json b/generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_client_config.json similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_client_config.json rename to generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_client_config.json diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_descriptor_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_descriptor_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_descriptor_config.php diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_rest_client_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/logging_service_v2_rest_client_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/logging_service_v2_rest_client_config.php diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_client_config.json b/generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_client_config.json similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_client_config.json rename to generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_client_config.json diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_descriptor_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_descriptor_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_descriptor_config.php diff --git a/generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_rest_client_config.php b/generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-logging-v2/src/Logging/V2/resources/metrics_service_v2_rest_client_config.php rename to generated/php/google-cloud-logging-v2/src/V2/resources/metrics_service_v2_rest_client_config.php diff --git a/generated/php/google-cloud-logging-v2/tests/system/Logging/V2/LoggingServiceV2SmokeTest.php b/generated/php/google-cloud-logging-v2/tests/System/V2/LoggingServiceV2SmokeTest.php similarity index 97% rename from generated/php/google-cloud-logging-v2/tests/system/Logging/V2/LoggingServiceV2SmokeTest.php rename to generated/php/google-cloud-logging-v2/tests/System/V2/LoggingServiceV2SmokeTest.php index 848a5cada..13230cf33 100644 --- a/generated/php/google-cloud-logging-v2/tests/system/Logging/V2/LoggingServiceV2SmokeTest.php +++ b/generated/php/google-cloud-logging-v2/tests/System/V2/LoggingServiceV2SmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Logging\V2; +namespace Google\Cloud\Logging\Tests\System\V2; use Google\Cloud\Logging\V2\LoggingServiceV2Client; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/ConfigServiceV2ClientTest.php b/generated/php/google-cloud-logging-v2/tests/Unit/V2/ConfigServiceV2ClientTest.php similarity index 96% rename from generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/ConfigServiceV2ClientTest.php rename to generated/php/google-cloud-logging-v2/tests/Unit/V2/ConfigServiceV2ClientTest.php index 12e6478f5..0ea575da7 100644 --- a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/ConfigServiceV2ClientTest.php +++ b/generated/php/google-cloud-logging-v2/tests/Unit/V2/ConfigServiceV2ClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Logging\V2; +namespace Google\Cloud\Logging\Tests\Unit\V2; use Google\Cloud\Logging\V2\ConfigServiceV2Client; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Logging\V2\ListExclusionsResponse; @@ -33,7 +34,7 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -55,6 +56,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ConfigServiceV2Client($options); } @@ -109,12 +116,12 @@ public function listSinksExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -190,12 +197,12 @@ public function getSinkExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -275,12 +282,12 @@ public function createSinkExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -361,12 +368,12 @@ public function updateSinkExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -432,12 +439,12 @@ public function deleteSinkExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -511,12 +518,12 @@ public function listExclusionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -590,12 +597,12 @@ public function getExclusionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -673,12 +680,12 @@ public function createExclusionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -761,12 +768,12 @@ public function updateExclusionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -833,12 +840,12 @@ public function deleteExclusionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/LoggingServiceV2ClientTest.php b/generated/php/google-cloud-logging-v2/tests/Unit/V2/LoggingServiceV2ClientTest.php similarity index 95% rename from generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/LoggingServiceV2ClientTest.php rename to generated/php/google-cloud-logging-v2/tests/Unit/V2/LoggingServiceV2ClientTest.php index 5b345937b..4d81ae441 100644 --- a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/LoggingServiceV2ClientTest.php +++ b/generated/php/google-cloud-logging-v2/tests/Unit/V2/LoggingServiceV2ClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Logging\V2; +namespace Google\Cloud\Logging\Tests\Unit\V2; use Google\Cloud\Logging\V2\LoggingServiceV2Client; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Api\MonitoredResourceDescriptor; @@ -34,7 +35,7 @@ use Google\Cloud\Logging\V2\WriteLogEntriesResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -56,6 +57,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new LoggingServiceV2Client($options); } @@ -101,12 +108,12 @@ public function deleteLogExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -172,12 +179,12 @@ public function writeLogEntriesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -251,12 +258,12 @@ public function listLogEntriesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -324,12 +331,12 @@ public function listMonitoredResourceDescriptorsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -400,12 +407,12 @@ public function listLogsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/MetricsServiceV2ClientTest.php b/generated/php/google-cloud-logging-v2/tests/Unit/V2/MetricsServiceV2ClientTest.php similarity index 95% rename from generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/MetricsServiceV2ClientTest.php rename to generated/php/google-cloud-logging-v2/tests/Unit/V2/MetricsServiceV2ClientTest.php index 222c27dca..c2e88db75 100644 --- a/generated/php/google-cloud-logging-v2/tests/unit/Logging/V2/MetricsServiceV2ClientTest.php +++ b/generated/php/google-cloud-logging-v2/tests/Unit/V2/MetricsServiceV2ClientTest.php @@ -20,17 +20,18 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Logging\V2; +namespace Google\Cloud\Logging\Tests\Unit\V2; use Google\Cloud\Logging\V2\MetricsServiceV2Client; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Logging\V2\ListLogMetricsResponse; use Google\Cloud\Logging\V2\LogMetric; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -52,6 +53,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new MetricsServiceV2Client($options); } @@ -106,12 +113,12 @@ public function listLogMetricsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -185,12 +192,12 @@ public function getLogMetricExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -268,12 +275,12 @@ public function createLogMetricExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -352,12 +359,12 @@ public function updateLogMetricExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -423,12 +430,12 @@ public function deleteLogMetricExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-longrunning-v1/composer.json b/generated/php/google-cloud-longrunning-v1/composer.json new file mode 100644 index 000000000..af353a33e --- /dev/null +++ b/generated/php/google-cloud-longrunning-v1/composer.json @@ -0,0 +1,21 @@ +{ + "name": "google/apicore-longrunning", + "description": "Google Long Running Operations API client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\ApiCore\\LongRunning\\": "src", + "Google\\ApiCore\\LongRunning\\Tests\\": "tests", + "": "proto/src" + } + }, + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + } +} \ No newline at end of file diff --git a/generated/php/google-longrunning-v1/proto/src/GPBMetadata/Google/Longrunning/Operations.php b/generated/php/google-cloud-longrunning-v1/proto/src/GPBMetadata/Google/Longrunning/Operations.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/GPBMetadata/Google/Longrunning/Operations.php rename to generated/php/google-cloud-longrunning-v1/proto/src/GPBMetadata/Google/Longrunning/Operations.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/CancelOperationRequest.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/CancelOperationRequest.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/CancelOperationRequest.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/CancelOperationRequest.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/DeleteOperationRequest.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/DeleteOperationRequest.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/DeleteOperationRequest.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/DeleteOperationRequest.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/GetOperationRequest.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/GetOperationRequest.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/GetOperationRequest.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/GetOperationRequest.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/ListOperationsRequest.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/ListOperationsRequest.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/ListOperationsRequest.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/ListOperationsRequest.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/ListOperationsResponse.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/ListOperationsResponse.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/ListOperationsResponse.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/ListOperationsResponse.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/Operation.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/Operation.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/Operation.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/Operation.php diff --git a/generated/php/google-longrunning-v1/proto/src/Google/LongRunning/OperationsGrpcClient.php b/generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/OperationsGrpcClient.php similarity index 100% rename from generated/php/google-longrunning-v1/proto/src/Google/LongRunning/OperationsGrpcClient.php rename to generated/php/google-cloud-longrunning-v1/proto/src/Google/LongRunning/OperationsGrpcClient.php diff --git a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php b/generated/php/google-cloud-longrunning-v1/src/Gapic/OperationsGapicClient.php similarity index 75% rename from generated/php/google-longrunning-v1/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php rename to generated/php/google-cloud-longrunning-v1/src/Gapic/OperationsGapicClient.php index 3fbff7491..b7f50b5d9 100644 --- a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php +++ b/generated/php/google-cloud-longrunning-v1/src/Gapic/OperationsGapicClient.php @@ -45,12 +45,12 @@ namespace Google\ApiCore\LongRunning\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\LongRunning\CancelOperationRequest; use Google\LongRunning\DeleteOperationRequest; use Google\LongRunning\GetOperationRequest; @@ -58,8 +58,6 @@ use Google\LongRunning\ListOperationsResponse; use Google\LongRunning\Operation; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Manages long-running operations with an API service. @@ -82,7 +80,9 @@ * ``` * $options = [ * 'serviceAddress' => 'my-service-address', - * 'scopes' => ['my-service-scope'], + * 'credentialsConfig' => [ + * 'scopes' => ['my-service-scope'], + * ], * ]; * $operationsClient = new OperationsClient($options); * try { @@ -116,19 +116,20 @@ class OperationsGapicClient */ const CODEGEN_NAME = 'gapic'; - /** - * The code generator version, to be included in the agent header. - */ - const CODEGEN_VERSION = '0.0.5'; - private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'port' => self::DEFAULT_SERVICE_PORT, - 'clientConfigPath' => __DIR__.'/../resources/operations_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/operations_rest_client_config.php', + 'clientConfig' => __DIR__.'/../resources/operations_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/operations_descriptor_config.php', + 'credentialsConfig' => [ + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/operations_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -139,58 +140,56 @@ private static function getClientDefaults() * Required. Options for configuring the service API wrapper. Those options * that must be provided are marked as Required. * - * @type string $serviceAddress Required. The domain name of the API remote host. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes Required. A string array of scopes to use when acquiring credentials. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * Required. The address of the API remote host. May optionally include the port, + * formatted as ":". + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } * - * @throws ValidationException Throws a ValidationException if required arguments are missing - * from the $options array. + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** @@ -202,7 +201,9 @@ public function __construct($options = []) * ``` * $options = [ * 'serviceAddress' => 'my-service-address', - * 'scopes' => ['my-service-scope'], + * 'credentialsConfig' => [ + * 'scopes' => ['my-service-scope'], + * ], * ]; * $operationsClient = new OperationsClient($options); * try { @@ -255,7 +256,9 @@ public function getOperation($name, $optionalArgs = []) * ``` * $options = [ * 'serviceAddress' => 'my-service-address', - * 'scopes' => ['my-service-scope'], + * 'credentialsConfig' => [ + * 'scopes' => ['my-service-scope'], + * ], * ]; * $operationsClient = new OperationsClient($options); * try { @@ -343,7 +346,9 @@ public function listOperations($name, $filter, $optionalArgs = []) * ``` * $options = [ * 'serviceAddress' => 'my-service-address', - * 'scopes' => ['my-service-scope'], + * 'credentialsConfig' => [ + * 'scopes' => ['my-service-scope'], + * ], * ]; * $operationsClient = new OperationsClient($options); * try { @@ -393,7 +398,9 @@ public function cancelOperation($name, $optionalArgs = []) * ``` * $options = [ * 'serviceAddress' => 'my-service-address', - * 'scopes' => ['my-service-scope'], + * 'credentialsConfig' => [ + * 'scopes' => ['my-service-scope'], + * ], * ]; * $operationsClient = new OperationsClient($options); * try { diff --git a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/OperationsClient.php b/generated/php/google-cloud-longrunning-v1/src/OperationsClient.php similarity index 97% rename from generated/php/google-longrunning-v1/src/ApiCore/LongRunning/OperationsClient.php rename to generated/php/google-cloud-longrunning-v1/src/OperationsClient.php index 4478ad056..118a47ffa 100644 --- a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/OperationsClient.php +++ b/generated/php/google-cloud-longrunning-v1/src/OperationsClient.php @@ -52,5 +52,5 @@ class OperationsClient extends OperationsGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see OperationsClientImpl} class. + // additions to the generated {@see OperationsGapicClient} class. } diff --git a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_client_config.json b/generated/php/google-cloud-longrunning-v1/src/resources/operations_client_config.json similarity index 100% rename from generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_client_config.json rename to generated/php/google-cloud-longrunning-v1/src/resources/operations_client_config.json diff --git a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_descriptor_config.php b/generated/php/google-cloud-longrunning-v1/src/resources/operations_descriptor_config.php similarity index 100% rename from generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_descriptor_config.php rename to generated/php/google-cloud-longrunning-v1/src/resources/operations_descriptor_config.php diff --git a/generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_rest_client_config.php b/generated/php/google-cloud-longrunning-v1/src/resources/operations_rest_client_config.php similarity index 100% rename from generated/php/google-longrunning-v1/src/ApiCore/LongRunning/resources/operations_rest_client_config.php rename to generated/php/google-cloud-longrunning-v1/src/resources/operations_rest_client_config.php diff --git a/generated/php/google-longrunning-v1/tests/unit/ApiCore/LongRunning/OperationsClientTest.php b/generated/php/google-cloud-longrunning-v1/tests/Unit/OperationsClientTest.php similarity index 94% rename from generated/php/google-longrunning-v1/tests/unit/ApiCore/LongRunning/OperationsClientTest.php rename to generated/php/google-cloud-longrunning-v1/tests/Unit/OperationsClientTest.php index ad53f59ae..abaf60c01 100644 --- a/generated/php/google-longrunning-v1/tests/unit/ApiCore/LongRunning/OperationsClientTest.php +++ b/generated/php/google-cloud-longrunning-v1/tests/Unit/OperationsClientTest.php @@ -34,9 +34,10 @@ * This file was automatically generated - do not edit! */ -namespace Google\Tests\Unit\ApiCore\LongRunning; +namespace Google\ApiCore\LongRunning\Tests\Unit; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -44,11 +45,11 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group long_running + * @group longrunning * @group grpc */ class OperationsClientTest extends GeneratedTest @@ -66,6 +67,16 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + 'serviceAddress' => '', + 'credentialsConfig' => [ + 'scopes' => [], + ], + ]; + return new OperationsClient($options); } @@ -116,12 +127,12 @@ public function getOperationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -199,12 +210,12 @@ public function listOperationsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -270,12 +281,12 @@ public function cancelOperationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -340,12 +351,12 @@ public function deleteOperationExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-monitoring-v3/composer.json b/generated/php/google-cloud-monitoring-v3/composer.json index c05031e9c..97534b792 100644 --- a/generated/php/google-cloud-monitoring-v3/composer.json +++ b/generated/php/google-cloud-monitoring-v3/composer.json @@ -1,30 +1,21 @@ { - "name": "monitoring/monitoring", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-monitoring", "description": "Stackdriver Monitoring API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Monitoring\\": "src", + "Google\\Cloud\\Monitoring\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/AlertPolicyServiceClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/AlertPolicyServiceClient.php similarity index 94% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/AlertPolicyServiceClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/AlertPolicyServiceClient.php index 04ca2719d..423f0dc45 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/AlertPolicyServiceClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/AlertPolicyServiceClient.php @@ -38,5 +38,5 @@ class AlertPolicyServiceClient extends AlertPolicyServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see AlertPolicyServiceClientImpl} class. + // additions to the generated {@see AlertPolicyServiceGapicClient} class. } diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/AlertPolicyServiceGapicClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php similarity index 83% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/AlertPolicyServiceGapicClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php index dd4168f90..41519b291 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/AlertPolicyServiceGapicClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Monitoring\V3\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Monitoring\V3\AlertPolicy; use Google\Cloud\Monitoring\V3\CreateAlertPolicyRequest; use Google\Cloud\Monitoring\V3\DeleteAlertPolicyRequest; @@ -47,8 +47,6 @@ use Google\Cloud\Monitoring\V3\UpdateAlertPolicyRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The AlertPolicyService API is used to manage (list, create, delete, @@ -122,10 +120,14 @@ class AlertPolicyServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; private static $projectNameTemplate; private static $alertPolicyNameTemplate; private static $alertPolicyConditionNameTemplate; @@ -135,18 +137,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/alert_policy_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/alert_policy_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/alert_policy_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/alert_policy_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/alert_policy_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -293,57 +295,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'monitoring.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Monitoring API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/GroupServiceGapicClient.php similarity index 84% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/Gapic/GroupServiceGapicClient.php index 31a76c808..4d5ea2f3a 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/GroupServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Monitoring\V3\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Monitoring\V3\CreateGroupRequest; use Google\Cloud\Monitoring\V3\DeleteGroupRequest; use Google\Cloud\Monitoring\V3\GetGroupRequest; @@ -49,8 +49,6 @@ use Google\Cloud\Monitoring\V3\TimeInterval; use Google\Cloud\Monitoring\V3\UpdateGroupRequest; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Group API lets you inspect and manage your @@ -127,10 +125,14 @@ class GroupServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; private static $projectNameTemplate; private static $groupNameTemplate; private static $pathTemplateMap; @@ -139,18 +141,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/group_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/group_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/group_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/group_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/group_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -266,57 +268,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'monitoring.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Monitoring API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/MetricServiceGapicClient.php similarity index 87% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/Gapic/MetricServiceGapicClient.php index 1f7e7bab3..c3b7163fe 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/MetricServiceGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Monitoring\V3\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; @@ -39,7 +40,6 @@ use Google\ApiCore\ValidationException; use Google\Api\MetricDescriptor; use Google\Api\MonitoredResourceDescriptor; -use Google\Auth\CredentialsLoader; use Google\Cloud\Monitoring\V3\Aggregation; use Google\Cloud\Monitoring\V3\CreateMetricDescriptorRequest; use Google\Cloud\Monitoring\V3\CreateTimeSeriesRequest; @@ -56,8 +56,6 @@ use Google\Cloud\Monitoring\V3\TimeInterval; use Google\Cloud\Monitoring\V3\TimeSeries; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Manages metric descriptors, monitored resource descriptors, and @@ -124,10 +122,14 @@ class MetricServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; private static $projectNameTemplate; private static $metricDescriptorNameTemplate; private static $monitoredResourceDescriptorNameTemplate; @@ -137,18 +139,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/metric_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/metric_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/metric_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/metric_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/metric_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -293,57 +295,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'monitoring.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Monitoring API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/NotificationChannelServiceGapicClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php similarity index 86% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/NotificationChannelServiceGapicClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php index f1849a1eb..a81363a70 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/NotificationChannelServiceGapicClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Monitoring\V3\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Monitoring\V3\CreateNotificationChannelRequest; use Google\Cloud\Monitoring\V3\DeleteNotificationChannelRequest; use Google\Cloud\Monitoring\V3\GetNotificationChannelDescriptorRequest; @@ -51,8 +51,6 @@ use Google\Cloud\Monitoring\V3\UpdateNotificationChannelRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The Notification Channel API provides access to configuration that @@ -119,10 +117,14 @@ class NotificationChannelServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; private static $projectNameTemplate; private static $notificationChannelNameTemplate; private static $notificationChannelDescriptorNameTemplate; @@ -132,18 +134,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/notification_channel_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/notification_channel_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/notification_channel_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/notification_channel_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/notification_channel_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -288,57 +290,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'monitoring.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Monitoring API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/UptimeCheckServiceGapicClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php similarity index 83% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/UptimeCheckServiceGapicClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php index 60f741777..aca084606 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/Gapic/UptimeCheckServiceGapicClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Monitoring\V3\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Monitoring\V3\CreateUptimeCheckConfigRequest; use Google\Cloud\Monitoring\V3\DeleteUptimeCheckConfigRequest; use Google\Cloud\Monitoring\V3\GetUptimeCheckConfigRequest; @@ -49,8 +49,6 @@ use Google\Cloud\Monitoring\V3\UptimeCheckConfig; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit) @@ -123,10 +121,14 @@ class UptimeCheckServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; private static $projectNameTemplate; private static $uptimeCheckConfigNameTemplate; private static $pathTemplateMap; @@ -135,18 +137,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ], - 'clientConfigPath' => __DIR__.'/../resources/uptime_check_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/uptime_check_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/uptime_check_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/uptime_check_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/uptime_check_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -262,57 +264,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'monitoring.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Monitoring API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/GroupServiceClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/GroupServiceClient.php similarity index 94% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/GroupServiceClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/GroupServiceClient.php index ca821aa1a..3b15c5e22 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/GroupServiceClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/GroupServiceClient.php @@ -38,5 +38,5 @@ class GroupServiceClient extends GroupServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see GroupServiceClientImpl} class. + // additions to the generated {@see GroupServiceGapicClient} class. } diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/MetricServiceClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/MetricServiceClient.php similarity index 94% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/MetricServiceClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/MetricServiceClient.php index 5e86f0e07..339f3badc 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/MetricServiceClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/MetricServiceClient.php @@ -38,5 +38,5 @@ class MetricServiceClient extends MetricServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see MetricServiceClientImpl} class. + // additions to the generated {@see MetricServiceGapicClient} class. } diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/NotificationChannelServiceClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/NotificationChannelServiceClient.php similarity index 98% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/NotificationChannelServiceClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/NotificationChannelServiceClient.php index 45334c487..fdee50031 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/NotificationChannelServiceClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/NotificationChannelServiceClient.php @@ -38,5 +38,5 @@ class NotificationChannelServiceClient extends NotificationChannelServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see NotificationChannelServiceClientImpl} class. + // additions to the generated {@see NotificationChannelServiceGapicClient} class. } diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/UptimeCheckServiceClient.php b/generated/php/google-cloud-monitoring-v3/src/V3/UptimeCheckServiceClient.php similarity index 94% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/UptimeCheckServiceClient.php rename to generated/php/google-cloud-monitoring-v3/src/V3/UptimeCheckServiceClient.php index 950464376..13593ce28 100644 --- a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/UptimeCheckServiceClient.php +++ b/generated/php/google-cloud-monitoring-v3/src/V3/UptimeCheckServiceClient.php @@ -38,5 +38,5 @@ class UptimeCheckServiceClient extends UptimeCheckServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see UptimeCheckServiceClientImpl} class. + // additions to the generated {@see UptimeCheckServiceGapicClient} class. } diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_client_config.json b/generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_client_config.json similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_client_config.json rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_client_config.json diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_descriptor_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_descriptor_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_descriptor_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_rest_client_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/alert_policy_service_rest_client_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/alert_policy_service_rest_client_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_client_config.json b/generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_client_config.json similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_client_config.json rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_client_config.json diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_descriptor_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_descriptor_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_descriptor_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_rest_client_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/group_service_rest_client_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/group_service_rest_client_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_client_config.json b/generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_client_config.json similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_client_config.json rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_client_config.json diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_descriptor_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_descriptor_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_descriptor_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_rest_client_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/metric_service_rest_client_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/metric_service_rest_client_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_client_config.json b/generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_client_config.json similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_client_config.json rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_client_config.json diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_descriptor_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_descriptor_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_descriptor_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_rest_client_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/notification_channel_service_rest_client_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/notification_channel_service_rest_client_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_client_config.json b/generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_client_config.json similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_client_config.json rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_client_config.json diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_descriptor_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_descriptor_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_descriptor_config.php diff --git a/generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_rest_client_config.php b/generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-monitoring-v3/src/Monitoring/V3/resources/uptime_check_service_rest_client_config.php rename to generated/php/google-cloud-monitoring-v3/src/V3/resources/uptime_check_service_rest_client_config.php diff --git a/generated/php/google-cloud-monitoring-v3/tests/system/Monitoring/V3/MetricServiceSmokeTest.php b/generated/php/google-cloud-monitoring-v3/tests/System/V3/MetricServiceSmokeTest.php similarity index 96% rename from generated/php/google-cloud-monitoring-v3/tests/system/Monitoring/V3/MetricServiceSmokeTest.php rename to generated/php/google-cloud-monitoring-v3/tests/System/V3/MetricServiceSmokeTest.php index 15c98b8c7..425caa91a 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/system/Monitoring/V3/MetricServiceSmokeTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/System/V3/MetricServiceSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\System\V3; use Google\Cloud\Monitoring\V3\MetricServiceClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/AlertPolicyServiceClientTest.php b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/AlertPolicyServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/AlertPolicyServiceClientTest.php rename to generated/php/google-cloud-monitoring-v3/tests/Unit/V3/AlertPolicyServiceClientTest.php index 3c9968b7f..3fb46c49b 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/AlertPolicyServiceClientTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/AlertPolicyServiceClientTest.php @@ -20,17 +20,18 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\Unit\V3; use Google\Cloud\Monitoring\V3\AlertPolicyServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Monitoring\V3\AlertPolicy; use Google\Cloud\Monitoring\V3\ListAlertPoliciesResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -52,6 +53,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new AlertPolicyServiceClient($options); } @@ -106,12 +113,12 @@ public function listAlertPoliciesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -181,12 +188,12 @@ public function getAlertPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -260,12 +267,12 @@ public function createAlertPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -331,12 +338,12 @@ public function deleteAlertPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -406,12 +413,12 @@ public function updateAlertPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/GroupServiceClientTest.php b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/GroupServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/GroupServiceClientTest.php rename to generated/php/google-cloud-monitoring-v3/tests/Unit/V3/GroupServiceClientTest.php index 3bbdcf5ed..44d17cdc9 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/GroupServiceClientTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/GroupServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\Unit\V3; use Google\Cloud\Monitoring\V3\GroupServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Api\MonitoredResource; @@ -32,7 +33,7 @@ use Google\Cloud\Monitoring\V3\ListGroupsResponse; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new GroupServiceClient($options); } @@ -108,12 +115,12 @@ public function listGroupsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -189,12 +196,12 @@ public function getGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -274,12 +281,12 @@ public function createGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -356,12 +363,12 @@ public function updateGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -426,12 +433,12 @@ public function deleteGroupExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -507,12 +514,12 @@ public function listGroupMembersExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/MetricServiceClientTest.php b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/MetricServiceClientTest.php similarity index 96% rename from generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/MetricServiceClientTest.php rename to generated/php/google-cloud-monitoring-v3/tests/Unit/V3/MetricServiceClientTest.php index 3b53a6f68..68fd8d1e3 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/MetricServiceClientTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/MetricServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\Unit\V3; use Google\Cloud\Monitoring\V3\MetricServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Api\MetricDescriptor; @@ -36,7 +37,7 @@ use Google\Cloud\Monitoring\V3\TimeSeries; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -58,6 +59,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new MetricServiceClient($options); } @@ -112,12 +119,12 @@ public function listMonitoredResourceDescriptorsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -191,12 +198,12 @@ public function getMonitoredResourceDescriptorExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -270,12 +277,12 @@ public function listMetricDescriptorsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -351,12 +358,12 @@ public function getMetricDescriptorExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -436,12 +443,12 @@ public function createMetricDescriptorExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -507,12 +514,12 @@ public function deleteMetricDescriptorExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -598,12 +605,12 @@ public function listTimeSeriesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -675,12 +682,12 @@ public function createTimeSeriesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/NotificationChannelServiceClientTest.php b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/NotificationChannelServiceClientTest.php similarity index 96% rename from generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/NotificationChannelServiceClientTest.php rename to generated/php/google-cloud-monitoring-v3/tests/Unit/V3/NotificationChannelServiceClientTest.php index 268db4670..4a7ffc01e 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/NotificationChannelServiceClientTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/NotificationChannelServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\Unit\V3; use Google\Cloud\Monitoring\V3\NotificationChannelServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Monitoring\V3\ListNotificationChannelDescriptorsResponse; @@ -32,7 +33,7 @@ use Google\Cloud\Monitoring\V3\NotificationChannelDescriptor; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new NotificationChannelServiceClient($options); } @@ -108,12 +115,12 @@ public function listNotificationChannelDescriptorsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -187,12 +194,12 @@ public function getNotificationChannelDescriptorExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -266,12 +273,12 @@ public function listNotificationChannelsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -345,12 +352,12 @@ public function getNotificationChannelExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -428,12 +435,12 @@ public function createNotificationChannelExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -508,12 +515,12 @@ public function updateNotificationChannelExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -578,12 +585,12 @@ public function deleteNotificationChannelExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/UptimeCheckServiceClientTest.php b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/UptimeCheckServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/UptimeCheckServiceClientTest.php rename to generated/php/google-cloud-monitoring-v3/tests/Unit/V3/UptimeCheckServiceClientTest.php index 0b39f3438..f27866e86 100644 --- a/generated/php/google-cloud-monitoring-v3/tests/unit/Monitoring/V3/UptimeCheckServiceClientTest.php +++ b/generated/php/google-cloud-monitoring-v3/tests/Unit/V3/UptimeCheckServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Monitoring\V3; +namespace Google\Cloud\Monitoring\Tests\Unit\V3; use Google\Cloud\Monitoring\V3\UptimeCheckServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Monitoring\V3\ListUptimeCheckConfigsResponse; @@ -32,7 +33,7 @@ use Google\Cloud\Monitoring\V3\UptimeCheckIp; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new UptimeCheckServiceClient($options); } @@ -108,12 +115,12 @@ public function listUptimeCheckConfigsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -183,12 +190,12 @@ public function getUptimeCheckConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -262,12 +269,12 @@ public function createUptimeCheckConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -338,12 +345,12 @@ public function updateUptimeCheckConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -408,12 +415,12 @@ public function deleteUptimeCheckConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -481,12 +488,12 @@ public function listUptimeCheckIpsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-os-login-v1beta/composer.json b/generated/php/google-cloud-os-login-v1beta/composer.json new file mode 100644 index 000000000..854350b78 --- /dev/null +++ b/generated/php/google-cloud-os-login-v1beta/composer.json @@ -0,0 +1,21 @@ +{ + "name": "google/cloud-oslogin", + "description": "Google Cloud OS Login API client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\OsLogin\\": "src", + "Google\\Cloud\\OsLogin\\Tests\\": "tests", + "": "proto/src" + } + }, + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + } +} \ No newline at end of file diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php b/generated/php/google-cloud-os-login-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1Beta/Oslogin.php b/generated/php/google-cloud-os-login-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1Beta/Oslogin.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1Beta/Oslogin.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1Beta/Oslogin.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeletePosixAccountRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeletePosixAccountRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeletePosixAccountRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeletePosixAccountRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeleteSshPublicKeyRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeleteSshPublicKeyRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeleteSshPublicKeyRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/DeleteSshPublicKeyRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetLoginProfileRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetLoginProfileRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetLoginProfileRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetLoginProfileRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetSshPublicKeyRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetSshPublicKeyRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetSshPublicKeyRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/GetSshPublicKeyRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyResponse.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyResponse.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyResponse.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/ImportSshPublicKeyResponse.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/LoginProfile.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/LoginProfile.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/LoginProfile.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/LoginProfile.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/OsLoginServiceGrpcClient.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/OsLoginServiceGrpcClient.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/OsLoginServiceGrpcClient.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/OsLoginServiceGrpcClient.php diff --git a/generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/UpdateSshPublicKeyRequest.php b/generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/UpdateSshPublicKeyRequest.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/UpdateSshPublicKeyRequest.php rename to generated/php/google-cloud-os-login-v1beta/proto/src/Google/Cloud/OsLogin/V1beta/UpdateSshPublicKeyRequest.php diff --git a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/Gapic/OsLoginServiceGapicClient.php b/generated/php/google-cloud-os-login-v1beta/src/V1beta/Gapic/OsLoginServiceGapicClient.php similarity index 81% rename from generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/Gapic/OsLoginServiceGapicClient.php rename to generated/php/google-cloud-os-login-v1beta/src/V1beta/Gapic/OsLoginServiceGapicClient.php index 8bb1e0347..fb2a1e632 100644 --- a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/Gapic/OsLoginServiceGapicClient.php +++ b/generated/php/google-cloud-os-login-v1beta/src/V1beta/Gapic/OsLoginServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\OsLogin\V1beta\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\OsLogin\Common\SshPublicKey; use Google\Cloud\OsLogin\V1beta\DeletePosixAccountRequest; use Google\Cloud\OsLogin\V1beta\DeleteSshPublicKeyRequest; @@ -49,8 +49,6 @@ use Google\Cloud\OsLogin\V1beta\UpdateSshPublicKeyRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Cloud OS Login API. @@ -107,10 +105,14 @@ class OsLoginServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/compute.readonly', + ]; private static $userNameTemplate; private static $projectNameTemplate; private static $fingerprintNameTemplate; @@ -120,18 +122,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/compute', - 'https://www.googleapis.com/auth/compute.readonly', - ], - 'clientConfigPath' => __DIR__.'/../resources/os_login_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/os_login_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/os_login_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/os_login_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/os_login_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -276,57 +278,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'oslogin.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud OS Login API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'oslogin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/OsLoginServiceClient.php b/generated/php/google-cloud-os-login-v1beta/src/V1beta/OsLoginServiceClient.php similarity index 94% rename from generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/OsLoginServiceClient.php rename to generated/php/google-cloud-os-login-v1beta/src/V1beta/OsLoginServiceClient.php index 372008208..46e6b99b8 100644 --- a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/OsLoginServiceClient.php +++ b/generated/php/google-cloud-os-login-v1beta/src/V1beta/OsLoginServiceClient.php @@ -38,5 +38,5 @@ class OsLoginServiceClient extends OsLoginServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see OsLoginServiceClientImpl} class. + // additions to the generated {@see OsLoginServiceGapicClient} class. } diff --git a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_client_config.json b/generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_client_config.json similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_client_config.json rename to generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_client_config.json diff --git a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_descriptor_config.php b/generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_descriptor_config.php rename to generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_descriptor_config.php diff --git a/generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_rest_client_config.php b/generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-oslogin-v1beta/src/OsLogin/V1beta/resources/os_login_service_rest_client_config.php rename to generated/php/google-cloud-os-login-v1beta/src/V1beta/resources/os_login_service_rest_client_config.php diff --git a/generated/php/google-cloud-oslogin-v1beta/tests/unit/OsLogin/V1beta/OsLoginServiceClientTest.php b/generated/php/google-cloud-os-login-v1beta/tests/Unit/V1beta/OsLoginServiceClientTest.php similarity index 95% rename from generated/php/google-cloud-oslogin-v1beta/tests/unit/OsLogin/V1beta/OsLoginServiceClientTest.php rename to generated/php/google-cloud-os-login-v1beta/tests/Unit/V1beta/OsLoginServiceClientTest.php index 7f1d7c7b4..f966f0d67 100644 --- a/generated/php/google-cloud-oslogin-v1beta/tests/unit/OsLogin/V1beta/OsLoginServiceClientTest.php +++ b/generated/php/google-cloud-os-login-v1beta/tests/Unit/V1beta/OsLoginServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\OsLogin\V1beta; +namespace Google\Cloud\OsLogin\Tests\Unit\V1beta; use Google\Cloud\OsLogin\V1beta\OsLoginServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\OsLogin\Common\SshPublicKey; @@ -31,11 +32,11 @@ use Google\Cloud\OsLogin\V1beta\LoginProfile; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group os_login + * @group os-login * @group grpc */ class OsLoginServiceClientTest extends GeneratedTest @@ -53,6 +54,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new OsLoginServiceClient($options); } @@ -98,12 +105,12 @@ public function deletePosixAccountExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -168,12 +175,12 @@ public function deleteSshPublicKeyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -243,12 +250,12 @@ public function getLoginProfileExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -320,12 +327,12 @@ public function getSshPublicKeyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -395,12 +402,12 @@ public function importSshPublicKeyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -477,12 +484,12 @@ public function updateSshPublicKeyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-oslogin-v1beta/composer.json b/generated/php/google-cloud-oslogin-v1beta/composer.json deleted file mode 100644 index 214866199..000000000 --- a/generated/php/google-cloud-oslogin-v1beta/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "oslogin/oslogin", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "Google Cloud OS Login API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/generated/php/google-cloud-pubsub-v1/composer.json b/generated/php/google-cloud-pubsub-v1/composer.json index 6f1e9014d..86ea386f6 100644 --- a/generated/php/google-cloud-pubsub-v1/composer.json +++ b/generated/php/google-cloud-pubsub-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "pubsub/pubsub", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-pubsub", "description": "Google Cloud Pub/Sub API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\PubSub\\": "src", + "Google\\Cloud\\PubSub\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/PublisherGapicClient.php b/generated/php/google-cloud-pubsub-v1/src/V1/Gapic/PublisherGapicClient.php similarity index 86% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/PublisherGapicClient.php rename to generated/php/google-cloud-pubsub-v1/src/V1/Gapic/PublisherGapicClient.php index 56c173d41..1a678a45d 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/PublisherGapicClient.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/Gapic/PublisherGapicClient.php @@ -32,12 +32,13 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\SetIamPolicyRequest; @@ -56,8 +57,6 @@ use Google\Cloud\PubSub\V1\UpdateTopicRequest; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The service that an application uses to manipulate topics, and to send @@ -112,55 +111,59 @@ class PublisherGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - - private static $projectNameTemplate; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/pubsub', + ]; private static $topicNameTemplate; + private static $projectNameTemplate; private static $pathTemplateMap; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/pubsub', - ], - 'clientConfigPath' => __DIR__.'/../resources/publisher_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/publisher_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/publisher_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/publisher_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/publisher_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } - private static function getProjectNameTemplate() + private static function getTopicNameTemplate() { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); + if (self::$topicNameTemplate == null) { + self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); } - return self::$projectNameTemplate; + return self::$topicNameTemplate; } - private static function getTopicNameTemplate() + private static function getProjectNameTemplate() { - if (self::$topicNameTemplate == null) { - self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); } - return self::$topicNameTemplate; + return self::$projectNameTemplate; } private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), 'topic' => self::getTopicNameTemplate(), + 'project' => self::getProjectNameTemplate(), ]; } @@ -169,35 +172,35 @@ private static function getPathTemplateMap() /** * Formats a string containing the fully-qualified path to represent - * a project resource. + * a topic resource. * * @param string $project + * @param string $topic * - * @return string The formatted project resource. + * @return string The formatted topic resource. * @experimental */ - public static function projectName($project) + public static function topicName($project, $topic) { - return self::getProjectNameTemplate()->render([ + return self::getTopicNameTemplate()->render([ 'project' => $project, + 'topic' => $topic, ]); } /** * Formats a string containing the fully-qualified path to represent - * a topic resource. + * a project resource. * * @param string $project - * @param string $topic * - * @return string The formatted topic resource. + * @return string The formatted project resource. * @experimental */ - public static function topicName($project, $topic) + public static function projectName($project) { - return self::getTopicNameTemplate()->render([ + return self::getProjectNameTemplate()->render([ 'project' => $project, - 'topic' => $topic, ]); } @@ -205,8 +208,8 @@ public static function topicName($project, $topic) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern - * - project: projects/{project} - * - topic: projects/{project}/topics/{topic}. + * - topic: projects/{project}/topics/{topic} + * - project: projects/{project}. * * The optional $template argument can be supplied to specify a particular pattern, and must * match one of the templates listed above. If no $template argument is provided, or if the @@ -249,57 +252,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'pubsub.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Pub/Sub API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'pubsub.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/SubscriberGapicClient.php b/generated/php/google-cloud-pubsub-v1/src/V1/Gapic/SubscriberGapicClient.php similarity index 92% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/SubscriberGapicClient.php rename to generated/php/google-cloud-pubsub-v1/src/V1/Gapic/SubscriberGapicClient.php index 86d48699c..18d482574 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/Gapic/SubscriberGapicClient.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/Gapic/SubscriberGapicClient.php @@ -32,12 +32,13 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\SetIamPolicyRequest; @@ -69,8 +70,6 @@ use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: The service that an application uses to manipulate subscriptions and to @@ -126,77 +125,81 @@ class SubscriberGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - - private static $projectNameTemplate; - private static $snapshotNameTemplate; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/pubsub', + ]; private static $subscriptionNameTemplate; private static $topicNameTemplate; + private static $projectNameTemplate; + private static $snapshotNameTemplate; private static $pathTemplateMap; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/pubsub', - ], - 'clientConfigPath' => __DIR__.'/../resources/subscriber_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/subscriber_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/subscriber_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/subscriber_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/subscriber_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } - private static function getProjectNameTemplate() + private static function getSubscriptionNameTemplate() { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); + if (self::$subscriptionNameTemplate == null) { + self::$subscriptionNameTemplate = new PathTemplate('projects/{project}/subscriptions/{subscription}'); } - return self::$projectNameTemplate; + return self::$subscriptionNameTemplate; } - private static function getSnapshotNameTemplate() + private static function getTopicNameTemplate() { - if (self::$snapshotNameTemplate == null) { - self::$snapshotNameTemplate = new PathTemplate('projects/{project}/snapshots/{snapshot}'); + if (self::$topicNameTemplate == null) { + self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); } - return self::$snapshotNameTemplate; + return self::$topicNameTemplate; } - private static function getSubscriptionNameTemplate() + private static function getProjectNameTemplate() { - if (self::$subscriptionNameTemplate == null) { - self::$subscriptionNameTemplate = new PathTemplate('projects/{project}/subscriptions/{subscription}'); + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); } - return self::$subscriptionNameTemplate; + return self::$projectNameTemplate; } - private static function getTopicNameTemplate() + private static function getSnapshotNameTemplate() { - if (self::$topicNameTemplate == null) { - self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); + if (self::$snapshotNameTemplate == null) { + self::$snapshotNameTemplate = new PathTemplate('projects/{project}/snapshots/{snapshot}'); } - return self::$topicNameTemplate; + return self::$snapshotNameTemplate; } private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - 'snapshot' => self::getSnapshotNameTemplate(), 'subscription' => self::getSubscriptionNameTemplate(), 'topic' => self::getTopicNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'snapshot' => self::getSnapshotNameTemplate(), ]; } @@ -205,71 +208,71 @@ private static function getPathTemplateMap() /** * Formats a string containing the fully-qualified path to represent - * a project resource. + * a subscription resource. * * @param string $project + * @param string $subscription * - * @return string The formatted project resource. + * @return string The formatted subscription resource. * @experimental */ - public static function projectName($project) + public static function subscriptionName($project, $subscription) { - return self::getProjectNameTemplate()->render([ + return self::getSubscriptionNameTemplate()->render([ 'project' => $project, + 'subscription' => $subscription, ]); } /** * Formats a string containing the fully-qualified path to represent - * a snapshot resource. + * a topic resource. * * @param string $project - * @param string $snapshot + * @param string $topic * - * @return string The formatted snapshot resource. + * @return string The formatted topic resource. * @experimental */ - public static function snapshotName($project, $snapshot) + public static function topicName($project, $topic) { - return self::getSnapshotNameTemplate()->render([ + return self::getTopicNameTemplate()->render([ 'project' => $project, - 'snapshot' => $snapshot, + 'topic' => $topic, ]); } /** * Formats a string containing the fully-qualified path to represent - * a subscription resource. + * a project resource. * * @param string $project - * @param string $subscription * - * @return string The formatted subscription resource. + * @return string The formatted project resource. * @experimental */ - public static function subscriptionName($project, $subscription) + public static function projectName($project) { - return self::getSubscriptionNameTemplate()->render([ + return self::getProjectNameTemplate()->render([ 'project' => $project, - 'subscription' => $subscription, ]); } /** * Formats a string containing the fully-qualified path to represent - * a topic resource. + * a snapshot resource. * * @param string $project - * @param string $topic + * @param string $snapshot * - * @return string The formatted topic resource. + * @return string The formatted snapshot resource. * @experimental */ - public static function topicName($project, $topic) + public static function snapshotName($project, $snapshot) { - return self::getTopicNameTemplate()->render([ + return self::getSnapshotNameTemplate()->render([ 'project' => $project, - 'topic' => $topic, + 'snapshot' => $snapshot, ]); } @@ -277,10 +280,10 @@ public static function topicName($project, $topic) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern - * - project: projects/{project} - * - snapshot: projects/{project}/snapshots/{snapshot} * - subscription: projects/{project}/subscriptions/{subscription} - * - topic: projects/{project}/topics/{topic}. + * - topic: projects/{project}/topics/{topic} + * - project: projects/{project} + * - snapshot: projects/{project}/snapshots/{snapshot}. * * The optional $template argument can be supplied to specify a particular pattern, and must * match one of the templates listed above. If no $template argument is provided, or if the @@ -323,57 +326,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'pubsub.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Pub/Sub API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'pubsub.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/PublisherClient.php b/generated/php/google-cloud-pubsub-v1/src/V1/PublisherClient.php similarity index 94% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/PublisherClient.php rename to generated/php/google-cloud-pubsub-v1/src/V1/PublisherClient.php index 49d9f9733..c84e98a63 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/PublisherClient.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/PublisherClient.php @@ -38,5 +38,5 @@ class PublisherClient extends PublisherGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see PublisherClientImpl} class. + // additions to the generated {@see PublisherGapicClient} class. } diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/SubscriberClient.php b/generated/php/google-cloud-pubsub-v1/src/V1/SubscriberClient.php similarity index 94% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/SubscriberClient.php rename to generated/php/google-cloud-pubsub-v1/src/V1/SubscriberClient.php index 5179b177b..d0578a488 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/SubscriberClient.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/SubscriberClient.php @@ -38,5 +38,5 @@ class SubscriberClient extends SubscriberGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SubscriberClientImpl} class. + // additions to the generated {@see SubscriberGapicClient} class. } diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_client_config.json b/generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_client_config.json similarity index 100% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_client_config.json rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_client_config.json diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_descriptor_config.php b/generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_descriptor_config.php rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_descriptor_config.php diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_rest_client_config.php b/generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_rest_client_config.php similarity index 95% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_rest_client_config.php rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_rest_client_config.php index 08d44c352..96cece9ad 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/publisher_rest_client_config.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/resources/publisher_rest_client_config.php @@ -18,14 +18,14 @@ 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:setIamPolicy', 'body' => '*', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], 'GetIamPolicy' => [ 'method' => 'get', @@ -39,14 +39,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:getIamPolicy', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], 'TestIamPermissions' => [ 'method' => 'post', @@ -63,14 +63,14 @@ 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:testIamPermissions', 'body' => '*', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], ], 'google.pubsub.v1.Publisher' => [ @@ -84,7 +84,7 @@ 'getName', ], ], - ] + ], ], 'UpdateTopic' => [ 'method' => 'patch', @@ -97,7 +97,7 @@ 'getName', ], ], - ] + ], ], 'Publish' => [ 'method' => 'post', @@ -109,7 +109,7 @@ 'getTopic', ], ], - ] + ], ], 'GetTopic' => [ 'method' => 'get', @@ -120,7 +120,7 @@ 'getTopic', ], ], - ] + ], ], 'ListTopics' => [ 'method' => 'get', @@ -131,7 +131,7 @@ 'getProject', ], ], - ] + ], ], 'ListTopicSubscriptions' => [ 'method' => 'get', @@ -142,7 +142,7 @@ 'getTopic', ], ], - ] + ], ], 'DeleteTopic' => [ 'method' => 'delete', @@ -153,8 +153,8 @@ 'getTopic', ], ], - ] + ], ], ], - ] + ], ]; diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_client_config.json b/generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_client_config.json similarity index 99% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_client_config.json rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_client_config.json index 764e831a9..758b3fb58 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_client_config.json +++ b/generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_client_config.json @@ -86,7 +86,7 @@ "retry_params_name": "messaging" }, "StreamingPull": { - "timeout_millis": 60000 + "timeout_millis": 900000 }, "ModifyPushConfig": { "timeout_millis": 60000, diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_descriptor_config.php b/generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_descriptor_config.php rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_descriptor_config.php diff --git a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_rest_client_config.php b/generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_rest_client_config.php similarity index 95% rename from generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_rest_client_config.php rename to generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_rest_client_config.php index 73e563ebd..2b2f26ddb 100644 --- a/generated/php/google-cloud-pubsub-v1/src/PubSub/V1/resources/subscriber_rest_client_config.php +++ b/generated/php/google-cloud-pubsub-v1/src/V1/resources/subscriber_rest_client_config.php @@ -18,14 +18,14 @@ 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:setIamPolicy', 'body' => '*', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], 'GetIamPolicy' => [ 'method' => 'get', @@ -39,14 +39,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:getIamPolicy', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], 'TestIamPermissions' => [ 'method' => 'post', @@ -63,14 +63,14 @@ 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:testIamPermissions', 'body' => '*', ], - ] + ], 'placeholders' => [ 'resource' => [ 'getters' => [ 'getResource', ], ], - ] + ], ], ], 'google.pubsub.v1.Subscriber' => [ @@ -84,7 +84,7 @@ 'getName', ], ], - ] + ], ], 'GetSubscription' => [ 'method' => 'get', @@ -95,7 +95,7 @@ 'getSubscription', ], ], - ] + ], ], 'UpdateSubscription' => [ 'method' => 'patch', @@ -108,7 +108,7 @@ 'getName', ], ], - ] + ], ], 'ListSubscriptions' => [ 'method' => 'get', @@ -119,7 +119,7 @@ 'getProject', ], ], - ] + ], ], 'DeleteSubscription' => [ 'method' => 'delete', @@ -130,7 +130,7 @@ 'getSubscription', ], ], - ] + ], ], 'ModifyAckDeadline' => [ 'method' => 'post', @@ -142,7 +142,7 @@ 'getSubscription', ], ], - ] + ], ], 'Acknowledge' => [ 'method' => 'post', @@ -154,7 +154,7 @@ 'getSubscription', ], ], - ] + ], ], 'Pull' => [ 'method' => 'post', @@ -166,7 +166,7 @@ 'getSubscription', ], ], - ] + ], ], 'ModifyPushConfig' => [ 'method' => 'post', @@ -178,7 +178,7 @@ 'getSubscription', ], ], - ] + ], ], 'ListSnapshots' => [ 'method' => 'get', @@ -189,7 +189,7 @@ 'getProject', ], ], - ] + ], ], 'CreateSnapshot' => [ 'method' => 'put', @@ -201,7 +201,7 @@ 'getName', ], ], - ] + ], ], 'UpdateSnapshot' => [ 'method' => 'patch', @@ -214,7 +214,7 @@ 'getName', ], ], - ] + ], ], 'DeleteSnapshot' => [ 'method' => 'delete', @@ -225,7 +225,7 @@ 'getSnapshot', ], ], - ] + ], ], 'Seek' => [ 'method' => 'post', @@ -237,8 +237,8 @@ 'getSubscription', ], ], - ] + ], ], ], - ] + ], ]; diff --git a/generated/php/google-cloud-pubsub-v1/tests/system/PubSub/V1/PublisherSmokeTest.php b/generated/php/google-cloud-pubsub-v1/tests/System/V1/PublisherSmokeTest.php similarity index 95% rename from generated/php/google-cloud-pubsub-v1/tests/system/PubSub/V1/PublisherSmokeTest.php rename to generated/php/google-cloud-pubsub-v1/tests/System/V1/PublisherSmokeTest.php index 3a697fa48..f87b956ee 100644 --- a/generated/php/google-cloud-pubsub-v1/tests/system/PubSub/V1/PublisherSmokeTest.php +++ b/generated/php/google-cloud-pubsub-v1/tests/System/V1/PublisherSmokeTest.php @@ -20,13 +20,13 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\PubSub\V1; +namespace Google\Cloud\PubSub\Tests\System\V1; use Google\Cloud\PubSub\V1\PublisherClient; use Google\ApiCore\Testing\GeneratedTest; /** - * @group pub_sub + * @group pubsub * @group grpc */ class PublisherSmokeTest extends GeneratedTest diff --git a/generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/PublisherClientTest.php b/generated/php/google-cloud-pubsub-v1/tests/Unit/V1/PublisherClientTest.php similarity index 96% rename from generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/PublisherClientTest.php rename to generated/php/google-cloud-pubsub-v1/tests/Unit/V1/PublisherClientTest.php index 7eff9403b..565856cbd 100644 --- a/generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/PublisherClientTest.php +++ b/generated/php/google-cloud-pubsub-v1/tests/Unit/V1/PublisherClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\PubSub\V1; +namespace Google\Cloud\PubSub\Tests\Unit\V1; use Google\Cloud\PubSub\V1\PublisherClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Iam\V1\Policy; @@ -36,11 +37,11 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group pub_sub + * @group pubsub * @group grpc */ class PublisherClientTest extends GeneratedTest @@ -58,6 +59,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new PublisherClient($options); } @@ -106,12 +113,12 @@ public function createTopicExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -183,12 +190,12 @@ public function updateTopicExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -265,12 +272,12 @@ public function publishExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -342,12 +349,12 @@ public function getTopicExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -421,12 +428,12 @@ public function listTopicsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -500,12 +507,12 @@ public function listTopicSubscriptionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -570,12 +577,12 @@ public function deleteTopicExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -649,12 +656,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -725,12 +732,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -800,12 +807,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/SubscriberClientTest.php b/generated/php/google-cloud-pubsub-v1/tests/Unit/V1/SubscriberClientTest.php similarity index 96% rename from generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/SubscriberClientTest.php rename to generated/php/google-cloud-pubsub-v1/tests/Unit/V1/SubscriberClientTest.php index fbabb4855..eb7a1f80b 100644 --- a/generated/php/google-cloud-pubsub-v1/tests/unit/PubSub/V1/SubscriberClientTest.php +++ b/generated/php/google-cloud-pubsub-v1/tests/Unit/V1/SubscriberClientTest.php @@ -20,11 +20,12 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\PubSub\V1; +namespace Google\Cloud\PubSub\Tests\Unit\V1; use Google\Cloud\PubSub\V1\SubscriberClient; use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Iam\V1\Policy; @@ -43,11 +44,11 @@ use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group pub_sub + * @group pubsub * @group grpc */ class SubscriberClientTest extends GeneratedTest @@ -65,6 +66,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SubscriberClient($options); } @@ -123,12 +130,12 @@ public function createSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -203,12 +210,12 @@ public function getSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -291,12 +298,12 @@ public function updateSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -376,12 +383,12 @@ public function listSubscriptionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -446,12 +453,12 @@ public function deleteSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -524,12 +531,12 @@ public function modifyAckDeadlineExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -600,12 +607,12 @@ public function acknowledgeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -676,12 +683,12 @@ public function pullExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -797,12 +804,12 @@ public function streamingPullExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -874,12 +881,12 @@ public function modifyPushConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -954,12 +961,12 @@ public function listSnapshotsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1033,12 +1040,12 @@ public function createSnapshotExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1120,12 +1127,12 @@ public function updateSnapshotExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1198,12 +1205,12 @@ public function deleteSnapshotExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1269,12 +1276,12 @@ public function seekExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1348,12 +1355,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1424,12 +1431,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1499,12 +1506,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-resourcemanager-v2/composer.json b/generated/php/google-cloud-resourcemanager-v2/composer.json deleted file mode 100644 index c199fbd26..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "resourcemanager/resourcemanager", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "Google Cloud Resource Manager API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/GPBMetadata/Google/Cloud/Resourcemanager/V2/Folders.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/GPBMetadata/Google/Cloud/Resourcemanager/V2/Folders.php deleted file mode 100644 index fc7e1cbba..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/GPBMetadata/Google/Cloud/Resourcemanager/V2/Folders.php +++ /dev/null @@ -1,144 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0af01a0a2d676f6f676c652f636c6f75642f7265736f757263656d616e61" . - "6765722f76322f666f6c646572732e70726f746f121f676f6f676c652e63" . - "6c6f75642e7265736f757263656d616e616765722e76321a1e676f6f676c" . - "652f69616d2f76312f69616d5f706f6c6963792e70726f746f1a1a676f6f" . - "676c652f69616d2f76312f706f6c6963792e70726f746f1a23676f6f676c" . - "652f6c6f6e6772756e6e696e672f6f7065726174696f6e732e70726f746f" . - "1a20676f6f676c652f70726f746f6275662f6669656c645f6d61736b2e70" . - "726f746f1a1f676f6f676c652f70726f746f6275662f74696d657374616d" . - "702e70726f746f22c4020a06466f6c646572120c0a046e616d6518012001" . - "2809120e0a06706172656e7418022001280912140a0c646973706c61795f" . - "6e616d65180320012809124f0a0f6c6966656379636c655f737461746518" . - "042001280e32362e676f6f676c652e636c6f75642e7265736f757263656d" . - "616e616765722e76322e466f6c6465722e4c6966656379636c6553746174" . - "65122f0a0b6372656174655f74696d6518052001280b321a2e676f6f676c" . - "652e70726f746f6275662e54696d657374616d70122f0a0b757064617465" . - "5f74696d6518062001280b321a2e676f6f676c652e70726f746f6275662e" . - "54696d657374616d7022530a0e4c6966656379636c655374617465121f0a" . - "1b4c4946454359434c455f53544154455f554e5350454349464945441000" . - "120a0a06414354495645100112140a1044454c4554455f52455155455354" . - "4544100222610a124c697374466f6c6465727352657175657374120e0a06" . - "706172656e7418012001280912110a09706167655f73697a651802200128" . - "0512120a0a706167655f746f6b656e18032001280912140a0c73686f775f" . - "64656c6574656418042001280822680a134c697374466f6c646572735265" . - "73706f6e736512380a07666f6c6465727318012003280b32272e676f6f67" . - "6c652e636c6f75642e7265736f757263656d616e616765722e76322e466f" . - "6c64657212170a0f6e6578745f706167655f746f6b656e18022001280922" . - "4c0a14536561726368466f6c646572735265717565737412110a09706167" . - "655f73697a6518012001280512120a0a706167655f746f6b656e18022001" . - "2809120d0a057175657279180320012809226a0a15536561726368466f6c" . - "64657273526573706f6e736512380a07666f6c6465727318012003280b32" . - "272e676f6f676c652e636c6f75642e7265736f757263656d616e61676572" . - "2e76322e466f6c64657212170a0f6e6578745f706167655f746f6b656e18" . - "022001280922200a10476574466f6c64657252657175657374120c0a046e" . - "616d65180120012809225e0a13437265617465466f6c6465725265717565" . - "7374120e0a06706172656e7418012001280912370a06666f6c6465721802" . - "2001280b32272e676f6f676c652e636c6f75642e7265736f757263656d61" . - "6e616765722e76322e466f6c646572223d0a114d6f7665466f6c64657252" . - "657175657374120c0a046e616d65180120012809121a0a1264657374696e" . - "6174696f6e5f706172656e74180220012809227f0a13557064617465466f" . - "6c6465725265717565737412370a06666f6c64657218012001280b32272e" . - "676f6f676c652e636c6f75642e7265736f757263656d616e616765722e76" . - "322e466f6c646572122f0a0b7570646174655f6d61736b18022001280b32" . - "1a2e676f6f676c652e70726f746f6275662e4669656c644d61736b223d0a" . - "1344656c657465466f6c64657252657175657374120c0a046e616d651801" . - "2001280912180a107265637572736976655f64656c657465180220012808" . - "22250a15556e64656c657465466f6c64657252657175657374120c0a046e" . - "616d6518012001280922f9010a0f466f6c6465724f7065726174696f6e12" . - "140a0c646973706c61795f6e616d6518012001280912560a0e6f70657261" . - "74696f6e5f7479706518022001280e323e2e676f6f676c652e636c6f7564" . - "2e7265736f757263656d616e616765722e76322e466f6c6465724f706572" . - "6174696f6e2e4f7065726174696f6e5479706512150a0d736f757263655f" . - "706172656e74180320012809121a0a1264657374696e6174696f6e5f7061" . - "72656e7418042001280922450a0d4f7065726174696f6e54797065121e0a" . - "1a4f5045524154494f4e5f545950455f554e535045434946494544100012" . - "0a0a06435245415445100112080a044d4f5645100232b30c0a07466f6c64" . - "657273128d010a0b4c697374466f6c6465727312332e676f6f676c652e63" . - "6c6f75642e7265736f757263656d616e616765722e76322e4c697374466f" . - "6c64657273526571756573741a342e676f6f676c652e636c6f75642e7265" . - "736f757263656d616e616765722e76322e4c697374466f6c646572735265" . - "73706f6e7365221382d3e493020d120b2f76322f666f6c64657273129d01" . - "0a0d536561726368466f6c6465727312352e676f6f676c652e636c6f7564" . - "2e7265736f757263656d616e616765722e76322e536561726368466f6c64" . - "657273526571756573741a362e676f6f676c652e636c6f75642e7265736f" . - "757263656d616e616765722e76322e536561726368466f6c646572735265" . - "73706f6e7365221d82d3e493021722122f76322f666f6c646572733a7365" . - "617263683a012a1285010a09476574466f6c64657212312e676f6f676c65" . - "2e636c6f75642e7265736f757263656d616e616765722e76322e47657446" . - "6f6c646572526571756573741a272e676f6f676c652e636c6f75642e7265" . - "736f757263656d616e616765722e76322e466f6c646572221c82d3e49302" . - "1612142f76322f7b6e616d653d666f6c646572732f2a7d1280010a0c4372" . - "65617465466f6c64657212342e676f6f676c652e636c6f75642e7265736f" . - "757263656d616e616765722e76322e437265617465466f6c646572526571" . - "756573741a1d2e676f6f676c652e6c6f6e6772756e6e696e672e4f706572" . - "6174696f6e221b82d3e4930215220b2f76322f666f6c646572733a06666f" . - "6c646572129a010a0c557064617465466f6c64657212342e676f6f676c65" . - "2e636c6f75642e7265736f757263656d616e616765722e76322e55706461" . - "7465466f6c646572526571756573741a272e676f6f676c652e636c6f7564" . - "2e7265736f757263656d616e616765722e76322e466f6c646572222b82d3" . - "e4930225321b2f76322f7b666f6c6465722e6e616d653d666f6c64657273" . - "2f2a7d3a06666f6c6465721285010a0a4d6f7665466f6c64657212322e67" . - "6f6f676c652e636c6f75642e7265736f757263656d616e616765722e7632" . - "2e4d6f7665466f6c646572526571756573741a1d2e676f6f676c652e6c6f" . - "6e6772756e6e696e672e4f7065726174696f6e222482d3e493021e22192f" . - "76322f7b6e616d653d666f6c646572732f2a7d3a6d6f76653a012a128b01" . - "0a0c44656c657465466f6c64657212342e676f6f676c652e636c6f75642e" . - "7265736f757263656d616e616765722e76322e44656c657465466f6c6465" . - "72526571756573741a272e676f6f676c652e636c6f75642e7265736f7572" . - "63656d616e616765722e76322e466f6c646572221c82d3e49302162a142f" . - "76322f7b6e616d653d666f6c646572732f2a7d129b010a0e556e64656c65" . - "7465466f6c64657212362e676f6f676c652e636c6f75642e7265736f7572" . - "63656d616e616765722e76322e556e64656c657465466f6c646572526571" . - "756573741a272e676f6f676c652e636c6f75642e7265736f757263656d61" . - "6e616765722e76322e466f6c646572222882d3e4930222221d2f76322f7b" . - "6e616d653d666f6c646572732f2a7d3a756e64656c6574653a012a127b0a" . - "0c47657449616d506f6c69637912222e676f6f676c652e69616d2e76312e" . - "47657449616d506f6c696379526571756573741a152e676f6f676c652e69" . - "616d2e76312e506f6c696379223082d3e493022a22252f76322f7b726573" . - "6f757263653d666f6c646572732f2a7d3a67657449616d506f6c6963793a" . - "012a127b0a0c53657449616d506f6c69637912222e676f6f676c652e6961" . - "6d2e76312e53657449616d506f6c696379526571756573741a152e676f6f" . - "676c652e69616d2e76312e506f6c696379223082d3e493022a22252f7632" . - "2f7b7265736f757263653d666f6c646572732f2a7d3a73657449616d506f" . - "6c6963793a012a12a1010a125465737449616d5065726d697373696f6e73" . - "12282e676f6f676c652e69616d2e76312e5465737449616d5065726d6973" . - "73696f6e73526571756573741a292e676f6f676c652e69616d2e76312e54" . - "65737449616d5065726d697373696f6e73526573706f6e7365223682d3e4" . - "930230222b2f76322f7b7265736f757263653d666f6c646572732f2a7d3a" . - "7465737449616d5065726d697373696f6e733a012a42c9010a23636f6d2e" . - "676f6f676c652e636c6f75642e7265736f757263656d616e616765722e76" . - "32420c466f6c6465727350726f746f50015a4e676f6f676c652e676f6c61" . - "6e672e6f72672f67656e70726f746f2f676f6f676c65617069732f636c6f" . - "75642f7265736f757263656d616e616765722f76323b7265736f75726365" . - "6d616e61676572aa021f476f6f676c652e436c6f75642e5265736f757263" . - "654d616e616765722e5632ca021f476f6f676c655c436c6f75645c526573" . - "6f757263654d616e616765725c5632620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/CreateFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/CreateFolderRequest.php deleted file mode 100644 index eb6d34dc1..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/CreateFolderRequest.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.resourcemanager.v2.CreateFolderRequest - */ -class CreateFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the new Folder's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string parent = 1; - */ - private $parent = ''; - /** - * The Folder being created, only the display name will be consulted. - * All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 2; - */ - private $folder = null; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The resource name of the new Folder's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The resource name of the new Folder's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The Folder being created, only the display name will be consulted. - * All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 2; - * @return \Google\Cloud\ResourceManager\V2\Folder - */ - public function getFolder() - { - return $this->folder; - } - - /** - * The Folder being created, only the display name will be consulted. - * All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 2; - * @param \Google\Cloud\ResourceManager\V2\Folder $var - * @return $this - */ - public function setFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ResourceManager\V2\Folder::class); - $this->folder = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/DeleteFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/DeleteFolderRequest.php deleted file mode 100644 index 7efb737a1..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/DeleteFolderRequest.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.resourcemanager.v2.DeleteFolderRequest - */ -class DeleteFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * the resource name of the Folder to be deleted. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * Instructs DeleteFolderAction to delete a folder even when the folder is not - * empty. - * - * Generated from protobuf field bool recursive_delete = 2; - */ - private $recursive_delete = false; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * the resource name of the Folder to be deleted. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * the resource name of the Folder to be deleted. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Instructs DeleteFolderAction to delete a folder even when the folder is not - * empty. - * - * Generated from protobuf field bool recursive_delete = 2; - * @return bool - */ - public function getRecursiveDelete() - { - return $this->recursive_delete; - } - - /** - * Instructs DeleteFolderAction to delete a folder even when the folder is not - * empty. - * - * Generated from protobuf field bool recursive_delete = 2; - * @param bool $var - * @return $this - */ - public function setRecursiveDelete($var) - { - GPBUtil::checkBool($var); - $this->recursive_delete = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder.php deleted file mode 100644 index 3a53c2eb4..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.resourcemanager.v2.Folder - */ -class Folder extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the Folder. - * Its format is `folders/{folder_id}`, for example: "folders/1234". - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * The Folder’s parent's resource name. - * Updates to the folder's parent must be performed via [MoveFolders]. - * - * Generated from protobuf field string parent = 2; - */ - private $parent = ''; - /** - * The folder’s display name. - * A folder’s display name must be unique amongst its siblings, e.g. - * no two folders with the same parent can share the same display name. - * The display name must start and end with a letter or digit, may contain - * letters, digits, spaces, hyphens and underscores and can be no longer - * than 30 characters. This is captured by the regular expression: - * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. - * - * Generated from protobuf field string display_name = 3; - */ - private $display_name = ''; - /** - * Output only. The lifecycle state of the folder. - * Updates to the lifecycle_state must be performed via - * [DeleteFolder] and [UndeleteFolder]. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder.LifecycleState lifecycle_state = 4; - */ - private $lifecycle_state = 0; - /** - * Output only. Timestamp when the Folder was created. Assigned by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - private $create_time = null; - /** - * Output only. Timestamp when the Folder was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - */ - private $update_time = null; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * Output only. The resource name of the Folder. - * Its format is `folders/{folder_id}`, for example: "folders/1234". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the Folder. - * Its format is `folders/{folder_id}`, for example: "folders/1234". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The Folder’s parent's resource name. - * Updates to the folder's parent must be performed via [MoveFolders]. - * - * Generated from protobuf field string parent = 2; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The Folder’s parent's resource name. - * Updates to the folder's parent must be performed via [MoveFolders]. - * - * Generated from protobuf field string parent = 2; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The folder’s display name. - * A folder’s display name must be unique amongst its siblings, e.g. - * no two folders with the same parent can share the same display name. - * The display name must start and end with a letter or digit, may contain - * letters, digits, spaces, hyphens and underscores and can be no longer - * than 30 characters. This is captured by the regular expression: - * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The folder’s display name. - * A folder’s display name must be unique amongst its siblings, e.g. - * no two folders with the same parent can share the same display name. - * The display name must start and end with a letter or digit, may contain - * letters, digits, spaces, hyphens and underscores and can be no longer - * than 30 characters. This is captured by the regular expression: - * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The lifecycle state of the folder. - * Updates to the lifecycle_state must be performed via - * [DeleteFolder] and [UndeleteFolder]. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder.LifecycleState lifecycle_state = 4; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The lifecycle state of the folder. - * Updates to the lifecycle_state must be performed via - * [DeleteFolder] and [UndeleteFolder]. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder.LifecycleState lifecycle_state = 4; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ResourceManager\V2\Folder_LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * Output only. Timestamp when the Folder was created. Assigned by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @return \Google\Protobuf\Timestamp - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Output only. Timestamp when the Folder was created. Assigned by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Timestamp when the Folder was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @return \Google\Protobuf\Timestamp - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Output only. Timestamp when the Folder was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation.php deleted file mode 100644 index d8471d61c..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.resourcemanager.v2.FolderOperation - */ -class FolderOperation extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the folder. - * - * Generated from protobuf field string display_name = 1; - */ - private $display_name = ''; - /** - * The type of this operation. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.FolderOperation.OperationType operation_type = 2; - */ - private $operation_type = 0; - /** - * The resource name of the folder's parent. - * Only applicable when the operation_type is MOVE. - * - * Generated from protobuf field string source_parent = 3; - */ - private $source_parent = ''; - /** - * The resource name of the folder or organization we are either creating - * the folder under or moving the folder to. - * - * Generated from protobuf field string destination_parent = 4; - */ - private $destination_parent = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The display name of the folder. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the folder. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The type of this operation. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.FolderOperation.OperationType operation_type = 2; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The type of this operation. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.FolderOperation.OperationType operation_type = 2; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ResourceManager\V2\FolderOperation_OperationType::class); - $this->operation_type = $var; - - return $this; - } - - /** - * The resource name of the folder's parent. - * Only applicable when the operation_type is MOVE. - * - * Generated from protobuf field string source_parent = 3; - * @return string - */ - public function getSourceParent() - { - return $this->source_parent; - } - - /** - * The resource name of the folder's parent. - * Only applicable when the operation_type is MOVE. - * - * Generated from protobuf field string source_parent = 3; - * @param string $var - * @return $this - */ - public function setSourceParent($var) - { - GPBUtil::checkString($var, True); - $this->source_parent = $var; - - return $this; - } - - /** - * The resource name of the folder or organization we are either creating - * the folder under or moving the folder to. - * - * Generated from protobuf field string destination_parent = 4; - * @return string - */ - public function getDestinationParent() - { - return $this->destination_parent; - } - - /** - * The resource name of the folder or organization we are either creating - * the folder under or moving the folder to. - * - * Generated from protobuf field string destination_parent = 4; - * @param string $var - * @return $this - */ - public function setDestinationParent($var) - { - GPBUtil::checkString($var, True); - $this->destination_parent = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation_OperationType.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation_OperationType.php deleted file mode 100644 index 2a281b0c0..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FolderOperation_OperationType.php +++ /dev/null @@ -1,33 +0,0 @@ -Google\Cloud\Resourcemanager\V2\FolderOperation\OperationType - */ -class FolderOperation_OperationType -{ - /** - * Operation type not specified. - * - * Generated from protobuf enum OPERATION_TYPE_UNSPECIFIED = 0; - */ - const OPERATION_TYPE_UNSPECIFIED = 0; - /** - * A create folder operation. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * A move folder operation. - * - * Generated from protobuf enum MOVE = 2; - */ - const MOVE = 2; -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder_LifecycleState.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder_LifecycleState.php deleted file mode 100644 index 95b5a550c..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/Folder_LifecycleState.php +++ /dev/null @@ -1,33 +0,0 @@ -Google\Cloud\Resourcemanager\V2\Folder\LifecycleState - */ -class Folder_LifecycleState -{ - /** - * Unspecified state. - * - * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; - */ - const LIFECYCLE_STATE_UNSPECIFIED = 0; - /** - * The normal and active state. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The folder has been marked for deletion by the user. - * - * Generated from protobuf enum DELETE_REQUESTED = 2; - */ - const DELETE_REQUESTED = 2; -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FoldersGrpcClient.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FoldersGrpcClient.php deleted file mode 100644 index d33a93c51..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/FoldersGrpcClient.php +++ /dev/null @@ -1,284 +0,0 @@ -_simpleRequest('/google.cloud.resourcemanager.v2.Folders/ListFolders', - $argument, - ['\Google\Cloud\ResourceManager\V2\ListFoldersResponse', 'decode'], - $metadata, $options); - } - - /** - * Search for folders that match specific filter criteria. - * Search provides an eventually consistent view of the folders a user has - * access to which meet the specified filter criteria. - * - * This will only return folders on which the caller has the - * permission `resourcemanager.folders.get`. - * @param \Google\Cloud\ResourceManager\V2\SearchFoldersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function SearchFolders(\Google\Cloud\ResourceManager\V2\SearchFoldersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/SearchFolders', - $argument, - ['\Google\Cloud\ResourceManager\V2\SearchFoldersResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a Folder identified by the supplied resource name. - * Valid Folder resource names have the format `folders/{folder_id}` - * (for example, `folders/1234`). - * The caller must have `resourcemanager.folders.get` permission on the - * identified folder. - * @param \Google\Cloud\ResourceManager\V2\GetFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function GetFolder(\Google\Cloud\ResourceManager\V2\GetFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/GetFolder', - $argument, - ['\Google\Cloud\ResourceManager\V2\Folder', 'decode'], - $metadata, $options); - } - - /** - * Creates a Folder in the resource hierarchy. - * Returns an Operation which can be used to track the progress of the - * folder creation workflow. - * Upon success the Operation.response field will be populated with the - * created Folder. - * - * In order to succeed, the addition of this new Folder must not violate - * the Folder naming, height or fanout constraints. - * + The Folder's display_name must be distinct from all other Folder's that - * share its parent. - * + The addition of the Folder must not cause the active Folder hierarchy - * to exceed a height of 4. Note, the full active + deleted Folder hierarchy - * is allowed to reach a height of 8; this provides additional headroom when - * moving folders that contain deleted folders. - * + The addition of the Folder must not cause the total number of Folders - * under its parent to exceed 100. - * - * If the operation fails due to a folder constraint violation, - * a PreconditionFailure explaining the violation will be returned. - * If the failure occurs synchronously then the PreconditionFailure - * will be returned via the Status.details field and if it occurs - * asynchronously then the PreconditionFailure will be returned - * via the the Operation.error field. - * - * The caller must have `resourcemanager.folders.create` permission on the - * identified parent. - * @param \Google\Cloud\ResourceManager\V2\CreateFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function CreateFolder(\Google\Cloud\ResourceManager\V2\CreateFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/CreateFolder', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a Folder, changing its display_name. - * Changes to the folder display_name will be rejected if they violate either - * the display_name formatting rules or naming constraints described in - * the [CreateFolder] documentation. - * + The Folder's display name must start and end with a letter or digit, - * may contain letters, digits, spaces, hyphens and underscores and can be - * no longer than 30 characters. This is captured by the regular expression: - * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. - * The caller must have `resourcemanager.folders.update` permission on the - * identified folder. - * - * If the update fails due to the unique name constraint then a - * PreconditionFailure explaining this violation will be returned - * in the Status.details field. - * @param \Google\Cloud\ResourceManager\V2\UpdateFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function UpdateFolder(\Google\Cloud\ResourceManager\V2\UpdateFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/UpdateFolder', - $argument, - ['\Google\Cloud\ResourceManager\V2\Folder', 'decode'], - $metadata, $options); - } - - /** - * Moves a Folder under a new resource parent. - * Returns an Operation which can be used to track the progress of the - * folder move workflow. - * Upon success the Operation.response field will be populated with the - * moved Folder. - * Upon failure, a FolderOperationError categorizing the failure cause will - * be returned - if the failure occurs synchronously then the - * FolderOperationError will be returned via the Status.details field - * and if it occurs asynchronously then the FolderOperation will be returned - * via the the Operation.error field. - * In addition, the Operation.metadata field will be populated with a - * FolderOperation message as an aid to stateless clients. - * Folder moves will be rejected if they violate either the naming, height - * or fanout constraints described in the [CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. - * @param \Google\Cloud\ResourceManager\V2\MoveFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function MoveFolder(\Google\Cloud\ResourceManager\V2\MoveFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/MoveFolder', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Requests deletion of a Folder. The Folder is moved into the - * [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days - * later. This method may only be called on an empty Folder in the [ACTIVE] - * state, where a Folder is empty if it doesn't contain any Folders or - * Projects in the [ACTIVE] state. - * The caller must have `resourcemanager.folders.delete` permission on the - * identified folder. - * @param \Google\Cloud\ResourceManager\V2\DeleteFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function DeleteFolder(\Google\Cloud\ResourceManager\V2\DeleteFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/DeleteFolder', - $argument, - ['\Google\Cloud\ResourceManager\V2\Folder', 'decode'], - $metadata, $options); - } - - /** - * Cancels the deletion request for a Folder. This method may only be - * called on a Folder in the [DELETE_REQUESTED] state. - * In order to succeed, the Folder's parent must be in the [ACTIVE] state. - * In addition, reintroducing the folder into the tree must not violate - * folder naming, height and fanout constraints described in the - * [CreateFolder] documentation. - * The caller must have `resourcemanager.folders.undelete` permission on the - * identified folder. - * @param \Google\Cloud\ResourceManager\V2\UndeleteFolderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function UndeleteFolder(\Google\Cloud\ResourceManager\V2\UndeleteFolderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/UndeleteFolder', - $argument, - ['\Google\Cloud\ResourceManager\V2\Folder', 'decode'], - $metadata, $options); - } - - /** - * Gets the access control policy for a Folder. The returned policy may be - * empty if no such policy or resource exists. The `resource` field should - * be the Folder's resource name, e.g. "folders/1234". - * The caller must have `resourcemanager.folders.getIamPolicy` permission - * on the identified folder. - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Sets the access control policy on a Folder, replacing any existing policy. - * The `resource` field should be the Folder's resource name, e.g. - * "folders/1234". - * The caller must have `resourcemanager.folders.setIamPolicy` permission - * on the identified folder. - * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Returns permissions that a caller has on the specified Folder. - * The `resource` field should be the Folder's resource name, - * e.g. "folders/1234". - * - * There are no permissions required for making this API call. - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.resourcemanager.v2.Folders/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/GetFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/GetFolderRequest.php deleted file mode 100644 index b410321e1..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/GetFolderRequest.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.resourcemanager.v2.GetFolderRequest - */ -class GetFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Folder to retrieve. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The resource name of the Folder to retrieve. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Folder to retrieve. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersRequest.php deleted file mode 100644 index e69591591..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.resourcemanager.v2.ListFoldersRequest - */ -class ListFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Organization or Folder whose Folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * Access to this method is controlled by checking the - * `resourcemanager.folders.list` permission on the `parent`. - * - * Generated from protobuf field string parent = 1; - */ - private $parent = ''; - /** - * The maximum number of Folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates where this listing should continue from. - * This field is optional. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - /** - * Controls whether Folders in the [DELETE_REQUESTED} state should - * be returned. - * - * Generated from protobuf field bool show_deleted = 4; - */ - private $show_deleted = false; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The resource name of the Organization or Folder whose Folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * Access to this method is controlled by checking the - * `resourcemanager.folders.list` permission on the `parent`. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The resource name of the Organization or Folder whose Folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * Access to this method is controlled by checking the - * `resourcemanager.folders.list` permission on the `parent`. - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of Folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of Folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates where this listing should continue from. - * This field is optional. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates where this listing should continue from. - * This field is optional. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Controls whether Folders in the [DELETE_REQUESTED} state should - * be returned. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Controls whether Folders in the [DELETE_REQUESTED} state should - * be returned. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersResponse.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersResponse.php deleted file mode 100644 index a7cf4c6af..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/ListFoldersResponse.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.resourcemanager.v2.ListFoldersResponse - */ -class ListFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A possibly paginated list of Folders that are direct descendants of - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - */ - private $folders; - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates from where listing should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * A possibly paginated list of Folders that are direct descendants of - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * A possibly paginated list of Folders that are direct descendants of - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - * @param \Google\Cloud\ResourceManager\V2\Folder[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ResourceManager\V2\Folder::class); - $this->folders = $arr; - - return $this; - } - - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates from where listing should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A pagination token returned from a previous call to `ListFolders` - * that indicates from where listing should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/MoveFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/MoveFolderRequest.php deleted file mode 100644 index e3195413e..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/MoveFolderRequest.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.resourcemanager.v2.MoveFolderRequest - */ -class MoveFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Folder to move. - * Must be of the form folders/{folder_id} - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * The resource name of the Folder or Organization to reparent - * the folder under. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string destination_parent = 2; - */ - private $destination_parent = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The resource name of the Folder to move. - * Must be of the form folders/{folder_id} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Folder to move. - * Must be of the form folders/{folder_id} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The resource name of the Folder or Organization to reparent - * the folder under. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string destination_parent = 2; - * @return string - */ - public function getDestinationParent() - { - return $this->destination_parent; - } - - /** - * The resource name of the Folder or Organization to reparent - * the folder under. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * - * Generated from protobuf field string destination_parent = 2; - * @param string $var - * @return $this - */ - public function setDestinationParent($var) - { - GPBUtil::checkString($var, True); - $this->destination_parent = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersRequest.php deleted file mode 100644 index 07183e966..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.resourcemanager.v2.SearchFoldersRequest - */ -class SearchFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 1; - */ - private $page_size = 0; - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. - * This field is optional. - * - * Generated from protobuf field string page_token = 2; - */ - private $page_token = ''; - /** - * Search criteria used to select the Folders to return. - * If no search criteria is specified then all accessible folders will be - * returned. - * Query expressions can be used to restrict results based upon displayName, - * lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` - * can be used along with the suffix wildcard symbol `*`. - * Some example queries are: - * |Query|Description| - * |------|-----------| - * |displayName=Test*|Folders whose display name starts with "Test".| - * |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| - * |parent=folders/123|Folders whose parent is "folders/123".| - * |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose - * parent is "folders/123".| - * - * Generated from protobuf field string query = 3; - */ - private $query = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The maximum number of folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 1; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of folders to return in the response. - * This field is optional. - * - * Generated from protobuf field int32 page_size = 1; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. - * This field is optional. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. - * This field is optional. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Search criteria used to select the Folders to return. - * If no search criteria is specified then all accessible folders will be - * returned. - * Query expressions can be used to restrict results based upon displayName, - * lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` - * can be used along with the suffix wildcard symbol `*`. - * Some example queries are: - * |Query|Description| - * |------|-----------| - * |displayName=Test*|Folders whose display name starts with "Test".| - * |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| - * |parent=folders/123|Folders whose parent is "folders/123".| - * |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose - * parent is "folders/123".| - * - * Generated from protobuf field string query = 3; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Search criteria used to select the Folders to return. - * If no search criteria is specified then all accessible folders will be - * returned. - * Query expressions can be used to restrict results based upon displayName, - * lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` - * can be used along with the suffix wildcard symbol `*`. - * Some example queries are: - * |Query|Description| - * |------|-----------| - * |displayName=Test*|Folders whose display name starts with "Test".| - * |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| - * |parent=folders/123|Folders whose parent is "folders/123".| - * |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose - * parent is "folders/123".| - * - * Generated from protobuf field string query = 3; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersResponse.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersResponse.php deleted file mode 100644 index ce53e9721..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/SearchFoldersResponse.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.resourcemanager.v2.SearchFoldersResponse - */ -class SearchFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A possibly paginated folder search results. - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - */ - private $folders; - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where searching should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * A possibly paginated folder search results. - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * A possibly paginated folder search results. - * the specified parent resource. - * - * Generated from protobuf field repeated .google.cloud.resourcemanager.v2.Folder folders = 1; - * @param \Google\Cloud\ResourceManager\V2\Folder[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ResourceManager\V2\Folder::class); - $this->folders = $arr; - - return $this; - } - - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where searching should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A pagination token returned from a previous call to `SearchFolders` - * that indicates from where searching should continue. - * This field is optional. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UndeleteFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UndeleteFolderRequest.php deleted file mode 100644 index 1ae155751..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UndeleteFolderRequest.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.resourcemanager.v2.UndeleteFolderRequest - */ -class UndeleteFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Folder to undelete. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The resource name of the Folder to undelete. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Folder to undelete. - * Must be of the form `folders/{folder_id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UpdateFolderRequest.php b/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UpdateFolderRequest.php deleted file mode 100644 index 39d9fd66c..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/proto/src/Google/Cloud/ResourceManager/V2/UpdateFolderRequest.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.resourcemanager.v2.UpdateFolderRequest - */ -class UpdateFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The new definition of the Folder. It must include a - * a `name` and `display_name` field. The other fields - * will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 1; - */ - private $folder = null; - /** - * Fields to be updated. - * Only the `display_name` can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - private $update_mask = null; - - public function __construct() { - \GPBMetadata\Google\Cloud\Resourcemanager\V2\Folders::initOnce(); - parent::__construct(); - } - - /** - * The new definition of the Folder. It must include a - * a `name` and `display_name` field. The other fields - * will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 1; - * @return \Google\Cloud\ResourceManager\V2\Folder - */ - public function getFolder() - { - return $this->folder; - } - - /** - * The new definition of the Folder. It must include a - * a `name` and `display_name` field. The other fields - * will be ignored. - * - * Generated from protobuf field .google.cloud.resourcemanager.v2.Folder folder = 1; - * @param \Google\Cloud\ResourceManager\V2\Folder $var - * @return $this - */ - public function setFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ResourceManager\V2\Folder::class); - $this->folder = $var; - - return $this; - } - - /** - * Fields to be updated. - * Only the `display_name` can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - /** - * Fields to be updated. - * Only the `display_name` can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/FoldersClient.php b/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/FoldersClient.php deleted file mode 100644 index a46382bb3..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/FoldersClient.php +++ /dev/null @@ -1,42 +0,0 @@ -organizationName('[ORG_ID]'); - * // Iterate through all elements - * $pagedResponse = $foldersClient->listFolders($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements - * $pagedResponse = $foldersClient->listFolders($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To assist - * with these names, this class includes a format method for each type of name, and additionally - * a parseName method to extract the individual identifiers contained within formatted names - * that are returned by the API. - * - * @experimental - */ -class FoldersGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.cloud.resourcemanager.v2.Folders'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'cloudresourcemanager.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The code generator version, to be included in the agent header. - */ - const CODEGEN_VERSION = '0.0.5'; - - private static $folderNameTemplate; - private static $organizationNameTemplate; - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ], - 'clientConfigPath' => __DIR__.'/../resources/folders_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/folders_rest_client_config.php', - 'descriptorsConfigPath' => __DIR__.'/../resources/folders_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', - ]; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{org_id}'); - } - - return self::$organizationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folder' => self::getFolderNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent - * a folder resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - * @experimental - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent - * a organization resource. - * - * @param string $orgId - * - * @return string The formatted organization resource. - * @experimental - */ - public static function organizationName($orgId) - { - return self::getOrganizationNameTemplate()->render([ - 'org_id' => $orgId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folder: folders/{folder} - * - organization: organizations/{org_id}. - * - * The optional $template argument can be supplied to specify a particular pattern, and must - * match one of the templates listed above. If no $template argument is provided, or if the - * $template argument does not match one of the templates listed, then parseName will check - * each of the supported templates, and return the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'cloudresourcemanager.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Resource Manager API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. - * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. - * } - * @experimental - */ - public function __construct($options = []) - { - $this->setClientOptions($options + self::getClientDefaults()); - } - - /** - * Lists the Folders that are direct descendants of supplied parent resource. - * List provides a strongly consistent view of the Folders underneath - * the specified parent resource. - * List returns Folders sorted based upon the (ascending) lexical ordering - * of their display_name. - * The caller must have `resourcemanager.folders.list` permission on the - * identified parent. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedParent = $foldersClient->organizationName('[ORG_ID]'); - * // Iterate through all elements - * $pagedResponse = $foldersClient->listFolders($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements - * $pagedResponse = $foldersClient->listFolders($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $parent The resource name of the Organization or Folder whose Folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * Access to this method is controlled by checking the - * `resourcemanager.folders.list` permission on the `parent`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type bool $showDeleted - * Controls whether Folders in the [DELETE_REQUESTED} state should - * be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function listFolders($parent, $optionalArgs = []) - { - $request = new ListFoldersRequest(); - $request->setParent($parent); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - return $this->getPagedListResponse( - 'ListFolders', - $optionalArgs, - ListFoldersResponse::class, - $request - ); - } - - /** - * Search for folders that match specific filter criteria. - * Search provides an eventually consistent view of the folders a user has - * access to which meet the specified filter criteria. - * - * This will only return folders on which the caller has the - * permission `resourcemanager.folders.get`. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * - * // Iterate through all elements - * $pagedResponse = $foldersClient->searchFolders(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements - * $pagedResponse = $foldersClient->searchFolders(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $query - * Search criteria used to select the Folders to return. - * If no search criteria is specified then all accessible folders will be - * returned. - * - * Query expressions can be used to restrict results based upon displayName, - * lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` - * can be used along with the suffix wildcard symbol `*`. - * - * Some example queries are: - * |Query|Description| - * |------|-----------| - * |displayName=Test*|Folders whose display name starts with "Test".| - * |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| - * |parent=folders/123|Folders whose parent is "folders/123".| - * |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose - * parent is "folders/123".| - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function searchFolders($optionalArgs = []) - { - $request = new SearchFoldersRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - if (isset($optionalArgs['query'])) { - $request->setQuery($optionalArgs['query']); - } - - return $this->getPagedListResponse( - 'SearchFolders', - $optionalArgs, - SearchFoldersResponse::class, - $request - ); - } - - /** - * Retrieves a Folder identified by the supplied resource name. - * Valid Folder resource names have the format `folders/{folder_id}` - * (for example, `folders/1234`). - * The caller must have `resourcemanager.folders.get` permission on the - * identified folder. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedName = $foldersClient->folderName('[FOLDER]'); - * $response = $foldersClient->getFolder($formattedName); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $name The resource name of the Folder to retrieve. - * Must be of the form `folders/{folder_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ResourceManager\V2\Folder - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function getFolder($name, $optionalArgs = []) - { - $request = new GetFolderRequest(); - $request->setName($name); - - return $this->startCall( - 'GetFolder', - Folder::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Creates a Folder in the resource hierarchy. - * Returns an Operation which can be used to track the progress of the - * folder creation workflow. - * Upon success the Operation.response field will be populated with the - * created Folder. - * - * In order to succeed, the addition of this new Folder must not violate - * the Folder naming, height or fanout constraints. - * + The Folder's display_name must be distinct from all other Folder's that - * share its parent. - * + The addition of the Folder must not cause the active Folder hierarchy - * to exceed a height of 4. Note, the full active + deleted Folder hierarchy - * is allowed to reach a height of 8; this provides additional headroom when - * moving folders that contain deleted folders. - * + The addition of the Folder must not cause the total number of Folders - * under its parent to exceed 100. - * - * If the operation fails due to a folder constraint violation, - * a PreconditionFailure explaining the violation will be returned. - * If the failure occurs synchronously then the PreconditionFailure - * will be returned via the Status.details field and if it occurs - * asynchronously then the PreconditionFailure will be returned - * via the the Operation.error field. - * - * The caller must have `resourcemanager.folders.create` permission on the - * identified parent. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedParent = $foldersClient->organizationName('[ORG_ID]'); - * $folder = new Folder(); - * $response = $foldersClient->createFolder($formattedParent, $folder); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $parent The resource name of the new Folder's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * @param Folder $folder The Folder being created, only the display name will be consulted. - * All other fields will be ignored. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function createFolder($parent, $folder, $optionalArgs = []) - { - $request = new CreateFolderRequest(); - $request->setParent($parent); - $request->setFolder($folder); - - return $this->startCall( - 'CreateFolder', - Operation::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Updates a Folder, changing its display_name. - * Changes to the folder display_name will be rejected if they violate either - * the display_name formatting rules or naming constraints described in - * the [CreateFolder] documentation. - * + The Folder's display name must start and end with a letter or digit, - * may contain letters, digits, spaces, hyphens and underscores and can be - * no longer than 30 characters. This is captured by the regular expression: - * [\p{L}\p{N}](https://cloud.google.com{\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. - * The caller must have `resourcemanager.folders.update` permission on the - * identified folder. - * - * If the update fails due to the unique name constraint then a - * PreconditionFailure explaining this violation will be returned - * in the Status.details field. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $folder = new Folder(); - * $updateMask = new FieldMask(); - * $response = $foldersClient->updateFolder($folder, $updateMask); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param Folder $folder The new definition of the Folder. It must include a - * a `name` and `display_name` field. The other fields - * will be ignored. - * @param FieldMask $updateMask Fields to be updated. - * Only the `display_name` can be updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ResourceManager\V2\Folder - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function updateFolder($folder, $updateMask, $optionalArgs = []) - { - $request = new UpdateFolderRequest(); - $request->setFolder($folder); - $request->setUpdateMask($updateMask); - - return $this->startCall( - 'UpdateFolder', - Folder::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Moves a Folder under a new resource parent. - * Returns an Operation which can be used to track the progress of the - * folder move workflow. - * Upon success the Operation.response field will be populated with the - * moved Folder. - * Upon failure, a FolderOperationError categorizing the failure cause will - * be returned - if the failure occurs synchronously then the - * FolderOperationError will be returned via the Status.details field - * and if it occurs asynchronously then the FolderOperation will be returned - * via the the Operation.error field. - * In addition, the Operation.metadata field will be populated with a - * FolderOperation message as an aid to stateless clients. - * Folder moves will be rejected if they violate either the naming, height - * or fanout constraints described in the [CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedName = $foldersClient->folderName('[FOLDER]'); - * $formattedDestinationParent = $foldersClient->organizationName('[ORG_ID]'); - * $response = $foldersClient->moveFolder($formattedName, $formattedDestinationParent); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $name The resource name of the Folder to move. - * Must be of the form folders/{folder_id} - * @param string $destinationParent The resource name of the Folder or Organization to reparent - * the folder under. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function moveFolder($name, $destinationParent, $optionalArgs = []) - { - $request = new MoveFolderRequest(); - $request->setName($name); - $request->setDestinationParent($destinationParent); - - return $this->startCall( - 'MoveFolder', - Operation::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Requests deletion of a Folder. The Folder is moved into the - * [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days - * later. This method may only be called on an empty Folder in the [ACTIVE] - * state, where a Folder is empty if it doesn't contain any Folders or - * Projects in the [ACTIVE] state. - * The caller must have `resourcemanager.folders.delete` permission on the - * identified folder. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedName = $foldersClient->folderName('[FOLDER]'); - * $response = $foldersClient->deleteFolder($formattedName); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $name the resource name of the Folder to be deleted. - * Must be of the form `folders/{folder_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $recursiveDelete - * Instructs DeleteFolderAction to delete a folder even when the folder is not - * empty. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ResourceManager\V2\Folder - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function deleteFolder($name, $optionalArgs = []) - { - $request = new DeleteFolderRequest(); - $request->setName($name); - if (isset($optionalArgs['recursiveDelete'])) { - $request->setRecursiveDelete($optionalArgs['recursiveDelete']); - } - - return $this->startCall( - 'DeleteFolder', - Folder::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Cancels the deletion request for a Folder. This method may only be - * called on a Folder in the [DELETE_REQUESTED] state. - * In order to succeed, the Folder's parent must be in the [ACTIVE] state. - * In addition, reintroducing the folder into the tree must not violate - * folder naming, height and fanout constraints described in the - * [CreateFolder] documentation. - * The caller must have `resourcemanager.folders.undelete` permission on the - * identified folder. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedName = $foldersClient->folderName('[FOLDER]'); - * $response = $foldersClient->undeleteFolder($formattedName); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $name The resource name of the Folder to undelete. - * Must be of the form `folders/{folder_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ResourceManager\V2\Folder - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function undeleteFolder($name, $optionalArgs = []) - { - $request = new UndeleteFolderRequest(); - $request->setName($name); - - return $this->startCall( - 'UndeleteFolder', - Folder::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Gets the access control policy for a Folder. The returned policy may be - * empty if no such policy or resource exists. The `resource` field should - * be the Folder's resource name, e.g. "folders/1234". - * The caller must have `resourcemanager.folders.getIamPolicy` permission - * on the identified folder. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedResource = $foldersClient->folderName('[FOLDER]'); - * $response = $foldersClient->getIamPolicy($formattedResource); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function getIamPolicy($resource, $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $request->setResource($resource); - - return $this->startCall( - 'GetIamPolicy', - Policy::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Sets the access control policy on a Folder, replacing any existing policy. - * The `resource` field should be the Folder's resource name, e.g. - * "folders/1234". - * The caller must have `resourcemanager.folders.setIamPolicy` permission - * on the identified folder. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedResource = $foldersClient->folderName('[FOLDER]'); - * $policy = new Policy(); - * $response = $foldersClient->setIamPolicy($formattedResource, $policy); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function setIamPolicy($resource, $policy, $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $request->setResource($resource); - $request->setPolicy($policy); - - return $this->startCall( - 'SetIamPolicy', - Policy::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Returns permissions that a caller has on the specified Folder. - * The `resource` field should be the Folder's resource name, - * e.g. "folders/1234". - * - * There are no permissions required for making this API call. - * - * Sample code: - * ``` - * $foldersClient = new FoldersClient(); - * try { - * $formattedResource = $foldersClient->folderName('[FOLDER]'); - * $permissions = []; - * $response = $foldersClient->testIamPermissions($formattedResource, $permissions); - * } finally { - * $foldersClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function testIamPermissions($resource, $permissions, $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $request->setResource($resource); - $request->setPermissions($permissions); - - return $this->startCall( - 'TestIamPermissions', - TestIamPermissionsResponse::class, - $optionalArgs, - $request - )->wait(); - } -} diff --git a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_client_config.json b/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_client_config.json deleted file mode 100644 index a6cd62824..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_client_config.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "interfaces": { - "google.cloud.resourcemanager.v2.Folders": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListFolders": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "SearchFolders": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetFolder": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateFolder": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateFolder": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "MoveFolder": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteFolder": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "UndeleteFolder": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_descriptor_config.php b/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_descriptor_config.php deleted file mode 100644 index 67e9877ac..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.resourcemanager.v2.Folders' => [ - 'ListFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFolders', - ], - ], - 'SearchFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFolders', - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_rest_client_config.php b/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_rest_client_config.php deleted file mode 100644 index e2dc4fb26..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/src/ResourceManager/V2/resources/folders_rest_client_config.php +++ /dev/null @@ -1,117 +0,0 @@ - [ - 'google.cloud.resourcemanager.v2.Folders' => [ - 'ListFolders' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/folders', - ], - 'SearchFolders' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/folders:search', - 'body' => '*', - ], - 'GetFolder' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateFolder' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/folders', - 'body' => 'folder', - ], - 'UpdateFolder' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{folder.name=folders/*}', - 'body' => 'folder', - 'placeholders' => [ - 'folder.name' => [ - 'getters' => [ - 'getFolder', - 'getName', - ], - ], - ], - ], - 'MoveFolder' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*}:move', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteFolder' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UndeleteFolder' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=folders/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=folders/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=folders/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-resourcemanager-v2/tests/system/ResourceManager/V2/FoldersSmokeTest.php b/generated/php/google-cloud-resourcemanager-v2/tests/system/ResourceManager/V2/FoldersSmokeTest.php deleted file mode 100644 index a2c03f308..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/tests/system/ResourceManager/V2/FoldersSmokeTest.php +++ /dev/null @@ -1,43 +0,0 @@ -searchFolders(['query' => $query]); - } -} diff --git a/generated/php/google-cloud-resourcemanager-v2/tests/unit/ResourceManager/V2/FoldersClientTest.php b/generated/php/google-cloud-resourcemanager-v2/tests/unit/ResourceManager/V2/FoldersClientTest.php deleted file mode 100644 index 3e8b65347..000000000 --- a/generated/php/google-cloud-resourcemanager-v2/tests/unit/ResourceManager/V2/FoldersClientTest.php +++ /dev/null @@ -1,914 +0,0 @@ -createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $nextPageToken = ''; - $foldersElement = new Folder(); - $folders = [$foldersElement]; - $expectedResponse = new ListFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFolders($folders); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedParent = $client->organizationName('[ORG_ID]'); - - $response = $client->listFolders($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); - - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/ListFolders', $actualFuncCall); - - $actualValue = $actualRequestObject->getParent(); - - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listFoldersExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedParent = $client->organizationName('[ORG_ID]'); - - try { - $client->listFolders($formattedParent); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function searchFoldersTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $nextPageToken = ''; - $foldersElement = new Folder(); - $folders = [$foldersElement]; - $expectedResponse = new SearchFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFolders($folders); - $transport->addResponse($expectedResponse); - - $response = $client->searchFolders(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); - - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/SearchFolders', $actualFuncCall); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function searchFoldersExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - try { - $client->searchFolders(); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - $response = $client->getFolder($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/GetFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getName(); - - $this->assertProtobufEquals($formattedName, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - try { - $client->getFolder($formattedName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function createFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name = 'name3373707'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedParent = $client->organizationName('[ORG_ID]'); - $folder = new Folder(); - - $response = $client->createFolder($formattedParent, $folder); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/CreateFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getParent(); - - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFolder(); - - $this->assertProtobufEquals($folder, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function createFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedParent = $client->organizationName('[ORG_ID]'); - $folder = new Folder(); - - try { - $client->createFolder($formattedParent, $folder); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function updateFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Folder(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - - // Mock request - $folder = new Folder(); - $updateMask = new FieldMask(); - - $response = $client->updateFolder($folder, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/UpdateFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getFolder(); - - $this->assertProtobufEquals($folder, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - - $this->assertProtobufEquals($updateMask, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function updateFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $folder = new Folder(); - $updateMask = new FieldMask(); - - try { - $client->updateFolder($folder, $updateMask); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function moveFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - $formattedDestinationParent = $client->organizationName('[ORG_ID]'); - - $response = $client->moveFolder($formattedName, $formattedDestinationParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/MoveFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getName(); - - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getDestinationParent(); - - $this->assertProtobufEquals($formattedDestinationParent, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function moveFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - $formattedDestinationParent = $client->organizationName('[ORG_ID]'); - - try { - $client->moveFolder($formattedName, $formattedDestinationParent); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function deleteFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - $response = $client->deleteFolder($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/DeleteFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getName(); - - $this->assertProtobufEquals($formattedName, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function deleteFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - try { - $client->deleteFolder($formattedName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function undeleteFolderTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - $response = $client->undeleteFolder($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/UndeleteFolder', $actualFuncCall); - - $actualValue = $actualRequestObject->getName(); - - $this->assertProtobufEquals($formattedName, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function undeleteFolderExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedName = $client->folderName('[FOLDER]'); - - try { - $client->undeleteFolder($formattedName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - - $response = $client->getIamPolicy($formattedResource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/GetIamPolicy', $actualFuncCall); - - $actualValue = $actualRequestObject->getResource(); - - $this->assertProtobufEquals($formattedResource, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - - try { - $client->getIamPolicy($formattedResource); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - $policy = new Policy(); - - $response = $client->setIamPolicy($formattedResource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/SetIamPolicy', $actualFuncCall); - - $actualValue = $actualRequestObject->getResource(); - - $this->assertProtobufEquals($formattedResource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - - $this->assertProtobufEquals($policy, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - $policy = new Policy(); - - try { - $client->setIamPolicy($formattedResource, $policy); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - $permissions = []; - - $response = $client->testIamPermissions($formattedResource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.resourcemanager.v2.Folders/TestIamPermissions', $actualFuncCall); - - $actualValue = $actualRequestObject->getResource(); - - $this->assertProtobufEquals($formattedResource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - - $this->assertProtobufEquals($permissions, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $formattedResource = $client->folderName('[FOLDER]'); - $permissions = []; - - try { - $client->testIamPermissions($formattedResource, $permissions); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/generated/php/google-cloud-spanner-admin-database-v1/composer.json b/generated/php/google-cloud-spanner-admin-database-v1/composer.json index 6b9c7e112..0ab67c458 100644 --- a/generated/php/google-cloud-spanner-admin-database-v1/composer.json +++ b/generated/php/google-cloud-spanner-admin-database-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "database/database", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-spanner-admin-database", "description": "Cloud Spanner Database Admin API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Spanner\\Admin\\Database\\": "src", + "Google\\Cloud\\Spanner\\Admin\\Database\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/DatabaseAdminClient.php b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/DatabaseAdminClient.php similarity index 94% rename from generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/DatabaseAdminClient.php rename to generated/php/google-cloud-spanner-admin-database-v1/src/V1/DatabaseAdminClient.php index 18abd2d5b..ecb703ea5 100644 --- a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/DatabaseAdminClient.php +++ b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/DatabaseAdminClient.php @@ -38,5 +38,5 @@ class DatabaseAdminClient extends DatabaseAdminGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see DatabaseAdminClientImpl} class. + // additions to the generated {@see DatabaseAdminGapicClient} class. } diff --git a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/Gapic/DatabaseAdminGapicClient.php similarity index 87% rename from generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php rename to generated/php/google-cloud-spanner-admin-database-v1/src/V1/Gapic/DatabaseAdminGapicClient.php index d85807368..3c6257bdf 100644 --- a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php +++ b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/Gapic/DatabaseAdminGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Spanner\Admin\Database\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -39,7 +40,6 @@ use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\SetIamPolicyRequest; @@ -58,8 +58,6 @@ use Google\Cloud\Spanner\Admin\Database\V1\UpdateDatabaseDdlRequest; use Google\LongRunning\Operation; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Cloud Spanner Database Admin API. @@ -129,10 +127,12 @@ class DatabaseAdminGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/spanner.admin', + ]; private static $instanceNameTemplate; private static $databaseNameTemplate; private static $pathTemplateMap; @@ -143,16 +143,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/spanner.admin', - ], - 'clientConfigPath' => __DIR__.'/../resources/database_admin_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/database_admin_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/database_admin_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/database_admin_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/database_admin_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -307,65 +309,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'spanner.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Spanner Database Admin API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'spanner.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_client_config.json b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_client_config.json similarity index 100% rename from generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_client_config.json rename to generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_client_config.json diff --git a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_descriptor_config.php b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_descriptor_config.php similarity index 73% rename from generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_descriptor_config.php rename to generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_descriptor_config.php index 038af90e3..709e2f9fe 100644 --- a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_descriptor_config.php +++ b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_descriptor_config.php @@ -7,12 +7,20 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Spanner\Admin\Database\V1\Database', 'metadataReturnType' => '\Google\Cloud\Spanner\Admin\Database\V1\CreateDatabaseMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'UpdateDatabaseDdl' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', 'metadataReturnType' => '\Google\Cloud\Spanner\Admin\Database\V1\UpdateDatabaseDdlMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'ListDatabases' => [ diff --git a/generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_rest_client_config.php b/generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-spanner-admin-database-v1/src/Spanner/Admin/Database/V1/resources/database_admin_rest_client_config.php rename to generated/php/google-cloud-spanner-admin-database-v1/src/V1/resources/database_admin_rest_client_config.php diff --git a/generated/php/google-cloud-spanner-admin-database-v1/tests/unit/Spanner/Admin/Database/V1/DatabaseAdminClientTest.php b/generated/php/google-cloud-spanner-admin-database-v1/tests/Unit/V1/DatabaseAdminClientTest.php similarity index 96% rename from generated/php/google-cloud-spanner-admin-database-v1/tests/unit/Spanner/Admin/Database/V1/DatabaseAdminClientTest.php rename to generated/php/google-cloud-spanner-admin-database-v1/tests/Unit/V1/DatabaseAdminClientTest.php index e3c082c42..e81f1f1ff 100644 --- a/generated/php/google-cloud-spanner-admin-database-v1/tests/unit/Spanner/Admin/Database/V1/DatabaseAdminClientTest.php +++ b/generated/php/google-cloud-spanner-admin-database-v1/tests/Unit/V1/DatabaseAdminClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Spanner\Admin\Database\V1; +namespace Google\Cloud\Spanner\Admin\Database\Tests\Unit\V1; use Google\Cloud\Spanner\Admin\Database\V1\DatabaseAdminClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -36,11 +37,11 @@ use Google\LongRunning\Operation; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group database + * @group spanner-admin-database * @group grpc */ class DatabaseAdminClientTest extends GeneratedTest @@ -58,6 +59,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new DatabaseAdminClient($options); } @@ -112,12 +119,12 @@ public function listDatabasesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -148,7 +155,6 @@ public function createDatabaseTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -226,7 +232,6 @@ public function createDatabaseExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -245,12 +250,12 @@ public function createDatabaseExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -328,12 +333,12 @@ public function getDatabaseExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -364,7 +369,6 @@ public function updateDatabaseDdlTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -440,7 +444,6 @@ public function updateDatabaseDdlExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -459,12 +462,12 @@ public function updateDatabaseDdlExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -539,12 +542,12 @@ public function dropDatabaseExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -610,12 +613,12 @@ public function getDatabaseDdlExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -689,12 +692,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -765,12 +768,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -840,12 +843,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/composer.json b/generated/php/google-cloud-spanner-admin-instance-v1/composer.json index 2dd5123ee..fe28610e4 100644 --- a/generated/php/google-cloud-spanner-admin-instance-v1/composer.json +++ b/generated/php/google-cloud-spanner-admin-instance-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "instance/instance", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-spanner-admin-instance", "description": "Cloud Spanner Instance Admin API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Spanner\\Admin\\Instance\\": "src", + "Google\\Cloud\\Spanner\\Admin\\Instance\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/Gapic/InstanceAdminGapicClient.php b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/Gapic/InstanceAdminGapicClient.php similarity index 89% rename from generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/Gapic/InstanceAdminGapicClient.php rename to generated/php/google-cloud-spanner-admin-instance-v1/src/V1/Gapic/InstanceAdminGapicClient.php index 08c3e978b..0ab213898 100644 --- a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/Gapic/InstanceAdminGapicClient.php +++ b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/Gapic/InstanceAdminGapicClient.php @@ -31,7 +31,8 @@ namespace Google\Cloud\Spanner\Admin\Instance\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -39,7 +40,6 @@ use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\SetIamPolicyRequest; @@ -61,8 +61,6 @@ use Google\LongRunning\Operation; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Cloud Spanner Instance Admin API. @@ -148,10 +146,12 @@ class InstanceAdminGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/spanner.admin', + ]; private static $projectNameTemplate; private static $instanceConfigNameTemplate; private static $instanceNameTemplate; @@ -163,16 +163,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/spanner.admin', - ], - 'clientConfigPath' => __DIR__.'/../resources/instance_admin_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/instance_admin_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/instance_admin_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/instance_admin_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/instance_admin_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -352,65 +354,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'spanner.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Spanner Instance Admin API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'spanner.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/InstanceAdminClient.php b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/InstanceAdminClient.php similarity index 94% rename from generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/InstanceAdminClient.php rename to generated/php/google-cloud-spanner-admin-instance-v1/src/V1/InstanceAdminClient.php index 5e90a09d6..d2be063da 100644 --- a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/InstanceAdminClient.php +++ b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/InstanceAdminClient.php @@ -38,5 +38,5 @@ class InstanceAdminClient extends InstanceAdminGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see InstanceAdminClientImpl} class. + // additions to the generated {@see InstanceAdminGapicClient} class. } diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_client_config.json b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_client_config.json similarity index 100% rename from generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_client_config.json rename to generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_client_config.json diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_descriptor_config.php b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_descriptor_config.php similarity index 79% rename from generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_descriptor_config.php rename to generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_descriptor_config.php index 810949197..cc734e0cf 100644 --- a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_descriptor_config.php +++ b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_descriptor_config.php @@ -7,12 +7,20 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Spanner\Admin\Instance\V1\Instance', 'metadataReturnType' => '\Google\Cloud\Spanner\Admin\Instance\V1\CreateInstanceMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'UpdateInstance' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Spanner\Admin\Instance\V1\Instance', 'metadataReturnType' => '\Google\Cloud\Spanner\Admin\Instance\V1\UpdateInstanceMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'ListInstanceConfigs' => [ diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_rest_client_config.php b/generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-spanner-admin-instance-v1/src/Spanner/Admin/Instance/V1/resources/instance_admin_rest_client_config.php rename to generated/php/google-cloud-spanner-admin-instance-v1/src/V1/resources/instance_admin_rest_client_config.php diff --git a/generated/php/google-cloud-spanner-admin-instance-v1/tests/unit/Spanner/Admin/Instance/V1/InstanceAdminClientTest.php b/generated/php/google-cloud-spanner-admin-instance-v1/tests/Unit/V1/InstanceAdminClientTest.php similarity index 96% rename from generated/php/google-cloud-spanner-admin-instance-v1/tests/unit/Spanner/Admin/Instance/V1/InstanceAdminClientTest.php rename to generated/php/google-cloud-spanner-admin-instance-v1/tests/Unit/V1/InstanceAdminClientTest.php index d30488ae9..9382201fa 100644 --- a/generated/php/google-cloud-spanner-admin-instance-v1/tests/unit/Spanner/Admin/Instance/V1/InstanceAdminClientTest.php +++ b/generated/php/google-cloud-spanner-admin-instance-v1/tests/Unit/V1/InstanceAdminClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Spanner\Admin\Instance\V1; +namespace Google\Cloud\Spanner\Admin\Instance\Tests\Unit\V1; use Google\Cloud\Spanner\Admin\Instance\V1\InstanceAdminClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -38,11 +39,11 @@ use Google\Protobuf\Any; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group instance + * @group spanner-admin-instance * @group grpc */ class InstanceAdminClientTest extends GeneratedTest @@ -60,6 +61,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new InstanceAdminClient($options); } @@ -114,12 +121,12 @@ public function listInstanceConfigsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -189,12 +196,12 @@ public function getInstanceConfigExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -268,12 +275,12 @@ public function listInstancesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -347,12 +354,12 @@ public function getInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -383,7 +390,6 @@ public function createInstanceTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -471,7 +477,6 @@ public function createInstanceExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -490,12 +495,12 @@ public function createInstanceExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -537,7 +542,6 @@ public function updateInstanceTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -621,7 +625,6 @@ public function updateInstanceExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -640,12 +643,12 @@ public function updateInstanceExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -720,12 +723,12 @@ public function deleteInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -799,12 +802,12 @@ public function setIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -875,12 +878,12 @@ public function getIamPolicyExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -950,12 +953,12 @@ public function testIamPermissionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-spanner-v1/composer.json b/generated/php/google-cloud-spanner-v1/composer.json index 5877ba813..690ca2e32 100644 --- a/generated/php/google-cloud-spanner-v1/composer.json +++ b/generated/php/google-cloud-spanner-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "spanner/spanner", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-spanner", "description": "Cloud Spanner API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Spanner\\": "src", + "Google\\Cloud\\Spanner\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/Gapic/SpannerGapicClient.php b/generated/php/google-cloud-spanner-v1/src/V1/Gapic/SpannerGapicClient.php similarity index 93% rename from generated/php/google-cloud-spanner-v1/src/Spanner/V1/Gapic/SpannerGapicClient.php rename to generated/php/google-cloud-spanner-v1/src/V1/Gapic/SpannerGapicClient.php index 97a1fb121..347a66422 100644 --- a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/Gapic/SpannerGapicClient.php +++ b/generated/php/google-cloud-spanner-v1/src/V1/Gapic/SpannerGapicClient.php @@ -32,12 +32,13 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Spanner\V1\BeginTransactionRequest; use Google\Cloud\Spanner\V1\CommitRequest; use Google\Cloud\Spanner\V1\CommitResponse; @@ -63,8 +64,6 @@ use Google\Cloud\Spanner\V1\TransactionSelector; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Struct; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Cloud Spanner API. @@ -121,10 +120,12 @@ class SpannerGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/spanner.data', + ]; private static $databaseNameTemplate; private static $sessionNameTemplate; private static $pathTemplateMap; @@ -133,16 +134,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/spanner.data', - ], - 'clientConfigPath' => __DIR__.'/../resources/spanner_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/spanner_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/spanner_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/spanner_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/spanner_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -266,57 +269,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'spanner.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Spanner API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'spanner.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/SpannerClient.php b/generated/php/google-cloud-spanner-v1/src/V1/SpannerClient.php similarity index 95% rename from generated/php/google-cloud-spanner-v1/src/Spanner/V1/SpannerClient.php rename to generated/php/google-cloud-spanner-v1/src/V1/SpannerClient.php index eaafa27ec..a31483189 100644 --- a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/SpannerClient.php +++ b/generated/php/google-cloud-spanner-v1/src/V1/SpannerClient.php @@ -38,5 +38,5 @@ class SpannerClient extends SpannerGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SpannerClientImpl} class. + // additions to the generated {@see SpannerGapicClient} class. } diff --git a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_client_config.json b/generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_client_config.json similarity index 100% rename from generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_client_config.json rename to generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_client_config.json diff --git a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_descriptor_config.php b/generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_descriptor_config.php rename to generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_descriptor_config.php diff --git a/generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_rest_client_config.php b/generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-spanner-v1/src/Spanner/V1/resources/spanner_rest_client_config.php rename to generated/php/google-cloud-spanner-v1/src/V1/resources/spanner_rest_client_config.php diff --git a/generated/php/google-cloud-spanner-v1/tests/unit/Spanner/V1/SpannerClientTest.php b/generated/php/google-cloud-spanner-v1/tests/Unit/V1/SpannerClientTest.php similarity index 96% rename from generated/php/google-cloud-spanner-v1/tests/unit/Spanner/V1/SpannerClientTest.php rename to generated/php/google-cloud-spanner-v1/tests/Unit/V1/SpannerClientTest.php index a505a292b..ddcc4f687 100644 --- a/generated/php/google-cloud-spanner-v1/tests/unit/Spanner/V1/SpannerClientTest.php +++ b/generated/php/google-cloud-spanner-v1/tests/Unit/V1/SpannerClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Spanner\V1; +namespace Google\Cloud\Spanner\Tests\Unit\V1; use Google\Cloud\Spanner\V1\SpannerClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\ServerStream; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -38,7 +39,7 @@ use Google\Cloud\Spanner\V1\TransactionOptions; use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -60,6 +61,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SpannerClient($options); } @@ -108,12 +115,12 @@ public function createSessionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -181,12 +188,12 @@ public function getSessionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -260,12 +267,12 @@ public function listSessionsExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -330,12 +337,12 @@ public function deleteSessionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -405,12 +412,12 @@ public function executeSqlExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -504,12 +511,12 @@ public function executeStreamingSqlExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -594,12 +601,12 @@ public function readExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -703,12 +710,12 @@ public function streamingReadExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -789,12 +796,12 @@ public function beginTransactionExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -865,12 +872,12 @@ public function commitExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -940,12 +947,12 @@ public function rollbackExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1016,12 +1023,12 @@ public function partitionQueryExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -1096,12 +1103,12 @@ public function partitionReadExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-speech-v1/composer.json b/generated/php/google-cloud-speech-v1/composer.json index cfd054a1c..a18c8e133 100644 --- a/generated/php/google-cloud-speech-v1/composer.json +++ b/generated/php/google-cloud-speech-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "speech/speech", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-speech", "description": "Google Cloud Speech API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Speech\\": "src", + "Google\\Cloud\\Speech\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-speech-v1/src/Speech/V1/Gapic/SpeechGapicClient.php b/generated/php/google-cloud-speech-v1/src/V1/Gapic/SpeechGapicClient.php similarity index 74% rename from generated/php/google-cloud-speech-v1/src/Speech/V1/Gapic/SpeechGapicClient.php rename to generated/php/google-cloud-speech-v1/src/V1/Gapic/SpeechGapicClient.php index 37a0168ce..b18af8d20 100644 --- a/generated/php/google-cloud-speech-v1/src/Speech/V1/Gapic/SpeechGapicClient.php +++ b/generated/php/google-cloud-speech-v1/src/V1/Gapic/SpeechGapicClient.php @@ -32,12 +32,14 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Speech\V1\LongRunningRecognizeRequest; use Google\Cloud\Speech\V1\LongRunningRecognizeResponse; use Google\Cloud\Speech\V1\RecognitionAudio; @@ -47,8 +49,6 @@ use Google\Cloud\Speech\V1\StreamingRecognizeRequest; use Google\Cloud\Speech\V1\StreamingRecognizeResponse; use Google\LongRunning\Operation; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that implements Google Cloud Speech API. @@ -106,9 +106,11 @@ class SpeechGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -116,15 +118,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/speech_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/speech_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/speech_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/speech_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/speech_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -169,65 +174,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'speech.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Speech API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'speech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-speech-v1/src/Speech/V1/SpeechClient.php b/generated/php/google-cloud-speech-v1/src/V1/SpeechClient.php similarity index 95% rename from generated/php/google-cloud-speech-v1/src/Speech/V1/SpeechClient.php rename to generated/php/google-cloud-speech-v1/src/V1/SpeechClient.php index eae73bec6..87a89ec06 100644 --- a/generated/php/google-cloud-speech-v1/src/Speech/V1/SpeechClient.php +++ b/generated/php/google-cloud-speech-v1/src/V1/SpeechClient.php @@ -38,5 +38,5 @@ class SpeechClient extends SpeechGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SpeechClientImpl} class. + // additions to the generated {@see SpeechGapicClient} class. } diff --git a/generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_client_config.json b/generated/php/google-cloud-speech-v1/src/V1/resources/speech_client_config.json similarity index 100% rename from generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_client_config.json rename to generated/php/google-cloud-speech-v1/src/V1/resources/speech_client_config.json diff --git a/generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_descriptor_config.php b/generated/php/google-cloud-speech-v1/src/V1/resources/speech_descriptor_config.php similarity index 72% rename from generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_descriptor_config.php rename to generated/php/google-cloud-speech-v1/src/V1/resources/speech_descriptor_config.php index 53ef45c5c..691cfdbcf 100644 --- a/generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_descriptor_config.php +++ b/generated/php/google-cloud-speech-v1/src/V1/resources/speech_descriptor_config.php @@ -7,6 +7,10 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Speech\V1\LongRunningRecognizeResponse', 'metadataReturnType' => '\Google\Cloud\Speech\V1\LongRunningRecognizeMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'StreamingRecognize' => [ diff --git a/generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_rest_client_config.php b/generated/php/google-cloud-speech-v1/src/V1/resources/speech_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-speech-v1/src/Speech/V1/resources/speech_rest_client_config.php rename to generated/php/google-cloud-speech-v1/src/V1/resources/speech_rest_client_config.php diff --git a/generated/php/google-cloud-speech-v1/tests/system/Speech/V1/SpeechSmokeTest.php b/generated/php/google-cloud-speech-v1/tests/System/V1/SpeechSmokeTest.php similarity index 97% rename from generated/php/google-cloud-speech-v1/tests/system/Speech/V1/SpeechSmokeTest.php rename to generated/php/google-cloud-speech-v1/tests/System/V1/SpeechSmokeTest.php index bcb35f215..2ae17f0b4 100644 --- a/generated/php/google-cloud-speech-v1/tests/system/Speech/V1/SpeechSmokeTest.php +++ b/generated/php/google-cloud-speech-v1/tests/System/V1/SpeechSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Speech\V1; +namespace Google\Cloud\Speech\Tests\System\V1; use Google\Cloud\Speech\V1\SpeechClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-speech-v1/tests/unit/Speech/V1/SpeechClientTest.php b/generated/php/google-cloud-speech-v1/tests/Unit/V1/SpeechClientTest.php similarity index 96% rename from generated/php/google-cloud-speech-v1/tests/unit/Speech/V1/SpeechClientTest.php rename to generated/php/google-cloud-speech-v1/tests/Unit/V1/SpeechClientTest.php index 358895742..a564f6c6c 100644 --- a/generated/php/google-cloud-speech-v1/tests/unit/Speech/V1/SpeechClientTest.php +++ b/generated/php/google-cloud-speech-v1/tests/Unit/V1/SpeechClientTest.php @@ -20,11 +20,12 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Speech\V1; +namespace Google\Cloud\Speech\Tests\Unit\V1; use Google\Cloud\Speech\V1\SpeechClient; use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -38,7 +39,7 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -60,6 +61,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SpeechClient($options); } @@ -118,12 +125,12 @@ public function recognizeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -163,7 +170,6 @@ public function longRunningRecognizeTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -247,7 +253,6 @@ public function longRunningRecognizeExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -266,12 +271,12 @@ public function longRunningRecognizeExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -383,12 +388,12 @@ public function streamingRecognizeExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-speech-v1beta1/composer.json b/generated/php/google-cloud-speech-v1beta1/composer.json index cfd054a1c..a18c8e133 100644 --- a/generated/php/google-cloud-speech-v1beta1/composer.json +++ b/generated/php/google-cloud-speech-v1beta1/composer.json @@ -1,30 +1,21 @@ { - "name": "speech/speech", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-speech", "description": "Google Cloud Speech API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Speech\\": "src", + "Google\\Cloud\\Speech\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/Gapic/SpeechGapicClient.php b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/Gapic/SpeechGapicClient.php similarity index 73% rename from generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/Gapic/SpeechGapicClient.php rename to generated/php/google-cloud-speech-v1beta1/src/V1beta1/Gapic/SpeechGapicClient.php index b7c1b7be2..d3ac1183c 100644 --- a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/Gapic/SpeechGapicClient.php +++ b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/Gapic/SpeechGapicClient.php @@ -32,12 +32,14 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Speech\V1beta1\AsyncRecognizeRequest; use Google\Cloud\Speech\V1beta1\AsyncRecognizeResponse; use Google\Cloud\Speech\V1beta1\RecognitionAudio; @@ -47,8 +49,6 @@ use Google\Cloud\Speech\V1beta1\SyncRecognizeRequest; use Google\Cloud\Speech\V1beta1\SyncRecognizeResponse; use Google\LongRunning\Operation; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that implements Google Cloud Speech API. @@ -104,9 +104,11 @@ class SpeechGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -114,15 +116,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/speech_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/speech_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/speech_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/speech_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/speech_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -167,65 +172,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'speech.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Speech API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'speech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/SpeechClient.php b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/SpeechClient.php similarity index 95% rename from generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/SpeechClient.php rename to generated/php/google-cloud-speech-v1beta1/src/V1beta1/SpeechClient.php index bb86ed50d..9efa4aaef 100644 --- a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/SpeechClient.php +++ b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/SpeechClient.php @@ -38,5 +38,5 @@ class SpeechClient extends SpeechGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see SpeechClientImpl} class. + // additions to the generated {@see SpeechGapicClient} class. } diff --git a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_client_config.json b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_client_config.json similarity index 100% rename from generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_client_config.json rename to generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_client_config.json diff --git a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_descriptor_config.php b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_descriptor_config.php similarity index 72% rename from generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_descriptor_config.php rename to generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_descriptor_config.php index 5a63cd7f2..752846cfe 100644 --- a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_descriptor_config.php +++ b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_descriptor_config.php @@ -7,6 +7,10 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Speech\V1beta1\AsyncRecognizeResponse', 'metadataReturnType' => '\Google\Cloud\Speech\V1beta1\AsyncRecognizeMetadata', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], 'StreamingRecognize' => [ diff --git a/generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_rest_client_config.php b/generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-speech-v1beta1/src/Speech/V1beta1/resources/speech_rest_client_config.php rename to generated/php/google-cloud-speech-v1beta1/src/V1beta1/resources/speech_rest_client_config.php diff --git a/generated/php/google-cloud-speech-v1beta1/tests/system/Speech/V1beta1/SpeechSmokeTest.php b/generated/php/google-cloud-speech-v1beta1/tests/System/V1beta1/SpeechSmokeTest.php similarity index 96% rename from generated/php/google-cloud-speech-v1beta1/tests/system/Speech/V1beta1/SpeechSmokeTest.php rename to generated/php/google-cloud-speech-v1beta1/tests/System/V1beta1/SpeechSmokeTest.php index c4868c7e9..82eab0edc 100644 --- a/generated/php/google-cloud-speech-v1beta1/tests/system/Speech/V1beta1/SpeechSmokeTest.php +++ b/generated/php/google-cloud-speech-v1beta1/tests/System/V1beta1/SpeechSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Speech\V1beta1; +namespace Google\Cloud\Speech\Tests\System\V1beta1; use Google\Cloud\Speech\V1beta1\SpeechClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-speech-v1beta1/tests/unit/Speech/V1beta1/SpeechClientTest.php b/generated/php/google-cloud-speech-v1beta1/tests/Unit/V1beta1/SpeechClientTest.php similarity index 96% rename from generated/php/google-cloud-speech-v1beta1/tests/unit/Speech/V1beta1/SpeechClientTest.php rename to generated/php/google-cloud-speech-v1beta1/tests/Unit/V1beta1/SpeechClientTest.php index d5cc31d4e..10a2c8539 100644 --- a/generated/php/google-cloud-speech-v1beta1/tests/unit/Speech/V1beta1/SpeechClientTest.php +++ b/generated/php/google-cloud-speech-v1beta1/tests/Unit/V1beta1/SpeechClientTest.php @@ -20,11 +20,12 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Speech\V1beta1; +namespace Google\Cloud\Speech\Tests\Unit\V1beta1; use Google\Cloud\Speech\V1beta1\SpeechClient; use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -38,7 +39,7 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -60,6 +61,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new SpeechClient($options); } @@ -116,12 +123,12 @@ public function syncRecognizeExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -159,7 +166,6 @@ public function asyncRecognizeTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -241,7 +247,6 @@ public function asyncRecognizeExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -260,12 +265,12 @@ public function asyncRecognizeExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -381,12 +386,12 @@ public function streamingRecognizeExceptionTest() $client = $this->createClient(['transport' => $transport]); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-trace-v1/composer.json b/generated/php/google-cloud-trace-v1/composer.json deleted file mode 100644 index 8a9441f46..000000000 --- a/generated/php/google-cloud-trace-v1/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "trace/trace", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "Stackdriver Trace API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/generated/php/google-cloud-trace-v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php b/generated/php/google-cloud-trace-v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php deleted file mode 100644 index b1950af76..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php +++ /dev/null @@ -1,93 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0ac20f0a29676f6f676c652f646576746f6f6c732f636c6f756474726163" . - "652f76312f74726163652e70726f746f121d676f6f676c652e646576746f" . - "6f6c732e636c6f756474726163652e76311a1b676f6f676c652f70726f74" . - "6f6275662f656d7074792e70726f746f1a1f676f6f676c652f70726f746f" . - "6275662f74696d657374616d702e70726f746f22660a0554726163651212" . - "0a0a70726f6a6563745f696418012001280912100a0874726163655f6964" . - "18022001280912370a057370616e7318032003280b32282e676f6f676c65" . - "2e646576746f6f6c732e636c6f756474726163652e76312e547261636553" . - "70616e223e0a0654726163657312340a0674726163657318012003280b32" . - "242e676f6f676c652e646576746f6f6c732e636c6f756474726163652e76" . - "312e5472616365229d030a0954726163655370616e120f0a077370616e5f" . - "6964180120012806123f0a046b696e6418022001280e32312e676f6f676c" . - "652e646576746f6f6c732e636c6f756474726163652e76312e5472616365" . - "5370616e2e5370616e4b696e64120c0a046e616d65180320012809122e0a" . - "0a73746172745f74696d6518042001280b321a2e676f6f676c652e70726f" . - "746f6275662e54696d657374616d70122c0a08656e645f74696d65180520" . - "01280b321a2e676f6f676c652e70726f746f6275662e54696d657374616d" . - "7012160a0e706172656e745f7370616e5f696418062001280612440a066c" . - "6162656c7318072003280b32342e676f6f676c652e646576746f6f6c732e" . - "636c6f756474726163652e76312e54726163655370616e2e4c6162656c73" . - "456e7472791a2d0a0b4c6162656c73456e747279120b0a036b6579180120" . - "012809120d0a0576616c75651802200128093a02380122450a085370616e" . - "4b696e6412190a155350414e5f4b494e445f554e53504543494649454410" . - "00120e0a0a5250435f5345525645521001120e0a0a5250435f434c49454e" . - "54100222e7020a114c6973745472616365735265717565737412120a0a70" . - "726f6a6563745f696418012001280912470a047669657718022001280e32" . - "392e676f6f676c652e646576746f6f6c732e636c6f756474726163652e76" . - "312e4c697374547261636573526571756573742e56696577547970651211" . - "0a09706167655f73697a6518032001280512120a0a706167655f746f6b65" . - "6e180420012809122e0a0a73746172745f74696d6518052001280b321a2e" . - "676f6f676c652e70726f746f6275662e54696d657374616d70122c0a0865" . - "6e645f74696d6518062001280b321a2e676f6f676c652e70726f746f6275" . - "662e54696d657374616d70120e0a0666696c74657218072001280912100a" . - "086f726465725f6279180820012809224e0a08566965775479706512190a" . - "15564945575f545950455f554e5350454349464945441000120b0a074d49" . - "4e494d414c1001120c0a08524f4f545350414e1002120c0a08434f4d504c" . - "455445100322630a124c697374547261636573526573706f6e736512340a" . - "0674726163657318012003280b32242e676f6f676c652e646576746f6f6c" . - "732e636c6f756474726163652e76312e547261636512170a0f6e6578745f" . - "706167655f746f6b656e18022001280922370a0f47657454726163655265" . - "717565737412120a0a70726f6a6563745f696418012001280912100a0874" . - "726163655f6964180220012809225f0a1250617463685472616365735265" . - "717565737412120a0a70726f6a6563745f696418012001280912350a0674" . - "726163657318022001280b32252e676f6f676c652e646576746f6f6c732e" . - "636c6f756474726163652e76312e54726163657332d1030a0c5472616365" . - "53657276696365129b010a0a4c69737454726163657312302e676f6f676c" . - "652e646576746f6f6c732e636c6f756474726163652e76312e4c69737454" . - "7261636573526571756573741a312e676f6f676c652e646576746f6f6c73" . - "2e636c6f756474726163652e76312e4c697374547261636573526573706f" . - "6e7365222882d3e493022212202f76312f70726f6a656374732f7b70726f" . - "6a6563745f69647d2f7472616365731295010a084765745472616365122e" . - "2e676f6f676c652e646576746f6f6c732e636c6f756474726163652e7631" . - "2e4765745472616365526571756573741a242e676f6f676c652e64657674" . - "6f6f6c732e636c6f756474726163652e76312e5472616365223382d3e493" . - "022d122b2f76312f70726f6a656374732f7b70726f6a6563745f69647d2f" . - "7472616365732f7b74726163655f69647d128a010a0b5061746368547261" . - "63657312312e676f6f676c652e646576746f6f6c732e636c6f7564747261" . - "63652e76312e5061746368547261636573526571756573741a162e676f6f" . - "676c652e70726f746f6275662e456d707479223082d3e493022a32202f76" . - "312f70726f6a656374732f7b70726f6a6563745f69647d2f747261636573" . - "3a0674726163657342aa010a21636f6d2e676f6f676c652e646576746f6f" . - "6c732e636c6f756474726163652e7631420a547261636550726f746f5001" . - "5a47676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f67" . - "6f6f676c65617069732f646576746f6f6c732f636c6f756474726163652f" . - "76313b636c6f75647472616365aa0215476f6f676c652e436c6f75642e54" . - "726163652e5631ca0215476f6f676c655c436c6f75645c54726163655c56" . - "31620670726f746f33" - )); - - static::$is_initialized = true; - } -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php deleted file mode 100644 index 14cb6021d..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.devtools.cloudtrace.v1.GetTraceRequest - */ -class GetTraceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - */ - private $project_id = ''; - /** - * ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2; - */ - private $trace_id = ''; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php deleted file mode 100644 index 48492a4a0..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php +++ /dev/null @@ -1,408 +0,0 @@ -google.devtools.cloudtrace.v1.ListTracesRequest - */ -class ListTracesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - */ - private $project_id = ''; - /** - * Type of data returned for traces in the list. Optional. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2; - */ - private $view = 0; - /** - * Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. Optional. - * - * Generated from protobuf field int32 page_size = 3; - */ - private $page_size = 0; - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. Optional. - * - * Generated from protobuf field string page_token = 4; - */ - private $page_token = ''; - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - */ - private $start_time = null; - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - private $end_time = null; - /** - * An optional filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7; - */ - private $filter = ''; - /** - * Field used to sort the returned traces. Optional. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8; - */ - private $order_by = ''; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Type of data returned for traces in the list. Optional. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Type of data returned for traces in the list. Optional. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\ListTracesRequest_ViewType::class); - $this->view = $var; - - return $this; - } - - /** - * Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. Optional. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. Optional. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. Optional. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. Optional. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @return \Google\Protobuf\Timestamp - */ - public function getStartTime() - { - return $this->start_time; - } - - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @return \Google\Protobuf\Timestamp - */ - public function getEndTime() - { - return $this->end_time; - } - - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * An optional filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An optional filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field used to sort the returned traces. Optional. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field used to sort the returned traces. Optional. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest_ViewType.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest_ViewType.php deleted file mode 100644 index 2fef22e90..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest_ViewType.php +++ /dev/null @@ -1,43 +0,0 @@ -Google\Devtools\Cloudtrace\V1\ListTracesRequest\ViewType - */ -class ListTracesRequest_ViewType -{ - /** - * Default is `MINIMAL` if unspecified. - * - * Generated from protobuf enum VIEW_TYPE_UNSPECIFIED = 0; - */ - const VIEW_TYPE_UNSPECIFIED = 0; - /** - * Minimal view of the trace record that contains only the project - * and trace IDs. - * - * Generated from protobuf enum MINIMAL = 1; - */ - const MINIMAL = 1; - /** - * Root span view of the trace record that returns the root spans along - * with the minimal trace data. - * - * Generated from protobuf enum ROOTSPAN = 2; - */ - const ROOTSPAN = 2; - /** - * Complete view of the trace record that contains the actual trace data. - * This is equivalent to calling the REST `get` or RPC `GetTrace` method - * using the ID of each listed trace. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php deleted file mode 100644 index eff9cdaf7..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php +++ /dev/null @@ -1,95 +0,0 @@ -google.devtools.cloudtrace.v1.ListTracesResponse - */ -class ListTracesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of trace records returned. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - */ - private $traces; - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * List of trace records returned. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTraces() - { - return $this->traces; - } - - /** - * List of trace records returned. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @param \Google\Cloud\Trace\V1\Trace[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php deleted file mode 100644 index d87e92b6e..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.devtools.cloudtrace.v1.PatchTracesRequest - */ -class PatchTracesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - */ - private $project_id = ''; - /** - * The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2; - */ - private $traces = null; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2; - * @return \Google\Cloud\Trace\V1\Traces - */ - public function getTraces() - { - return $this->traces; - } - - /** - * The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2; - * @param \Google\Cloud\Trace\V1\Traces $var - * @return $this - */ - public function setTraces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V1\Traces::class); - $this->traces = $var; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Trace.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Trace.php deleted file mode 100644 index e4ccddff6..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Trace.php +++ /dev/null @@ -1,126 +0,0 @@ -google.devtools.cloudtrace.v1.Trace - */ -class Trace extends \Google\Protobuf\Internal\Message -{ - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - */ - private $project_id = ''; - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. - * - * Generated from protobuf field string trace_id = 2; - */ - private $trace_id = ''; - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - */ - private $spans; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. - * - * Generated from protobuf field string trace_id = 2; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. - * - * Generated from protobuf field string trace_id = 2; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpans() - { - return $this->spans; - } - - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - * @param \Google\Cloud\Trace\V1\TraceSpan[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\TraceSpan::class); - $this->spans = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceServiceGrpcClient.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceServiceGrpcClient.php deleted file mode 100644 index 961676b89..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceServiceGrpcClient.php +++ /dev/null @@ -1,85 +0,0 @@ -_simpleRequest('/google.devtools.cloudtrace.v1.TraceService/ListTraces', - $argument, - ['\Google\Cloud\Trace\V1\ListTracesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a single trace by its ID. - * @param \Google\Cloud\Trace\V1\GetTraceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function GetTrace(\Google\Cloud\Trace\V1\GetTraceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.cloudtrace.v1.TraceService/GetTrace', - $argument, - ['\Google\Cloud\Trace\V1\Trace', 'decode'], - $metadata, $options); - } - - /** - * Sends new traces to Stackdriver Trace or updates existing traces. If the ID - * of a trace that you send matches that of an existing trace, any fields - * in the existing trace and its spans are overwritten by the provided values, - * and any new fields provided are merged with the existing trace data. If the - * ID does not match, a new trace is created. - * @param \Google\Cloud\Trace\V1\PatchTracesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - */ - public function PatchTraces(\Google\Cloud\Trace\V1\PatchTracesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.cloudtrace.v1.TraceService/PatchTraces', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php deleted file mode 100644 index 4f97e7ab9..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php +++ /dev/null @@ -1,364 +0,0 @@ -google.devtools.cloudtrace.v1.TraceSpan - */ -class TraceSpan extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. - * - * Generated from protobuf field fixed64 span_id = 1; - */ - private $span_id = 0; - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - */ - private $kind = 0; - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * {% dynamic print site_values.console_name %}. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - */ - private $name = ''; - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - private $start_time = null; - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - private $end_time = null; - /** - * ID of the parent span, if any. Optional. - * - * Generated from protobuf field fixed64 parent_span_id = 6; - */ - private $parent_span_id = 0; - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. - * - * Generated from protobuf field fixed64 span_id = 1; - * @return int|string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. - * - * Generated from protobuf field fixed64 span_id = 1; - * @param int|string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkUint64($var); - $this->span_id = $var; - - return $this; - } - - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\TraceSpan_SpanKind::class); - $this->kind = $var; - - return $this; - } - - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * {% dynamic print site_values.console_name %}. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * {% dynamic print site_values.console_name %}. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp - */ - public function getStartTime() - { - return $this->start_time; - } - - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @return \Google\Protobuf\Timestamp - */ - public function getEndTime() - { - return $this->end_time; - } - - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * ID of the parent span, if any. Optional. - * - * Generated from protobuf field fixed64 parent_span_id = 6; - * @return int|string - */ - public function getParentSpanId() - { - return $this->parent_span_id; - } - - /** - * ID of the parent span, if any. Optional. - * - * Generated from protobuf field fixed64 parent_span_id = 6; - * @param int|string $var - * @return $this - */ - public function setParentSpanId($var) - { - GPBUtil::checkUint64($var); - $this->parent_span_id = $var; - - return $this; - } - - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan_SpanKind.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan_SpanKind.php deleted file mode 100644 index 391a429b1..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/TraceSpan_SpanKind.php +++ /dev/null @@ -1,36 +0,0 @@ -Google\Devtools\Cloudtrace\V1\TraceSpan\SpanKind - */ -class TraceSpan_SpanKind -{ - /** - * Unspecified. - * - * Generated from protobuf enum SPAN_KIND_UNSPECIFIED = 0; - */ - const SPAN_KIND_UNSPECIFIED = 0; - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote network request. - * - * Generated from protobuf enum RPC_SERVER = 1; - */ - const RPC_SERVER = 1; - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - * - * Generated from protobuf enum RPC_CLIENT = 2; - */ - const RPC_CLIENT = 2; -} - diff --git a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Traces.php b/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Traces.php deleted file mode 100644 index 658d10807..000000000 --- a/generated/php/google-cloud-trace-v1/proto/src/Google/Cloud/Trace/V1/Traces.php +++ /dev/null @@ -1,57 +0,0 @@ -google.devtools.cloudtrace.v1.Traces - */ -class Traces extends \Google\Protobuf\Internal\Message -{ - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - */ - private $traces; - - public function __construct() { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct(); - } - - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTraces() - { - return $this->traces; - } - - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @param \Google\Cloud\Trace\V1\Trace[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - -} - diff --git a/generated/php/google-cloud-trace-v1/src/Trace/V1/Gapic/TraceServiceGapicClient.php b/generated/php/google-cloud-trace-v1/src/Trace/V1/Gapic/TraceServiceGapicClient.php deleted file mode 100644 index e0823b46f..000000000 --- a/generated/php/google-cloud-trace-v1/src/Trace/V1/Gapic/TraceServiceGapicClient.php +++ /dev/null @@ -1,416 +0,0 @@ -patchTraces($projectId, $traces); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @experimental - */ -class TraceServiceGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.devtools.cloudtrace.v1.TraceService'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'cloudtrace.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The code generator version, to be included in the agent header. - */ - const CODEGEN_VERSION = '0.0.5'; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/trace.append', - 'https://www.googleapis.com/auth/trace.readonly', - ], - 'clientConfigPath' => __DIR__.'/../resources/trace_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/trace_service_rest_client_config.php', - 'descriptorsConfigPath' => __DIR__.'/../resources/trace_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'cloudtrace.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Trace API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. - * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. - * } - * @experimental - */ - public function __construct($options = []) - { - $this->setClientOptions($options + self::getClientDefaults()); - } - - /** - * Sends new traces to Stackdriver Trace or updates existing traces. If the ID - * of a trace that you send matches that of an existing trace, any fields - * in the existing trace and its spans are overwritten by the provided values, - * and any new fields provided are merged with the existing trace data. If the - * ID does not match, a new trace is created. - * - * Sample code: - * ``` - * $traceServiceClient = new TraceServiceClient(); - * try { - * $projectId = ''; - * $traces = new Traces(); - * $traceServiceClient->patchTraces($projectId, $traces); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @param string $projectId ID of the Cloud project where the trace data is stored. - * @param Traces $traces The body of the message. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function patchTraces($projectId, $traces, $optionalArgs = []) - { - $request = new PatchTracesRequest(); - $request->setProjectId($projectId); - $request->setTraces($traces); - - return $this->startCall( - 'PatchTraces', - GPBEmpty::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Gets a single trace by its ID. - * - * Sample code: - * ``` - * $traceServiceClient = new TraceServiceClient(); - * try { - * $projectId = ''; - * $traceId = ''; - * $response = $traceServiceClient->getTrace($projectId, $traceId); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @param string $projectId ID of the Cloud project where the trace data is stored. - * @param string $traceId ID of the trace to return. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Trace\V1\Trace - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function getTrace($projectId, $traceId, $optionalArgs = []) - { - $request = new GetTraceRequest(); - $request->setProjectId($projectId); - $request->setTraceId($traceId); - - return $this->startCall( - 'GetTrace', - Trace::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Returns of a list of traces that match the specified filter conditions. - * - * Sample code: - * ``` - * $traceServiceClient = new TraceServiceClient(); - * try { - * $projectId = ''; - * // Iterate through all elements - * $pagedResponse = $traceServiceClient->listTraces($projectId); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements - * $pagedResponse = $traceServiceClient->listTraces($projectId); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @param string $projectId ID of the Cloud project where the trace data is stored. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Type of data returned for traces in the list. Optional. Default is - * `MINIMAL`. - * For allowed values, use constants defined on {@see \Google\Cloud\Trace\V1\ListTracesRequest_ViewType} - * @type int $pageSize - * Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. Optional. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type Timestamp $startTime - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * @type Timestamp $endTime - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * @type string $filter - * An optional filter against labels for the request. - * - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * @type string $orderBy - * Field used to sort the returned traces. Optional. - * Can be one of the following: - * - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * - * Only one sort field is permitted. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * @experimental - */ - public function listTraces($projectId, $optionalArgs = []) - { - $request = new ListTracesRequest(); - $request->setProjectId($projectId); - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - if (isset($optionalArgs['startTime'])) { - $request->setStartTime($optionalArgs['startTime']); - } - if (isset($optionalArgs['endTime'])) { - $request->setEndTime($optionalArgs['endTime']); - } - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - return $this->getPagedListResponse( - 'ListTraces', - $optionalArgs, - ListTracesResponse::class, - $request - ); - } -} diff --git a/generated/php/google-cloud-trace-v1/src/Trace/V1/TraceServiceClient.php b/generated/php/google-cloud-trace-v1/src/Trace/V1/TraceServiceClient.php deleted file mode 100644 index 40e240c2e..000000000 --- a/generated/php/google-cloud-trace-v1/src/Trace/V1/TraceServiceClient.php +++ /dev/null @@ -1,42 +0,0 @@ - [ - 'google.devtools.cloudtrace.v1.TraceService' => [ - 'ListTraces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTraces', - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-trace-v1/src/Trace/V1/resources/trace_service_rest_client_config.php b/generated/php/google-cloud-trace-v1/src/Trace/V1/resources/trace_service_rest_client_config.php deleted file mode 100644 index e7a9f8d12..000000000 --- a/generated/php/google-cloud-trace-v1/src/Trace/V1/resources/trace_service_rest_client_config.php +++ /dev/null @@ -1,47 +0,0 @@ - [ - 'google.devtools.cloudtrace.v1.TraceService' => [ - 'PatchTraces' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project_id}/traces', - 'body' => 'traces', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - 'GetTrace' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/traces/{trace_id}', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'trace_id' => [ - 'getters' => [ - 'getTraceId', - ], - ], - ], - ], - 'ListTraces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/traces', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - ], - ], -]; diff --git a/generated/php/google-cloud-trace-v1/tests/system/Trace/V1/TraceServiceSmokeTest.php b/generated/php/google-cloud-trace-v1/tests/system/Trace/V1/TraceServiceSmokeTest.php deleted file mode 100644 index 7704e0cdf..000000000 --- a/generated/php/google-cloud-trace-v1/tests/system/Trace/V1/TraceServiceSmokeTest.php +++ /dev/null @@ -1,48 +0,0 @@ -fail('Environment variable PROJECT_ID must be set for smoke test'); - } - - $traceServiceClient = new TraceServiceClient(); - $projectId2 = $projectId; - $traceServiceClient->listTraces($projectId2); - } -} diff --git a/generated/php/google-cloud-trace-v1/tests/unit/Trace/V1/TraceServiceClientTest.php b/generated/php/google-cloud-trace-v1/tests/unit/Trace/V1/TraceServiceClientTest.php deleted file mode 100644 index 57e328523..000000000 --- a/generated/php/google-cloud-trace-v1/tests/unit/Trace/V1/TraceServiceClientTest.php +++ /dev/null @@ -1,292 +0,0 @@ -createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - - // Mock request - $projectId = 'projectId-1969970175'; - $traces = new Traces(); - - $client->patchTraces($projectId, $traces); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/PatchTraces', $actualFuncCall); - - $actualValue = $actualRequestObject->getProjectId(); - - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTraces(); - - $this->assertProtobufEquals($traces, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function patchTracesExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $projectId = 'projectId-1969970175'; - $traces = new Traces(); - - try { - $client->patchTraces($projectId, $traces); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getTraceTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $projectId2 = 'projectId2939242356'; - $traceId2 = 'traceId2987826376'; - $expectedResponse = new Trace(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setTraceId($traceId2); - $transport->addResponse($expectedResponse); - - // Mock request - $projectId = 'projectId-1969970175'; - $traceId = 'traceId1270300245'; - - $response = $client->getTrace($projectId, $traceId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/GetTrace', $actualFuncCall); - - $actualValue = $actualRequestObject->getProjectId(); - - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTraceId(); - - $this->assertProtobufEquals($traceId, $actualValue); - - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getTraceExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $projectId = 'projectId-1969970175'; - $traceId = 'traceId1270300245'; - - try { - $client->getTrace($projectId, $traceId); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listTracesTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - // Mock response - $nextPageToken = ''; - $tracesElement = new Trace(); - $traces = [$tracesElement]; - $expectedResponse = new ListTracesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTraces($traces); - $transport->addResponse($expectedResponse); - - // Mock request - $projectId = 'projectId-1969970175'; - - $response = $client->listTraces($projectId); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTraces()[0], $resources[0]); - - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/ListTraces', $actualFuncCall); - - $actualValue = $actualRequestObject->getProjectId(); - - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listTracesExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - - $this->assertTrue($transport->isExhausted()); - - $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; - $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - - // Mock request - $projectId = 'projectId-1969970175'; - - try { - $client->listTraces($projectId); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/generated/php/google-cloud-trace-v2/composer.json b/generated/php/google-cloud-trace-v2/composer.json index 8a9441f46..8a79a42c1 100644 --- a/generated/php/google-cloud-trace-v2/composer.json +++ b/generated/php/google-cloud-trace-v2/composer.json @@ -1,30 +1,21 @@ { - "name": "trace/trace", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-trace", "description": "Stackdriver Trace API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Trace\\": "src", + "Google\\Cloud\\Trace\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-trace-v2/src/Trace/V2/Gapic/TraceServiceGapicClient.php b/generated/php/google-cloud-trace-v2/src/V2/Gapic/TraceServiceGapicClient.php similarity index 78% rename from generated/php/google-cloud-trace-v2/src/Trace/V2/Gapic/TraceServiceGapicClient.php rename to generated/php/google-cloud-trace-v2/src/V2/Gapic/TraceServiceGapicClient.php index c67bf0d58..b72144c92 100644 --- a/generated/php/google-cloud-trace-v2/src/Trace/V2/Gapic/TraceServiceGapicClient.php +++ b/generated/php/google-cloud-trace-v2/src/V2/Gapic/TraceServiceGapicClient.php @@ -31,13 +31,13 @@ namespace Google\Cloud\Trace\V2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; -use Google\Auth\CredentialsLoader; use Google\Cloud\Trace\V2\BatchWriteSpansRequest; use Google\Cloud\Trace\V2\Span; use Google\Cloud\Trace\V2\Span_Attributes; @@ -50,8 +50,6 @@ use Google\Protobuf\Int32Value; use Google\Protobuf\Timestamp; use Google\Rpc\Status; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: This file describes an API for collecting and viewing traces and spans @@ -110,10 +108,12 @@ class TraceServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; - + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/trace.append', + ]; private static $projectNameTemplate; private static $spanNameTemplate; private static $pathTemplateMap; @@ -122,16 +122,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/trace.append', - ], - 'clientConfigPath' => __DIR__.'/../resources/trace_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/trace_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/trace_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/trace_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/trace_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -249,57 +251,56 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'cloudtrace.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Stackdriver Trace API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtrace.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-trace-v2/src/Trace/V2/TraceServiceClient.php b/generated/php/google-cloud-trace-v2/src/V2/TraceServiceClient.php similarity index 94% rename from generated/php/google-cloud-trace-v2/src/Trace/V2/TraceServiceClient.php rename to generated/php/google-cloud-trace-v2/src/V2/TraceServiceClient.php index 63232e4eb..ffb01061e 100644 --- a/generated/php/google-cloud-trace-v2/src/Trace/V2/TraceServiceClient.php +++ b/generated/php/google-cloud-trace-v2/src/V2/TraceServiceClient.php @@ -38,5 +38,5 @@ class TraceServiceClient extends TraceServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see TraceServiceClientImpl} class. + // additions to the generated {@see TraceServiceGapicClient} class. } diff --git a/generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_client_config.json b/generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_client_config.json similarity index 100% rename from generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_client_config.json rename to generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_client_config.json diff --git a/generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_descriptor_config.php b/generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_descriptor_config.php rename to generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_descriptor_config.php diff --git a/generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_rest_client_config.php b/generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-trace-v2/src/Trace/V2/resources/trace_service_rest_client_config.php rename to generated/php/google-cloud-trace-v2/src/V2/resources/trace_service_rest_client_config.php diff --git a/generated/php/google-cloud-trace-v2/tests/system/Trace/V2/TraceServiceSmokeTest.php b/generated/php/google-cloud-trace-v2/tests/System/V2/TraceServiceSmokeTest.php similarity index 96% rename from generated/php/google-cloud-trace-v2/tests/system/Trace/V2/TraceServiceSmokeTest.php rename to generated/php/google-cloud-trace-v2/tests/System/V2/TraceServiceSmokeTest.php index a2dd4e68c..31eb882bc 100644 --- a/generated/php/google-cloud-trace-v2/tests/system/Trace/V2/TraceServiceSmokeTest.php +++ b/generated/php/google-cloud-trace-v2/tests/System/V2/TraceServiceSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Trace\V2; +namespace Google\Cloud\Trace\Tests\System\V2; use Google\Cloud\Trace\V2\TraceServiceClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-trace-v2/tests/unit/Trace/V2/TraceServiceClientTest.php b/generated/php/google-cloud-trace-v2/tests/Unit/V2/TraceServiceClientTest.php similarity index 94% rename from generated/php/google-cloud-trace-v2/tests/unit/Trace/V2/TraceServiceClientTest.php rename to generated/php/google-cloud-trace-v2/tests/Unit/V2/TraceServiceClientTest.php index fe5ca3a8a..f666035ce 100644 --- a/generated/php/google-cloud-trace-v2/tests/unit/Trace/V2/TraceServiceClientTest.php +++ b/generated/php/google-cloud-trace-v2/tests/Unit/V2/TraceServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Trace\V2; +namespace Google\Cloud\Trace\Tests\Unit\V2; use Google\Cloud\Trace\V2\TraceServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Trace\V2\Span; @@ -31,7 +32,7 @@ use Google\Protobuf\Any; use Google\Protobuf\GPBEmpty; use Google\Protobuf\Timestamp; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -53,6 +54,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new TraceServiceClient($options); } @@ -102,12 +109,12 @@ public function batchWriteSpansExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); @@ -196,12 +203,12 @@ public function createSpanExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-video-intelligence-v1/composer.json b/generated/php/google-cloud-video-intelligence-v1/composer.json index b85391182..3fe2add3c 100644 --- a/generated/php/google-cloud-video-intelligence-v1/composer.json +++ b/generated/php/google-cloud-video-intelligence-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "videointelligence/videointelligence", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-videointelligence", "description": "Cloud Video Intelligence API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\VideoIntelligence\\": "src", + "Google\\Cloud\\VideoIntelligence\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/Gapic/VideoIntelligenceServiceGapicClient.php b/generated/php/google-cloud-video-intelligence-v1/src/V1/Gapic/VideoIntelligenceServiceGapicClient.php similarity index 72% rename from generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/Gapic/VideoIntelligenceServiceGapicClient.php rename to generated/php/google-cloud-video-intelligence-v1/src/V1/Gapic/VideoIntelligenceServiceGapicClient.php index 9dd2dcede..80e2653b3 100644 --- a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/Gapic/VideoIntelligenceServiceGapicClient.php +++ b/generated/php/google-cloud-video-intelligence-v1/src/V1/Gapic/VideoIntelligenceServiceGapicClient.php @@ -31,21 +31,20 @@ namespace Google\Cloud\VideoIntelligence\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\VideoIntelligence\V1\AnnotateVideoProgress; use Google\Cloud\VideoIntelligence\V1\AnnotateVideoRequest; use Google\Cloud\VideoIntelligence\V1\AnnotateVideoResponse; use Google\Cloud\VideoIntelligence\V1\Feature; use Google\Cloud\VideoIntelligence\V1\VideoContext; use Google\LongRunning\Operation; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that implements Google Cloud Video Intelligence API. @@ -121,9 +120,11 @@ class VideoIntelligenceServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -131,15 +132,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/video_intelligence_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/video_intelligence_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/video_intelligence_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -184,65 +188,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'videointelligence.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Cloud Video Intelligence API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videointelligence.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/VideoIntelligenceServiceClient.php b/generated/php/google-cloud-video-intelligence-v1/src/V1/VideoIntelligenceServiceClient.php similarity index 98% rename from generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/VideoIntelligenceServiceClient.php rename to generated/php/google-cloud-video-intelligence-v1/src/V1/VideoIntelligenceServiceClient.php index b37ba3642..a933b63ff 100644 --- a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/VideoIntelligenceServiceClient.php +++ b/generated/php/google-cloud-video-intelligence-v1/src/V1/VideoIntelligenceServiceClient.php @@ -38,5 +38,5 @@ class VideoIntelligenceServiceClient extends VideoIntelligenceServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see VideoIntelligenceServiceClientImpl} class. + // additions to the generated {@see VideoIntelligenceServiceGapicClient} class. } diff --git a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_client_config.json b/generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_client_config.json similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_client_config.json rename to generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_client_config.json diff --git a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_descriptor_config.php b/generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_descriptor_config.php similarity index 66% rename from generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_descriptor_config.php rename to generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_descriptor_config.php index c8994bd14..55b87b873 100644 --- a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_descriptor_config.php +++ b/generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_descriptor_config.php @@ -7,6 +7,10 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoResponse', 'metadataReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoProgress', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], ], diff --git a/generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_rest_client_config.php b/generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1/src/VideoIntelligence/V1/resources/video_intelligence_service_rest_client_config.php rename to generated/php/google-cloud-video-intelligence-v1/src/V1/resources/video_intelligence_service_rest_client_config.php diff --git a/generated/php/google-cloud-video-intelligence-v1/tests/system/VideoIntelligence/V1/VideoIntelligenceServiceSmokeTest.php b/generated/php/google-cloud-video-intelligence-v1/tests/System/V1/VideoIntelligenceServiceSmokeTest.php similarity index 93% rename from generated/php/google-cloud-video-intelligence-v1/tests/system/VideoIntelligence/V1/VideoIntelligenceServiceSmokeTest.php rename to generated/php/google-cloud-video-intelligence-v1/tests/System/V1/VideoIntelligenceServiceSmokeTest.php index 3c20cf1c4..e82e9fa79 100644 --- a/generated/php/google-cloud-video-intelligence-v1/tests/system/VideoIntelligence/V1/VideoIntelligenceServiceSmokeTest.php +++ b/generated/php/google-cloud-video-intelligence-v1/tests/System/V1/VideoIntelligenceServiceSmokeTest.php @@ -20,14 +20,14 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\VideoIntelligence\V1; +namespace Google\Cloud\VideoIntelligence\Tests\System\V1; use Google\Cloud\VideoIntelligence\V1\VideoIntelligenceServiceClient; use Google\ApiCore\Testing\GeneratedTest; use Google\Cloud\VideoIntelligence\V1\Feature; /** - * @group video_intelligence + * @group video-intelligence * @group grpc */ class VideoIntelligenceServiceSmokeTest extends GeneratedTest diff --git a/generated/php/google-cloud-video-intelligence-v1/tests/unit/VideoIntelligence/V1/VideoIntelligenceServiceClientTest.php b/generated/php/google-cloud-video-intelligence-v1/tests/Unit/V1/VideoIntelligenceServiceClientTest.php similarity index 94% rename from generated/php/google-cloud-video-intelligence-v1/tests/unit/VideoIntelligence/V1/VideoIntelligenceServiceClientTest.php rename to generated/php/google-cloud-video-intelligence-v1/tests/Unit/V1/VideoIntelligenceServiceClientTest.php index 15d5d0463..630a13932 100644 --- a/generated/php/google-cloud-video-intelligence-v1/tests/unit/VideoIntelligence/V1/VideoIntelligenceServiceClientTest.php +++ b/generated/php/google-cloud-video-intelligence-v1/tests/Unit/V1/VideoIntelligenceServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\VideoIntelligence\V1; +namespace Google\Cloud\VideoIntelligence\Tests\Unit\V1; use Google\Cloud\VideoIntelligence\V1\VideoIntelligenceServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -32,11 +33,11 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group video_intelligence + * @group video-intelligence * @group grpc */ class VideoIntelligenceServiceClientTest extends GeneratedTest @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new VideoIntelligenceServiceClient($options); } @@ -65,7 +72,6 @@ public function annotateVideoTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -136,7 +142,6 @@ public function annotateVideoExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -155,12 +160,12 @@ public function annotateVideoExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/composer.json b/generated/php/google-cloud-video-intelligence-v1beta1/composer.json index db13efb76..bf2f37f6f 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta1/composer.json +++ b/generated/php/google-cloud-video-intelligence-v1beta1/composer.json @@ -1,30 +1,21 @@ { - "name": "videointelligence/videointelligence", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-videointelligence", "description": "Google Cloud Video Intelligence API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\VideoIntelligence\\": "src", + "Google\\Cloud\\VideoIntelligence\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php similarity index 72% rename from generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php rename to generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php index 40a9979f5..88db98a36 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php +++ b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/Gapic/VideoIntelligenceServiceGapicClient.php @@ -31,21 +31,20 @@ namespace Google\Cloud\VideoIntelligence\V1beta1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\VideoIntelligence\V1beta1\AnnotateVideoProgress; use Google\Cloud\VideoIntelligence\V1beta1\AnnotateVideoRequest; use Google\Cloud\VideoIntelligence\V1beta1\AnnotateVideoResponse; use Google\Cloud\VideoIntelligence\V1beta1\Feature; use Google\Cloud\VideoIntelligence\V1beta1\VideoContext; use Google\LongRunning\Operation; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that implements Google Cloud Video Intelligence API. @@ -121,9 +120,11 @@ class VideoIntelligenceServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -131,15 +132,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/video_intelligence_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/video_intelligence_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/video_intelligence_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -184,65 +188,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'videointelligence.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Video Intelligence API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videointelligence.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/VideoIntelligenceServiceClient.php b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/VideoIntelligenceServiceClient.php similarity index 98% rename from generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/VideoIntelligenceServiceClient.php rename to generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/VideoIntelligenceServiceClient.php index 5554220e0..68ddb893f 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/VideoIntelligenceServiceClient.php +++ b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/VideoIntelligenceServiceClient.php @@ -38,5 +38,5 @@ class VideoIntelligenceServiceClient extends VideoIntelligenceServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see VideoIntelligenceServiceClientImpl} class. + // additions to the generated {@see VideoIntelligenceServiceGapicClient} class. } diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_client_config.json b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_client_config.json similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_client_config.json rename to generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_client_config.json diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_descriptor_config.php b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_descriptor_config.php similarity index 67% rename from generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_descriptor_config.php rename to generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_descriptor_config.php index d014463f7..3b88238f0 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_descriptor_config.php +++ b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_descriptor_config.php @@ -7,6 +7,10 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VideoIntelligence\V1beta1\AnnotateVideoResponse', 'metadataReturnType' => '\Google\Cloud\VideoIntelligence\V1beta1\AnnotateVideoProgress', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], ], diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_rest_client_config.php b/generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1beta1/src/VideoIntelligence/V1beta1/resources/video_intelligence_service_rest_client_config.php rename to generated/php/google-cloud-video-intelligence-v1beta1/src/V1beta1/resources/video_intelligence_service_rest_client_config.php diff --git a/generated/php/google-cloud-video-intelligence-v1beta1/tests/unit/VideoIntelligence/V1beta1/VideoIntelligenceServiceClientTest.php b/generated/php/google-cloud-video-intelligence-v1beta1/tests/Unit/V1beta1/VideoIntelligenceServiceClientTest.php similarity index 94% rename from generated/php/google-cloud-video-intelligence-v1beta1/tests/unit/VideoIntelligence/V1beta1/VideoIntelligenceServiceClientTest.php rename to generated/php/google-cloud-video-intelligence-v1beta1/tests/Unit/V1beta1/VideoIntelligenceServiceClientTest.php index f905d4f08..456b34a5d 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta1/tests/unit/VideoIntelligence/V1beta1/VideoIntelligenceServiceClientTest.php +++ b/generated/php/google-cloud-video-intelligence-v1beta1/tests/Unit/V1beta1/VideoIntelligenceServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\VideoIntelligence\V1beta1; +namespace Google\Cloud\VideoIntelligence\Tests\Unit\V1beta1; use Google\Cloud\VideoIntelligence\V1beta1\VideoIntelligenceServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -32,11 +33,11 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group video_intelligence + * @group video-intelligence * @group grpc */ class VideoIntelligenceServiceClientTest extends GeneratedTest @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new VideoIntelligenceServiceClient($options); } @@ -65,7 +72,6 @@ public function annotateVideoTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -142,7 +148,6 @@ public function annotateVideoExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -161,12 +166,12 @@ public function annotateVideoExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/composer.json b/generated/php/google-cloud-video-intelligence-v1beta2/composer.json index db13efb76..bf2f37f6f 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta2/composer.json +++ b/generated/php/google-cloud-video-intelligence-v1beta2/composer.json @@ -1,30 +1,21 @@ { - "name": "videointelligence/videointelligence", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-videointelligence", "description": "Google Cloud Video Intelligence API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\VideoIntelligence\\": "src", + "Google\\Cloud\\VideoIntelligence\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php similarity index 72% rename from generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php rename to generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php index f7fd0b771..0dafd6994 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php +++ b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/Gapic/VideoIntelligenceServiceGapicClient.php @@ -31,21 +31,20 @@ namespace Google\Cloud\VideoIntelligence\V1beta2\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\VideoIntelligence\V1beta2\AnnotateVideoProgress; use Google\Cloud\VideoIntelligence\V1beta2\AnnotateVideoRequest; use Google\Cloud\VideoIntelligence\V1beta2\AnnotateVideoResponse; use Google\Cloud\VideoIntelligence\V1beta2\Feature; use Google\Cloud\VideoIntelligence\V1beta2\VideoContext; use Google\LongRunning\Operation; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that implements Google Cloud Video Intelligence API. @@ -121,9 +120,11 @@ class VideoIntelligenceServiceGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -131,15 +132,18 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - ], - 'clientConfigPath' => __DIR__.'/../resources/video_intelligence_service_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/video_intelligence_service_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/video_intelligence_service_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/video_intelligence_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -184,65 +188,57 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'videointelligence.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Video Intelligence API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videointelligence.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $options += self::getClientDefaults(); - $this->setClientOptions($options); - $this->pluckArray([ - 'serviceName', - 'clientConfigPath', - 'descriptorsConfigPath', - ], $options); - $this->operationsClient = $this->pluck('operationsClient', $options, false) - ?: new OperationsClient($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); } /** diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/VideoIntelligenceServiceClient.php b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/VideoIntelligenceServiceClient.php similarity index 98% rename from generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/VideoIntelligenceServiceClient.php rename to generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/VideoIntelligenceServiceClient.php index 59bd767d7..27af6c88d 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/VideoIntelligenceServiceClient.php +++ b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/VideoIntelligenceServiceClient.php @@ -38,5 +38,5 @@ class VideoIntelligenceServiceClient extends VideoIntelligenceServiceGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see VideoIntelligenceServiceClientImpl} class. + // additions to the generated {@see VideoIntelligenceServiceGapicClient} class. } diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_client_config.json b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_client_config.json similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_client_config.json rename to generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_client_config.json diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_descriptor_config.php b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_descriptor_config.php similarity index 67% rename from generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_descriptor_config.php rename to generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_descriptor_config.php index 8e573e852..666138e53 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_descriptor_config.php +++ b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_descriptor_config.php @@ -7,6 +7,10 @@ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VideoIntelligence\V1beta2\AnnotateVideoResponse', 'metadataReturnType' => '\Google\Cloud\VideoIntelligence\V1beta2\AnnotateVideoProgress', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', ], ], ], diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_rest_client_config.php b/generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-video-intelligence-v1beta2/src/VideoIntelligence/V1beta2/resources/video_intelligence_service_rest_client_config.php rename to generated/php/google-cloud-video-intelligence-v1beta2/src/V1beta2/resources/video_intelligence_service_rest_client_config.php diff --git a/generated/php/google-cloud-video-intelligence-v1beta2/tests/unit/VideoIntelligence/V1beta2/VideoIntelligenceServiceClientTest.php b/generated/php/google-cloud-video-intelligence-v1beta2/tests/Unit/V1beta2/VideoIntelligenceServiceClientTest.php similarity index 94% rename from generated/php/google-cloud-video-intelligence-v1beta2/tests/unit/VideoIntelligence/V1beta2/VideoIntelligenceServiceClientTest.php rename to generated/php/google-cloud-video-intelligence-v1beta2/tests/Unit/V1beta2/VideoIntelligenceServiceClientTest.php index a720be020..33d009570 100644 --- a/generated/php/google-cloud-video-intelligence-v1beta2/tests/unit/VideoIntelligence/V1beta2/VideoIntelligenceServiceClientTest.php +++ b/generated/php/google-cloud-video-intelligence-v1beta2/tests/Unit/V1beta2/VideoIntelligenceServiceClientTest.php @@ -20,10 +20,11 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\VideoIntelligence\V1beta2; +namespace Google\Cloud\VideoIntelligence\Tests\Unit\V1beta2; use Google\Cloud\VideoIntelligence\V1beta2\VideoIntelligenceServiceClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; @@ -32,11 +33,11 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** - * @group video_intelligence + * @group video-intelligence * @group grpc */ class VideoIntelligenceServiceClientTest extends GeneratedTest @@ -54,6 +55,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new VideoIntelligenceServiceClient($options); } @@ -65,7 +72,6 @@ public function annotateVideoTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -136,7 +142,6 @@ public function annotateVideoExceptionTest() $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ 'serviceAddress' => '', - 'scopes' => [], 'transport' => $operationsTransport, ]); $transport = $this->createTransport(); @@ -155,12 +160,12 @@ public function annotateVideoExceptionTest() $transport->addResponse($incompleteOperation); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-cloud-vision-v1/composer.json b/generated/php/google-cloud-vision-v1/composer.json index 3ea3f8b1d..8e55dccfe 100644 --- a/generated/php/google-cloud-vision-v1/composer.json +++ b/generated/php/google-cloud-vision-v1/composer.json @@ -1,30 +1,21 @@ { - "name": "vision/vision", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", + "name": "google/cloud-vision", "description": "Google Cloud Vision API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, "license": "Apache-2.0", + "minimum-stability": "stable", "autoload": { "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", + "Google\\Cloud\\Vision\\": "src", + "Google\\Cloud\\Vision\\Tests\\": "tests", "": "proto/src" } }, - "scripts": { - "test": [ - "phpunit tests" - ] + "require": { + "google/gax": "^0.30.2", + "google/protobuf": "^3.5.1", + "php" : "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" } } \ No newline at end of file diff --git a/generated/php/google-cloud-vision-v1/src/Vision/V1/Gapic/ImageAnnotatorGapicClient.php b/generated/php/google-cloud-vision-v1/src/V1/Gapic/ImageAnnotatorGapicClient.php similarity index 53% rename from generated/php/google-cloud-vision-v1/src/Vision/V1/Gapic/ImageAnnotatorGapicClient.php rename to generated/php/google-cloud-vision-v1/src/V1/Gapic/ImageAnnotatorGapicClient.php index 3a72f3ab9..ad06ed0c8 100644 --- a/generated/php/google-cloud-vision-v1/src/Vision/V1/Gapic/ImageAnnotatorGapicClient.php +++ b/generated/php/google-cloud-vision-v1/src/V1/Gapic/ImageAnnotatorGapicClient.php @@ -31,16 +31,15 @@ namespace Google\Cloud\Vision\V1\Gapic; use Google\ApiCore\ApiException; -use Google\ApiCore\Call; +use Google\ApiCore\CredentialsWrapper; +use Google\ApiCore\FetchAuthTokenInterface; use Google\ApiCore\GapicClientTrait; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; -use Google\Auth\CredentialsLoader; +use Google\ApiCore\ValidationException; use Google\Cloud\Vision\V1\AnnotateImageRequest; use Google\Cloud\Vision\V1\BatchAnnotateImagesRequest; use Google\Cloud\Vision\V1\BatchAnnotateImagesResponse; -use Grpc\Channel; -use Grpc\ChannelCredentials; /** * Service Description: Service that performs Google Cloud Vision API detection tasks over client @@ -91,24 +90,29 @@ class ImageAnnotatorGapicClient const CODEGEN_NAME = 'gapic'; /** - * The code generator version, to be included in the agent header. + * The default scopes required by the service. */ - const CODEGEN_VERSION = '0.0.5'; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-vision', + ]; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS, - 'port' => self::DEFAULT_SERVICE_PORT, - 'scopes' => [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-vision', - ], - 'clientConfigPath' => __DIR__.'/../resources/image_annotator_client_config.json', - 'restClientConfigPath' => __DIR__.'/../resources/image_annotator_rest_client_config.php', + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/image_annotator_client_config.json', 'descriptorsConfigPath' => __DIR__.'/../resources/image_annotator_descriptor_config.php', - 'versionFile' => __DIR__.'/../../VERSION', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/image_annotator_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', ]; } @@ -118,57 +122,56 @@ private static function getClientDefaults() * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress The domain name of the API remote host. - * Default 'vision.googleapis.com'. - * @type mixed $port The port on which to connect to the remote host. Default 443. - * @type Channel $channel - * A `Channel` object. If not specified, a channel will be constructed. - * NOTE: This option is only valid when utilizing the gRPC transport. - * @type ChannelCredentials $sslCreds - * A `ChannelCredentials` object for use with an SSL-enabled channel. - * Default: a credentials object returned from - * \Grpc\ChannelCredentials::createSsl(). - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this argument is unused. - * @type bool $forceNewChannel - * If true, this forces gRPC to create a new channel instead of using a persistent channel. - * Defaults to false. - * NOTE: This option is only valid when utilizing the gRPC transport. Also, if the $channel - * optional argument is specified, then this option is unused. - * @type CredentialsLoader $credentialsLoader - * A CredentialsLoader object created using the Google\Auth library. - * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the Google Cloud Vision API. - * @type string $clientConfigPath - * Path to a JSON file containing client method configuration, including retry settings. - * Specify this setting to specify the retry behavior of all methods on the client. + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. * By default this settings points to the default client config file, which is provided - * in the resources folder. The retry settings provided in this option can be overridden - * by settings in $retryingOverride - * @type array $retryingOverride - * An associative array in which the keys are method names (e.g. 'createFoo'), and - * the values are retry settings to use for that method. The retry settings for each - * method can be a {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} - * for example usage. Passing a value of null is equivalent to a value of - * ['retriesEnabled' => false]. Retry settings provided in this setting override the - * settings in $clientConfigPath. - * @type callable $authHttpHandler A handler used to deliver PSR-7 requests specifically - * for authentication. Should match a signature of - * `function (RequestInterface $request, array $options) : ResponseInterface`. - * @type callable $httpHandler A handler used to deliver PSR-7 requests. Should match a - * signature of `function (RequestInterface $request, array $options) : PromiseInterface`. - * NOTE: This option is only valid when utilizing the REST transport. - * @type string|TransportInterface $transport The transport used for executing network - * requests. May be either the string `rest` or `grpc`. Additionally, it is possible - * to pass in an already instantiated transport. Defaults to `grpc` if gRPC support is - * detected on the system. + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. * } + * + * @throws ValidationException * @experimental */ public function __construct($options = []) { - $this->setClientOptions($options + self::getClientDefaults()); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); } /** diff --git a/generated/php/google-cloud-vision-v1/src/Vision/V1/ImageAnnotatorClient.php b/generated/php/google-cloud-vision-v1/src/V1/ImageAnnotatorClient.php similarity index 94% rename from generated/php/google-cloud-vision-v1/src/Vision/V1/ImageAnnotatorClient.php rename to generated/php/google-cloud-vision-v1/src/V1/ImageAnnotatorClient.php index 7c14ee179..a29a63f2a 100644 --- a/generated/php/google-cloud-vision-v1/src/Vision/V1/ImageAnnotatorClient.php +++ b/generated/php/google-cloud-vision-v1/src/V1/ImageAnnotatorClient.php @@ -38,5 +38,5 @@ class ImageAnnotatorClient extends ImageAnnotatorGapicClient { // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ImageAnnotatorClientImpl} class. + // additions to the generated {@see ImageAnnotatorGapicClient} class. } diff --git a/generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_client_config.json b/generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_client_config.json similarity index 100% rename from generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_client_config.json rename to generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_client_config.json diff --git a/generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_descriptor_config.php b/generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_descriptor_config.php similarity index 100% rename from generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_descriptor_config.php rename to generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_descriptor_config.php diff --git a/generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_rest_client_config.php b/generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_rest_client_config.php similarity index 100% rename from generated/php/google-cloud-vision-v1/src/Vision/V1/resources/image_annotator_rest_client_config.php rename to generated/php/google-cloud-vision-v1/src/V1/resources/image_annotator_rest_client_config.php diff --git a/generated/php/google-cloud-vision-v1/tests/system/Vision/V1/ImageAnnotatorSmokeTest.php b/generated/php/google-cloud-vision-v1/tests/System/V1/ImageAnnotatorSmokeTest.php similarity index 97% rename from generated/php/google-cloud-vision-v1/tests/system/Vision/V1/ImageAnnotatorSmokeTest.php rename to generated/php/google-cloud-vision-v1/tests/System/V1/ImageAnnotatorSmokeTest.php index a3f830a83..839a016e1 100644 --- a/generated/php/google-cloud-vision-v1/tests/system/Vision/V1/ImageAnnotatorSmokeTest.php +++ b/generated/php/google-cloud-vision-v1/tests/System/V1/ImageAnnotatorSmokeTest.php @@ -20,7 +20,7 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\System\Vision\V1; +namespace Google\Cloud\Vision\Tests\System\V1; use Google\Cloud\Vision\V1\ImageAnnotatorClient; use Google\ApiCore\Testing\GeneratedTest; diff --git a/generated/php/google-cloud-vision-v1/tests/unit/Vision/V1/ImageAnnotatorClientTest.php b/generated/php/google-cloud-vision-v1/tests/Unit/V1/ImageAnnotatorClientTest.php similarity index 90% rename from generated/php/google-cloud-vision-v1/tests/unit/Vision/V1/ImageAnnotatorClientTest.php rename to generated/php/google-cloud-vision-v1/tests/Unit/V1/ImageAnnotatorClientTest.php index 88fd1a9cb..504a7a98d 100644 --- a/generated/php/google-cloud-vision-v1/tests/unit/Vision/V1/ImageAnnotatorClientTest.php +++ b/generated/php/google-cloud-vision-v1/tests/Unit/V1/ImageAnnotatorClientTest.php @@ -20,15 +20,16 @@ * This file was automatically generated - do not edit! */ -namespace Google\Cloud\Tests\Unit\Vision\V1; +namespace Google\Cloud\Vision\Tests\Unit\V1; use Google\Cloud\Vision\V1\ImageAnnotatorClient; use Google\ApiCore\ApiException; +use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Vision\V1\BatchAnnotateImagesResponse; use Google\Protobuf\Any; -use Grpc; +use Google\Rpc\Code; use stdClass; /** @@ -50,6 +51,12 @@ private function createTransport($deserialize = null) */ private function createClient(array $options = []) { + $options += [ + 'credentials' => $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + return new ImageAnnotatorClient($options); } @@ -96,12 +103,12 @@ public function batchAnnotateImagesExceptionTest() $this->assertTrue($transport->isExhausted()); $status = new stdClass(); - $status->code = Grpc\STATUS_DATA_LOSS; + $status->code = Code::DATA_LOSS; $status->details = 'internal error'; $expectedExceptionMessage = json_encode([ 'message' => 'internal error', - 'code' => Grpc\STATUS_DATA_LOSS, + 'code' => Code::DATA_LOSS, 'status' => 'DATA_LOSS', 'details' => [], ], JSON_PRETTY_PRINT); diff --git a/generated/php/google-longrunning-v1/composer.json b/generated/php/google-longrunning-v1/composer.json deleted file mode 100644 index c39c04ce5..000000000 --- a/generated/php/google-longrunning-v1/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "longrunning/longrunning", - "version": "0.1.0", - "author": "Google LLC", - "url": "https://github.com/googleapis/googleapis", - "description": "Google Long Running Operations API client for PHP", - "require": { - "google/gax": "^0.28.0", - "google/protobuf": "^3.4.0", - "php" : "^5.5 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "Google\\Cloud\\": "src", - "Google\\Cloud\\Tests\\": "tests", - "Google\\Cloud\\Tests\\System\\": "tests/system", - "Google\\Cloud\\Tests\\Unit\\": "tests/unit", - "": "proto/src" - } - }, - "scripts": { - "test": [ - "phpunit tests" - ] - } -} \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2b866d2ec..3820d4fdf 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,7 +3,7 @@ colors="true"> - generated/php/*/tests/unit + generated/php/*/tests/Unit