diff --git a/composer.json b/composer.json index 2f2328a2357c..cebc9971d6d3 100644 --- a/composer.json +++ b/composer.json @@ -48,8 +48,8 @@ "monolog/monolog": "~1", "psr/http-message": "1.0.*", "ramsey/uuid": "~3", - "google/proto-client": "^0.24", - "google/gax": "^0.24" + "google/proto-client": "^0.25", + "google/gax": "^0.25" }, "require-dev": { "phpunit/phpunit": "4.8.*", @@ -117,4 +117,4 @@ ] } } -} \ No newline at end of file +} diff --git a/src/Dlp/V2beta1/Gapic/DlpServiceGapicClient.php b/src/Dlp/V2beta1/Gapic/DlpServiceGapicClient.php index ee0fc733829b..52f4af114b72 100644 --- a/src/Dlp/V2beta1/Gapic/DlpServiceGapicClient.php +++ b/src/Dlp/V2beta1/Gapic/DlpServiceGapicClient.php @@ -39,8 +39,12 @@ use Google\GAX\OperationResponse; use Google\GAX\PathTemplate; use Google\GAX\ValidationException; +use Google\Privacy\Dlp\V2beta1\AnalyzeDataSourceRiskRequest; +use Google\Privacy\Dlp\V2beta1\BigQueryTable; use Google\Privacy\Dlp\V2beta1\ContentItem; use Google\Privacy\Dlp\V2beta1\CreateInspectOperationRequest; +use Google\Privacy\Dlp\V2beta1\DeidentifyConfig; +use Google\Privacy\Dlp\V2beta1\DeidentifyContentRequest; use Google\Privacy\Dlp\V2beta1\DlpServiceGrpcClient; use Google\Privacy\Dlp\V2beta1\InspectConfig; use Google\Privacy\Dlp\V2beta1\InspectContentRequest; @@ -49,6 +53,7 @@ use Google\Privacy\Dlp\V2beta1\ListRootCategoriesRequest; use Google\Privacy\Dlp\V2beta1\OperationConfig; use Google\Privacy\Dlp\V2beta1\OutputStorageConfig; +use Google\Privacy\Dlp\V2beta1\PrivacyMetric; use Google\Privacy\Dlp\V2beta1\RedactContentRequest; use Google\Privacy\Dlp\V2beta1\RedactContentRequest_ImageRedactionConfig as ImageRedactionConfig; use Google\Privacy\Dlp\V2beta1\RedactContentRequest_ReplaceConfig as ReplaceConfig; @@ -72,19 +77,10 @@ * ``` * try { * $dlpServiceClient = new DlpServiceClient(); - * $name = "EMAIL_ADDRESS"; - * $infoTypesElement = new InfoType(); - * $infoTypesElement->setName($name); - * $infoTypes = [$infoTypesElement]; + * $deidentifyConfig = new DeidentifyConfig(); * $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); + * $items = []; + * $response = $dlpServiceClient->deidentifyContent($deidentifyConfig, $inspectConfig, $items); * } finally { * $dlpServiceClient->close(); * } @@ -154,6 +150,10 @@ private static function getPathTemplateMap() private static function getLongRunningDescriptors() { return [ + 'analyzeDataSourceRisk' => [ + 'operationReturnType' => '\Google\Privacy\Dlp\V2beta1\RiskAnalysisOperationResult', + 'metadataReturnType' => '\Google\Privacy\Dlp\V2beta1\RiskAnalysisOperationMetadata', + ], 'createInspectOperation' => [ 'operationReturnType' => '\Google\Privacy\Dlp\V2beta1\InspectOperationResult', 'metadataReturnType' => '\Google\Privacy\Dlp\V2beta1\InspectOperationMetadata', @@ -181,7 +181,7 @@ private static function getGapicVersion() * * @param string $result * - * @return string The formatted result resource. + * @return string the formatted result resource * @experimental */ public static function resultName($result) @@ -205,9 +205,9 @@ public static function resultName($result) * @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. + * @return array an associative array from name component IDs to component values * - * @throws ValidationException If $formattedName could not be matched. + * @throws ValidationException if $formattedName could not be matched * @experimental */ public static function parseName($formattedName, $template = null) @@ -345,6 +345,8 @@ public function __construct($options = []) $defaultDescriptors = ['headerDescriptor' => $headerDescriptor]; $this->descriptors = [ + 'deidentifyContent' => $defaultDescriptors, + 'analyzeDataSourceRisk' => $defaultDescriptors, 'inspectContent' => $defaultDescriptors, 'redactContent' => $defaultDescriptors, 'createInspectOperation' => $defaultDescriptors, @@ -383,6 +385,153 @@ public function __construct($options = []) $this->dlpServiceStub = $this->grpcCredentialsHelper->createStub($createDlpServiceStubFunction); } + /** + * De-identifies potentially sensitive info from a list of strings. + * This method has limits on input size and output size. + * + * Sample code: + * ``` + * try { + * $dlpServiceClient = new DlpServiceClient(); + * $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 \Google\GAX\RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\GAX\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\GAX\RetrySettings} for example usage. + * } + * + * @return \Google\Privacy\Dlp\V2beta1\DeidentifyContentResponse + * + * @throws \Google\GAX\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); + + $defaultCallSettings = $this->defaultCallSettings['deidentifyContent']; + if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) { + $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with( + $optionalArgs['retrySettings'] + ); + } + $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs)); + $callable = ApiCallable::createApiCall( + $this->dlpServiceStub, + 'DeidentifyContent', + $mergedSettings, + $this->descriptors['deidentifyContent'] + ); + + return $callable( + $request, + [], + ['call_credentials_callback' => $this->createCredentialsCallback()]); + } + + /** + * Schedules a job to compute risk analysis metrics over content in a Google + * Cloud Platform repository. + * + * Sample code: + * ``` + * try { + * $dlpServiceClient = new DlpServiceClient(); + * $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 \Google\GAX\RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\GAX\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\GAX\RetrySettings} for example usage. + * } + * + * @return \Google\GAX\OperationResponse + * + * @throws \Google\GAX\ApiException if the remote call fails + * @experimental + */ + public function analyzeDataSourceRisk($privacyMetric, $sourceTable, $optionalArgs = []) + { + $request = new AnalyzeDataSourceRiskRequest(); + $request->setPrivacyMetric($privacyMetric); + $request->setSourceTable($sourceTable); + + $defaultCallSettings = $this->defaultCallSettings['analyzeDataSourceRisk']; + if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) { + $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with( + $optionalArgs['retrySettings'] + ); + } + $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs)); + $callable = ApiCallable::createApiCall( + $this->dlpServiceStub, + 'AnalyzeDataSourceRisk', + $mergedSettings, + $this->descriptors['analyzeDataSourceRisk'] + ); + + return $callable( + $request, + [], + ['call_credentials_callback' => $this->createCredentialsCallback()]); + } + /** * Finds potentially sensitive info in a list of strings. * This method has limits on input size, processing time, and output size. @@ -391,14 +540,14 @@ public function __construct($options = []) * ``` * try { * $dlpServiceClient = new DlpServiceClient(); - * $name = "EMAIL_ADDRESS"; + * $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."; + * $type = 'text/plain'; + * $value = 'My email is example@example.com.'; * $itemsElement = new ContentItem(); * $itemsElement->setType($type); * $itemsElement->setValue($value); @@ -409,12 +558,12 @@ public function __construct($options = []) * } * ``` * - * @param InspectConfig $inspectConfig Configuration for the inspector. + * @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. + * Optional * * @type \Google\GAX\RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a @@ -462,22 +611,22 @@ public function inspectContent($inspectConfig, $items, $optionalArgs = []) * ``` * try { * $dlpServiceClient = new DlpServiceClient(); - * $name = "EMAIL_ADDRESS"; + * $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."; + * $type = 'text/plain'; + * $value = 'My email is example@example.com.'; * $itemsElement = new ContentItem(); * $itemsElement->setType($type); * $itemsElement->setValue($value); * $items = [$itemsElement]; - * $name2 = "EMAIL_ADDRESS"; + * $name2 = 'EMAIL_ADDRESS'; * $infoType = new InfoType(); * $infoType->setName($name2); - * $replaceWith = "REDACTED"; + * $replaceWith = 'REDACTED'; * $replaceConfigsElement = new ReplaceConfig(); * $replaceConfigsElement->setInfoType($infoType); * $replaceConfigsElement->setReplaceWith($replaceWith); @@ -488,12 +637,12 @@ public function inspectContent($inspectConfig, $items, $optionalArgs = []) * } * ``` * - * @param InspectConfig $inspectConfig Configuration for the inspector. + * @param InspectConfig $inspectConfig configuration for the inspector * @param ContentItem[] $items The list of items to inspect. Up to 100 are allowed per request. * @param ReplaceConfig[] $replaceConfigs The strings to replace findings text findings with. Must specify at least * one of these or one ImageRedactionConfig if redacting images. * @param array $optionalArgs { - * Optional. + * Optional * * @type ImageRedactionConfig[] $imageRedactionConfigs * The configuration for specifying what content to redact from images. @@ -547,13 +696,13 @@ public function redactContent($inspectConfig, $items, $replaceConfigs, $optional * ``` * try { * $dlpServiceClient = new DlpServiceClient(); - * $name = "EMAIL_ADDRESS"; + * $name = 'EMAIL_ADDRESS'; * $infoTypesElement = new InfoType(); * $infoTypesElement->setName($name); * $infoTypes = [$infoTypesElement]; * $inspectConfig = new InspectConfig(); * $inspectConfig->setInfoTypes($infoTypes); - * $url = "gs://example_bucket/example_file.png"; + * $url = 'gs://example_bucket/example_file.png'; * $fileSet = new FileSet(); * $fileSet->setUrl($url); * $cloudStorageOptions = new CloudStorageOptions(); @@ -592,26 +741,11 @@ public function redactContent($inspectConfig, $items, $replaceConfigs, $optional * } * ``` * - * @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. 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:
For Cloud Storage the next columns are:
For Cloud Datastore the next columns are:
For BigQuery the next columns are:
Examples:
- *
projects/my-project-123/groups/my-group
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -368,9 +368,9 @@ public function getGroup($groupName, $optionalArgs = [])
* }
* ```
*
- * @param ErrorGroup $group [Required] The group which replaces the resource on the server.
+ * @param errorGroup $group [Required] The group which replaces the resource on the server
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php
index f42d6c076b8e..681babf69ed9 100644
--- a/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php
+++ b/src/ErrorReporting/V1beta1/Gapic/ErrorStatsServiceGapicClient.php
@@ -61,7 +61,7 @@
* ```
* try {
* $errorStatsServiceClient = new ErrorStatsServiceClient();
- * $formattedProjectName = $errorStatsServiceClient->projectName("[PROJECT]");
+ * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]');
* $timeRange = new QueryTimeRange();
* // Iterate through all elements
* $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange);
@@ -69,8 +69,8 @@
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -140,6 +140,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listGroupStatsPageStreamingDescriptor =
@@ -189,7 +190,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -213,9 +214,9 @@ public static function projectName($project)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -348,7 +349,7 @@ public function __construct($options = [])
* ```
* try {
* $errorStatsServiceClient = new ErrorStatsServiceClient();
- * $formattedProjectName = $errorStatsServiceClient->projectName("[PROJECT]");
+ * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]');
* $timeRange = new QueryTimeRange();
* // Iterate through all elements
* $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange);
@@ -356,8 +357,8 @@ public function __construct($options = [])
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName, $timeRange);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -382,7 +383,7 @@ public function __construct($options = [])
* If a group_id list is given, also ErrorGroupStats
with zero
* occurrences are returned.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string[] $groupId
* [Optional] List all ErrorGroupStats
with these IDs.
@@ -482,16 +483,16 @@ public function listGroupStats($projectName, $timeRange, $optionalArgs = [])
* ```
* try {
* $errorStatsServiceClient = new ErrorStatsServiceClient();
- * $formattedProjectName = $errorStatsServiceClient->projectName("[PROJECT]");
- * $groupId = "";
+ * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]');
+ * $groupId = '';
* // Iterate through all elements
* $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -507,9 +508,9 @@ public function listGroupStats($projectName, $timeRange, $optionalArgs = [])
* [Google Cloud Platform project
* ID](https://support.google.com/cloud/answer/6158840).
* Example: `projects/my-project-123`.
- * @param string $groupId [Required] The group for which events shall be returned.
+ * @param string $groupId [Required] The group for which events shall be returned
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type ServiceContextFilter $serviceFilter
* [Optional] List only ErrorGroups which belong to a service context that
@@ -585,7 +586,7 @@ public function listEvents($projectName, $groupId, $optionalArgs = [])
* ```
* try {
* $errorStatsServiceClient = new ErrorStatsServiceClient();
- * $formattedProjectName = $errorStatsServiceClient->projectName("[PROJECT]");
+ * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]');
* $response = $errorStatsServiceClient->deleteEvents($formattedProjectName);
* } finally {
* $errorStatsServiceClient->close();
@@ -598,7 +599,7 @@ public function listEvents($projectName, $groupId, $optionalArgs = [])
* ID](https://support.google.com/cloud/answer/6158840).
* Example: `projects/my-project-123`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php
index 871d95617f8b..51311370ef41 100644
--- a/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php
+++ b/src/ErrorReporting/V1beta1/Gapic/ReportErrorsServiceGapicClient.php
@@ -54,7 +54,7 @@
* ```
* try {
* $reportErrorsServiceClient = new ReportErrorsServiceClient();
- * $formattedProjectName = $reportErrorsServiceClient->projectName("[PROJECT]");
+ * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]');
* $event = new ReportedErrorEvent();
* $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event);
* } finally {
@@ -142,7 +142,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -166,9 +166,9 @@ public static function projectName($project)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -302,7 +302,7 @@ public function __construct($options = [])
* ```
* try {
* $reportErrorsServiceClient = new ReportErrorsServiceClient();
- * $formattedProjectName = $reportErrorsServiceClient->projectName("[PROJECT]");
+ * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]');
* $event = new ReportedErrorEvent();
* $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event);
* } finally {
@@ -314,9 +314,9 @@ public function __construct($options = [])
* as `projects/` plus the
* [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).
* Example: `projects/my-project-123`.
- * @param ReportedErrorEvent $event [Required] The error event to be reported.
+ * @param reportedErrorEvent $event [Required] The error event to be reported
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php b/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php
index cac6b6dca6f6..20a6a474174a 100644
--- a/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php
+++ b/src/Language/V1beta2/Gapic/LanguageServiceGapicClient.php
@@ -228,9 +228,9 @@ public function __construct($options = [])
* }
* ```
*
- * @param Document $document Input document.
+ * @param Document $document input document
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $encodingType
* The encoding type used by the API to calculate sentence offsets for the
@@ -292,9 +292,9 @@ public function analyzeSentiment($document, $optionalArgs = [])
* }
* ```
*
- * @param Document $document Input document.
+ * @param Document $document input document
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $encodingType
* The encoding type used by the API to calculate offsets.
@@ -354,9 +354,9 @@ public function analyzeEntities($document, $optionalArgs = [])
* }
* ```
*
- * @param Document $document Input document.
+ * @param Document $document input document
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $encodingType
* The encoding type used by the API to calculate offsets.
@@ -417,9 +417,9 @@ public function analyzeEntitySentiment($document, $optionalArgs = [])
* }
* ```
*
- * @param Document $document Input document.
+ * @param Document $document input document
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $encodingType
* The encoding type used by the API to calculate offsets.
@@ -478,9 +478,9 @@ public function analyzeSyntax($document, $optionalArgs = [])
* }
* ```
*
- * @param Document $document Input document.
+ * @param Document $document input document
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -535,10 +535,10 @@ public function classifyText($document, $optionalArgs = [])
* }
* ```
*
- * @param Document $document Input document.
- * @param Features $features The enabled features.
+ * @param Document $document input document
+ * @param Features $features the enabled features
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $encodingType
* The encoding type used by the API to calculate offsets.
diff --git a/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php b/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php
index a8c746994d56..f0fce8507aad 100644
--- a/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php
+++ b/src/Logging/V2/Gapic/ConfigServiceV2GapicClient.php
@@ -39,12 +39,19 @@
use Google\GAX\PathTemplate;
use Google\GAX\ValidationException;
use Google\Logging\V2\ConfigServiceV2GrpcClient;
+use Google\Logging\V2\CreateExclusionRequest;
use Google\Logging\V2\CreateSinkRequest;
+use Google\Logging\V2\DeleteExclusionRequest;
use Google\Logging\V2\DeleteSinkRequest;
+use Google\Logging\V2\GetExclusionRequest;
use Google\Logging\V2\GetSinkRequest;
+use Google\Logging\V2\ListExclusionsRequest;
use Google\Logging\V2\ListSinksRequest;
+use Google\Logging\V2\LogExclusion;
use Google\Logging\V2\LogSink;
+use Google\Logging\V2\UpdateExclusionRequest;
use Google\Logging\V2\UpdateSinkRequest;
+use Google\Protobuf\FieldMask;
/**
* Service Description: Service for configuring sinks used to export log entries outside of
@@ -60,15 +67,15 @@
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedParent = $configServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $configServiceV2Client->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $configServiceV2Client->listSinks($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $configServiceV2Client->listSinks($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $configServiceV2Client->listSinks($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -110,6 +117,7 @@ class ConfigServiceV2GapicClient
private static $projectNameTemplate;
private static $sinkNameTemplate;
+ private static $exclusionNameTemplate;
private static $pathTemplateMap;
private static $gapicVersion;
private static $gapicVersionLoaded = false;
@@ -138,17 +146,28 @@ private static function getSinkNameTemplate()
return self::$sinkNameTemplate;
}
+ private static function getExclusionNameTemplate()
+ {
+ if (self::$exclusionNameTemplate == null) {
+ self::$exclusionNameTemplate = new PathTemplate('projects/{project}/exclusions/{exclusion}');
+ }
+
+ return self::$exclusionNameTemplate;
+ }
+
private static function getPathTemplateMap()
{
if (self::$pathTemplateMap == null) {
self::$pathTemplateMap = [
'project' => self::getProjectNameTemplate(),
'sink' => self::getSinkNameTemplate(),
+ 'exclusion' => self::getExclusionNameTemplate(),
];
}
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listSinksPageStreamingDescriptor =
@@ -160,9 +179,19 @@ private static function getPageStreamingDescriptors()
'responsePageTokenGetMethod' => 'getNextPageToken',
'resourcesGetMethod' => 'getSinks',
]);
+ $listExclusionsPageStreamingDescriptor =
+ new PageStreamingDescriptor([
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getExclusions',
+ ]);
$pageStreamingDescriptors = [
'listSinks' => $listSinksPageStreamingDescriptor,
+ 'listExclusions' => $listExclusionsPageStreamingDescriptor,
];
return $pageStreamingDescriptors;
@@ -188,7 +217,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -205,7 +234,7 @@ public static function projectName($project)
* @param string $project
* @param string $sink
*
- * @return string The formatted sink resource.
+ * @return string the formatted sink resource
* @experimental
*/
public static function sinkName($project, $sink)
@@ -216,12 +245,31 @@ public static function sinkName($project, $sink)
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent
+ * a exclusion resource.
+ *
+ * @param string $project
+ * @param string $exclusion
+ *
+ * @return string the formatted exclusion resource
+ * @experimental
+ */
+ public static function exclusionName($project, $exclusion)
+ {
+ return self::getExclusionNameTemplate()->render([
+ 'project' => $project,
+ 'exclusion' => $exclusion,
+ ]);
+ }
+
/**
* 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}
- * - sink: projects/{project}/sinks/{sink}.
+ * - sink: projects/{project}/sinks/{sink}
+ * - exclusion: projects/{project}/exclusions/{exclusion}.
*
* 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
@@ -231,9 +279,9 @@ public static function sinkName($project, $sink)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -333,6 +381,11 @@ public function __construct($options = [])
'createSink' => $defaultDescriptors,
'updateSink' => $defaultDescriptors,
'deleteSink' => $defaultDescriptors,
+ 'listExclusions' => $defaultDescriptors,
+ 'getExclusion' => $defaultDescriptors,
+ 'createExclusion' => $defaultDescriptors,
+ 'updateExclusion' => $defaultDescriptors,
+ 'deleteExclusion' => $defaultDescriptors,
];
$pageStreamingDescriptors = self::getPageStreamingDescriptors();
foreach ($pageStreamingDescriptors as $method => $pageStreamingDescriptor) {
@@ -372,15 +425,15 @@ public function __construct($options = [])
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedParent = $configServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $configServiceV2Client->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $configServiceV2Client->listSinks($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $configServiceV2Client->listSinks($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $configServiceV2Client->listSinks($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -398,7 +451,7 @@ public function __construct($options = [])
* "billingAccounts/[BILLING_ACCOUNT_ID]"
* "folders/[FOLDER_ID]"
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $pageToken
* A page token is used to specify a page of values to be returned.
@@ -459,7 +512,7 @@ public function listSinks($parent, $optionalArgs = [])
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedSinkName = $configServiceV2Client->sinkName("[PROJECT]", "[SINK]");
+ * $formattedSinkName = $configServiceV2Client->sinkName('[PROJECT]', '[SINK]');
* $response = $configServiceV2Client->getSink($formattedSinkName);
* } finally {
* $configServiceV2Client->close();
@@ -475,7 +528,7 @@ public function listSinks($parent, $optionalArgs = [])
*
* Example: `"projects/my-project-id/sinks/my-sink-id"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -525,7 +578,7 @@ public function getSink($sinkName, $optionalArgs = [])
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedParent = $configServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $configServiceV2Client->projectName('[PROJECT]');
* $sink = new LogSink();
* $response = $configServiceV2Client->createSink($formattedParent, $sink);
* } finally {
@@ -544,7 +597,7 @@ public function getSink($sinkName, $optionalArgs = [])
* @param LogSink $sink Required. The new sink, whose `name` parameter is a sink identifier that
* is not already in use.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type bool $uniqueWriterIdentity
* Optional. Determines the kind of IAM identity returned as `writer_identity`
@@ -610,7 +663,7 @@ public function createSink($parent, $sink, $optionalArgs = [])
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedSinkName = $configServiceV2Client->sinkName("[PROJECT]", "[SINK]");
+ * $formattedSinkName = $configServiceV2Client->sinkName('[PROJECT]', '[SINK]');
* $sink = new LogSink();
* $response = $configServiceV2Client->updateSink($formattedSinkName, $sink);
* } finally {
@@ -630,7 +683,7 @@ public function createSink($parent, $sink, $optionalArgs = [])
* @param LogSink $sink Required. The updated sink, whose name is the same identifier that appears
* as part of `sink_name`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type bool $uniqueWriterIdentity
* Optional. See
@@ -694,7 +747,7 @@ public function updateSink($sinkName, $sink, $optionalArgs = [])
* ```
* try {
* $configServiceV2Client = new ConfigServiceV2Client();
- * $formattedSinkName = $configServiceV2Client->sinkName("[PROJECT]", "[SINK]");
+ * $formattedSinkName = $configServiceV2Client->sinkName('[PROJECT]', '[SINK]');
* $configServiceV2Client->deleteSink($formattedSinkName);
* } finally {
* $configServiceV2Client->close();
@@ -711,7 +764,7 @@ public function updateSink($sinkName, $sink, $optionalArgs = [])
*
* Example: `"projects/my-project-id/sinks/my-sink-id"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -748,6 +801,358 @@ public function deleteSink($sinkName, $optionalArgs = [])
['call_credentials_callback' => $this->createCredentialsCallback()]);
}
+ /**
+ * Lists all the exclusions in a parent resource.
+ *
+ * Sample code:
+ * ```
+ * try {
+ * $configServiceV2Client = new ConfigServiceV2Client();
+ * $formattedParent = $configServiceV2Client->projectName('[PROJECT]');
+ * // Iterate through all elements
+ * $pagedResponse = $configServiceV2Client->listExclusions($formattedParent);
+ * foreach ($pagedResponse->iterateAllElements() as $element) {
+ * // doSomethingWith($element);
+ * }
+ *
+ * // OR iterate over pages of elements
+ * $pagedResponse = $configServiceV2Client->listExclusions($formattedParent);
+ * foreach ($pagedResponse->iteratePages() as $page) {
+ * foreach ($page as $element) {
+ * // doSomethingWith($element);
+ * }
+ * }
+ * } finally {
+ * $configServiceV2Client->close();
+ * }
+ * ```
+ *
+ * @param string $parent Required. The parent resource whose exclusions are to be listed.
+ *
+ * "projects/[PROJECT_ID]"
+ * "organizations/[ORGANIZATION_ID]"
+ * "billingAccounts/[BILLING_ACCOUNT_ID]"
+ * "folders/[FOLDER_ID]"
+ * @param array $optionalArgs {
+ * 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 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 \Google\GAX\RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a
+ * {@see Google\GAX\RetrySettings} object, or an associative array
+ * of retry settings parameters. See the documentation on
+ * {@see Google\GAX\RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\GAX\PagedListResponse
+ *
+ * @throws \Google\GAX\ApiException if the remote call fails
+ * @experimental
+ */
+ public function listExclusions($parent, $optionalArgs = [])
+ {
+ $request = new ListExclusionsRequest();
+ $request->setParent($parent);
+ if (isset($optionalArgs['pageToken'])) {
+ $request->setPageToken($optionalArgs['pageToken']);
+ }
+ if (isset($optionalArgs['pageSize'])) {
+ $request->setPageSize($optionalArgs['pageSize']);
+ }
+
+ $defaultCallSettings = $this->defaultCallSettings['listExclusions'];
+ if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) {
+ $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with(
+ $optionalArgs['retrySettings']
+ );
+ }
+ $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs));
+ $callable = ApiCallable::createApiCall(
+ $this->configServiceV2Stub,
+ 'ListExclusions',
+ $mergedSettings,
+ $this->descriptors['listExclusions']
+ );
+
+ return $callable(
+ $request,
+ [],
+ ['call_credentials_callback' => $this->createCredentialsCallback()]);
+ }
+
+ /**
+ * Gets the description of an exclusion.
+ *
+ * Sample code:
+ * ```
+ * try {
+ * $configServiceV2Client = new ConfigServiceV2Client();
+ * $formattedName = $configServiceV2Client->exclusionName('[PROJECT]', '[EXCLUSION]');
+ * $response = $configServiceV2Client->getExclusion($formattedName);
+ * } finally {
+ * $configServiceV2Client->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The resource name of an existing exclusion:
+ *
+ * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ *
+ * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ * @param array $optionalArgs {
+ * Optional
+ *
+ * @type \Google\GAX\RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a
+ * {@see Google\GAX\RetrySettings} object, or an associative array
+ * of retry settings parameters. See the documentation on
+ * {@see Google\GAX\RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\Logging\V2\LogExclusion
+ *
+ * @throws \Google\GAX\ApiException if the remote call fails
+ * @experimental
+ */
+ public function getExclusion($name, $optionalArgs = [])
+ {
+ $request = new GetExclusionRequest();
+ $request->setName($name);
+
+ $defaultCallSettings = $this->defaultCallSettings['getExclusion'];
+ if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) {
+ $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with(
+ $optionalArgs['retrySettings']
+ );
+ }
+ $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs));
+ $callable = ApiCallable::createApiCall(
+ $this->configServiceV2Stub,
+ 'GetExclusion',
+ $mergedSettings,
+ $this->descriptors['getExclusion']
+ );
+
+ return $callable(
+ $request,
+ [],
+ ['call_credentials_callback' => $this->createCredentialsCallback()]);
+ }
+
+ /**
+ * Creates a new exclusion in a specified parent resource.
+ * Only log entries belonging to that resource can be excluded.
+ * You can have up to 10 exclusions in a resource.
+ *
+ * Sample code:
+ * ```
+ * try {
+ * $configServiceV2Client = new ConfigServiceV2Client();
+ * $formattedParent = $configServiceV2Client->projectName('[PROJECT]');
+ * $exclusion = new LogExclusion();
+ * $response = $configServiceV2Client->createExclusion($formattedParent, $exclusion);
+ * } finally {
+ * $configServiceV2Client->close();
+ * }
+ * ```
+ *
+ * @param string $parent Required. The parent resource in which to create the exclusion:
+ *
+ * "projects/[PROJECT_ID]"
+ * "organizations/[ORGANIZATION_ID]"
+ * "billingAccounts/[BILLING_ACCOUNT_ID]"
+ * "folders/[FOLDER_ID]"
+ *
+ * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
+ * @param LogExclusion $exclusion Required. The new exclusion, whose `name` parameter is an exclusion name
+ * that is not already used in the parent resource.
+ * @param array $optionalArgs {
+ * Optional
+ *
+ * @type \Google\GAX\RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a
+ * {@see Google\GAX\RetrySettings} object, or an associative array
+ * of retry settings parameters. See the documentation on
+ * {@see Google\GAX\RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\Logging\V2\LogExclusion
+ *
+ * @throws \Google\GAX\ApiException if the remote call fails
+ * @experimental
+ */
+ public function createExclusion($parent, $exclusion, $optionalArgs = [])
+ {
+ $request = new CreateExclusionRequest();
+ $request->setParent($parent);
+ $request->setExclusion($exclusion);
+
+ $defaultCallSettings = $this->defaultCallSettings['createExclusion'];
+ if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) {
+ $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with(
+ $optionalArgs['retrySettings']
+ );
+ }
+ $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs));
+ $callable = ApiCallable::createApiCall(
+ $this->configServiceV2Stub,
+ 'CreateExclusion',
+ $mergedSettings,
+ $this->descriptors['createExclusion']
+ );
+
+ return $callable(
+ $request,
+ [],
+ ['call_credentials_callback' => $this->createCredentialsCallback()]);
+ }
+
+ /**
+ * Changes one or more properties of an existing exclusion.
+ *
+ * Sample code:
+ * ```
+ * try {
+ * $configServiceV2Client = new ConfigServiceV2Client();
+ * $formattedName = $configServiceV2Client->exclusionName('[PROJECT]', '[EXCLUSION]');
+ * $exclusion = new LogExclusion();
+ * $updateMask = new FieldMask();
+ * $response = $configServiceV2Client->updateExclusion($formattedName, $exclusion, $updateMask);
+ * } finally {
+ * $configServiceV2Client->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The resource name of the exclusion to update:
+ *
+ * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ *
+ * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ * @param LogExclusion $exclusion Required. New values for the existing exclusion. Only the fields specified
+ * in `update_mask` are relevant.
+ * @param FieldMask $updateMask Required. A nonempty list of fields to change in the existing exclusion.
+ * New values for the fields are taken from the corresponding fields in the
+ * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
+ * `update_mask` are not changed and are ignored in the request.
+ *
+ * For example, to change the filter and description of an exclusion,
+ * specify an `update_mask` of `"filter,description"`.
+ * @param array $optionalArgs {
+ * Optional
+ *
+ * @type \Google\GAX\RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a
+ * {@see Google\GAX\RetrySettings} object, or an associative array
+ * of retry settings parameters. See the documentation on
+ * {@see Google\GAX\RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\Logging\V2\LogExclusion
+ *
+ * @throws \Google\GAX\ApiException if the remote call fails
+ * @experimental
+ */
+ public function updateExclusion($name, $exclusion, $updateMask, $optionalArgs = [])
+ {
+ $request = new UpdateExclusionRequest();
+ $request->setName($name);
+ $request->setExclusion($exclusion);
+ $request->setUpdateMask($updateMask);
+
+ $defaultCallSettings = $this->defaultCallSettings['updateExclusion'];
+ if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) {
+ $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with(
+ $optionalArgs['retrySettings']
+ );
+ }
+ $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs));
+ $callable = ApiCallable::createApiCall(
+ $this->configServiceV2Stub,
+ 'UpdateExclusion',
+ $mergedSettings,
+ $this->descriptors['updateExclusion']
+ );
+
+ return $callable(
+ $request,
+ [],
+ ['call_credentials_callback' => $this->createCredentialsCallback()]);
+ }
+
+ /**
+ * Deletes an exclusion.
+ *
+ * Sample code:
+ * ```
+ * try {
+ * $configServiceV2Client = new ConfigServiceV2Client();
+ * $formattedName = $configServiceV2Client->exclusionName('[PROJECT]', '[EXCLUSION]');
+ * $configServiceV2Client->deleteExclusion($formattedName);
+ * } finally {
+ * $configServiceV2Client->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The resource name of an existing exclusion to delete:
+ *
+ * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ *
+ * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ * @param array $optionalArgs {
+ * Optional
+ *
+ * @type \Google\GAX\RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a
+ * {@see Google\GAX\RetrySettings} object, or an associative array
+ * of retry settings parameters. See the documentation on
+ * {@see Google\GAX\RetrySettings} for example usage.
+ * }
+ *
+ * @throws \Google\GAX\ApiException if the remote call fails
+ * @experimental
+ */
+ public function deleteExclusion($name, $optionalArgs = [])
+ {
+ $request = new DeleteExclusionRequest();
+ $request->setName($name);
+
+ $defaultCallSettings = $this->defaultCallSettings['deleteExclusion'];
+ if (isset($optionalArgs['retrySettings']) && is_array($optionalArgs['retrySettings'])) {
+ $optionalArgs['retrySettings'] = $defaultCallSettings->getRetrySettings()->with(
+ $optionalArgs['retrySettings']
+ );
+ }
+ $mergedSettings = $defaultCallSettings->merge(new CallSettings($optionalArgs));
+ $callable = ApiCallable::createApiCall(
+ $this->configServiceV2Stub,
+ 'DeleteExclusion',
+ $mergedSettings,
+ $this->descriptors['deleteExclusion']
+ );
+
+ return $callable(
+ $request,
+ [],
+ ['call_credentials_callback' => $this->createCredentialsCallback()]);
+ }
+
/**
* Initiates an orderly shutdown in which preexisting calls continue but new
* calls are immediately cancelled.
diff --git a/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php b/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php
index afcc13483bdc..3f64b5f54cf3 100644
--- a/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php
+++ b/src/Logging/V2/Gapic/LoggingServiceV2GapicClient.php
@@ -60,7 +60,7 @@
* ```
* try {
* $loggingServiceV2Client = new LoggingServiceV2Client();
- * $formattedLogName = $loggingServiceV2Client->logName("[PROJECT]", "[LOG]");
+ * $formattedLogName = $loggingServiceV2Client->logName('[PROJECT]', '[LOG]');
* $loggingServiceV2Client->deleteLog($formattedLogName);
* } finally {
* $loggingServiceV2Client->close();
@@ -137,6 +137,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listLogEntriesPageStreamingDescriptor =
@@ -196,7 +197,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -213,7 +214,7 @@ public static function projectName($project)
* @param string $project
* @param string $log
*
- * @return string The formatted log resource.
+ * @return string the formatted log resource
* @experimental
*/
public static function logName($project, $log)
@@ -239,9 +240,9 @@ public static function logName($project, $log)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -383,7 +384,7 @@ public function __construct($options = [])
* ```
* try {
* $loggingServiceV2Client = new LoggingServiceV2Client();
- * $formattedLogName = $loggingServiceV2Client->logName("[PROJECT]", "[LOG]");
+ * $formattedLogName = $loggingServiceV2Client->logName('[PROJECT]', '[LOG]');
* $loggingServiceV2Client->deleteLog($formattedLogName);
* } finally {
* $loggingServiceV2Client->close();
@@ -403,7 +404,7 @@ public function __construct($options = [])
* For more information about log names, see
* [LogEntry][google.logging.v2.LogEntry].
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -482,7 +483,7 @@ public function deleteLog($logName, $optionalArgs = [])
* you should try to include several log entries in this list,
* rather than calling this method for each individual log entry.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $logName
* Optional. A default log resource name that is assigned to all log entries
@@ -583,8 +584,8 @@ public function writeLogEntries($entries, $optionalArgs = [])
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $loggingServiceV2Client->listLogEntries($resourceNames, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $loggingServiceV2Client->listLogEntries($resourceNames);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -605,7 +606,7 @@ public function writeLogEntries($entries, $optionalArgs = [])
*
* Projects listed in the `project_ids` field are added to this list.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string[] $projectIds
* Deprecated. Use `resource_names` instead. One or more project identifiers
@@ -704,8 +705,8 @@ public function listLogEntries($resourceNames, $optionalArgs = [])
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $loggingServiceV2Client->listMonitoredResourceDescriptors(['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $loggingServiceV2Client->listMonitoredResourceDescriptors();
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -717,7 +718,7 @@ public function listLogEntries($resourceNames, $optionalArgs = [])
* ```
*
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
@@ -778,15 +779,15 @@ public function listMonitoredResourceDescriptors($optionalArgs = [])
* ```
* try {
* $loggingServiceV2Client = new LoggingServiceV2Client();
- * $formattedParent = $loggingServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $loggingServiceV2Client->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $loggingServiceV2Client->listLogs($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $loggingServiceV2Client->listLogs($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $loggingServiceV2Client->listLogs($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -804,7 +805,7 @@ public function listMonitoredResourceDescriptors($optionalArgs = [])
* "billingAccounts/[BILLING_ACCOUNT_ID]"
* "folders/[FOLDER_ID]"
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
diff --git a/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php b/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php
index f1ccaf9d5667..4b2886769142 100644
--- a/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php
+++ b/src/Logging/V2/Gapic/MetricsServiceV2GapicClient.php
@@ -59,15 +59,15 @@
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedParent = $metricsServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $metricsServiceV2Client->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -148,6 +148,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listLogMetricsPageStreamingDescriptor =
@@ -187,7 +188,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -204,7 +205,7 @@ public static function projectName($project)
* @param string $project
* @param string $metric
*
- * @return string The formatted metric resource.
+ * @return string the formatted metric resource
* @experimental
*/
public static function metricName($project, $metric)
@@ -230,9 +231,9 @@ public static function metricName($project, $metric)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -371,15 +372,15 @@ public function __construct($options = [])
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedParent = $metricsServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $metricsServiceV2Client->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -394,7 +395,7 @@ public function __construct($options = [])
*
* "projects/[PROJECT_ID]"
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $pageToken
* A page token is used to specify a page of values to be returned.
@@ -455,7 +456,7 @@ public function listLogMetrics($parent, $optionalArgs = [])
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedMetricName = $metricsServiceV2Client->metricName("[PROJECT]", "[METRIC]");
+ * $formattedMetricName = $metricsServiceV2Client->metricName('[PROJECT]', '[METRIC]');
* $response = $metricsServiceV2Client->getLogMetric($formattedMetricName);
* } finally {
* $metricsServiceV2Client->close();
@@ -466,7 +467,7 @@ public function listLogMetrics($parent, $optionalArgs = [])
*
* "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -512,7 +513,7 @@ public function getLogMetric($metricName, $optionalArgs = [])
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedParent = $metricsServiceV2Client->projectName("[PROJECT]");
+ * $formattedParent = $metricsServiceV2Client->projectName('[PROJECT]');
* $metric = new LogMetric();
* $response = $metricsServiceV2Client->createLogMetric($formattedParent, $metric);
* } finally {
@@ -520,15 +521,15 @@ public function getLogMetric($metricName, $optionalArgs = [])
* }
* ```
*
- * @param string $parent The resource name of the project in which to create the metric:
+ * @param string $parent the resource name of the project in which to create the metric:
*
* "projects/[PROJECT_ID]"
*
- * The new metric must be provided in the request.
- * @param LogMetric $metric The new logs-based metric, which must not have an identifier that
- * already exists.
+ * The new metric must be provided in the request
+ * @param LogMetric $metric the new logs-based metric, which must not have an identifier that
+ * already exists
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -575,7 +576,7 @@ public function createLogMetric($parent, $metric, $optionalArgs = [])
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedMetricName = $metricsServiceV2Client->metricName("[PROJECT]", "[METRIC]");
+ * $formattedMetricName = $metricsServiceV2Client->metricName('[PROJECT]', '[METRIC]');
* $metric = new LogMetric();
* $response = $metricsServiceV2Client->updateLogMetric($formattedMetricName, $metric);
* } finally {
@@ -583,16 +584,16 @@ public function createLogMetric($parent, $metric, $optionalArgs = [])
* }
* ```
*
- * @param string $metricName The resource name of the metric to update:
+ * @param string $metricName the resource name of the metric to update:
*
* "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
*
* The updated metric must be provided in the request and it's
* `name` field must be the same as `[METRIC_ID]` If the metric
- * does not exist in `[PROJECT_ID]`, then a new metric is created.
- * @param LogMetric $metric The updated metric.
+ * does not exist in `[PROJECT_ID]`, then a new metric is created
+ * @param LogMetric $metric the updated metric
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -639,7 +640,7 @@ public function updateLogMetric($metricName, $metric, $optionalArgs = [])
* ```
* try {
* $metricsServiceV2Client = new MetricsServiceV2Client();
- * $formattedMetricName = $metricsServiceV2Client->metricName("[PROJECT]", "[METRIC]");
+ * $formattedMetricName = $metricsServiceV2Client->metricName('[PROJECT]', '[METRIC]');
* $metricsServiceV2Client->deleteLogMetric($formattedMetricName);
* } finally {
* $metricsServiceV2Client->close();
@@ -650,7 +651,7 @@ public function updateLogMetric($metricName, $metric, $optionalArgs = [])
*
* "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/Logging/V2/resources/config_service_v2_client_config.json b/src/Logging/V2/resources/config_service_v2_client_config.json
index c0a6ecfa533c..733cac2aba0a 100644
--- a/src/Logging/V2/resources/config_service_v2_client_config.json
+++ b/src/Logging/V2/resources/config_service_v2_client_config.json
@@ -14,35 +14,69 @@
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.2,
"max_retry_delay_millis": 1000,
- "initial_rpc_timeout_millis": 2000,
+ "initial_rpc_timeout_millis": 30000,
"rpc_timeout_multiplier": 1.5,
- "max_rpc_timeout_millis": 30000,
- "total_timeout_millis": 45000
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 90000
+ },
+ "write_sink": {
+ "initial_retry_delay_millis": 100,
+ "retry_delay_multiplier": 1.2,
+ "max_retry_delay_millis": 1000,
+ "initial_rpc_timeout_millis": 30000,
+ "rpc_timeout_multiplier": 1.5,
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 120000
}
},
"methods": {
"ListSinks": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"GetSink": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"CreateSink": {
- "timeout_millis": 30000,
+ "timeout_millis": 120000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"UpdateSink": {
- "timeout_millis": 30000,
+ "timeout_millis": 120000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"DeleteSink": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
+ "retry_codes_name": "idempotent",
+ "retry_params_name": "default"
+ },
+ "ListExclusions": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "idempotent",
+ "retry_params_name": "default"
+ },
+ "GetExclusion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "idempotent",
+ "retry_params_name": "default"
+ },
+ "CreateExclusion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "non_idempotent",
+ "retry_params_name": "default"
+ },
+ "UpdateExclusion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "non_idempotent",
+ "retry_params_name": "default"
+ },
+ "DeleteExclusion": {
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
}
diff --git a/src/Logging/V2/resources/logging_service_v2_client_config.json b/src/Logging/V2/resources/logging_service_v2_client_config.json
index 19f31df6f4bf..5d2fc1d67128 100644
--- a/src/Logging/V2/resources/logging_service_v2_client_config.json
+++ b/src/Logging/V2/resources/logging_service_v2_client_config.json
@@ -14,29 +14,29 @@
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.2,
"max_retry_delay_millis": 1000,
- "initial_rpc_timeout_millis": 2000,
+ "initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.5,
- "max_rpc_timeout_millis": 30000,
- "total_timeout_millis": 45000
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 90000
},
"list": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.2,
"max_retry_delay_millis": 1000,
- "initial_rpc_timeout_millis": 7000,
+ "initial_rpc_timeout_millis": 2000,
"rpc_timeout_multiplier": 1.5,
- "max_rpc_timeout_millis": 30000,
- "total_timeout_millis": 45000
+ "max_rpc_timeout_millis": 10000,
+ "total_timeout_millis": 20000
}
},
"methods": {
"DeleteLog": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"WriteLogEntries": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"bundling": {
@@ -46,17 +46,17 @@
}
},
"ListLogEntries": {
- "timeout_millis": 30000,
+ "timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_params_name": "list"
},
"ListMonitoredResourceDescriptors": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"ListLogs": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
}
diff --git a/src/Logging/V2/resources/metrics_service_v2_client_config.json b/src/Logging/V2/resources/metrics_service_v2_client_config.json
index 205eae8dd194..a0678701c210 100644
--- a/src/Logging/V2/resources/metrics_service_v2_client_config.json
+++ b/src/Logging/V2/resources/metrics_service_v2_client_config.json
@@ -14,35 +14,35 @@
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.2,
"max_retry_delay_millis": 1000,
- "initial_rpc_timeout_millis": 2000,
+ "initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.5,
- "max_rpc_timeout_millis": 30000,
- "total_timeout_millis": 45000
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 90000
}
},
"methods": {
"ListLogMetrics": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"GetLogMetric": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
},
"CreateLogMetric": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"UpdateLogMetric": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"DeleteLogMetric": {
- "timeout_millis": 30000,
+ "timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
}
diff --git a/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php b/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php
index df660abb679b..a0015110045a 100644
--- a/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php
+++ b/src/Monitoring/V3/Gapic/GroupServiceGapicClient.php
@@ -72,15 +72,15 @@
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->projectName("[PROJECT]");
+ * $formattedName = $groupServiceClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $groupServiceClient->listGroups($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $groupServiceClient->listGroups($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $groupServiceClient->listGroups($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -161,6 +161,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listGroupsPageStreamingDescriptor =
@@ -210,7 +211,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -227,7 +228,7 @@ public static function projectName($project)
* @param string $project
* @param string $group
*
- * @return string The formatted group resource.
+ * @return string the formatted group resource
* @experimental
*/
public static function groupName($project, $group)
@@ -253,9 +254,9 @@ public static function groupName($project, $group)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -394,15 +395,15 @@ public function __construct($options = [])
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->projectName("[PROJECT]");
+ * $formattedName = $groupServiceClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $groupServiceClient->listGroups($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $groupServiceClient->listGroups($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $groupServiceClient->listGroups($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -416,7 +417,7 @@ public function __construct($options = [])
* @param string $name The project whose groups are to be listed. The format is
* `"projects/{project_id_or_number}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $childrenOfGroup
* A group name: `"projects/{project_id_or_number}/groups/{group_id}"`.
@@ -501,7 +502,7 @@ public function listGroups($name, $optionalArgs = [])
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->groupName("[PROJECT]", "[GROUP]");
+ * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]');
* $response = $groupServiceClient->getGroup($formattedName);
* } finally {
* $groupServiceClient->close();
@@ -511,7 +512,7 @@ public function listGroups($name, $optionalArgs = [])
* @param string $name The group to retrieve. The format is
* `"projects/{project_id_or_number}/groups/{group_id}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -557,7 +558,7 @@ public function getGroup($name, $optionalArgs = [])
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->projectName("[PROJECT]");
+ * $formattedName = $groupServiceClient->projectName('[PROJECT]');
* $group = new Group();
* $response = $groupServiceClient->createGroup($formattedName, $group);
* } finally {
@@ -570,7 +571,7 @@ public function getGroup($name, $optionalArgs = [])
* @param Group $group A group definition. It is an error to define the `name` field because
* the system assigns the name.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type bool $validateOnly
* If true, validate this request but do not create the group.
@@ -633,7 +634,7 @@ public function createGroup($name, $group, $optionalArgs = [])
* @param Group $group The new definition of the group. All fields of the existing group,
* excepting `name`, are replaced with the corresponding fields of this group.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type bool $validateOnly
* If true, validate this request but do not update the existing group.
@@ -684,7 +685,7 @@ public function updateGroup($group, $optionalArgs = [])
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->groupName("[PROJECT]", "[GROUP]");
+ * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]');
* $groupServiceClient->deleteGroup($formattedName);
* } finally {
* $groupServiceClient->close();
@@ -694,7 +695,7 @@ public function updateGroup($group, $optionalArgs = [])
* @param string $name The group to delete. The format is
* `"projects/{project_id_or_number}/groups/{group_id}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -738,15 +739,15 @@ public function deleteGroup($name, $optionalArgs = [])
* ```
* try {
* $groupServiceClient = new GroupServiceClient();
- * $formattedName = $groupServiceClient->groupName("[PROJECT]", "[GROUP]");
+ * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]');
* // Iterate through all elements
* $pagedResponse = $groupServiceClient->listGroupMembers($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -760,7 +761,7 @@ public function deleteGroup($name, $optionalArgs = [])
* @param string $name The group whose members are listed. The format is
* `"projects/{project_id_or_number}/groups/{group_id}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
diff --git a/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php b/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php
index c0f82ad77984..61ac1a6579a0 100644
--- a/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php
+++ b/src/Monitoring/V3/Gapic/MetricServiceGapicClient.php
@@ -67,15 +67,15 @@
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -167,6 +167,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listMonitoredResourceDescriptorsPageStreamingDescriptor =
@@ -226,7 +227,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -243,7 +244,7 @@ public static function projectName($project)
* @param string $project
* @param string $metricDescriptor
*
- * @return string The formatted metric_descriptor resource.
+ * @return string the formatted metric_descriptor resource
* @experimental
*/
public static function metricDescriptorName($project, $metricDescriptor)
@@ -261,7 +262,7 @@ public static function metricDescriptorName($project, $metricDescriptor)
* @param string $project
* @param string $monitoredResourceDescriptor
*
- * @return string The formatted monitored_resource_descriptor resource.
+ * @return string the formatted monitored_resource_descriptor resource
* @experimental
*/
public static function monitoredResourceDescriptorName($project, $monitoredResourceDescriptor)
@@ -288,9 +289,9 @@ public static function monitoredResourceDescriptorName($project, $monitoredResou
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -431,15 +432,15 @@ public function __construct($options = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -453,7 +454,7 @@ public function __construct($options = [])
* @param string $name The project on which to execute the request. The format is
* `"projects/{project_id_or_number}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $filter
* An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing
@@ -525,7 +526,7 @@ public function listMonitoredResourceDescriptors($name, $optionalArgs = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->monitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
+ * $formattedName = $metricServiceClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]');
* $response = $metricServiceClient->getMonitoredResourceDescriptor($formattedName);
* } finally {
* $metricServiceClient->close();
@@ -537,7 +538,7 @@ public function listMonitoredResourceDescriptors($name, $optionalArgs = [])
* The `{resource_type}` is a predefined type, such as
* `cloudsql_database`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -583,15 +584,15 @@ public function getMonitoredResourceDescriptor($name, $optionalArgs = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $metricServiceClient->listMetricDescriptors($formattedName);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricServiceClient->listMetricDescriptors($formattedName, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricServiceClient->listMetricDescriptors($formattedName);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -605,7 +606,7 @@ public function getMonitoredResourceDescriptor($name, $optionalArgs = [])
* @param string $name The project on which to execute the request. The format is
* `"projects/{project_id_or_number}"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type string $filter
* If this field is empty, all custom and
@@ -678,7 +679,7 @@ public function listMetricDescriptors($name, $optionalArgs = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->metricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]");
+ * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]');
* $response = $metricServiceClient->getMetricDescriptor($formattedName);
* } finally {
* $metricServiceClient->close();
@@ -690,7 +691,7 @@ public function listMetricDescriptors($name, $optionalArgs = [])
* An example value of `{metric_id}` is
* `"compute.googleapis.com/instance/disk/read_bytes_count"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -738,7 +739,7 @@ public function getMetricDescriptor($name, $optionalArgs = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
* $metricDescriptor = new MetricDescriptor();
* $response = $metricServiceClient->createMetricDescriptor($formattedName, $metricDescriptor);
* } finally {
@@ -751,7 +752,7 @@ public function getMetricDescriptor($name, $optionalArgs = [])
* @param MetricDescriptor $metricDescriptor The new [custom metric](https://cloud.google.com/monitoring/custom-metrics)
* descriptor.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -799,7 +800,7 @@ public function createMetricDescriptor($name, $metricDescriptor, $optionalArgs =
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->metricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]");
+ * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]');
* $metricServiceClient->deleteMetricDescriptor($formattedName);
* } finally {
* $metricServiceClient->close();
@@ -811,7 +812,7 @@ public function createMetricDescriptor($name, $metricDescriptor, $optionalArgs =
* An example of `{metric_id}` is:
* `"custom.googleapis.com/my_test_metric"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -855,8 +856,8 @@ public function deleteMetricDescriptor($name, $optionalArgs = [])
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
- * $filter = "";
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
+ * $filter = '';
* $interval = new TimeInterval();
* $view = TimeSeriesView::FULL;
* // Iterate through all elements
@@ -865,8 +866,8 @@ public function deleteMetricDescriptor($name, $optionalArgs = [])
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -892,7 +893,7 @@ public function deleteMetricDescriptor($name, $optionalArgs = [])
* @param int $view Specifies which information is returned about the time series.
* For allowed values, use constants defined on {@see \Google\Monitoring\V3\ListTimeSeriesRequest_TimeSeriesView}
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type Aggregation $aggregation
* By default, the raw time series data is returned.
@@ -973,7 +974,7 @@ public function listTimeSeries($name, $filter, $interval, $view, $optionalArgs =
* ```
* try {
* $metricServiceClient = new MetricServiceClient();
- * $formattedName = $metricServiceClient->projectName("[PROJECT]");
+ * $formattedName = $metricServiceClient->projectName('[PROJECT]');
* $timeSeries = [];
* $metricServiceClient->createTimeSeries($formattedName, $timeSeries);
* } finally {
@@ -989,7 +990,7 @@ public function listTimeSeries($name, $filter, $interval, $view, $optionalArgs =
* `TimeSeries` value must fully specify a unique time series by supplying
* all label values for the metric and the monitored resource.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/PubSub/V1/Gapic/PublisherGapicClient.php b/src/PubSub/V1/Gapic/PublisherGapicClient.php
index 7a079f9540e1..7047ab81b2ec 100644
--- a/src/PubSub/V1/Gapic/PublisherGapicClient.php
+++ b/src/PubSub/V1/Gapic/PublisherGapicClient.php
@@ -68,7 +68,7 @@
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedName = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedName = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $publisherClient->createTopic($formattedName);
* } finally {
* $publisherClient->close();
@@ -146,6 +146,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listTopicsPageStreamingDescriptor =
@@ -195,7 +196,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -212,7 +213,7 @@ public static function projectName($project)
* @param string $project
* @param string $topic
*
- * @return string The formatted topic resource.
+ * @return string the formatted topic resource
* @experimental
*/
public static function topicName($project, $topic)
@@ -238,9 +239,9 @@ public static function topicName($project, $topic)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -388,7 +389,7 @@ public function __construct($options = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedName = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedName = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $publisherClient->createTopic($formattedName);
* } finally {
* $publisherClient->close();
@@ -402,7 +403,7 @@ public function __construct($options = [])
* signs (`%`). It must be between 3 and 255 characters in length, and it
* must not start with `"goog"`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type array $labels
* User labels.
@@ -466,11 +467,11 @@ public function createTopic($name, $optionalArgs = [])
* }
* ```
*
- * @param Topic $topic The topic to update.
+ * @param Topic $topic the topic to update
* @param FieldMask $updateMask Indicates which fields in the provided topic to update.
* Must be specified and non-empty.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -519,8 +520,8 @@ public function updateTopic($topic, $updateMask, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedTopic = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
- * $data = "";
+ * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
+ * $data = '';
* $messagesElement = new PubsubMessage();
* $messagesElement->setData($data);
* $messages = [$messagesElement];
@@ -532,9 +533,9 @@ public function updateTopic($topic, $updateMask, $optionalArgs = [])
*
* @param string $topic The messages in the request will be published on this topic.
* Format is `projects/{project}/topics/{topic}`.
- * @param PubsubMessage[] $messages The messages to publish.
+ * @param PubsubMessage[] $messages the messages to publish
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -581,7 +582,7 @@ public function publish($topic, $messages, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedTopic = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $publisherClient->getTopic($formattedTopic);
* } finally {
* $publisherClient->close();
@@ -591,7 +592,7 @@ public function publish($topic, $messages, $optionalArgs = [])
* @param string $topic The name of the topic to get.
* Format is `projects/{project}/topics/{topic}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -637,15 +638,15 @@ public function getTopic($topic, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedProject = $publisherClient->projectName("[PROJECT]");
+ * $formattedProject = $publisherClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $publisherClient->listTopics($formattedProject);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $publisherClient->listTopics($formattedProject, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $publisherClient->listTopics($formattedProject);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -659,7 +660,7 @@ public function getTopic($topic, $optionalArgs = [])
* @param string $project The name of the cloud project that topics belong to.
* Format is `projects/{project}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
@@ -720,15 +721,15 @@ public function listTopics($project, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedTopic = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* // Iterate through all elements
* $pagedResponse = $publisherClient->listTopicSubscriptions($formattedTopic);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $publisherClient->listTopicSubscriptions($formattedTopic, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $publisherClient->listTopicSubscriptions($formattedTopic);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -742,7 +743,7 @@ public function listTopics($project, $optionalArgs = [])
* @param string $topic The name of the topic that subscriptions are attached to.
* Format is `projects/{project}/topics/{topic}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
@@ -807,7 +808,7 @@ public function listTopicSubscriptions($topic, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedTopic = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $publisherClient->deleteTopic($formattedTopic);
* } finally {
* $publisherClient->close();
@@ -817,7 +818,7 @@ public function listTopicSubscriptions($topic, $optionalArgs = [])
* @param string $topic Name of the topic to delete.
* Format is `projects/{project}/topics/{topic}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -862,7 +863,7 @@ public function deleteTopic($topic, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedResource = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedResource = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $policy = new Policy();
* $response = $publisherClient->setIamPolicy($formattedResource, $policy);
* } finally {
@@ -878,7 +879,7 @@ public function deleteTopic($topic, $optionalArgs = [])
* valid policy but certain Cloud Platform services (such as Projects)
* might reject them.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -927,7 +928,7 @@ public function setIamPolicy($resource, $policy, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedResource = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedResource = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $publisherClient->getIamPolicy($formattedResource);
* } finally {
* $publisherClient->close();
@@ -938,7 +939,7 @@ public function setIamPolicy($resource, $policy, $optionalArgs = [])
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -986,7 +987,7 @@ public function getIamPolicy($resource, $optionalArgs = [])
* ```
* try {
* $publisherClient = new PublisherClient();
- * $formattedResource = $publisherClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedResource = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
* $permissions = [];
* $response = $publisherClient->testIamPermissions($formattedResource, $permissions);
* } finally {
@@ -1002,7 +1003,7 @@ public function getIamPolicy($resource, $optionalArgs = [])
* information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/PubSub/V1/Gapic/SubscriberGapicClient.php b/src/PubSub/V1/Gapic/SubscriberGapicClient.php
index 4570c1ada8da..709443cf8c15 100644
--- a/src/PubSub/V1/Gapic/SubscriberGapicClient.php
+++ b/src/PubSub/V1/Gapic/SubscriberGapicClient.php
@@ -79,8 +79,8 @@
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedName = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
- * $formattedTopic = $subscriberClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedName = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
+ * $formattedTopic = $subscriberClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $subscriberClient->createSubscription($formattedName, $formattedTopic);
* } finally {
* $subscriberClient->close();
@@ -180,6 +180,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listSubscriptionsPageStreamingDescriptor =
@@ -239,7 +240,7 @@ private static function getGapicVersion()
*
* @param string $project
*
- * @return string The formatted project resource.
+ * @return string the formatted project resource
* @experimental
*/
public static function projectName($project)
@@ -256,7 +257,7 @@ public static function projectName($project)
* @param string $project
* @param string $snapshot
*
- * @return string The formatted snapshot resource.
+ * @return string the formatted snapshot resource
* @experimental
*/
public static function snapshotName($project, $snapshot)
@@ -274,7 +275,7 @@ public static function snapshotName($project, $snapshot)
* @param string $project
* @param string $subscription
*
- * @return string The formatted subscription resource.
+ * @return string the formatted subscription resource
* @experimental
*/
public static function subscriptionName($project, $subscription)
@@ -292,7 +293,7 @@ public static function subscriptionName($project, $subscription)
* @param string $project
* @param string $topic
*
- * @return string The formatted topic resource.
+ * @return string the formatted topic resource
* @experimental
*/
public static function topicName($project, $topic)
@@ -320,9 +321,9 @@ public static function topicName($project, $topic)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -491,8 +492,8 @@ public function __construct($options = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedName = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
- * $formattedTopic = $subscriberClient->topicName("[PROJECT]", "[TOPIC]");
+ * $formattedName = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
+ * $formattedTopic = $subscriberClient->topicName('[PROJECT]', '[TOPIC]');
* $response = $subscriberClient->createSubscription($formattedName, $formattedTopic);
* } finally {
* $subscriberClient->close();
@@ -510,7 +511,7 @@ public function __construct($options = [])
* The value of this field will be `_deleted-topic_` if the topic has been
* deleted.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type PushConfig $pushConfig
* If push delivery is used with this subscription, this field is
@@ -610,7 +611,7 @@ public function createSubscription($name, $topic, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $response = $subscriberClient->getSubscription($formattedSubscription);
* } finally {
* $subscriberClient->close();
@@ -620,7 +621,7 @@ public function createSubscription($name, $topic, $optionalArgs = [])
* @param string $subscription The name of the subscription to get.
* Format is `projects/{project}/subscriptions/{sub}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -679,11 +680,11 @@ public function getSubscription($subscription, $optionalArgs = [])
* }
* ```
*
- * @param Subscription $subscription The updated subscription object.
+ * @param Subscription $subscription the updated subscription object
* @param FieldMask $updateMask Indicates which fields in the provided subscription to update.
* Must be specified and non-empty.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -730,15 +731,15 @@ public function updateSubscription($subscription, $updateMask, $optionalArgs = [
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedProject = $subscriberClient->projectName("[PROJECT]");
+ * $formattedProject = $subscriberClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $subscriberClient->listSubscriptions($formattedProject);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $subscriberClient->listSubscriptions($formattedProject, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $subscriberClient->listSubscriptions($formattedProject);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -752,7 +753,7 @@ public function updateSubscription($subscription, $updateMask, $optionalArgs = [
* @param string $project The name of the cloud project that subscriptions belong to.
* Format is `projects/{project}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
@@ -817,7 +818,7 @@ public function listSubscriptions($project, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $subscriberClient->deleteSubscription($formattedSubscription);
* } finally {
* $subscriberClient->close();
@@ -827,7 +828,7 @@ public function listSubscriptions($project, $optionalArgs = [])
* @param string $subscription The subscription to delete.
* Format is `projects/{project}/subscriptions/{sub}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -875,7 +876,7 @@ public function deleteSubscription($subscription, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $ackIds = [];
* $ackDeadlineSeconds = 0;
* $subscriberClient->modifyAckDeadline($formattedSubscription, $ackIds, $ackDeadlineSeconds);
@@ -886,7 +887,7 @@ public function deleteSubscription($subscription, $optionalArgs = [])
*
* @param string $subscription The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
- * @param string[] $ackIds List of acknowledgment IDs.
+ * @param string[] $ackIds list of acknowledgment IDs
* @param int $ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to
* the Pub/Sub system. For example, if the value is 10, the new
* ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
@@ -895,7 +896,7 @@ public function deleteSubscription($subscription, $optionalArgs = [])
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -947,7 +948,7 @@ public function modifyAckDeadline($subscription, $ackIds, $ackDeadlineSeconds, $
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $ackIds = [];
* $subscriberClient->acknowledge($formattedSubscription, $ackIds);
* } finally {
@@ -960,7 +961,7 @@ public function modifyAckDeadline($subscription, $ackIds, $ackDeadlineSeconds, $
* @param string[] $ackIds The acknowledgment ID for the messages being acknowledged that was returned
* by the Pub/Sub system in the `Pull` response. Must not be empty.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1008,7 +1009,7 @@ public function acknowledge($subscription, $ackIds, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $maxMessages = 0;
* $response = $subscriberClient->pull($formattedSubscription, $maxMessages);
* } finally {
@@ -1021,7 +1022,7 @@ public function acknowledge($subscription, $ackIds, $optionalArgs = [])
* @param int $maxMessages The maximum number of messages returned for this request. The Pub/Sub
* system may return fewer than the number specified.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type bool $returnImmediately
* If this field set to true, the system will respond immediately even if
@@ -1089,7 +1090,7 @@ public function pull($subscription, $maxMessages, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $streamAckDeadlineSeconds = 0;
* $request = new StreamingPullRequest();
* $request->setSubscription($formattedSubscription);
@@ -1126,7 +1127,7 @@ public function pull($subscription, $maxMessages, $optionalArgs = [])
* ```
*
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $timeoutMillis
* Timeout to use for this call.
@@ -1178,7 +1179,7 @@ public function streamingPull($optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $pushConfig = new PushConfig();
* $subscriberClient->modifyPushConfig($formattedSubscription, $pushConfig);
* } finally {
@@ -1195,7 +1196,7 @@ public function streamingPull($optionalArgs = [])
* messages to be pulled and acknowledged - effectively pausing
* the subscription if `Pull` is not called.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1240,15 +1241,15 @@ public function modifyPushConfig($subscription, $pushConfig, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedProject = $subscriberClient->projectName("[PROJECT]");
+ * $formattedProject = $subscriberClient->projectName('[PROJECT]');
* // Iterate through all elements
* $pagedResponse = $subscriberClient->listSnapshots($formattedProject);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $subscriberClient->listSnapshots($formattedProject, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $subscriberClient->listSnapshots($formattedProject);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -1262,7 +1263,7 @@ public function modifyPushConfig($subscription, $pushConfig, $optionalArgs = [])
* @param string $project The name of the cloud project that snapshots belong to.
* Format is `projects/{project}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type int $pageSize
* The maximum number of resources contained in the underlying API
@@ -1332,8 +1333,8 @@ public function listSnapshots($project, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedName = $subscriberClient->snapshotName("[PROJECT]", "[SNAPSHOT]");
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedName = $subscriberClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $response = $subscriberClient->createSnapshot($formattedName, $formattedSubscription);
* } finally {
* $subscriberClient->close();
@@ -1355,7 +1356,7 @@ public function listSnapshots($project, $optionalArgs = [])
* successful completion of the CreateSnapshot request.
* Format is `projects/{project}/subscriptions/{sub}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1415,11 +1416,11 @@ public function createSnapshot($name, $subscription, $optionalArgs = [])
* }
* ```
*
- * @param Snapshot $snapshot The updated snpashot object.
+ * @param Snapshot $snapshot the updated snpashot object
* @param FieldMask $updateMask Indicates which fields in the provided snapshot to update.
* Must be specified and non-empty.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1469,7 +1470,7 @@ public function updateSnapshot($snapshot, $updateMask, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSnapshot = $subscriberClient->snapshotName("[PROJECT]", "[SNAPSHOT]");
+ * $formattedSnapshot = $subscriberClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
* $subscriberClient->deleteSnapshot($formattedSnapshot);
* } finally {
* $subscriberClient->close();
@@ -1479,7 +1480,7 @@ public function updateSnapshot($snapshot, $updateMask, $optionalArgs = [])
* @param string $snapshot The name of the snapshot to delete.
* Format is `projects/{project}/snapshots/{snap}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1524,16 +1525,16 @@ public function deleteSnapshot($snapshot, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedSubscription = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $response = $subscriberClient->seek($formattedSubscription);
* } finally {
* $subscriberClient->close();
* }
* ```
*
- * @param string $subscription The subscription to affect.
+ * @param string $subscription the subscription to affect
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type Timestamp $time
* The time to seek to.
@@ -1602,7 +1603,7 @@ public function seek($subscription, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedResource = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedResource = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $policy = new Policy();
* $response = $subscriberClient->setIamPolicy($formattedResource, $policy);
* } finally {
@@ -1618,7 +1619,7 @@ public function seek($subscription, $optionalArgs = [])
* valid policy but certain Cloud Platform services (such as Projects)
* might reject them.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1667,7 +1668,7 @@ public function setIamPolicy($resource, $policy, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedResource = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedResource = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $response = $subscriberClient->getIamPolicy($formattedResource);
* } finally {
* $subscriberClient->close();
@@ -1678,7 +1679,7 @@ public function setIamPolicy($resource, $policy, $optionalArgs = [])
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
@@ -1726,7 +1727,7 @@ public function getIamPolicy($resource, $optionalArgs = [])
* ```
* try {
* $subscriberClient = new SubscriberClient();
- * $formattedResource = $subscriberClient->subscriptionName("[PROJECT]", "[SUBSCRIPTION]");
+ * $formattedResource = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
* $permissions = [];
* $response = $subscriberClient->testIamPermissions($formattedResource, $permissions);
* } finally {
@@ -1742,7 +1743,7 @@ public function getIamPolicy($resource, $optionalArgs = [])
* information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
* @param array $optionalArgs {
- * Optional.
+ * Optional
*
* @type \Google\GAX\RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
diff --git a/src/PubSub/V1/resources/publisher_client_config.json b/src/PubSub/V1/resources/publisher_client_config.json
index b1e3be747fd0..72dec325a157 100644
--- a/src/PubSub/V1/resources/publisher_client_config.json
+++ b/src/PubSub/V1/resources/publisher_client_config.json
@@ -7,13 +7,13 @@
"UNAVAILABLE"
],
"one_plus_delivery": [
+ "ABORTED",
"CANCELLED",
- "UNKNOWN",
"DEADLINE_EXCEEDED",
- "RESOURCE_EXHAUSTED",
- "ABORTED",
"INTERNAL",
- "UNAVAILABLE"
+ "RESOURCE_EXHAUSTED",
+ "UNAVAILABLE",
+ "UNKNOWN"
],
"non_idempotent": []
},
diff --git a/src/PubSub/V1/resources/subscriber_client_config.json b/src/PubSub/V1/resources/subscriber_client_config.json
index 37a5f16fe8f7..764e831a944e 100644
--- a/src/PubSub/V1/resources/subscriber_client_config.json
+++ b/src/PubSub/V1/resources/subscriber_client_config.json
@@ -10,8 +10,8 @@
"pull": [
"CANCELLED",
"DEADLINE_EXCEEDED",
- "RESOURCE_EXHAUSTED",
"INTERNAL",
+ "RESOURCE_EXHAUSTED",
"UNAVAILABLE"
]
},
diff --git a/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php b/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php
index 38c4f0603ea9..b5e301f0e2ea 100644
--- a/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php
+++ b/src/Spanner/Admin/Database/V1/Gapic/DatabaseAdminGapicClient.php
@@ -72,15 +72,15 @@
* ```
* try {
* $databaseAdminClient = new DatabaseAdminClient();
- * $formattedParent = $databaseAdminClient->instanceName("[PROJECT]", "[INSTANCE]");
+ * $formattedParent = $databaseAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* // Iterate through all elements
* $pagedResponse = $databaseAdminClient->listDatabases($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $databaseAdminClient->listDatabases($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $databaseAdminClient->listDatabases($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -162,6 +162,7 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+
private static function getPageStreamingDescriptors()
{
$listDatabasesPageStreamingDescriptor =
@@ -216,7 +217,7 @@ private static function getGapicVersion()
* @param string $project
* @param string $instance
*
- * @return string The formatted instance resource.
+ * @return string the formatted instance resource
* @experimental
*/
public static function instanceName($project, $instance)
@@ -235,7 +236,7 @@ public static function instanceName($project, $instance)
* @param string $instance
* @param string $database
*
- * @return string The formatted database resource.
+ * @return string the formatted database resource
* @experimental
*/
public static function databaseName($project, $instance, $database)
@@ -262,9 +263,9 @@ public static function databaseName($project, $instance, $database)
* @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.
+ * @return array an associative array from name component IDs to component values
*
- * @throws ValidationException If $formattedName could not be matched.
+ * @throws ValidationException if $formattedName could not be matched
* @experimental
*/
public static function parseName($formattedName, $template = null)
@@ -455,15 +456,15 @@ public function __construct($options = [])
* ```
* try {
* $databaseAdminClient = new DatabaseAdminClient();
- * $formattedParent = $databaseAdminClient->instanceName("[PROJECT]", "[INSTANCE]");
+ * $formattedParent = $databaseAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* // Iterate through all elements
* $pagedResponse = $databaseAdminClient->listDatabases($formattedParent);
* foreach ($pagedResponse->iterateAllElements() as $element) {
* // doSomethingWith($element);
* }
*
- * // OR iterate over pages of elements, with the maximum page size set to 5
- * $pagedResponse = $databaseAdminClient->listDatabases($formattedParent, ['pageSize' => 5]);
+ * // OR iterate over pages of elements
+ * $pagedResponse = $databaseAdminClient->listDatabases($formattedParent);
* foreach ($pagedResponse->iteratePages() as $page) {
* foreach ($page as $element) {
* // doSomethingWith($element);
@@ -477,7 +478,7 @@ public function __construct($options = [])
* @param string $parent Required. The instance whose databases should be listed.
* Values are of the form `projects/