@@ -374,7 +374,7 @@ class EntityTypesClient {
374
374
* client.listEntityTypes({parent: formattedParent})
375
375
* .then(responses => {
376
376
* const resources = responses[0];
377
- * for (let i = 0; i < resources.length; i += 1 ) {
377
+ * for (const resource of resources) {
378
378
* // doThingsWith(resources[i])
379
379
* }
380
380
* })
@@ -394,7 +394,7 @@ class EntityTypesClient {
394
394
* const nextRequest = responses[1];
395
395
* // The actual response object, if necessary.
396
396
* // const rawResponse = responses[2];
397
- * for (let i = 0; i < resources.length; i += 1 ) {
397
+ * for (const resource of resources) {
398
398
* // doThingsWith(resources[i]);
399
399
* }
400
400
* if (nextRequest) {
@@ -747,20 +747,14 @@ class EntityTypesClient {
747
747
* // Handle the operation using the promise pattern.
748
748
* client.batchUpdateEntityTypes({parent: formattedParent})
749
749
* .then(responses => {
750
- * const operation = responses[0];
751
- * const initialApiResponse = responses[1];
750
+ * const [operation, initialApiResponse] = responses;
752
751
*
753
752
* // Operation#promise starts polling for the completion of the LRO.
754
753
* return operation.promise();
755
754
* })
756
755
* .then(responses => {
757
- * // The final result of the operation.
758
756
* const result = responses[0];
759
- *
760
- * // The metadata value of the completed operation.
761
757
* const metadata = responses[1];
762
- *
763
- * // The response of the api call returning the complete operation.
764
758
* const finalApiResponse = responses[2];
765
759
* })
766
760
* .catch(err => {
@@ -772,8 +766,7 @@ class EntityTypesClient {
772
766
* // Handle the operation using the event emitter pattern.
773
767
* client.batchUpdateEntityTypes({parent: formattedParent})
774
768
* .then(responses => {
775
- * const operation = responses[0];
776
- * const initialApiResponse = responses[1];
769
+ * const [operation, initialApiResponse] = responses;
777
770
*
778
771
* // Adding a listener for the "complete" event starts polling for the
779
772
* // completion of the operation.
@@ -853,20 +846,14 @@ class EntityTypesClient {
853
846
* // Handle the operation using the promise pattern.
854
847
* client.batchDeleteEntityTypes(request)
855
848
* .then(responses => {
856
- * const operation = responses[0];
857
- * const initialApiResponse = responses[1];
849
+ * const [operation, initialApiResponse] = responses;
858
850
*
859
851
* // Operation#promise starts polling for the completion of the LRO.
860
852
* return operation.promise();
861
853
* })
862
854
* .then(responses => {
863
- * // The final result of the operation.
864
855
* const result = responses[0];
865
- *
866
- * // The metadata value of the completed operation.
867
856
* const metadata = responses[1];
868
- *
869
- * // The response of the api call returning the complete operation.
870
857
* const finalApiResponse = responses[2];
871
858
* })
872
859
* .catch(err => {
@@ -883,8 +870,7 @@ class EntityTypesClient {
883
870
* // Handle the operation using the event emitter pattern.
884
871
* client.batchDeleteEntityTypes(request)
885
872
* .then(responses => {
886
- * const operation = responses[0];
887
- * const initialApiResponse = responses[1];
873
+ * const [operation, initialApiResponse] = responses;
888
874
*
889
875
* // Adding a listener for the "complete" event starts polling for the
890
876
* // completion of the operation.
@@ -971,20 +957,14 @@ class EntityTypesClient {
971
957
* // Handle the operation using the promise pattern.
972
958
* client.batchCreateEntities(request)
973
959
* .then(responses => {
974
- * const operation = responses[0];
975
- * const initialApiResponse = responses[1];
960
+ * const [operation, initialApiResponse] = responses;
976
961
*
977
962
* // Operation#promise starts polling for the completion of the LRO.
978
963
* return operation.promise();
979
964
* })
980
965
* .then(responses => {
981
- * // The final result of the operation.
982
966
* const result = responses[0];
983
- *
984
- * // The metadata value of the completed operation.
985
967
* const metadata = responses[1];
986
- *
987
- * // The response of the api call returning the complete operation.
988
968
* const finalApiResponse = responses[2];
989
969
* })
990
970
* .catch(err => {
@@ -1001,8 +981,7 @@ class EntityTypesClient {
1001
981
* // Handle the operation using the event emitter pattern.
1002
982
* client.batchCreateEntities(request)
1003
983
* .then(responses => {
1004
- * const operation = responses[0];
1005
- * const initialApiResponse = responses[1];
984
+ * const [operation, initialApiResponse] = responses;
1006
985
*
1007
986
* // Adding a listener for the "complete" event starts polling for the
1008
987
* // completion of the operation.
@@ -1090,20 +1069,14 @@ class EntityTypesClient {
1090
1069
* // Handle the operation using the promise pattern.
1091
1070
* client.batchUpdateEntities(request)
1092
1071
* .then(responses => {
1093
- * const operation = responses[0];
1094
- * const initialApiResponse = responses[1];
1072
+ * const [operation, initialApiResponse] = responses;
1095
1073
*
1096
1074
* // Operation#promise starts polling for the completion of the LRO.
1097
1075
* return operation.promise();
1098
1076
* })
1099
1077
* .then(responses => {
1100
- * // The final result of the operation.
1101
1078
* const result = responses[0];
1102
- *
1103
- * // The metadata value of the completed operation.
1104
1079
* const metadata = responses[1];
1105
- *
1106
- * // The response of the api call returning the complete operation.
1107
1080
* const finalApiResponse = responses[2];
1108
1081
* })
1109
1082
* .catch(err => {
@@ -1120,8 +1093,7 @@ class EntityTypesClient {
1120
1093
* // Handle the operation using the event emitter pattern.
1121
1094
* client.batchUpdateEntities(request)
1122
1095
* .then(responses => {
1123
- * const operation = responses[0];
1124
- * const initialApiResponse = responses[1];
1096
+ * const [operation, initialApiResponse] = responses;
1125
1097
*
1126
1098
* // Adding a listener for the "complete" event starts polling for the
1127
1099
* // completion of the operation.
@@ -1204,20 +1176,14 @@ class EntityTypesClient {
1204
1176
* // Handle the operation using the promise pattern.
1205
1177
* client.batchDeleteEntities(request)
1206
1178
* .then(responses => {
1207
- * const operation = responses[0];
1208
- * const initialApiResponse = responses[1];
1179
+ * const [operation, initialApiResponse] = responses;
1209
1180
*
1210
1181
* // Operation#promise starts polling for the completion of the LRO.
1211
1182
* return operation.promise();
1212
1183
* })
1213
1184
* .then(responses => {
1214
- * // The final result of the operation.
1215
1185
* const result = responses[0];
1216
- *
1217
- * // The metadata value of the completed operation.
1218
1186
* const metadata = responses[1];
1219
- *
1220
- * // The response of the api call returning the complete operation.
1221
1187
* const finalApiResponse = responses[2];
1222
1188
* })
1223
1189
* .catch(err => {
@@ -1234,8 +1200,7 @@ class EntityTypesClient {
1234
1200
* // Handle the operation using the event emitter pattern.
1235
1201
* client.batchDeleteEntities(request)
1236
1202
* .then(responses => {
1237
- * const operation = responses[0];
1238
- * const initialApiResponse = responses[1];
1203
+ * const [operation, initialApiResponse] = responses;
1239
1204
*
1240
1205
* // Adding a listener for the "complete" event starts polling for the
1241
1206
* // completion of the operation.
0 commit comments