AI-generated Key Takeaways
-
The
SetCredentialsResponseis a builder used to create a response for thesetCredentials()function in a script project. -
The
build()method validates the object and returns it in the format required by Data Studio. -
The
printJson()method prints the JSON representation of the object for debugging. -
The
setIsValid(isValid)method sets the validity status of theSetCredentialsResponse.
Builder to create a set
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
|
Sets the valid status of this Set
. |
Detailed documentation
build()
Validates this object and returns it in the format needed by Data Studio.
Return
Object
— The validated Set
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
. Set to true
if the
credentials provided in the request were valid, false
, otherwise.
Parameters
| Name | Type | Description |
|---|---|---|
is
|
Boolean
|
The valid status to set. |
Return
Set
— This builder, for chaining.

