[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Apps Chat V1 Client - Class SwitchControl (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Card.V1.DecoratedText.SwitchControl)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Card.V1.DecoratedText.SwitchControl)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Card.V1.DecoratedText.SwitchControl)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Card.V1.DecoratedText.SwitchControl)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Card.V1.DecoratedText.SwitchControl)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Card.V1.DecoratedText.SwitchControl)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Card.V1.DecoratedText.SwitchControl)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Card.V1.DecoratedText.SwitchControl)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Card.V1.DecoratedText.SwitchControl)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Card.V1.DecoratedText.SwitchControl)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Card.V1.DecoratedText.SwitchControl)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Card.V1.DecoratedText.SwitchControl) \nReference documentation and code samples for the Google Apps Chat V1 Client class SwitchControl.\n\nEither a toggle-style switch or a checkbox inside a `decoratedText` widget.\n\n[Google Workspace Add-ons and Chat\napps](https://developers.google.com/workspace/extend):\nOnly supported in the `decoratedText` widget.\n\nGenerated from protobuf message `google.apps.card.v1.DecoratedText.SwitchControl`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Card \\\\ V1 \\\\ DecoratedText\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe name by which the switch widget is identified in a form input event.\n\nFor details about working with form inputs, see [Receive form\ndata](https://developers.google.com/workspace/chat/read-form-data).\n\n### setName\n\nThe name by which the switch widget is identified in a form input event.\n\nFor details about working with form inputs, see [Receive form\ndata](https://developers.google.com/workspace/chat/read-form-data).\n\n### getValue\n\nThe value entered by a user, returned as part of a form input event.\n\nFor details about working with form inputs, see [Receive form\ndata](https://developers.google.com/workspace/chat/read-form-data).\n\n### setValue\n\nThe value entered by a user, returned as part of a form input event.\n\nFor details about working with form inputs, see [Receive form\ndata](https://developers.google.com/workspace/chat/read-form-data).\n\n### getSelected\n\nWhen `true`, the switch is selected.\n\n### setSelected\n\nWhen `true`, the switch is selected.\n\n### getOnChangeAction\n\nThe action to perform when the switch state is changed, such as what\nfunction to run.\n\n### hasOnChangeAction\n\n### clearOnChangeAction\n\n### setOnChangeAction\n\nThe action to perform when the switch state is changed, such as what\nfunction to run.\n\n### getControlType\n\nHow the switch appears in the user interface.\n\n[Google Workspace Add-ons\nand Chat apps](https://developers.google.com/workspace/extend):\n\n### setControlType\n\nHow the switch appears in the user interface.\n\n[Google Workspace Add-ons\nand Chat apps](https://developers.google.com/workspace/extend):"]]