Skip to content

Commit 0ff3683

Browse files
dpebotJustinBeckwith
authored andcommitted
Switch to let/const (#72)
1 parent b8ca422 commit 0ff3683

File tree

6 files changed

+93
-93
lines changed

6 files changed

+93
-93
lines changed

packages/google-cloud-oslogin/src/v1beta/doc/google/cloud/oslogin/common/doc_common.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @memberof google.cloud.oslogin.common
5151
* @see [google.cloud.oslogin.common.PosixAccount definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/common/common.proto}
5252
*/
53-
var PosixAccount = {
53+
const PosixAccount = {
5454
// This is for documentation. Actual contents will be loaded by gRPC.
5555
};
5656

@@ -72,6 +72,6 @@ var PosixAccount = {
7272
* @memberof google.cloud.oslogin.common
7373
* @see [google.cloud.oslogin.common.SshPublicKey definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/common/common.proto}
7474
*/
75-
var SshPublicKey = {
75+
const SshPublicKey = {
7676
// This is for documentation. Actual contents will be loaded by gRPC.
7777
};

packages/google-cloud-oslogin/src/v1beta/doc/google/cloud/oslogin/v1beta/doc_oslogin.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @memberof google.cloud.oslogin.v1beta
3939
* @see [google.cloud.oslogin.v1beta.LoginProfile definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
4040
*/
41-
var LoginProfile = {
41+
const LoginProfile = {
4242
// This is for documentation. Actual contents will be loaded by gRPC.
4343
};
4444

@@ -54,7 +54,7 @@ var LoginProfile = {
5454
* @memberof google.cloud.oslogin.v1beta
5555
* @see [google.cloud.oslogin.v1beta.DeletePosixAccountRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
5656
*/
57-
var DeletePosixAccountRequest = {
57+
const DeletePosixAccountRequest = {
5858
// This is for documentation. Actual contents will be loaded by gRPC.
5959
};
6060

@@ -70,7 +70,7 @@ var DeletePosixAccountRequest = {
7070
* @memberof google.cloud.oslogin.v1beta
7171
* @see [google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
7272
*/
73-
var DeleteSshPublicKeyRequest = {
73+
const DeleteSshPublicKeyRequest = {
7474
// This is for documentation. Actual contents will be loaded by gRPC.
7575
};
7676

@@ -84,7 +84,7 @@ var DeleteSshPublicKeyRequest = {
8484
* @memberof google.cloud.oslogin.v1beta
8585
* @see [google.cloud.oslogin.v1beta.GetLoginProfileRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
8686
*/
87-
var GetLoginProfileRequest = {
87+
const GetLoginProfileRequest = {
8888
// This is for documentation. Actual contents will be loaded by gRPC.
8989
};
9090

@@ -100,7 +100,7 @@ var GetLoginProfileRequest = {
100100
* @memberof google.cloud.oslogin.v1beta
101101
* @see [google.cloud.oslogin.v1beta.GetSshPublicKeyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
102102
*/
103-
var GetSshPublicKeyRequest = {
103+
const GetSshPublicKeyRequest = {
104104
// This is for documentation. Actual contents will be loaded by gRPC.
105105
};
106106

@@ -122,7 +122,7 @@ var GetSshPublicKeyRequest = {
122122
* @memberof google.cloud.oslogin.v1beta
123123
* @see [google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
124124
*/
125-
var ImportSshPublicKeyRequest = {
125+
const ImportSshPublicKeyRequest = {
126126
// This is for documentation. Actual contents will be loaded by gRPC.
127127
};
128128

@@ -138,7 +138,7 @@ var ImportSshPublicKeyRequest = {
138138
* @memberof google.cloud.oslogin.v1beta
139139
* @see [google.cloud.oslogin.v1beta.ImportSshPublicKeyResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
140140
*/
141-
var ImportSshPublicKeyResponse = {
141+
const ImportSshPublicKeyResponse = {
142142
// This is for documentation. Actual contents will be loaded by gRPC.
143143
};
144144

@@ -164,6 +164,6 @@ var ImportSshPublicKeyResponse = {
164164
* @memberof google.cloud.oslogin.v1beta
165165
* @see [google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/oslogin/v1beta/oslogin.proto}
166166
*/
167-
var UpdateSshPublicKeyRequest = {
167+
const UpdateSshPublicKeyRequest = {
168168
// This is for documentation. Actual contents will be loaded by gRPC.
169169
};

packages/google-cloud-oslogin/src/v1beta/doc/google/protobuf/doc_empty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
* @memberof google.protobuf
3030
* @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto}
3131
*/
32-
var Empty = {
32+
const Empty = {
3333
// This is for documentation. Actual contents will be loaded by gRPC.
3434
};

packages/google-cloud-oslogin/src/v1beta/doc/google/protobuf/doc_field_mask.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@
231231
* @memberof google.protobuf
232232
* @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto}
233233
*/
234-
var FieldMask = {
234+
const FieldMask = {
235235
// This is for documentation. Actual contents will be loaded by gRPC.
236236
};

packages/google-cloud-oslogin/src/v1beta/os_login_service_client.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class OsLoginServiceClient {
7474
// Create a `gaxGrpc` object, with any grpc-specific options
7575
// sent to the client.
7676
opts.scopes = this.constructor.scopes;
77-
var gaxGrpc = new gax.GrpcClient(opts);
77+
const gaxGrpc = new gax.GrpcClient(opts);
7878

7979
// Save the auth object to the client, for use by other methods.
8080
this.auth = gaxGrpc.auth;
8181

8282
// Determine the client header string.
83-
var clientHeader = [
83+
const clientHeader = [
8484
`gl-node/${process.version}`,
8585
`grpc/${gaxGrpc.grpcVersion}`,
8686
`gax/${gax.version}`,
@@ -91,7 +91,7 @@ class OsLoginServiceClient {
9191
}
9292

9393
// Load the applicable protos.
94-
var protos = merge(
94+
const protos = merge(
9595
{},
9696
gaxGrpc.loadProto(
9797
path.join(__dirname, '..', '..', 'protos'),
@@ -113,7 +113,7 @@ class OsLoginServiceClient {
113113
};
114114

115115
// Put together the default options sent with requests.
116-
var defaults = gaxGrpc.constructSettings(
116+
const defaults = gaxGrpc.constructSettings(
117117
'google.cloud.oslogin.v1beta.OsLoginService',
118118
gapicConfig,
119119
opts.clientConfig,
@@ -127,14 +127,14 @@ class OsLoginServiceClient {
127127

128128
// Put together the "service stub" for
129129
// google.cloud.oslogin.v1beta.OsLoginService.
130-
var osLoginServiceStub = gaxGrpc.createStub(
130+
const osLoginServiceStub = gaxGrpc.createStub(
131131
protos.google.cloud.oslogin.v1beta.OsLoginService,
132132
opts
133133
);
134134

135135
// Iterate over each of the methods that the service provides
136136
// and create an API call method for each.
137-
var osLoginServiceStubMethods = [
137+
const osLoginServiceStubMethods = [
138138
'deletePosixAccount',
139139
'deleteSshPublicKey',
140140
'getLoginProfile',
@@ -147,7 +147,7 @@ class OsLoginServiceClient {
147147
osLoginServiceStub.then(
148148
stub =>
149149
function() {
150-
var args = Array.prototype.slice.call(arguments, 0);
150+
const args = Array.prototype.slice.call(arguments, 0);
151151
return stub[methodName].apply(stub, args);
152152
}
153153
),
@@ -218,11 +218,11 @@ class OsLoginServiceClient {
218218
*
219219
* const osLogin = require('@google-cloud/os-login');
220220
*
221-
* var client = new osLogin.v1beta.OsLoginServiceClient({
221+
* const client = new osLogin.v1beta.OsLoginServiceClient({
222222
* // optional auth parameters.
223223
* });
224224
*
225-
* var formattedName = client.projectPath('[USER]', '[PROJECT]');
225+
* const formattedName = client.projectPath('[USER]', '[PROJECT]');
226226
* client.deletePosixAccount({name: formattedName}).catch(err => {
227227
* console.error(err);
228228
* });
@@ -258,11 +258,11 @@ class OsLoginServiceClient {
258258
*
259259
* const osLogin = require('@google-cloud/os-login');
260260
*
261-
* var client = new osLogin.v1beta.OsLoginServiceClient({
261+
* const client = new osLogin.v1beta.OsLoginServiceClient({
262262
* // optional auth parameters.
263263
* });
264264
*
265-
* var formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
265+
* const formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
266266
* client.deleteSshPublicKey({name: formattedName}).catch(err => {
267267
* console.error(err);
268268
* });
@@ -300,14 +300,14 @@ class OsLoginServiceClient {
300300
*
301301
* const osLogin = require('@google-cloud/os-login');
302302
*
303-
* var client = new osLogin.v1beta.OsLoginServiceClient({
303+
* const client = new osLogin.v1beta.OsLoginServiceClient({
304304
* // optional auth parameters.
305305
* });
306306
*
307-
* var formattedName = client.userPath('[USER]');
307+
* const formattedName = client.userPath('[USER]');
308308
* client.getLoginProfile({name: formattedName})
309309
* .then(responses => {
310-
* var response = responses[0];
310+
* const response = responses[0];
311311
* // doThingsWith(response)
312312
* })
313313
* .catch(err => {
@@ -348,14 +348,14 @@ class OsLoginServiceClient {
348348
*
349349
* const osLogin = require('@google-cloud/os-login');
350350
*
351-
* var client = new osLogin.v1beta.OsLoginServiceClient({
351+
* const client = new osLogin.v1beta.OsLoginServiceClient({
352352
* // optional auth parameters.
353353
* });
354354
*
355-
* var formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
355+
* const formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
356356
* client.getSshPublicKey({name: formattedName})
357357
* .then(responses => {
358-
* var response = responses[0];
358+
* const response = responses[0];
359359
* // doThingsWith(response)
360360
* })
361361
* .catch(err => {
@@ -402,19 +402,19 @@ class OsLoginServiceClient {
402402
*
403403
* const osLogin = require('@google-cloud/os-login');
404404
*
405-
* var client = new osLogin.v1beta.OsLoginServiceClient({
405+
* const client = new osLogin.v1beta.OsLoginServiceClient({
406406
* // optional auth parameters.
407407
* });
408408
*
409-
* var formattedParent = client.userPath('[USER]');
410-
* var sshPublicKey = {};
411-
* var request = {
409+
* const formattedParent = client.userPath('[USER]');
410+
* const sshPublicKey = {};
411+
* const request = {
412412
* parent: formattedParent,
413413
* sshPublicKey: sshPublicKey,
414414
* };
415415
* client.importSshPublicKey(request)
416416
* .then(responses => {
417-
* var response = responses[0];
417+
* const response = responses[0];
418418
* // doThingsWith(response)
419419
* })
420420
* .catch(err => {
@@ -464,19 +464,19 @@ class OsLoginServiceClient {
464464
*
465465
* const osLogin = require('@google-cloud/os-login');
466466
*
467-
* var client = new osLogin.v1beta.OsLoginServiceClient({
467+
* const client = new osLogin.v1beta.OsLoginServiceClient({
468468
* // optional auth parameters.
469469
* });
470470
*
471-
* var formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
472-
* var sshPublicKey = {};
473-
* var request = {
471+
* const formattedName = client.fingerprintPath('[USER]', '[FINGERPRINT]');
472+
* const sshPublicKey = {};
473+
* const request = {
474474
* name: formattedName,
475475
* sshPublicKey: sshPublicKey,
476476
* };
477477
* client.updateSshPublicKey(request)
478478
* .then(responses => {
479-
* var response = responses[0];
479+
* const response = responses[0];
480480
* // doThingsWith(response)
481481
* })
482482
* .catch(err => {

0 commit comments

Comments
 (0)