From a4d2d45e7e5ee1bca8df428236732b517eb159cd Mon Sep 17 00:00:00 2001 From: dpebot Date: Tue, 14 Aug 2018 02:59:44 -0700 Subject: [PATCH] Re-generate library using Tasks/synth.py --- .../V2beta2/Gapic/CloudTasksGapicClient.php | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php b/Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php index af4b5f7756b4..4aadb6170f82 100644 --- a/Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php +++ b/Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php @@ -78,19 +78,22 @@ * $cloudTasksClient = new CloudTasksClient(); * try { * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements + * // Iterate over pages of elements * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); * foreach ($pagedResponse->iteratePages() as $page) { * foreach ($page as $element) { * // doSomethingWith($element); * } * } + * + * + * // Alternatively: + * + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } * } finally { * $cloudTasksClient->close(); * } @@ -395,19 +398,22 @@ public function __construct(array $options = []) * $cloudTasksClient = new CloudTasksClient(); * try { * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements + * // Iterate over pages of elements * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); * foreach ($pagedResponse->iteratePages() as $page) { * foreach ($page as $element) { * // doSomethingWith($element); * } * } + * + * + * // Alternatively: + * + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } * } finally { * $cloudTasksClient->close(); * } @@ -1137,19 +1143,22 @@ public function testIamPermissions($resource, $permissions, array $optionalArgs * $cloudTasksClient = new CloudTasksClient(); * try { * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * - * // OR iterate over pages of elements + * // Iterate over pages of elements * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); * foreach ($pagedResponse->iteratePages() as $page) { * foreach ($page as $element) { * // doSomethingWith($element); * } * } + * + * + * // Alternatively: + * + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } * } finally { * $cloudTasksClient->close(); * }