Skip to content

Commit

Permalink
feat: update retry and timeout configuration (#3186)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored Jun 25, 2020
1 parent 63ec629 commit 8c14718
Show file tree
Hide file tree
Showing 16 changed files with 277 additions and 139 deletions.
25 changes: 23 additions & 2 deletions Dialogflow/src/V2/AgentsGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Google\Cloud\Dialogflow\V2\GetAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Agent
*/
public function GetAgent(\Google\Cloud\Dialogflow\V2\GetAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -51,6 +52,7 @@ public function GetAgent(\Google\Cloud\Dialogflow\V2\GetAgentRequest $argument,
* @param \Google\Cloud\Dialogflow\V2\SetAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Agent
*/
public function SetAgent(\Google\Cloud\Dialogflow\V2\SetAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -65,6 +67,7 @@ public function SetAgent(\Google\Cloud\Dialogflow\V2\SetAgentRequest $argument,
* @param \Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Protobuf\GPBEmpty
*/
public function DeleteAgent(\Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -85,6 +88,7 @@ public function DeleteAgent(\Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argu
* @param \Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\SearchAgentsResponse
*/
public function SearchAgents(\Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -101,6 +105,7 @@ public function SearchAgents(\Google\Cloud\Dialogflow\V2\SearchAgentsRequest $ar
* @param \Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function TrainAgent(\Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -117,6 +122,7 @@ public function TrainAgent(\Google\Cloud\Dialogflow\V2\TrainAgentRequest $argume
* @param \Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function ExportAgent(\Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -131,12 +137,19 @@ public function ExportAgent(\Google\Cloud\Dialogflow\V2\ExportAgentRequest $argu
*
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft
* agent will be trained automatically (unless disabled in agent settings).
* However, once the import is done, training may not be completed yet. Please
* call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
* explicitly.
*
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
* An operation which tracks when importing is complete. It only tracks
* when the draft agent is updated not when it is done training.
* @param \Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function ImportAgent(\Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -150,12 +163,19 @@ public function ImportAgent(\Google\Cloud\Dialogflow\V2\ImportAgentRequest $argu
* Restores the specified agent from a ZIP file.
*
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* entity types in the older version are deleted. After the restore, the
* restored draft agent will be trained automatically (unless disabled in
* agent settings). However, once the restore is done, training may not be
* completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
* returns in order to train explicitly.
*
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
* An operation which tracks when restoring is complete. It only tracks
* when the draft agent is updated not when it is done training.
* @param \Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function RestoreAgent(\Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -171,6 +191,7 @@ public function RestoreAgent(\Google\Cloud\Dialogflow\V2\RestoreAgentRequest $ar
* @param \Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\ValidationResult
*/
public function GetValidationResult(\Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument,
$metadata = [], $options = []) {
Expand Down
6 changes: 6 additions & 0 deletions Dialogflow/src/V2/ContextsGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Google\Cloud\Dialogflow\V2\ListContextsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\ListContextsResponse
*/
public function ListContexts(\Google\Cloud\Dialogflow\V2\ListContextsRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -68,6 +69,7 @@ public function ListContexts(\Google\Cloud\Dialogflow\V2\ListContextsRequest $ar
* @param \Google\Cloud\Dialogflow\V2\GetContextRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Context
*/
public function GetContext(\Google\Cloud\Dialogflow\V2\GetContextRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -84,6 +86,7 @@ public function GetContext(\Google\Cloud\Dialogflow\V2\GetContextRequest $argume
* @param \Google\Cloud\Dialogflow\V2\CreateContextRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Context
*/
public function CreateContext(\Google\Cloud\Dialogflow\V2\CreateContextRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -98,6 +101,7 @@ public function CreateContext(\Google\Cloud\Dialogflow\V2\CreateContextRequest $
* @param \Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Context
*/
public function UpdateContext(\Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -112,6 +116,7 @@ public function UpdateContext(\Google\Cloud\Dialogflow\V2\UpdateContextRequest $
* @param \Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Protobuf\GPBEmpty
*/
public function DeleteContext(\Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -126,6 +131,7 @@ public function DeleteContext(\Google\Cloud\Dialogflow\V2\DeleteContextRequest $
* @param \Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Protobuf\GPBEmpty
*/
public function DeleteAllContexts(\Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument,
$metadata = [], $options = []) {
Expand Down
10 changes: 10 additions & 0 deletions Dialogflow/src/V2/EntityTypesGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Google\Cloud\Dialogflow\V2\ListEntityTypesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\ListEntityTypesResponse
*/
public function ListEntityTypes(\Google\Cloud\Dialogflow\V2\ListEntityTypesRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -78,6 +79,7 @@ public function ListEntityTypes(\Google\Cloud\Dialogflow\V2\ListEntityTypesReque
* @param \Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\EntityType
*/
public function GetEntityType(\Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -92,6 +94,7 @@ public function GetEntityType(\Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $
* @param \Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\EntityType
*/
public function CreateEntityType(\Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -106,6 +109,7 @@ public function CreateEntityType(\Google\Cloud\Dialogflow\V2\CreateEntityTypeReq
* @param \Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\EntityType
*/
public function UpdateEntityType(\Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -120,6 +124,7 @@ public function UpdateEntityType(\Google\Cloud\Dialogflow\V2\UpdateEntityTypeReq
* @param \Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Protobuf\GPBEmpty
*/
public function DeleteEntityType(\Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -136,6 +141,7 @@ public function DeleteEntityType(\Google\Cloud\Dialogflow\V2\DeleteEntityTypeReq
* @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchUpdateEntityTypes(\Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -152,6 +158,7 @@ public function BatchUpdateEntityTypes(\Google\Cloud\Dialogflow\V2\BatchUpdateEn
* @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchDeleteEntityTypes(\Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -168,6 +175,7 @@ public function BatchDeleteEntityTypes(\Google\Cloud\Dialogflow\V2\BatchDeleteEn
* @param \Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchCreateEntities(\Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -187,6 +195,7 @@ public function BatchCreateEntities(\Google\Cloud\Dialogflow\V2\BatchCreateEntit
* @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchUpdateEntities(\Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -204,6 +213,7 @@ public function BatchUpdateEntities(\Google\Cloud\Dialogflow\V2\BatchUpdateEntit
* @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchDeleteEntities(\Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument,
$metadata = [], $options = []) {
Expand Down
1 change: 1 addition & 0 deletions Dialogflow/src/V2/EnvironmentsGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Google\Cloud\Dialogflow\V2\ListEnvironmentsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\ListEnvironmentsResponse
*/
public function ListEnvironments(\Google\Cloud\Dialogflow\V2\ListEnvironmentsRequest $argument,
$metadata = [], $options = []) {
Expand Down
16 changes: 14 additions & 2 deletions Dialogflow/src/V2/Gapic/AgentsGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,15 @@ public function exportAgent($parent, $agentUri, array $optionalArgs = [])
* Restores the specified agent from a ZIP file.
*
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* entity types in the older version are deleted. After the restore, the
* restored draft agent will be trained automatically (unless disabled in
* agent settings). However, once the restore is done, training may not be
* completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
* returns in order to train explicitly.
*
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
* An operation which tracks when restoring is complete. It only tracks
* when the draft agent is updated not when it is done training.
*
* Sample code:
* ```
Expand Down Expand Up @@ -812,9 +818,15 @@ public function getAgent($parent, array $optionalArgs = [])
*
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft
* agent will be trained automatically (unless disabled in agent settings).
* However, once the import is done, training may not be completed yet. Please
* call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
* explicitly.
*
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
* An operation which tracks when importing is complete. It only tracks
* when the draft agent is updated not when it is done training.
*
* Sample code:
* ```
Expand Down
7 changes: 7 additions & 0 deletions Dialogflow/src/V2/IntentsGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Google\Cloud\Dialogflow\V2\ListIntentsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\ListIntentsResponse
*/
public function ListIntents(\Google\Cloud\Dialogflow\V2\ListIntentsRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -82,6 +83,7 @@ public function ListIntents(\Google\Cloud\Dialogflow\V2\ListIntentsRequest $argu
* @param \Google\Cloud\Dialogflow\V2\GetIntentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Intent
*/
public function GetIntent(\Google\Cloud\Dialogflow\V2\GetIntentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -96,6 +98,7 @@ public function GetIntent(\Google\Cloud\Dialogflow\V2\GetIntentRequest $argument
* @param \Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Intent
*/
public function CreateIntent(\Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -110,6 +113,7 @@ public function CreateIntent(\Google\Cloud\Dialogflow\V2\CreateIntentRequest $ar
* @param \Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Cloud\Dialogflow\V2\Intent
*/
public function UpdateIntent(\Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -124,6 +128,7 @@ public function UpdateIntent(\Google\Cloud\Dialogflow\V2\UpdateIntentRequest $ar
* @param \Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\Protobuf\GPBEmpty
*/
public function DeleteIntent(\Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -140,6 +145,7 @@ public function DeleteIntent(\Google\Cloud\Dialogflow\V2\DeleteIntentRequest $ar
* @param \Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchUpdateIntents(\Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument,
$metadata = [], $options = []) {
Expand All @@ -156,6 +162,7 @@ public function BatchUpdateIntents(\Google\Cloud\Dialogflow\V2\BatchUpdateIntent
* @param \Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Google\LongRunning\Operation
*/
public function BatchDeleteIntents(\Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument,
$metadata = [], $options = []) {
Expand Down
Loading

0 comments on commit 8c14718

Please sign in to comment.