@@ -32,7 +32,7 @@ import {Transform} from 'stream';
32
32
import { RequestType } from 'google-gax/build/src/apitypes' ;
33
33
import * as protos from '../../protos/protos' ;
34
34
import * as gapicConfig from './bigtable_instance_admin_client_config.json' ;
35
-
35
+ import { operationsProtos } from 'google-gax' ;
36
36
const version = require ( '../../../package.json' ) . version ;
37
37
38
38
/**
@@ -1675,6 +1675,42 @@ export class BigtableInstanceAdminClient {
1675
1675
this . initialize ( ) ;
1676
1676
return this . innerApiCalls . createInstance ( request , options , callback ) ;
1677
1677
}
1678
+ /**
1679
+ * Check the status of the long running operation returned by the createInstance() method.
1680
+ * @param {String } name
1681
+ * The operation name that will be passed.
1682
+ * @returns {Promise } - The promise which resolves to an object.
1683
+ * The decoded operation object has result and metadata field to get information from.
1684
+ *
1685
+ * @example :
1686
+ * const decodedOperation = await checkCreateInstanceProgress(name);
1687
+ * console.log(decodedOperation.result);
1688
+ * console.log(decodedOperation.done);
1689
+ * console.log(decodedOperation.metadata);
1690
+ *
1691
+ */
1692
+ async checkCreateInstanceProgress (
1693
+ name : string
1694
+ ) : Promise <
1695
+ LROperation <
1696
+ protos . google . bigtable . admin . v2 . Instance ,
1697
+ protos . google . bigtable . admin . v2 . CreateInstanceMetadata
1698
+ >
1699
+ > {
1700
+ const request = new operationsProtos . google . longrunning . GetOperationRequest (
1701
+ { name}
1702
+ ) ;
1703
+ const [ operation ] = await this . operationsClient . getOperation ( request ) ;
1704
+ const decodeOperation = new gax . Operation (
1705
+ operation ,
1706
+ this . descriptors . longrunning . createInstance ,
1707
+ gax . createDefaultBackoffSettings ( )
1708
+ ) ;
1709
+ return decodeOperation as LROperation <
1710
+ protos . google . bigtable . admin . v2 . Instance ,
1711
+ protos . google . bigtable . admin . v2 . CreateInstanceMetadata
1712
+ > ;
1713
+ }
1678
1714
partialUpdateInstance (
1679
1715
request : protos . google . bigtable . admin . v2 . IPartialUpdateInstanceRequest ,
1680
1716
options ?: gax . CallOptions
@@ -1777,6 +1813,42 @@ export class BigtableInstanceAdminClient {
1777
1813
this . initialize ( ) ;
1778
1814
return this . innerApiCalls . partialUpdateInstance ( request , options , callback ) ;
1779
1815
}
1816
+ /**
1817
+ * Check the status of the long running operation returned by the partialUpdateInstance() method.
1818
+ * @param {String } name
1819
+ * The operation name that will be passed.
1820
+ * @returns {Promise } - The promise which resolves to an object.
1821
+ * The decoded operation object has result and metadata field to get information from.
1822
+ *
1823
+ * @example :
1824
+ * const decodedOperation = await checkPartialUpdateInstanceProgress(name);
1825
+ * console.log(decodedOperation.result);
1826
+ * console.log(decodedOperation.done);
1827
+ * console.log(decodedOperation.metadata);
1828
+ *
1829
+ */
1830
+ async checkPartialUpdateInstanceProgress (
1831
+ name : string
1832
+ ) : Promise <
1833
+ LROperation <
1834
+ protos . google . bigtable . admin . v2 . Instance ,
1835
+ protos . google . bigtable . admin . v2 . UpdateInstanceMetadata
1836
+ >
1837
+ > {
1838
+ const request = new operationsProtos . google . longrunning . GetOperationRequest (
1839
+ { name}
1840
+ ) ;
1841
+ const [ operation ] = await this . operationsClient . getOperation ( request ) ;
1842
+ const decodeOperation = new gax . Operation (
1843
+ operation ,
1844
+ this . descriptors . longrunning . partialUpdateInstance ,
1845
+ gax . createDefaultBackoffSettings ( )
1846
+ ) ;
1847
+ return decodeOperation as LROperation <
1848
+ protos . google . bigtable . admin . v2 . Instance ,
1849
+ protos . google . bigtable . admin . v2 . UpdateInstanceMetadata
1850
+ > ;
1851
+ }
1780
1852
createCluster (
1781
1853
request : protos . google . bigtable . admin . v2 . ICreateClusterRequest ,
1782
1854
options ?: gax . CallOptions
@@ -1884,6 +1956,42 @@ export class BigtableInstanceAdminClient {
1884
1956
this . initialize ( ) ;
1885
1957
return this . innerApiCalls . createCluster ( request , options , callback ) ;
1886
1958
}
1959
+ /**
1960
+ * Check the status of the long running operation returned by the createCluster() method.
1961
+ * @param {String } name
1962
+ * The operation name that will be passed.
1963
+ * @returns {Promise } - The promise which resolves to an object.
1964
+ * The decoded operation object has result and metadata field to get information from.
1965
+ *
1966
+ * @example :
1967
+ * const decodedOperation = await checkCreateClusterProgress(name);
1968
+ * console.log(decodedOperation.result);
1969
+ * console.log(decodedOperation.done);
1970
+ * console.log(decodedOperation.metadata);
1971
+ *
1972
+ */
1973
+ async checkCreateClusterProgress (
1974
+ name : string
1975
+ ) : Promise <
1976
+ LROperation <
1977
+ protos . google . bigtable . admin . v2 . Cluster ,
1978
+ protos . google . bigtable . admin . v2 . CreateClusterMetadata
1979
+ >
1980
+ > {
1981
+ const request = new operationsProtos . google . longrunning . GetOperationRequest (
1982
+ { name}
1983
+ ) ;
1984
+ const [ operation ] = await this . operationsClient . getOperation ( request ) ;
1985
+ const decodeOperation = new gax . Operation (
1986
+ operation ,
1987
+ this . descriptors . longrunning . createCluster ,
1988
+ gax . createDefaultBackoffSettings ( )
1989
+ ) ;
1990
+ return decodeOperation as LROperation <
1991
+ protos . google . bigtable . admin . v2 . Cluster ,
1992
+ protos . google . bigtable . admin . v2 . CreateClusterMetadata
1993
+ > ;
1994
+ }
1887
1995
updateCluster (
1888
1996
request : protos . google . bigtable . admin . v2 . ICluster ,
1889
1997
options ?: gax . CallOptions
@@ -1998,6 +2106,42 @@ export class BigtableInstanceAdminClient {
1998
2106
this . initialize ( ) ;
1999
2107
return this . innerApiCalls . updateCluster ( request , options , callback ) ;
2000
2108
}
2109
+ /**
2110
+ * Check the status of the long running operation returned by the updateCluster() method.
2111
+ * @param {String } name
2112
+ * The operation name that will be passed.
2113
+ * @returns {Promise } - The promise which resolves to an object.
2114
+ * The decoded operation object has result and metadata field to get information from.
2115
+ *
2116
+ * @example :
2117
+ * const decodedOperation = await checkUpdateClusterProgress(name);
2118
+ * console.log(decodedOperation.result);
2119
+ * console.log(decodedOperation.done);
2120
+ * console.log(decodedOperation.metadata);
2121
+ *
2122
+ */
2123
+ async checkUpdateClusterProgress (
2124
+ name : string
2125
+ ) : Promise <
2126
+ LROperation <
2127
+ protos . google . bigtable . admin . v2 . Cluster ,
2128
+ protos . google . bigtable . admin . v2 . UpdateClusterMetadata
2129
+ >
2130
+ > {
2131
+ const request = new operationsProtos . google . longrunning . GetOperationRequest (
2132
+ { name}
2133
+ ) ;
2134
+ const [ operation ] = await this . operationsClient . getOperation ( request ) ;
2135
+ const decodeOperation = new gax . Operation (
2136
+ operation ,
2137
+ this . descriptors . longrunning . updateCluster ,
2138
+ gax . createDefaultBackoffSettings ( )
2139
+ ) ;
2140
+ return decodeOperation as LROperation <
2141
+ protos . google . bigtable . admin . v2 . Cluster ,
2142
+ protos . google . bigtable . admin . v2 . UpdateClusterMetadata
2143
+ > ;
2144
+ }
2001
2145
updateAppProfile (
2002
2146
request : protos . google . bigtable . admin . v2 . IUpdateAppProfileRequest ,
2003
2147
options ?: gax . CallOptions
@@ -2101,6 +2245,42 @@ export class BigtableInstanceAdminClient {
2101
2245
this . initialize ( ) ;
2102
2246
return this . innerApiCalls . updateAppProfile ( request , options , callback ) ;
2103
2247
}
2248
+ /**
2249
+ * Check the status of the long running operation returned by the updateAppProfile() method.
2250
+ * @param {String } name
2251
+ * The operation name that will be passed.
2252
+ * @returns {Promise } - The promise which resolves to an object.
2253
+ * The decoded operation object has result and metadata field to get information from.
2254
+ *
2255
+ * @example :
2256
+ * const decodedOperation = await checkUpdateAppProfileProgress(name);
2257
+ * console.log(decodedOperation.result);
2258
+ * console.log(decodedOperation.done);
2259
+ * console.log(decodedOperation.metadata);
2260
+ *
2261
+ */
2262
+ async checkUpdateAppProfileProgress (
2263
+ name : string
2264
+ ) : Promise <
2265
+ LROperation <
2266
+ protos . google . bigtable . admin . v2 . AppProfile ,
2267
+ protos . google . bigtable . admin . v2 . UpdateAppProfileMetadata
2268
+ >
2269
+ > {
2270
+ const request = new operationsProtos . google . longrunning . GetOperationRequest (
2271
+ { name}
2272
+ ) ;
2273
+ const [ operation ] = await this . operationsClient . getOperation ( request ) ;
2274
+ const decodeOperation = new gax . Operation (
2275
+ operation ,
2276
+ this . descriptors . longrunning . updateAppProfile ,
2277
+ gax . createDefaultBackoffSettings ( )
2278
+ ) ;
2279
+ return decodeOperation as LROperation <
2280
+ protos . google . bigtable . admin . v2 . AppProfile ,
2281
+ protos . google . bigtable . admin . v2 . UpdateAppProfileMetadata
2282
+ > ;
2283
+ }
2104
2284
listAppProfiles (
2105
2285
request : protos . google . bigtable . admin . v2 . IListAppProfilesRequest ,
2106
2286
options ?: gax . CallOptions
0 commit comments