@@ -67,6 +67,7 @@ class Instance
6767 private bool $ routeToLeader ;
6868 private string $ projectName ;
6969 private bool $ returnInt64AsObject ;
70+ private array $ info ;
7071
7172 /**
7273 * Create an object representing a Cloud Spanner instance.
@@ -91,8 +92,8 @@ class Instance
9192 * @type bool $returnInt64AsObject If true, 64 bit integers will be
9293 * returned as a {@see \Google\Cloud\Core\Int64} object for 32 bit platform
9394 * compatibility. **Defaults to** false.
95+ * @type array $instance An array representation of the instance object.
9496 * }
95- * @param array $info A representation of the instance object.
9697 */
9798 public function __construct (
9899 private GapicSpannerClient $ spannerClient ,
@@ -102,13 +103,13 @@ public function __construct(
102103 private string $ projectId ,
103104 private string $ name ,
104105 array $ options = [],
105- private array $ info = [],
106106 ) {
107107 $ this ->name = $ this ->fullyQualifiedInstanceName ($ name , $ projectId );
108108 $ this ->directedReadOptions = $ options ['directedReadOptions ' ] ?? [];
109109 $ this ->routeToLeader = $ options ['routeToLeader ' ] ?? true ;
110110 $ this ->defaultQueryOptions = $ options ['defaultQueryOptions ' ] ?? [];
111111 $ this ->returnInt64AsObject = $ options ['returnInt64AsObject ' ] ?? false ;
112+ $ this ->info = $ options ['instance ' ] ?? [];
112113 $ this ->projectName = InstanceAdminClient::projectName ($ projectId );
113114 $ this ->optionsValidator = new OptionsValidator ($ serializer );
114115 }
@@ -582,7 +583,7 @@ public function backup(string $name, array $backup = []): Backup
582583 $ this ,
583584 $ this ->projectId ,
584585 $ name ,
585- $ backup
586+ [ ' backup ' => $ backup]
586587 );
587588 }
588589
@@ -892,8 +893,8 @@ private function instanceResultFunction(): Closure
892893 'routeToLeader ' => $ this ->routeToLeader ,
893894 'defaultQueryOptions ' => $ this ->defaultQueryOptions ,
894895 'returnInt64AsObject ' => $ this ->returnInt64AsObject ,
896+ 'instance ' => $ result ,
895897 ],
896- $ result ,
897898 );
898899 };
899900 }
0 commit comments