Class SetCredentialsResponse

SetCredentialsResponse

Builder to create a setCredentials() response for your script project.

 function 
  
 setCredentials 
 ( 
 request 
 ) 
  
 { 
  
 var 
  
 isValid 
  
 = 
  
 checkForValidCreds 
 ( 
 request 
 ); 
  
 if 
  
 ( 
 isValid 
 ) 
  
 { 
  
 // 
  
 store 
  
 the 
  
 creds 
  
 somewhere 
 . 
  
 } 
  
 return 
  
 cc 
 . 
 newSetCredentialsResponse 
 () 
  
 . 
 setIsValid 
 ( 
 isValid 
 ) 
  
 . 
 build 
 (); 
 } 

Methods

Method Return type Brief description
Object Validates this object and returns it in the format needed by Data Studio.
String Prints the JSON representation of this object.
SetCredentialsResponse Sets the valid status of this SetCredentialsResponse .

Detailed documentation

build()

Validates this object and returns it in the format needed by Data Studio.

Return

Object — The validated SetCredentialsResponse object.


printJson()

Prints the JSON representation of this object. This is for debugging only.

Return

String


setIsValid(isValid)

Sets the valid status of this SetCredentialsResponse . Set to true if the credentials provided in the request were valid, false , otherwise.

Parameters

Name Type Description
isValid
Boolean The valid status to set.

Return

SetCredentialsResponse — This builder, for chaining.