Skip to content

Commit

Permalink
feat: Update ReadRowsResponse, update sample code. (#1997)
Browse files Browse the repository at this point in the history
* [CHANGE ME] Re-generated Bigtable to pick up changes in the API or client library generator.

* Fix samples class references

* Fix bad replace
  • Loading branch information
yoshi-automation authored and dwsupplee committed Jun 24, 2019
1 parent 9dfcbc0 commit e0f041e
Show file tree
Hide file tree
Showing 9 changed files with 243 additions and 122 deletions.
61 changes: 31 additions & 30 deletions src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
use Google\Cloud\Bigtable\Admin\V2\GetClusterRequest;
use Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest;
use Google\Cloud\Bigtable\Admin\V2\Instance;
use Google\Cloud\Bigtable\Admin\V2\Instance\State;
use Google\Cloud\Bigtable\Admin\V2\Instance\Type;
use Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest;
use Google\Cloud\Bigtable\Admin\V2\ListAppProfilesResponse;
Expand Down Expand Up @@ -76,11 +77,11 @@
* calls that map to API methods. Sample code to get started:
*
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->projectName('[PROJECT]');
* $instanceId = '';
* $instance = new Instance();
* $instance = new Google\Cloud\Bigtable\Admin\V2\Instance();
* $clusters = [];
* $operationResponse = $bigtableInstanceAdminClient->createInstance($formattedParent, $instanceId, $instance, $clusters);
* $operationResponse->pollUntilComplete();
Expand Down Expand Up @@ -485,11 +486,11 @@ public function __construct(array $options = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->projectName('[PROJECT]');
* $instanceId = '';
* $instance = new Instance();
* $instance = new Google\Cloud\Bigtable\Admin\V2\Instance();
* $clusters = [];
* $operationResponse = $bigtableInstanceAdminClient->createInstance($formattedParent, $instanceId, $instance, $clusters);
* $operationResponse->pollUntilComplete();
Expand Down Expand Up @@ -580,7 +581,7 @@ public function createInstance($parent, $instanceId, $instance, $clusters, array
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $response = $bigtableInstanceAdminClient->getInstance($formattedName);
Expand Down Expand Up @@ -631,7 +632,7 @@ public function getInstance($name, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->projectName('[PROJECT]');
* $response = $bigtableInstanceAdminClient->listInstances($formattedParent);
Expand Down Expand Up @@ -687,11 +688,11 @@ public function listInstances($parent, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $displayName = '';
* $type = Instance\Type::TYPE_UNSPECIFIED;
* $type = Google\Cloud\Bigtable\Admin\V2\Instance\Type::TYPE_UNSPECIFIED;
* $labels = [];
* $response = $bigtableInstanceAdminClient->updateInstance($formattedName, $displayName, $type, $labels);
* } finally {
Expand Down Expand Up @@ -768,10 +769,10 @@ public function updateInstance($name, $displayName, $type, $labels, array $optio
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $instance = new Instance();
* $updateMask = new FieldMask();
* $instance = new Google\Cloud\Bigtable\Admin\V2\Instance();
* $updateMask = new Google\Protobuf\FieldMask();
* $operationResponse = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask);
* $operationResponse->pollUntilComplete();
* if ($operationResponse->operationSucceeded()) {
Expand Down Expand Up @@ -850,7 +851,7 @@ public function partialUpdateInstance($instance, $updateMask, array $optionalArg
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $bigtableInstanceAdminClient->deleteInstance($formattedName);
Expand Down Expand Up @@ -899,11 +900,11 @@ public function deleteInstance($name, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $clusterId = '';
* $cluster = new Cluster();
* $cluster = new Google\Cloud\Bigtable\Admin\V2\Cluster();
* $operationResponse = $bigtableInstanceAdminClient->createCluster($formattedParent, $clusterId, $cluster);
* $operationResponse->pollUntilComplete();
* if ($operationResponse->operationSucceeded()) {
Expand Down Expand Up @@ -988,7 +989,7 @@ public function createCluster($parent, $clusterId, $cluster, array $optionalArgs
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
* $response = $bigtableInstanceAdminClient->getCluster($formattedName);
Expand Down Expand Up @@ -1039,7 +1040,7 @@ public function getCluster($name, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $response = $bigtableInstanceAdminClient->listClusters($formattedParent);
Expand Down Expand Up @@ -1097,7 +1098,7 @@ public function listClusters($parent, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
* $serveNodes = 0;
Expand Down Expand Up @@ -1205,7 +1206,7 @@ public function updateCluster($name, $serveNodes, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
* $bigtableInstanceAdminClient->deleteCluster($formattedName);
Expand Down Expand Up @@ -1254,11 +1255,11 @@ public function deleteCluster($name, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $appProfileId = '';
* $appProfile = new AppProfile();
* $appProfile = new Google\Cloud\Bigtable\Admin\V2\AppProfile();
* $response = $bigtableInstanceAdminClient->createAppProfile($formattedParent, $appProfileId, $appProfile);
* } finally {
* $bigtableInstanceAdminClient->close();
Expand Down Expand Up @@ -1320,7 +1321,7 @@ public function createAppProfile($parent, $appProfileId, $appProfile, array $opt
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]');
* $response = $bigtableInstanceAdminClient->getAppProfile($formattedName);
Expand Down Expand Up @@ -1371,7 +1372,7 @@ public function getAppProfile($name, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* // Iterate over pages of elements
Expand Down Expand Up @@ -1454,10 +1455,10 @@ public function listAppProfiles($parent, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $appProfile = new AppProfile();
* $updateMask = new FieldMask();
* $appProfile = new Google\Cloud\Bigtable\Admin\V2\AppProfile();
* $updateMask = new Google\Protobuf\FieldMask();
* $operationResponse = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask);
* $operationResponse->pollUntilComplete();
* if ($operationResponse->operationSucceeded()) {
Expand Down Expand Up @@ -1541,7 +1542,7 @@ public function updateAppProfile($appProfile, $updateMask, array $optionalArgs =
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedName = $bigtableInstanceAdminClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]');
* $ignoreWarnings = false;
Expand Down Expand Up @@ -1594,7 +1595,7 @@ public function deleteAppProfile($name, $ignoreWarnings, array $optionalArgs = [
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedResource = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $response = $bigtableInstanceAdminClient->getIamPolicy($formattedResource);
Expand Down Expand Up @@ -1646,10 +1647,10 @@ public function getIamPolicy($resource, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedResource = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $policy = new Policy();
* $policy = new Google\Cloud\Iam\V1\Policy();
* $response = $bigtableInstanceAdminClient->setIamPolicy($formattedResource, $policy);
* } finally {
* $bigtableInstanceAdminClient->close();
Expand Down Expand Up @@ -1703,7 +1704,7 @@ public function setIamPolicy($resource, $policy, array $optionalArgs = [])
*
* Sample code:
* ```
* $bigtableInstanceAdminClient = new BigtableInstanceAdminClient();
* $bigtableInstanceAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient();
* try {
* $formattedResource = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]');
* $permissions = [];
Expand Down
Loading

0 comments on commit e0f041e

Please sign in to comment.