Skip to content

Commit

Permalink
chore: migrate scheduler/{v1,v1beta1} to the PHP microgenerator
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 369288631

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Apr 19 13:22:03 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 93a4a58e39bef226d65c571072a42d97e53a5248
Source-Link: googleapis/googleapis@93a4a58
  • Loading branch information
yoshi-automation committed Apr 20, 2021
1 parent 746bf39 commit 3d382d4
Show file tree
Hide file tree
Showing 13 changed files with 1,209 additions and 1,382 deletions.
14 changes: 7 additions & 7 deletions Scheduler/src/V1/CloudSchedulerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@

/*
* GENERATED CODE WARNING
* This file was generated from the file
* Generated by gapic-generator-php from the file
* https://github.com/google/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto
* and updates to that file get reflected here through a refresh process.
* Updates to the above are reflected here through a refresh process.
*/

declare(strict_types=1);

namespace Google\Cloud\Scheduler\V1;

use Google\Cloud\Scheduler\V1\Gapic\CloudSchedulerGapicClient;

/**
* {@inheritdoc}
*/
/** {@inheritdoc} */
class CloudSchedulerClient extends CloudSchedulerGapicClient
{
// This class is intentionally empty, and is intended to hold manual
// additions to the generated {@see CloudSchedulerGapicClient} class.
// This class is intentionally empty, and is intended to hold manual additions to
// the generated {@see CloudSchedulerGapicClient} class.
}
545 changes: 232 additions & 313 deletions Scheduler/src/V1/Gapic/CloudSchedulerGapicClient.php

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions Scheduler/src/V1/gapic_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"schema": "1.0",
"comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods",
"language": "php",
"protoPackage": "google.cloud.scheduler.v1",
"libraryPackage": "Google\\Cloud\\Scheduler\\V1",
"services": {
"CloudScheduler": {
"clients": {
"grpc": {
"libraryClient": "CloudSchedulerGapicClient",
"rpcs": {
"CreateJob": {
"methods": [
"createJob"
]
},
"DeleteJob": {
"methods": [
"deleteJob"
]
},
"GetJob": {
"methods": [
"getJob"
]
},
"ListJobs": {
"methods": [
"listJobs"
]
},
"PauseJob": {
"methods": [
"pauseJob"
]
},
"ResumeJob": {
"methods": [
"resumeJob"
]
},
"RunJob": {
"methods": [
"runJob"
]
},
"UpdateJob": {
"methods": [
"updateJob"
]
}
}
}
}
}
}
}
162 changes: 81 additions & 81 deletions Scheduler/src/V1/resources/cloud_scheduler_client_config.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
{
"interfaces": {
"google.cloud.scheduler.v1.CloudScheduler": {
"retry_codes": {
"retry_policy_1_codes": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"no_retry_codes": [],
"no_retry_1_codes": []
},
"retry_params": {
"retry_policy_1_params": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000
},
"no_retry_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 0,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 0,
"total_timeout_millis": 0
},
"no_retry_1_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000
"interfaces": {
"google.cloud.scheduler.v1.CloudScheduler": {
"retry_codes": {
"no_retry_codes": [],
"retry_policy_1_codes": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"no_retry_1_codes": []
},
"retry_params": {
"no_retry_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 0,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 0,
"total_timeout_millis": 0
},
"retry_policy_1_params": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000
},
"no_retry_1_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000
}
},
"methods": {
"CreateJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"DeleteJob": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"GetJob": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"ListJobs": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"PauseJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"ResumeJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"RunJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"UpdateJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
}
}
}
},
"methods": {
"ListJobs": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"GetJob": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"CreateJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"UpdateJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"DeleteJob": {
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
"PauseJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"ResumeJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
"RunJob": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
}
}
}
}
}
54 changes: 27 additions & 27 deletions Scheduler/src/V1/resources/cloud_scheduler_rest_client_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
return [
'interfaces' => [
'google.cloud.scheduler.v1.CloudScheduler' => [
'ListJobs' => [
'method' => 'get',
'CreateJob' => [
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs',
'body' => 'job',
'placeholders' => [
'parent' => [
'getters' => [
Expand All @@ -14,8 +15,8 @@
],
],
],
'GetJob' => [
'method' => 'get',
'DeleteJob' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}',
'placeholders' => [
'name' => [
Expand All @@ -25,38 +26,24 @@
],
],
],
'CreateJob' => [
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs',
'body' => 'job',
'placeholders' => [
'parent' => [
'getters' => [
'getParent',
],
],
],
],
'UpdateJob' => [
'method' => 'patch',
'uriTemplate' => '/v1/{job.name=projects/*/locations/*/jobs/*}',
'body' => 'job',
'GetJob' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}',
'placeholders' => [
'job.name' => [
'name' => [
'getters' => [
'getJob',
'getName',
],
],
],
],
'DeleteJob' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}',
'ListJobs' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs',
'placeholders' => [
'name' => [
'parent' => [
'getters' => [
'getName',
'getParent',
],
],
],
Expand Down Expand Up @@ -97,6 +84,19 @@
],
],
],
'UpdateJob' => [
'method' => 'patch',
'uriTemplate' => '/v1/{job.name=projects/*/locations/*/jobs/*}',
'body' => 'job',
'placeholders' => [
'job.name' => [
'getters' => [
'getJob',
'getName',
],
],
],
],
],
],
];
14 changes: 7 additions & 7 deletions Scheduler/src/V1beta1/CloudSchedulerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@

/*
* GENERATED CODE WARNING
* This file was generated from the file
* Generated by gapic-generator-php from the file
* https://github.com/google/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto
* and updates to that file get reflected here through a refresh process.
* Updates to the above are reflected here through a refresh process.
*
* @experimental
*/

declare(strict_types=1);

namespace Google\Cloud\Scheduler\V1beta1;

use Google\Cloud\Scheduler\V1beta1\Gapic\CloudSchedulerGapicClient;

/**
* {@inheritdoc}
*/
/** {@inheritdoc} */
class CloudSchedulerClient extends CloudSchedulerGapicClient
{
// This class is intentionally empty, and is intended to hold manual
// additions to the generated {@see CloudSchedulerGapicClient} class.
// This class is intentionally empty, and is intended to hold manual additions to
// the generated {@see CloudSchedulerGapicClient} class.
}
Loading

0 comments on commit 3d382d4

Please sign in to comment.