Class Config

  • Config contains the configuration entries for a connector, defining the questions asked when adding a new connector.

  • Thebuild() method validates the Config object and returns it in the format needed by Data Studio.

  • Config offers methods to create various configuration entry types like checkbox, info, select multiple, select single, text area, and text input.

  • Methods likesetDateRangeRequired() andsetIsSteppedConfig() allow for setting specific behaviors for the connector configuration.

Config

Contains the configuration entries for a connector. These configuration entries define whatquestions are asked when adding a new connector.

constcc=DataStudioApp.createCommunityConnector();constconfig=cc.getConfig();constinfo_entry=config.newInfo().setId('info_id').setHelpText('This connector can connect to multiple data endpoints.');

Methods

MethodReturn typeBrief description
build()ObjectValidates this object and returns it in the format needed by Data Studio.
newCheckbox()CheckboxReturns a new checkbox configuration entry.
newInfo()InfoReturns a new info configuration entry.
newOptionBuilder()OptionBuilderReturns a new options builder.
newSelectMultiple()SelectMultipleReturns a new select multiple configuration entry.
newSelectSingle()SelectSingleReturns a new select single configuration entry.
newTextArea()TextAreaReturns a new text area configuration entry.
newTextInput()TextInputReturns a new text input configuration entry.
printJson()StringPrints the JSON representation of this object.
setDateRangeRequired(dateRangeRequired)ConfigIftrue, a date range is provided for getData() requests.
setIsSteppedConfig(isSteppedConfig)ConfigIftrue,getConfig() is called again with the current user configuration.

Detailed documentation

build()

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

Return

Object — The validatedConfig object.


newCheckbox()

Returns a new checkbox configuration entry.

Return

Checkbox — A new checkbox configuration entry.


newInfo()

Returns a new info configuration entry.

Return

Info — A new info configuration entry.


newOptionBuilder()

Returns a new options builder.

Return

OptionBuilder — A new options builder.


newSelectMultiple()

Returns a new select multiple configuration entry.

Return

SelectMultiple — A new select multiple configuration entry.


newSelectSingle()

Returns a new select single configuration entry.

Return

SelectSingle — A new select single configuration entry.


newTextArea()

Returns a new text area configuration entry.

Return

TextArea — A new text area configuration entry.


newTextInput()

Returns a new text input configuration entry.

Return

TextInput — A new text input configuration entry.


printJson()

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

Return

String


setDateRangeRequired(dateRangeRequired)

Iftrue, a date range is provided for getData() requests.

Parameters

NameTypeDescription
dateRangeRequiredBooleanWhether or not a date range should be provided togetData() requests.

Return

Config — This builder, for chaining.


setIsSteppedConfig(isSteppedConfig)

Iftrue,getConfig() is called again with the current user configuration.

Parameters

NameTypeDescription
isSteppedConfigBooleanThe stepped config status to set.

Return

Config — This builder, for chaining.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.