@@ -56,7 +56,7 @@ Service_.LOCK_EXPIRATION_MILLISECONDS_ = 30 * 1000;
56
56
* this URL should be
57
57
* https://accounts.google.com/o/oauth2/auth.
58
58
* @param {string } authorizationBaseUrl The authorization endpoint base URL.
59
- * @return {Service_ } This service, for chaining.
59
+ * @return {! Service_ } This service, for chaining.
60
60
*/
61
61
Service_ . prototype . setAuthorizationBaseUrl = function ( authorizationBaseUrl ) {
62
62
this . authorizationBaseUrl_ = authorizationBaseUrl ;
@@ -67,7 +67,7 @@ Service_.prototype.setAuthorizationBaseUrl = function(authorizationBaseUrl) {
67
67
* Sets the service's token URL (required). For Google services this URL should
68
68
* be https://accounts.google.com/o/oauth2/token.
69
69
* @param {string } tokenUrl The token endpoint URL.
70
- * @return {Service_ } This service, for chaining.
70
+ * @return {! Service_ } This service, for chaining.
71
71
*/
72
72
Service_ . prototype . setTokenUrl = function ( tokenUrl ) {
73
73
this . tokenUrl_ = tokenUrl ;
@@ -78,7 +78,7 @@ Service_.prototype.setTokenUrl = function(tokenUrl) {
78
78
* Sets the service's refresh URL. Some OAuth providers require a different URL
79
79
* to be used when generating access tokens from a refresh token.
80
80
* @param {string } refreshUrl The refresh endpoint URL.
81
- * @return {Service_ } This service, for chaining.
81
+ * @return {! Service_ } This service, for chaining.
82
82
*/
83
83
Service_ . prototype . setRefreshUrl = function ( refreshUrl ) {
84
84
this . refreshUrl_ = refreshUrl ;
@@ -88,7 +88,7 @@ Service_.prototype.setRefreshUrl = function(refreshUrl) {
88
88
/**
89
89
* Sets the format of the returned token. Default: OAuth2.TOKEN_FORMAT.JSON.
90
90
* @param {OAuth2.TOKEN_FORMAT } tokenFormat The format of the returned token.
91
- * @return {Service_ } This service, for chaining.
91
+ * @return {! Service_ } This service, for chaining.
92
92
*/
93
93
Service_ . prototype . setTokenFormat = function ( tokenFormat ) {
94
94
this . tokenFormat_ = tokenFormat ;
@@ -99,7 +99,7 @@ Service_.prototype.setTokenFormat = function(tokenFormat) {
99
99
* Sets the additional HTTP headers that should be sent when retrieving or
100
100
* refreshing the access token.
101
101
* @param {Object.<string,string> } tokenHeaders A map of header names to values.
102
- * @return {Service_ } This service, for chaining.
102
+ * @return {! Service_ } This service, for chaining.
103
103
*/
104
104
Service_ . prototype . setTokenHeaders = function ( tokenHeaders ) {
105
105
this . tokenHeaders_ = tokenHeaders ;
@@ -123,7 +123,7 @@ Service_.prototype.setTokenHeaders = function(tokenHeaders) {
123
123
* request.
124
124
* @param {tokenHandler } tokenHandler tokenHandler A function to invoke on the
125
125
* payload of the request for an access token.
126
- * @return {Service_ } This service, for chaining.
126
+ * @return {! Service_ } This service, for chaining.
127
127
*/
128
128
Service_ . prototype . setTokenPayloadHandler = function ( tokenHandler ) {
129
129
this . tokenPayloadHandler_ = tokenHandler ;
@@ -137,7 +137,7 @@ Service_.prototype.setTokenPayloadHandler = function(tokenHandler) {
137
137
* which should be passed to this service's <code>handleCallback()</code> method
138
138
* to complete the process.
139
139
* @param {string } callbackFunctionName The name of the callback function.
140
- * @return {Service_ } This service, for chaining.
140
+ * @return {! Service_ } This service, for chaining.
141
141
*/
142
142
Service_ . prototype . setCallbackFunction = function ( callbackFunctionName ) {
143
143
this . callbackFunctionName_ = callbackFunctionName ;
@@ -154,7 +154,7 @@ Service_.prototype.setCallbackFunction = function(callbackFunctionName) {
154
154
* the Script Editor, and then click on the link "Google Developers Console" in
155
155
* the resulting dialog.
156
156
* @param {string } clientId The client ID to use for the OAuth flow.
157
- * @return {Service_ } This service, for chaining.
157
+ * @return {! Service_ } This service, for chaining.
158
158
*/
159
159
Service_ . prototype . setClientId = function ( clientId ) {
160
160
this . clientId_ = clientId ;
@@ -166,7 +166,7 @@ Service_.prototype.setClientId = function(clientId) {
166
166
* documentation for <code>setClientId()</code> for more information on how to
167
167
* create client IDs and secrets.
168
168
* @param {string } clientSecret The client secret to use for the OAuth flow.
169
- * @return {Service_ } This service, for chaining.
169
+ * @return {! Service_ } This service, for chaining.
170
170
*/
171
171
Service_ . prototype . setClientSecret = function ( clientSecret ) {
172
172
this . clientSecret_ = clientSecret ;
@@ -179,7 +179,7 @@ Service_.prototype.setClientSecret = function(clientSecret) {
179
179
* may be appropriate if you want to share access across users.
180
180
* @param {PropertiesService.Properties } propertyStore The property store to use
181
181
* when persisting credentials.
182
- * @return {Service_ } This service, for chaining.
182
+ * @return {! Service_ } This service, for chaining.
183
183
* @see https://developers.google.com/apps-script/reference/properties/
184
184
*/
185
185
Service_ . prototype . setPropertyStore = function ( propertyStore ) {
@@ -194,7 +194,7 @@ Service_.prototype.setPropertyStore = function(propertyStore) {
194
194
* may be appropriate if you want to share access across users.
195
195
* @param {CacheService.Cache } cache The cache to use when persisting
196
196
* credentials.
197
- * @return {Service_ } This service, for chaining.
197
+ * @return {! Service_ } This service, for chaining.
198
198
* @see https://developers.google.com/apps-script/reference/cache/
199
199
*/
200
200
Service_ . prototype . setCache = function ( cache ) {
@@ -208,7 +208,7 @@ Service_.prototype.setCache = function(cache) {
208
208
* stored credentials at a time. This can prevent race conditions that arise
209
209
* when two executions attempt to refresh an expired token.
210
210
* @param {LockService.Lock } lock The lock to use when accessing credentials.
211
- * @return {Service_ } This service, for chaining.
211
+ * @return {! Service_ } This service, for chaining.
212
212
* @see https://developers.google.com/apps-script/reference/lock/
213
213
*/
214
214
Service_ . prototype . setLock = function ( lock ) {
@@ -223,7 +223,7 @@ Service_.prototype.setLock = function(lock) {
223
223
* @param {string|Array.<string> } scope The scope or scopes to request.
224
224
* @param {string } [optSeparator] The optional separator to use when joining
225
225
* multiple scopes. Default: space.
226
- * @return {Service_ } This service, for chaining.
226
+ * @return {! Service_ } This service, for chaining.
227
227
*/
228
228
Service_ . prototype . setScope = function ( scope , optSeparator ) {
229
229
var separator = optSeparator || ' ' ;
@@ -237,7 +237,7 @@ Service_.prototype.setScope = function(scope, optSeparator) {
237
237
* on what parameter values they support.
238
238
* @param {string } name The parameter name.
239
239
* @param {string } value The parameter value.
240
- * @return {Service_ } This service, for chaining.
240
+ * @return {! Service_ } This service, for chaining.
241
241
*/
242
242
Service_ . prototype . setParam = function ( name , value ) {
243
243
this . params_ [ name ] = value ;
@@ -247,7 +247,7 @@ Service_.prototype.setParam = function(name, value) {
247
247
/**
248
248
* Sets the private key to use for Service Account authorization.
249
249
* @param {string } privateKey The private key.
250
- * @return {Service_ } This service, for chaining.
250
+ * @return {! Service_ } This service, for chaining.
251
251
*/
252
252
Service_ . prototype . setPrivateKey = function ( privateKey ) {
253
253
this . privateKey_ = privateKey ;
@@ -258,7 +258,7 @@ Service_.prototype.setPrivateKey = function(privateKey) {
258
258
* Sets the issuer (iss) value to use for Service Account authorization.
259
259
* If not set the client ID will be used instead.
260
260
* @param {string } issuer This issuer value
261
- * @return {Service_ } This service, for chaining.
261
+ * @return {! Service_ } This service, for chaining.
262
262
*/
263
263
Service_ . prototype . setIssuer = function ( issuer ) {
264
264
this . issuer_ = issuer ;
@@ -269,7 +269,7 @@ Service_.prototype.setIssuer = function(issuer) {
269
269
* Sets additional JWT claims to use for Service Account authorization.
270
270
* @param {Object.<string,string> } additionalClaims The additional claims, as
271
271
* key-value pairs.
272
- * @return {Service_ } This service, for chaining.
272
+ * @return {! Service_ } This service, for chaining.
273
273
*/
274
274
Service_ . prototype . setAdditionalClaims = function ( additionalClaims ) {
275
275
this . additionalClaims_ = additionalClaims ;
@@ -279,7 +279,7 @@ Service_.prototype.setAdditionalClaims = function(additionalClaims) {
279
279
/**
280
280
* Sets the subject (sub) value to use for Service Account authorization.
281
281
* @param {string } subject This subject value
282
- * @return {Service_ } This service, for chaining.
282
+ * @return {! Service_ } This service, for chaining.
283
283
*/
284
284
Service_ . prototype . setSubject = function ( subject ) {
285
285
this . subject_ = subject ;
@@ -290,7 +290,7 @@ Service_.prototype.setSubject = function(subject) {
290
290
* Sets number of minutes that a token obtained through Service Account
291
291
* authorization should be valid. Default: 60 minutes.
292
292
* @param {string } expirationMinutes The expiration duration in minutes.
293
- * @return {Service_ } This service, for chaining.
293
+ * @return {! Service_ } This service, for chaining.
294
294
*/
295
295
Service_ . prototype . setExpirationMinutes = function ( expirationMinutes ) {
296
296
this . expirationMinutes_ = expirationMinutes ;
@@ -304,7 +304,7 @@ Service_.prototype.setExpirationMinutes = function(expirationMinutes) {
304
304
* it to "client_credentials" and then also set the token headers to include
305
305
* the Authorization header required by the OAuth2 provider.
306
306
* @param {string } grantType The OAuth2 grant_type value.
307
- * @return {Service_ } This service, for chaining.
307
+ * @return {! Service_ } This service, for chaining.
308
308
*/
309
309
Service_ . prototype . setGrantType = function ( grantType ) {
310
310
this . grantType_ = grantType ;
@@ -316,7 +316,7 @@ Service_.prototype.setGrantType = function(grantType) {
316
316
* library will provide this value automatically, but in some rare cases you may
317
317
* need to override it.
318
318
* @param {string } redirectUri The redirect URI.
319
- * @return {Service_ } This service, for chaining.
319
+ * @return {! Service_ } This service, for chaining.
320
320
*/
321
321
Service_ . prototype . setRedirectUri = function ( redirectUri ) {
322
322
this . redirectUri_ = redirectUri ;
@@ -518,7 +518,7 @@ Service_.prototype.fetchToken_ = function(payload, optUrl) {
518
518
/**
519
519
* Gets the token from a UrlFetchApp response.
520
520
* @param {UrlFetchApp.HTTPResponse } response The response object.
521
- * @return {Object } The parsed token.
521
+ * @return {! Object } The parsed token.
522
522
* @throws If the token cannot be parsed or the response contained an error.
523
523
* @private
524
524
*/
@@ -545,7 +545,7 @@ Service_.prototype.getTokenFromResponse_ = function(response) {
545
545
/**
546
546
* Parses the token using the service's token format.
547
547
* @param {string } content The serialized token content.
548
- * @return {Object } The parsed token.
548
+ * @return {! Object } The parsed token.
549
549
* @private
550
550
*/
551
551
Service_ . prototype . parseToken_ = function ( content ) {
0 commit comments