Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHANGE ME] Re-generated Tasks to pick up changes in the API or client library generator. #2670

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Tasks/src/V2/AppEngineHttpRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 21 additions & 22 deletions Tasks/src/V2/Gapic/CloudTasksGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,21 +219,6 @@ public static function locationName($project, $location)
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a project resource.
*
* @param string $project
*
* @return string The formatted project resource.
*/
public static function projectName($project)
{
return self::getProjectNameTemplate()->render([
'project' => $project,
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a queue resource.
Expand Down Expand Up @@ -274,12 +259,26 @@ public static function taskName($project, $location, $queue, $task)
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a project resource.
*
* @param string $project
*
* @return string The formatted project resource.
*/
public static function projectName($project)
{
return self::getProjectNameTemplate()->render([
'project' => $project,
]);
}

/**
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
* - location: projects/{project}/locations/{location}
* - project: projects/{project}
* - queue: projects/{project}/locations/{location}/queues/{queue}
* - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task}.
*
Expand Down Expand Up @@ -918,8 +917,8 @@ public function resumeQueue($name, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $response = $cloudTasksClient->getIamPolicy($formattedResource);
* $resource = '';
* $response = $cloudTasksClient->getIamPolicy($resource);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down Expand Up @@ -984,9 +983,9 @@ public function getIamPolicy($resource, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $resource = '';
* $policy = new Policy();
* $response = $cloudTasksClient->setIamPolicy($formattedResource, $policy);
* $response = $cloudTasksClient->setIamPolicy($resource, $policy);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down Expand Up @@ -1046,9 +1045,9 @@ public function setIamPolicy($resource, $policy, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $resource = '';
* $permissions = [];
* $response = $cloudTasksClient->testIamPermissions($formattedResource, $permissions);
* $response = $cloudTasksClient->testIamPermissions($resource, $permissions);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down
4 changes: 2 additions & 2 deletions Tasks/src/V2/HttpRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Tasks/src/V2/resources/cloud_tasks_client_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"GetIamPolicy": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwsupplee to confirm this change.

"retry_params_name": "default"
},
"SetIamPolicy": {
Expand All @@ -72,7 +72,7 @@
},
"TestIamPermissions": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"ListTasks": {
Expand All @@ -92,7 +92,7 @@
},
"DeleteTask": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"RunTask": {
Expand Down
44 changes: 21 additions & 23 deletions Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,22 +231,6 @@ public static function locationName($project, $location)
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a project resource.
*
* @param string $project
*
* @return string The formatted project resource.
* @experimental
*/
public static function projectName($project)
{
return self::getProjectNameTemplate()->render([
'project' => $project,
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a queue resource.
Expand Down Expand Up @@ -289,12 +273,26 @@ public static function taskName($project, $location, $queue, $task)
]);
}

/**
* Formats a string containing the fully-qualified path to represent
* a project resource.
*
* @param string $project
*
* @return string The formatted project resource.
*/
public static function projectName($project)
{
return self::getProjectNameTemplate()->render([
'project' => $project,
]);
}

/**
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
* - location: projects/{project}/locations/{location}
* - project: projects/{project}
* - queue: projects/{project}/locations/{location}/queues/{queue}
* - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task}.
*
Expand Down Expand Up @@ -943,8 +941,8 @@ public function resumeQueue($name, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $response = $cloudTasksClient->getIamPolicy($formattedResource);
* $resource = '';
* $response = $cloudTasksClient->getIamPolicy($resource);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down Expand Up @@ -1010,9 +1008,9 @@ public function getIamPolicy($resource, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $resource = '';
* $policy = new Policy();
* $response = $cloudTasksClient->setIamPolicy($formattedResource, $policy);
* $response = $cloudTasksClient->setIamPolicy($resource, $policy);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down Expand Up @@ -1073,9 +1071,9 @@ public function setIamPolicy($resource, $policy, array $optionalArgs = [])
* ```
* $cloudTasksClient = new CloudTasksClient();
* try {
* $formattedResource = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');
* $resource = '';
* $permissions = [];
* $response = $cloudTasksClient->testIamPermissions($formattedResource, $permissions);
* $response = $cloudTasksClient->testIamPermissions($resource, $permissions);
* } finally {
* $cloudTasksClient->close();
* }
Expand Down
6 changes: 3 additions & 3 deletions Tasks/src/V2beta2/resources/cloud_tasks_client_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"GetIamPolicy": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"SetIamPolicy": {
Expand All @@ -72,7 +72,7 @@
},
"TestIamPermissions": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"ListTasks": {
Expand All @@ -92,7 +92,7 @@
},
"DeleteTask": {
"timeout_millis": 10000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"LeaseTasks": {
Expand Down
8 changes: 4 additions & 4 deletions Tasks/src/V2beta3/AppEngineHttpRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading