Class SetCredentialsResponse

Set Credentials Response

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

 const 
  
 communityConnector 
  
 = 
  
 DataStudioApp 
 . 
 createCommunityConnector 
 (); 
 function 
  
 setCredentials 
 ( 
 request 
 ) 
  
 { 
  
 const 
  
 isValid 
  
 = 
  
 validateCredentials 
 ( 
 request 
 ); 
  
 if 
  
 ( 
 isValid 
 ) 
  
 { 
  
 // store the credentials somewhere. 
  
 } 
  
 return 
  
 communityConnector 
 . 
 newSetCredentialsResponse 
 (). 
 setIsValid 
 ( 
 isValid 
 ). 
 build 
 (); 
 } 
 function 
  
 validateCredentials 
 ( 
 request 
 ) 
  
 { 
  
 // ... 
 } 

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.
Set Credentials Response Sets the valid status of this Set Credentials Response .

Detailed documentation

build()

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

Return

Object — The validated Set Credentials Response object.


print Json()

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

Return

String


set Is Valid(isValid)

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

Parameters

Name Type Description
is Valid
Boolean The valid status to set.

Return

Set Credentials Response — This builder, for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: