Skip to content

Commit

Permalink
Add support for failover instances. (#1810)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Here's the log from Synthtool:
```
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/Redis/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:d9597f983d1d4e61272c63cb97b7d8f8234da9999526c35d357de3d781f0ec1b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/cloud/redis/artman_redis_v1beta1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/php/google-cloud-redis-v1beta1.
synthtool > Running generator for google/cloud/redis/artman_redis_v1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/php/google-cloud-redis-v1.
synthtool > Replaced 'Copyright \\d{4}' in src/V1/Gapic/CloudRedisGapicClient.php.
synthtool > Replaced 'Copyright \\d{4}' in src/V1beta1/Gapic/CloudRedisGapicClient.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/Unit/V1/CloudRedisClientTest.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/Unit/V1/CloudRedisClientPartialVeneerTest.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/Unit/V1beta1/CloudRedisClientTest.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/Unit/V1beta1/CloudRedisClientPartialVeneerTest.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/System/V1/CloudRedisClientTest.php.
synthtool > Replaced 'Copyright \\d{4}' in tests/System/V1beta1/CloudRedisClientTest.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1/FailoverInstanceRequest_DataProtectionMode.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1/Instance_State.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1/Instance_Tier.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1beta1/FailoverInstanceRequest_DataProtectionMode.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1beta1/Instance_State.php.
synthtool > Replaced 'will be removed in the next major release' in src/V1beta1/Instance_Tier.php.
synthtool > Replaced 'Instance_Tier' in src/V1/Gapic/CloudRedisGapicClient.php.
synthtool > Replaced 'Instance_Tier' in src/V1beta1/Gapic/CloudRedisGapicClient.php.
synthtool > Cleaned up 1 temporary directories.
synthtool > Wrote metadata to synth.metadata.

```
  • Loading branch information
yoshi-automation authored and jdpedrie committed Apr 5, 2019
1 parent 5b69569 commit d6ece55
Show file tree
Hide file tree
Showing 15 changed files with 780 additions and 165 deletions.
145 changes: 81 additions & 64 deletions Redis/metadata/V1Beta1/CloudRedis.php

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

20 changes: 18 additions & 2 deletions Redis/src/V1beta1/CloudRedisGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// GENERATED CODE -- DO NOT EDIT!

// Original file comments:
// Copyright 2018 Google Inc.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
namespace Google\Cloud\Redis\V1beta1;

/**
Expand Down Expand Up @@ -84,7 +85,7 @@ public function GetInstance(\Google\Cloud\Redis\V1beta1\GetInstanceRequest $argu
/**
* Creates a Redis instance based on the specified tier and memory size.
*
* By default, the instance is peered to the project's
* By default, the instance is accessible from the project's
* [default network](/compute/docs/networks-and-firewalls#networks).
*
* The creation is executed asynchronously and callers may check the returned
Expand Down Expand Up @@ -124,6 +125,21 @@ public function UpdateInstance(\Google\Cloud\Redis\V1beta1\UpdateInstanceRequest
$metadata, $options);
}

/**
* Failover the master role to current replica node against a specific
* STANDARD tier redis instance.
* @param \Google\Cloud\Redis\V1beta1\FailoverInstanceRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function FailoverInstance(\Google\Cloud\Redis\V1beta1\FailoverInstanceRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.redis.v1beta1.CloudRedis/FailoverInstance',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}

/**
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
Expand Down
114 changes: 114 additions & 0 deletions Redis/src/V1beta1/FailoverInstanceRequest.php

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

Loading

0 comments on commit d6ece55

Please sign in to comment.