Skip to content

Commit 5a3e8e9

Browse files
saranshdhingrarsamborski
authored andcommitted
chore: upgrade remaining bigtable samples (GoogleCloudPlatform#1496)
1 parent d6a5807 commit 5a3e8e9

File tree

64 files changed

+1846
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1846
-546
lines changed

bigtable/src/create_app_profile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
6-
* Copyright 2019 Google LLC.
3+
* Copyright 2021 Google LLC.
74
*
85
* Licensed under the Apache License, Version 2.0 (the "License");
96
* you may not use this file except in compliance with the License.
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_app_profile]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\Cloud\Bigtable\Admin\V2\AppProfile;
@@ -32,6 +31,7 @@
3231

3332
/**
3433
* Create an App Profile
34+
*
3535
* @param string $projectId The Google Cloud project ID
3636
* @param string $instanceId The ID of the Bigtable instance
3737
* @param string $clusterId The ID of the cluster where the new App Profile will route it's requests(in case of single cluster routing)

bigtable/src/create_cluster.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_cluster]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\Cloud\Bigtable\Admin\V2\Cluster;
@@ -32,6 +31,7 @@
3231

3332
/**
3433
* Create a cluster in an existing Bigtable instance
34+
*
3535
* @param string $projectId The Google Cloud project ID
3636
* @param string $instanceId The ID of the parent Bigtable instance
3737
* @param string $clusterId The ID of the cluster to be generated

bigtable/src/create_dev_instance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_dev_instance]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\Cloud\Bigtable\Admin\V2\Instance;
@@ -34,6 +33,7 @@
3433

3534
/**
3635
* Create a development Bigtable instance
36+
*
3737
* @param string $projectId The Google Cloud project ID
3838
* @param string $instanceId The ID of the Bigtable instance to be generated
3939
* @param string $clusterId The ID of the cluster to be generated

bigtable/src/create_family_gc_intersection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_family_gc_intersection]
2827
use Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection as GcRuleIntersection;
2928
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
@@ -34,6 +33,7 @@
3433

3534
/**
3635
* Create a new column family with an intersection GC rule
36+
*
3737
* @param string $projectId The Google Cloud project ID
3838
* @param string $instanceId The ID of the Bigtable instance where the table resides
3939
* @param string $tableId The ID of the table in which the rule needs to be created

bigtable/src/create_family_gc_max_age.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_family_gc_max_age]
2827
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
2928
use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient;
@@ -33,6 +32,7 @@
3332

3433
/**
3534
* Create a new column family with a max age GC rule
35+
*
3636
* @param string $projectId The Google Cloud project ID
3737
* @param string $instanceId The ID of the Bigtable instance where the table resides
3838
* @param string $tableId The ID of the table in which the rule needs to be created

bigtable/src/create_family_gc_max_versions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_family_gc_max_versions]
2827
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
2928
use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient;
@@ -32,6 +31,7 @@
3231

3332
/**
3433
* Create a new column family with a max versions GC rule
34+
*
3535
* @param string $projectId The Google Cloud project ID
3636
* @param string $instanceId The ID of the Bigtable instance where the table resides
3737
* @param string $tableId The ID of the table in which the rule needs to be created

bigtable/src/create_family_gc_nested.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_family_gc_nested]
2827
use Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection as GcRuleIntersection;
2928
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
@@ -35,6 +34,7 @@
3534

3635
/**
3736
* Create a new column family with a nested GC rule
37+
*
3838
* @param string $projectId The Google Cloud project ID
3939
* @param string $instanceId The ID of the Bigtable instance where the table resides
4040
* @param string $tableId The ID of the table in which the rule needs to be created

bigtable/src/create_family_gc_union.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_family_gc_union]
2827
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
2928
use Google\Cloud\Bigtable\Admin\V2\GcRule\Union as GcRuleUnion;
@@ -34,6 +33,7 @@
3433

3534
/**
3635
* Create a new column family with a union GC rule
36+
*
3737
* @param string $projectId The Google Cloud project ID
3838
* @param string $instanceId The ID of the Bigtable instance where the table resides
3939
* @param string $tableId The ID of the table in which the rule needs to be created

bigtable/src/create_production_instance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_prod_instance]
2827
use Google\Cloud\Bigtable\Admin\V2\Instance\Type as InstanceType;
2928
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
@@ -34,6 +33,7 @@
3433

3534
/**
3635
* Create a production Bigtable instance
36+
*
3737
* @param string $projectId The Google Cloud project ID
3838
* @param string $instanceId The ID of the Bigtable instance to be generated
3939
* @param string $clusterId The ID of the cluster to be generated

bigtable/src/create_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,6 +21,8 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_create_table]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient;
@@ -33,6 +32,7 @@
3332

3433
/**
3534
* Create a new table in a Bigtable instance
35+
*
3636
* @param string $projectId The Google Cloud project ID
3737
* @param string $instanceId The ID of the Bigtable instance where you need the table to reside
3838
* @param string $tableId The ID of the table to be generated

bigtable/src/delete_app_profile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
6-
* Copyright 2019 Google LLC.
3+
* Copyright 2021 Google LLC.
74
*
85
* Licensed under the Apache License, Version 2.0 (the "License");
96
* you may not use this file except in compliance with the License.
@@ -24,12 +21,15 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_delete_app_profile]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\ApiCore\ApiException;
3029

3130
/**
3231
* Delete an App Profile from a Bigtable instance.
32+
*
3333
* @param string $projectId The Google Cloud project ID
3434
* @param string $instanceId The ID of the Bigtable instance
3535
* @param string $appProfileId The ID of the App Profile to be deleted

bigtable/src/delete_cluster.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,12 +21,15 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_delete_cluster]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\ApiCore\ApiException;
3029

3130
/**
3231
* Delete a cluster
32+
*
3333
* @param string $projectId The Google Cloud project ID
3434
* @param string $instanceId The ID of the Bigtable instance
3535
* @param string $clusterId The ID of the cluster to be deleted

bigtable/src/delete_family.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,12 +21,15 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_delete_family]
2827
use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification;
2928
use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient;
3029

3130
/**
3231
* Delete a column family in a table
32+
*
3333
* @param string $projectId The Google Cloud project ID
3434
* @param string $instanceId The ID of the Bigtable instance
3535
* @param string $tableId The ID of the table where the column family needs to be deleted

bigtable/src/delete_instance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,12 +21,15 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_delete_instance]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient;
2928
use Google\ApiCore\ApiException;
3029

3130
/**
3231
* Delete a bigtable instance
32+
*
3333
* @param string $projectId The Google Cloud project ID
3434
* @param string $instanceId The ID of the Bigtable instance to be deleted
3535
*/

bigtable/src/delete_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
2-
3-
namespace Google\Cloud\Samples\Bigtable;
4-
52
/**
63
* Copyright 2019 Google LLC.
74
*
@@ -24,12 +21,15 @@
2421
* @see https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable/README.md
2522
*/
2623

24+
namespace Google\Cloud\Samples\Bigtable;
25+
2726
// [START bigtable_delete_table]
2827
use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient;
2928
use Google\ApiCore\ApiException;
3029

3130
/**
3231
* Delete a table
32+
*
3333
* @param string $projectId The Google Cloud project ID
3434
* @param string $instanceId The ID of the Bigtable instance
3535
* @param string $tableId The ID of the table to be deleted

0 commit comments

Comments
 (0)