Class Config
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
構成コネクタの構成エントリが含まれます。これらの構成エントリは、新しいコネクタを追加するときに表示される質問を定義します。
const cc = DataStudioApp.createCommunityConnector();
const config = cc.getConfig();
const info_entry = config.newInfo().setId('info_id').setHelpText(
'This connector can connect to multiple data endpoints.');
詳細なドキュメント
build()
このオブジェクトを検証し、データポータルで必要な形式で返します。
戻る
Object
- 検証済みの Config
オブジェクト。
newCheckbox()
新しいチェックボックスの設定エントリを返します。
戻る
Checkbox
- 新しいチェックボックスの設定エントリ。
newInfo()
新しい情報構成エントリを返します。
戻る
Info
- 新しい情報構成エントリ。
newTextArea()
新しいテキスト領域の構成エントリを返します。
戻る
TextArea
- 新しいテキスト領域の構成エントリ。
newTextInput()
新しいテキスト入力構成エントリを返します。
戻る
TextInput
- 新しいテキスト入力構成エントリ。
printJson()
このオブジェクトの JSON 表現を出力します。これはデバッグ専用です。
戻る
String
setDateRangeRequired(dateRangeRequired)
true
の場合、getData() リクエストの期間が指定されます。
パラメータ
名前 | 型 | 説明 |
dateRangeRequired | Boolean | getData() リクエストに期間を指定するかどうか。 |
戻る
Config
- チェーン用のこのビルダー。
setIsSteppedConfig(isSteppedConfig)
true
の場合、現在のユーザー構成で getConfig()
が再度呼び出されます。
パラメータ
名前 | 型 | 説明 |
isSteppedConfig | Boolean | 設定するステップ構成ステータス。 |
戻る
Config
- チェーン用のこのビルダー。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eThe \u003ccode\u003eConfig\u003c/code\u003e object defines the configuration entries for a connector, determining the questions asked when adding a new connector.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for creating various configuration entry types like checkboxes, text inputs, and select lists.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method validates the configuration and returns it in the required format for Data Studio.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetDateRangeRequired()\u003c/code\u003e and \u003ccode\u003esetIsSteppedConfig()\u003c/code\u003e methods control whether a date range is provided to data requests and if the configuration is stepped.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods such as \u003ccode\u003eprintJson()\u003c/code\u003e for debugging purposes.\u003c/p\u003e\n"]]],[],null,["# Class Config\n\nConfig\n\nContains the configuration entries for a connector. These configuration entries define what\nquestions are asked when adding a new connector.\n\n```javascript\nconst cc = DataStudioApp.createCommunityConnector();\nconst config = cc.getConfig();\n\nconst info_entry = config.newInfo().setId('info_id').setHelpText(\n 'This connector can connect to multiple data endpoints.');\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------------|----------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [build()](#build()) | `Object` | Validates this object and returns it in the format needed by Data Studio. |\n| [newCheckbox()](#newCheckbox()) | [Checkbox](/apps-script/reference/data-studio/checkbox) | Returns a new checkbox configuration entry. |\n| [newInfo()](#newInfo()) | [Info](/apps-script/reference/data-studio/info) | Returns a new info configuration entry. |\n| [newOptionBuilder()](#newOptionBuilder()) | [OptionBuilder](/apps-script/reference/data-studio/option-builder) | Returns a new options builder. |\n| [newSelectMultiple()](#newSelectMultiple()) | [SelectMultiple](/apps-script/reference/data-studio/select-multiple) | Returns a new select multiple configuration entry. |\n| [newSelectSingle()](#newSelectSingle()) | [SelectSingle](/apps-script/reference/data-studio/select-single) | Returns a new select single configuration entry. |\n| [newTextArea()](#newTextArea()) | [TextArea](/apps-script/reference/data-studio/text-area) | Returns a new text area configuration entry. |\n| [newTextInput()](#newTextInput()) | [TextInput](/apps-script/reference/data-studio/text-input) | Returns a new text input configuration entry. |\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n| [setDateRangeRequired(dateRangeRequired)](#setDateRangeRequired(Boolean)) | [Config](#) | If `true`, a date range is provided for getData() requests. |\n| [setIsSteppedConfig(isSteppedConfig)](#setIsSteppedConfig(Boolean)) | [Config](#) | If `true`, `get``Config()` is called again with the current user configuration. |\n\nDetailed documentation\n----------------------\n\n### `build()`\n\nValidates this object and returns it in the format needed by Data Studio.\n\n#### Return\n\n\n`Object` --- The validated [Config](#) object.\n\n*** ** * ** ***\n\n### `new``Checkbox()`\n\nReturns a new checkbox configuration entry.\n\n#### Return\n\n\n[Checkbox](/apps-script/reference/data-studio/checkbox) --- A new checkbox configuration entry.\n\n*** ** * ** ***\n\n### `new``Info()`\n\nReturns a new info configuration entry.\n\n#### Return\n\n\n[Info](/apps-script/reference/data-studio/info) --- A new info configuration entry.\n\n*** ** * ** ***\n\n### `new``Option``Builder()`\n\nReturns a new options builder.\n\n#### Return\n\n\n[OptionBuilder](/apps-script/reference/data-studio/option-builder) --- A new options builder.\n\n*** ** * ** ***\n\n### `new``Select``Multiple()`\n\nReturns a new select multiple configuration entry.\n\n#### Return\n\n\n[SelectMultiple](/apps-script/reference/data-studio/select-multiple) --- A new select multiple configuration entry.\n\n*** ** * ** ***\n\n### `new``Select``Single()`\n\nReturns a new select single configuration entry.\n\n#### Return\n\n\n[SelectSingle](/apps-script/reference/data-studio/select-single) --- A new select single configuration entry.\n\n*** ** * ** ***\n\n### `new``Text``Area()`\n\nReturns a new text area configuration entry.\n\n#### Return\n\n\n[TextArea](/apps-script/reference/data-studio/text-area) --- A new text area configuration entry.\n\n*** ** * ** ***\n\n### `new``Text``Input()`\n\nReturns a new text input configuration entry.\n\n#### Return\n\n\n[TextInput](/apps-script/reference/data-studio/text-input) --- A new text input configuration entry.\n\n*** ** * ** ***\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`\n\n*** ** * ** ***\n\n### `set``Date``Range``Required(dateRangeRequired)`\n\nIf `true`, a date range is provided for getData() requests.\n\n#### Parameters\n\n| Name | Type | Description |\n|-------------------------|-----------|---------------------------------------------------------------------------|\n| `date``Range``Required` | `Boolean` | Whether or not a date range should be provided to `get``Data()` requests. |\n\n#### Return\n\n\n[Config](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Is``Stepped``Config(isSteppedConfig)`\n\nIf `true`, `get``Config()` is called again with the current user configuration.\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------------------|-----------|-----------------------------------|\n| `is``Stepped``Config` | `Boolean` | The stepped config status to set. |\n\n#### Return\n\n\n[Config](#) --- This builder, for chaining."]]