Cards v2

কার্ড

গুগল চ্যাট মেসেজ বা গুগল ওয়ার্কস্পেস অ্যাড-অনে প্রদর্শিত একটি কার্ড ইন্টারফেস।

কার্ড একটি নির্দিষ্ট লেআউট, বাটনের মতো ইন্টারেক্টিভ UI এলিমেন্ট এবং ছবির মতো রিচ মিডিয়া সমর্থন করে। বিস্তারিত তথ্য উপস্থাপন করতে, ব্যবহারকারীদের কাছ থেকে তথ্য সংগ্রহ করতে এবং পরবর্তী পদক্ষেপ নিতে তাদের নির্দেশনা দিতে কার্ড ব্যবহার করুন।

কার্ড বিল্ডার ব্যবহার করে কার্ড ডিজাইন করুন এবং প্রিভিউ দেখুন।

কার্ড বিল্ডারটি খুলুন

কার্ড তৈরি করার পদ্ধতি জানতে, নিম্নলিখিত ডকুমেন্টেশন দেখুন:

দ্রষ্টব্য: আপনি প্রতি কার্ডে সর্বোচ্চ ১০০টি উইজেট যোগ করতে পারবেন। যদি কোনো সেকশনের উইজেটের সংখ্যা বেড়ে মোট সংখ্যা ১০০ ছাড়িয়ে যায়, তাহলে সেই সম্পূর্ণ সেকশন এবং তার পরবর্তী সমস্ত সেকশন উপেক্ষা করা হবে। এই সীমাটি গুগল চ্যাট অ্যাপের কার্ড মেসেজ ও ডায়ালগ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনের কার্ড—উভয়ের ক্ষেত্রেই প্রযোজ্য।

উদাহরণ: গুগল চ্যাট অ্যাপের জন্য কার্ড বার্তা

যোগাযোগের কার্ডের উদাহরণ

গুগল চ্যাটে নমুনা কার্ড বার্তা তৈরি করতে, নিম্নলিখিত JSON ব্যবহার করুন:

{
  "cardsV2": [
    {
      "cardId": "unique-card-id",
      "card": {
        "header": {
           "title": "Sasha",
           "subtitle": "Software Engineer",
           "imageUrl":
           "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
           "imageType": "CIRCLE",
           "imageAltText": "Avatar for Sasha"
         },
         "sections": [
           {
             "header": "Contact Info",
             "collapsible": true,
             "uncollapsibleWidgetsCount": 1,
             "widgets": [
               {
                 "decoratedText": {
                   "startIcon": {
                     "knownIcon": "EMAIL"
                   },
                   "text": "sasha@example.com"
                 }
               },
               {
                 "decoratedText": {
                   "startIcon": {
                     "knownIcon": "PERSON"
                   },
                   "text": "<font color=\"#80e27e\">Online</font>"
                 }
               },
               {
                 "decoratedText": {
                   "startIcon": {
                     "knownIcon": "PHONE"
                   },
                   "text": "+1 (555) 555-1234"
                 }
               },
               {
                 "buttonList": {
                   "buttons": [
                     {
                       "text": "Share",
                       "onClick": {
                        "openLink": {
                           "url": "https://example.com/share"
                         }
                       }
                     },
                     {
                       "text": "Edit",
                       "onClick": {
                         "action": {
                           "function": "goToView",
                           "parameters": [
                             {
                               "key": "viewType",
                               "value": "EDIT"
                             }
                           ]
                         }
                       }
                     }
                   ]
                 }
               }
             ]
           }
         ]
       }
    }
  ]
}
JSON উপস্থাপনা
{
  "header": {
    object (CardHeader)
  },
  "sections": [
    {
      object (Section)
    }
  ],
  "sectionDividerStyle": enum (DividerStyle),
  "cardActions": [
    {
      object (CardAction)
    }
  ],
  "name": string,
  "fixedFooter": {
    object (CardFixedFooter)
  },
  "displayStyle": enum (DisplayStyle),
  "peekCardHeader": {
    object (CardHeader)
  },
  "expressionData": [
    {
      object (ExpressionData)
    }
  ]
}
ক্ষেত্র
header

object ( CardHeader )

কার্ডের হেডার। একটি হেডারে সাধারণত একটি প্রধান ছবি এবং একটি শিরোনাম থাকে। হেডার সবসময় কার্ডের শীর্ষে প্রদর্শিত হয়।

sections[]

object ( Section )

এতে উইজেটের একটি সংগ্রহ রয়েছে। প্রতিটি বিভাগের নিজস্ব, ঐচ্ছিক হেডার আছে। বিভাগগুলো একটি রেখা বিভাজক দ্বারা দৃশ্যত পৃথক করা থাকে। গুগল চ্যাট অ্যাপে একটি উদাহরণের জন্য, ‘একটি কার্ডের বিভাগ সংজ্ঞায়িত করুন ’ দেখুন।

sectionDividerStyle

enum ( DividerStyle )

হেডার, সেকশন ও ফুটারের মধ্যবর্তী বিভাজক শৈলী।

cardActions[]

object ( CardAction )

কার্ডের কার্যকলাপসমূহ। কার্যকলাপগুলো কার্ডের টুলবার মেনুতে যোগ করা হয়।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

উদাহরণস্বরূপ, নিম্নলিখিত JSON-টি Settings এবং Send Feedback বিকল্পসহ একটি কার্ড অ্যাকশন মেনু তৈরি করে:

"cardActions": [
  {
    "actionLabel": "Settings",
    "onClick": {
      "action": {
        "functionName": "goToView",
        "parameters": [
          {
            "key": "viewType",
            "value": "SETTING"
         }
        ],
        "loadIndicator": "LoadIndicator.SPINNER"
      }
    }
  },
  {
    "actionLabel": "Send Feedback",
    "onClick": {
      "openLink": {
        "url": "https://example.com/feedback"
      }
    }
  }
]
name

string

কার্ডের নাম। কার্ড নেভিগেশনে কার্ড শনাক্তকারী হিসেবে ব্যবহৃত হয়।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

displayStyle

enum ( DisplayStyle )

গুগল ওয়ার্কস্পেস অ্যাড-অন-এ, এটি peekCardHeader এর ডিসপ্লে প্রোপার্টি সেট করে।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

peekCardHeader

object ( CardHeader )

প্রাসঙ্গিক বিষয়বস্তু প্রদর্শন করার সময়, পিক কার্ড হেডারটি একটি প্লেসহোল্ডার হিসেবে কাজ করে, যাতে ব্যবহারকারী হোমপেজের কার্ডগুলো এবং প্রাসঙ্গিক কার্ডগুলোর মধ্যে সামনে এগিয়ে যেতে পারেন।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

expressionData[]

object ( ExpressionData )

কার্ডটির জন্য এক্সপ্রেশন ডেটা।

Google Workspace Studio-এর কার্যকারিতা বর্ধনকারী Google Workspace অ্যাড-অনগুলির জন্য উপলব্ধ। Google Chat অ্যাপগুলির জন্য অনুপলব্ধ।

কার্ডহেডার

এটি একটি কার্ড হেডার নির্দেশ করে। গুগল চ্যাট অ্যাপে এর একটি উদাহরণের জন্য, ‘হেডার যোগ করুন’ দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "title": string,
  "subtitle": string,
  "imageType": enum (ImageType),
  "imageUrl": string,
  "imageAltText": string
}
ক্ষেত্র
title

string

আবশ্যক। কার্ড হেডারের শিরোনাম। হেডারের একটি নির্দিষ্ট উচ্চতা রয়েছে: যদি শিরোনাম এবং উপ-শিরোনাম উভয়ই উল্লেখ করা হয়, তবে প্রতিটি এক লাইনে স্থান পাবে। যদি শুধু শিরোনাম উল্লেখ করা হয়, তবে সেটি উভয় লাইনেই স্থান পাবে।

subtitle

string

কার্ড হেডারের উপশিরোনাম। নির্দিষ্ট করা থাকলে, এটি title নিচে নিজস্ব লাইনে প্রদর্শিত হয়।

imageType

enum ( ImageType )

ছবিটি ক্রপ করতে ব্যবহৃত আকৃতি।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

imageUrl

string

কার্ড হেডারে থাকা ছবিটির HTTPS URL।

imageAltText

string

এই ছবিটির বিকল্প লেখাটি অ্যাক্সেসিবিলিটির জন্য ব্যবহৃত হয়।

ছবির ধরন

ছবিটি ক্রপ করতে ব্যবহৃত আকৃতি।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

এনাম
SQUARE ডিফল্ট মান। ছবির উপর একটি বর্গাকার মাস্ক প্রয়োগ করে। উদাহরণস্বরূপ, একটি ৪x৩ ​​ছবি ৩x৩ হয়ে যায়।
CIRCLE ছবিতে একটি বৃত্তাকার মাস্ক প্রয়োগ করে। উদাহরণস্বরূপ, একটি ৪x৩ ​​ছবি ৩ ব্যাসবিশিষ্ট একটি বৃত্তে পরিণত হয়।

বিভাগ

একটি সেকশনে উইজেটগুলোর একটি সংগ্রহ থাকে, যেগুলো নির্দিষ্ট করার ক্রমানুসারে উল্লম্বভাবে রেন্ডার করা হয়।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "header": string,
  "widgets": [
    {
      object (Widget)
    }
  ],
  "collapsible": boolean,
  "uncollapsibleWidgetsCount": integer,
  "id": string,
  "collapseControl": {
    object (CollapseControl)
  }
}
ক্ষেত্র
header

string

সেকশনের শীর্ষে প্রদর্শিত টেক্সট। সাধারণ HTML ফরম্যাট করা টেক্সট সমর্থন করে। টেক্সট ফরম্যাটিং সম্পর্কে আরও তথ্যের জন্য, Google Chat অ্যাপে টেক্সট ফরম্যাটিং এবং Google Workspace অ্যাড-অনে টেক্সট ফরম্যাটিং দেখুন।

widgets[]

object ( Widget )

সেকশনটির সমস্ত উইজেট। এতে অবশ্যই অন্তত একটি উইজেট থাকতে হবে।

collapsible

boolean

এই অংশটি ভাঁজযোগ্য কিনা তা নির্দেশ করে।

সংকুচিত করা যায় এমন বিভাগগুলো কিছু বা সমস্ত উইজেট লুকিয়ে রাখে, কিন্তু ব্যবহারকারীরা 'আরও দেখান' (Show more) এ ক্লিক করে বিভাগটি প্রসারিত করার মাধ্যমে লুকানো উইজেটগুলো আবার দেখতে পারেন। ব্যবহারকারীরা 'কম দেখান' (Show less) এ ক্লিক করে উইজেটগুলো পুনরায় লুকাতে পারেন।

কোন উইজেটগুলো লুকানো থাকবে তা নির্ধারণ করতে, uncollapsibleWidgetsCount নির্দিষ্ট করুন।

uncollapsibleWidgetsCount

integer

যেসব উইজেট কোনো সেকশন সংকুচিত করার পরেও দৃশ্যমান থাকে, তাদের সংখ্যা।

উদাহরণস্বরূপ, যখন একটি বিভাগে পাঁচটি উইজেট থাকে এবং uncollapsibleWidgetsCount এর মান 2 সেট করা থাকে, তখন প্রথম দুটি উইজেট সর্বদা দেখানো হয় এবং শেষের তিনটি ডিফল্টরূপে সংকুচিত থাকে। uncollapsibleWidgetsCount শুধুমাত্র তখনই বিবেচনা করা হয় যখন collapsible true হয়।

id

string

যে সেকশনটি পরিবর্তন করা হবে, সেটিকে শনাক্ত করার জন্য নির্ধারিত একটি অনন্য আইডি। আইডিটির অক্ষর সংখ্যা ৬৪-এর মধ্যে সীমাবদ্ধ এবং এটি [a-zA-Z0-9-]+ ফরম্যাটে হতে হবে।

Google Workspace Studio-এর কার্যকারিতা বর্ধনকারী Google Workspace অ্যাড-অনগুলির জন্য উপলব্ধ। Google Chat অ্যাপগুলির জন্য অনুপলব্ধ।

collapseControl

object ( CollapseControl )

ঐচ্ছিক। সেকশনটির এক্সপ্যান্ড এবং কলাপস বাটন নির্ধারণ করুন। এই বাটনটি শুধুমাত্র তখনই দেখানো হবে যখন সেকশনটি কলাপসিবল হবে। এই ফিল্ডটি সেট করা না থাকলে, ডিফল্ট বাটনটি ব্যবহৃত হবে।

উইজেট

প্রতিটি কার্ড উইজেট দিয়ে গঠিত।

উইজেট হলো একটি যৌগিক বস্তু যা টেক্সট, ছবি, বাটন এবং অন্যান্য ধরনের বস্তুকে উপস্থাপন করতে পারে।

JSON উপস্থাপনা
{
  "horizontalAlignment": enum (HorizontalAlignment),
  "id": string,
  "visibility": enum (Visibility),
  "eventActions": [
    {
      object (EventAction)
    }
  ],

  "textParagraph": {
    object (TextParagraph)
  },
  "image": {
    object (Image)
  },
  "decoratedText": {
    object (DecoratedText)
  },
  "buttonList": {
    object (ButtonList)
  },
  "textInput": {
    object (TextInput)
  },
  "selectionInput": {
    object (SelectionInput)
  },
  "dateTimePicker": {
    object (DateTimePicker)
  },
  "divider": {
    object (Divider)
  },
  "grid": {
    object (Grid)
  },
  "columns": {
    object (Columns)
  },
  "carousel": {
    object (Carousel)
  },
  "chipList": {
    object (ChipList)
  }
}
ক্ষেত্র
horizontalAlignment

enum ( HorizontalAlignment )

উইজেটগুলো কোনো কলামের বামে, ডানে, নাকি কেন্দ্রে সারিবদ্ধ হবে তা নির্দিষ্ট করে।

id

string

যে উইজেটটি পরিবর্তন করা হবে, সেটিকে শনাক্ত করার জন্য উইজেটটিকে একটি অনন্য আইডি দেওয়া হয়। আইডিটির অক্ষর সংখ্যা ৬৪-এর মধ্যে সীমাবদ্ধ এবং [a-zA-Z0-9-]+ এবং এই ফরম্যাটে হতে হবে।

Google Workspace Studio-এর কার্যকারিতা বর্ধনকারী Google Workspace অ্যাড-অনগুলির জন্য উপলব্ধ। Google Chat অ্যাপগুলির জন্য অনুপলব্ধ।

visibility

enum ( Visibility )

উইজেটটি দৃশ্যমান হবে নাকি অদৃশ্য থাকবে তা নির্দিষ্ট করে। এর ডিফল্ট মান হলো VISIBLE )।

Google Workspace Studio-এর কার্যকারিতা বর্ধনকারী Google Workspace অ্যাড-অনগুলির জন্য উপলব্ধ। Google Chat অ্যাপগুলির জন্য অনুপলব্ধ।

eventActions[]

object ( EventAction )

উইজেটটিতে যে ইভেন্ট অ্যাকশনগুলো সম্পাদন করা যেতে পারে, তা নির্দিষ্ট করে।

Google Workspace Studio-এর কার্যকারিতা বর্ধনকারী Google Workspace অ্যাড-অনগুলির জন্য উপলব্ধ। Google Chat অ্যাপগুলির জন্য অনুপলব্ধ।

ইউনিয়ন ফিল্ড data । একটি উইজেটে নিম্নলিখিত আইটেমগুলির মধ্যে কেবল একটিই থাকতে পারে। আরও আইটেম প্রদর্শন করতে আপনি একাধিক উইজেট ফিল্ড ব্যবহার করতে পারেন। data নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
textParagraph

object ( TextParagraph )

একটি পাঠ্য অনুচ্ছেদ প্রদর্শন করে। সাধারণ HTML ফরম্যাট করা পাঠ্য সমর্থন করে। পাঠ্য ফরম্যাট করার বিষয়ে আরও তথ্যের জন্য, Google Chat অ্যাপে পাঠ্য ফরম্যাট করা এবং Google Workspace অ্যাড-অনগুলিতে পাঠ্য ফরম্যাট করা দেখুন।

উদাহরণস্বরূপ, নিম্নলিখিত JSON একটি বোল্ড টেক্সট তৈরি করে:

"textParagraph": {
  "text": "  <b>bold text</b>"
}
image

object ( Image )

একটি ছবি প্রদর্শন করে।

উদাহরণস্বরূপ, নিম্নলিখিত JSON-টি বিকল্প টেক্সট সহ একটি ছবি তৈরি করে:

"image": {
  "imageUrl":
  "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
  "altText": "Chat app avatar"
}
decoratedText

object ( DecoratedText )

একটি সজ্জিত পাঠ্য আইটেম প্রদর্শন করে।

উদাহরণস্বরূপ, নিম্নলিখিত JSON টি ইমেল ঠিকানা প্রদর্শনকারী একটি সজ্জিত টেক্সট উইজেট তৈরি করে:

"decoratedText": {
  "icon": {
    "knownIcon": "EMAIL"
  },
  "topLabel": "Email Address",
  "text": "sasha@example.com",
  "bottomLabel": "This is a new Email address!",
  "switchControl": {
    "name": "has_send_welcome_email_to_sasha",
    "selected": false,
    "controlType": "CHECKBOX"
  }
}
buttonList

object ( ButtonList )

বাটনগুলোর একটি তালিকা।

উদাহরণস্বরূপ, নিম্নলিখিত JSON দুটি বাটন তৈরি করে। প্রথমটি একটি নীল রঙের টেক্সট বাটন এবং দ্বিতীয়টি একটি ইমেজ বাটন যা একটি লিঙ্ক খোলে:

"buttonList": {
  "buttons": [
    {
      "text": "Edit",
      "color": {
        "red": 0,
        "green": 0,
        "blue": 1,
      },
      "disabled": true,
    },
    {
      "icon": {
        "knownIcon": "INVITE",
        "altText": "check calendar"
      },
      "onClick": {
        "openLink": {
          "url": "https://example.com/calendar"
        }
      }
    }
  ]
}
textInput

object ( TextInput )

একটি টেক্সট বক্স প্রদর্শন করে যেখানে ব্যবহারকারীরা টাইপ করতে পারেন।

উদাহরণস্বরূপ, নিম্নলিখিত JSON একটি ইমেল ঠিকানার জন্য একটি টেক্সট ইনপুট তৈরি করে:

"textInput": {
  "name": "mailing_address",
  "label": "Mailing Address"
}

আরেকটি উদাহরণ হিসেবে, নিম্নলিখিত JSON-টি স্ট্যাটিক সাজেশন সহ একটি প্রোগ্রামিং ভাষার জন্য টেক্সট ইনপুট তৈরি করে:

"textInput": {
  "name": "preferred_programing_language",
  "label": "Preferred Language",
  "initialSuggestions": {
    "items": [
      {
        "text": "C++"
      },
      {
        "text": "Java"
      },
      {
        "text": "JavaScript"
      },
      {
        "text": "Python"
      }
    ]
  }
}
selectionInput

object ( SelectionInput )

একটি সিলেকশন কন্ট্রোল প্রদর্শন করে যা ব্যবহারকারীদের আইটেম নির্বাচন করতে দেয়। সিলেকশন কন্ট্রোলগুলো চেকবক্স, রেডিও বাটন, সুইচ বা ড্রপডাউন মেনু হতে পারে।

উদাহরণস্বরূপ, নিম্নলিখিত JSON একটি ড্রপডাউন মেনু তৈরি করে যা ব্যবহারকারীদের আকার বেছে নিতে দেয়:

"selectionInput": {
  "name": "size",
  "label": "Size"
  "type": "DROPDOWN",
  "items": [
    {
      "text": "S",
      "value": "small",
      "selected": false
    },
    {
      "text": "M",
      "value": "medium",
      "selected": true
    },
    {
      "text": "L",
      "value": "large",
      "selected": false
    },
    {
      "text": "XL",
      "value": "extra_large",
      "selected": false
    }
  ]
}
dateTimePicker

object ( DateTimePicker )

এমন একটি উইজেট প্রদর্শন করে, যা ব্যবহারকারীদের তারিখ, সময় অথবা তারিখ ও সময় ইনপুট করার সুযোগ দেয়।

উদাহরণস্বরূপ, নিম্নলিখিত JSON একটি অ্যাপয়েন্টমেন্ট নির্ধারণ করার জন্য একটি ডেট টাইম পিকার তৈরি করে:

"dateTimePicker": {
  "name": "appointment_time",
  "label": "Book your appointment at:",
  "type": "DATE_AND_TIME",
  "valueMsEpoch": 796435200000
}
divider

object ( Divider )

উইজেটগুলোর মধ্যে একটি আনুভূমিক রেখা বিভাজক প্রদর্শন করে।

উদাহরণস্বরূপ, নিম্নলিখিত JSON একটি ডিভাইডার তৈরি করে:

"divider": {
}
grid

object ( Grid )

আইটেমসমূহের একটি সংগ্রহসহ একটি গ্রিড প্রদর্শন করে।

একটি গ্রিডে যেকোনো সংখ্যক কলাম এবং আইটেম থাকতে পারে। আইটেমের সংখ্যাকে কলামের সংখ্যা দিয়ে ভাগ করে প্রাপ্ত মান দ্বারা সারির সংখ্যা নির্ধারণ করা হয়। ১০টি আইটেম ও ২টি কলামের একটি গ্রিডে ৫টি সারি থাকে। ১১টি আইটেম ও ২টি কলামের একটি গ্রিডে ৬টি সারি থাকে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

উদাহরণস্বরূপ, নিম্নলিখিত JSON-টি একটি মাত্র আইটেম সহ একটি ২-কলামের গ্রিড তৈরি করে:

"grid": {
  "title": "A fine collection of items",
  "columnCount": 2,
  "borderStyle": {
    "type": "STROKE",
    "cornerRadius": 4
  },
  "items": [
    {
      "image": {
        "imageUri": "https://www.example.com/image.png",
        "cropStyle": {
          "type": "SQUARE"
        },
        "borderStyle": {
          "type": "STROKE"
        }
      },
      "title": "An item",
      "textAlignment": "CENTER"
    }
  ],
  "onClick": {
    "openLink": {
      "url": "https://www.example.com"
    }
  }
}
columns

object ( Columns )

সর্বোচ্চ ২টি কলাম প্রদর্শন করে।

দুইটির বেশি কলাম বা সারি অন্তর্ভুক্ত করতে Grid উইজেট ব্যবহার করুন।

উদাহরণস্বরূপ, নিম্নলিখিত JSON-টি ২টি কলাম তৈরি করে, যেগুলোর প্রতিটিতে টেক্সট প্যারাগ্রাফ থাকে:

"columns": {
  "columnItems": [
    {
      "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
      "horizontalAlignment": "CENTER",
      "verticalAlignment": "CENTER",
      "widgets": [
        {
          "textParagraph": {
            "text": "First column text paragraph"
          }
        }
      ]
    },
    {
      "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
      "horizontalAlignment": "CENTER",
      "verticalAlignment": "CENTER",
      "widgets": [
        {
          "textParagraph": {
            "text": "Second column text paragraph"
          }
        }
      ]
    }
  ]
}
carousel

object ( Carousel )

একটি ক্যারোসেলে একাধিক নেস্টেড উইজেট থাকে। উদাহরণস্বরূপ, এটি একটি ক্যারোসেলের JSON উপস্থাপনা, যাতে দুটি টেক্সট প্যারাগ্রাফ রয়েছে।

{
  "widgets": [
    {
      "textParagraph": {
        "text": "First text paragraph in the carousel."
      }
    },
    {
      "textParagraph": {
        "text": "Second text paragraph in the carousel."
      }
    }
  ]
}
chipList

object ( ChipList )

চিপসের একটি তালিকা।

উদাহরণস্বরূপ, নিম্নলিখিত JSON দুটি চিপ তৈরি করে। প্রথমটি একটি টেক্সট চিপ এবং দ্বিতীয়টি একটি আইকন চিপ যা একটি লিঙ্ক খোলে:

"chipList": {
  "chips": [
    {
      "text": "Edit",
      "disabled": true,
    },
    {
      "icon": {
        "knownIcon": "INVITE",
        "altText": "check calendar"
      },
      "onClick": {
        "openLink": {
          "url": "https://example.com/calendar"
        }
      }
    }
  ]
}

পাঠ্য অনুচ্ছেদ

একটি টেক্সট প্যারাগ্রাফ যা ফরম্যাটিং সমর্থন করে। গুগল চ্যাট অ্যাপে একটি উদাহরণের জন্য, ‘ফরম্যাট করা টেক্সটের একটি প্যারাগ্রাফ যোগ করুন ’ দেখুন। টেক্সট ফরম্যাটিং সম্পর্কে আরও তথ্যের জন্য, ‘গুগল চ্যাট অ্যাপে টেক্সট ফরম্যাটিং’ এবং ‘গুগল ওয়ার্কস্পেস অ্যাড-অনগুলিতে টেক্সট ফরম্যাটিং’ দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "text": string,
  "maxLines": integer,
  "textSyntax": enum (TextSyntax)
}
ক্ষেত্র
text

string

উইজেটে যে লেখাটি দেখানো হয়।

maxLines

integer

উইজেটে প্রদর্শিত টেক্সটের সর্বোচ্চ লাইন সংখ্যা। যদি টেক্সট নির্দিষ্ট সর্বোচ্চ লাইন সংখ্যা অতিক্রম করে, তবে অতিরিক্ত অংশটি একটি 'আরও দেখান' বাটনের আড়ালে লুকিয়ে রাখা হয়। যদি টেক্সট নির্দিষ্ট সর্বোচ্চ লাইন সংখ্যার সমান বা তার চেয়ে ছোট হয়, তবে কোনো ' আরও দেখান ' বাটন প্রদর্শিত হয় না।

ডিফল্ট মান হলো ০, সেক্ষেত্রে সমস্ত প্রাসঙ্গিক তথ্য প্রদর্শিত হয়। ঋণাত্মক মান উপেক্ষা করা হয়।

textSyntax

enum ( TextSyntax )

টেক্সটের সিনট্যাক্স। এটি সেট করা না থাকলে, টেক্সটটি HTML হিসেবে রেন্ডার করা হয়।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

টেক্সট সিনট্যাক্স

টেক্সট ফরম্যাট করার জন্য ব্যবহৃত সিনট্যাক্স।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

এনাম
TEXT_SYNTAX_UNSPECIFIED অনির্দিষ্ট থাকলে লেখাটি HTML হিসেবে প্রদর্শিত হয়।
HTML লেখাটি HTML হিসেবে রেন্ডার করা হয়। এটিই ডিফল্ট মান।
MARKDOWN লেখাটি মার্কডাউন হিসেবে রেন্ডার করা হয়েছে।

ছবি

একটি ছবি যা একটি URL দ্বারা নির্দিষ্ট করা হয় এবং এতে একটি onClick অ্যাকশন থাকতে পারে। একটি উদাহরণের জন্য, 'একটি ছবি যোগ করুন' দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "imageUrl": string,
  "onClick": {
    object (OnClick)
  },
  "altText": string
}
ক্ষেত্র
imageUrl

string

যে HTTPS URL-টিতে ছবিটি রয়েছে।

উদাহরণস্বরূপ:

https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
onClick

object ( OnClick )

যখন কোনো ব্যবহারকারী ছবিটিতে ক্লিক করেন, তখন সেই ক্লিকের ফলে এই কাজটি সম্পন্ন হয়।

altText

string

এই ছবিটির বিকল্প লেখাটি অ্যাক্সেসিবিলিটির জন্য ব্যবহৃত হয়।

অনক্লিক

ব্যবহারকারীরা যখন কার্ডের কোনো ইন্টারেক্টিভ উপাদানে, যেমন একটি বোতামে, ক্লিক করেন তখন কীভাবে প্রতিক্রিয়া জানাতে হবে তা এটি নির্দেশ করে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{

  "action": {
    object (Action)
  },
  "openLink": {
    object (OpenLink)
  },
  "openDynamicLinkAction": {
    object (Action)
  },
  "card": {
    object (Card)
  },
  "overflowMenu": {
    object (OverflowMenu)
  }
}
ক্ষেত্র

ইউনিয়ন ফিল্ড data

data নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:

action

object ( Action )

নির্দিষ্ট করা থাকলে, এই onClick মাধ্যমে একটি অ্যাকশন ট্রিগার হয়।

card

object ( Card )

নির্দিষ্ট করা থাকলে, ক্লিক করার পর কার্ড স্ট্যাকে একটি নতুন কার্ড যুক্ত হয়।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

overflowMenu

object ( OverflowMenu )

নির্দিষ্ট করা থাকলে, এই onClick একটি ওভারফ্লো মেনু খোলে।

পদক্ষেপ

একটি অ্যাকশন যা ফর্ম সাবমিট করা হলে তার আচরণ বর্ণনা করে। উদাহরণস্বরূপ, ফর্মটি পরিচালনা করার জন্য আপনি একটি অ্যাপস স্ক্রিপ্ট কল করতে পারেন। অ্যাকশনটি ট্রিগার হলে, ফর্মের ভ্যালুগুলো সার্ভারে পাঠানো হয়।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "function": string,
  "parameters": [
    {
      object (ActionParameter)
    }
  ],
  "loadIndicator": enum (LoadIndicator),
  "persistValues": boolean,
  "interaction": enum (Interaction),
  "requiredWidgets": [
    string
  ],
  "allWidgetsAreRequired": boolean
}
ক্ষেত্র
function

string

একটি কাস্টম ফাংশন যা ধারণকারী এলিমেন্টটি ক্লিক করা হলে বা অন্য কোনোভাবে সক্রিয় হলে চালু হয়।

ব্যবহারের উদাহরণের জন্য, 'ফর্ম ডেটা পড়ুন' দেখুন।

parameters[]

object ( ActionParameter )

কর্ম পরামিতিগুলির তালিকা।

loadIndicator

enum ( LoadIndicator )

অ্যাকশনটি কল করার সময় যে লোডিং ইন্ডিকেটরটি প্রদর্শিত হয়, তা নির্দিষ্ট করে।

persistValues

boolean

কাজটি সম্পন্ন হওয়ার পর ফর্মের মানগুলো স্থায়ী থাকবে কিনা তা নির্দেশ করে। এর ডিফল্ট মান হলো false

যদি true , তাহলে অ্যাকশনটি ট্রিগার হওয়ার পরেও ফর্মের মানগুলো অপরিবর্তিত থাকে। অ্যাকশনটি প্রসেস হওয়ার সময় ব্যবহারকারীকে পরিবর্তন করার সুযোগ দিতে, LoadIndicator কে NONE এ সেট করুন। চ্যাট অ্যাপের কার্ড মেসেজের ক্ষেত্রে, আপনাকে অবশ্যই অ্যাকশনটির ResponseType কে UPDATE_MESSAGE এ সেট করতে হবে এবং যে কার্ডে অ্যাকশনটি ছিল, সেই কার্ডের cardId ব্যবহার করতে হবে।

false হলে, অ্যাকশনটি ট্রিগার হওয়ার সময় ফর্মের ভ্যালুগুলো মুছে যায়। অ্যাকশনটি প্রসেস হওয়ার সময় ব্যবহারকারী যাতে কোনো পরিবর্তন করতে না পারে, সেজন্য LoadIndicator SPINNER এ সেট করুন।

interaction

enum ( Interaction )

ঐচ্ছিক। ডায়ালগ খোলার সময় প্রয়োজন।

ব্যবহারকারীর সাথে কোনো ইন্টারঅ্যাকশনের জবাবে কী করতে হবে, যেমন ব্যবহারকারী কার্ড মেসেজে কোনো বাটনে ক্লিক করলে।

অনির্দিষ্ট থাকলে, অ্যাপটি স্বাভাবিকভাবে কোনো একটি action সম্পাদন করে—যেমন কোনো লিঙ্ক খোলা বা কোনো ফাংশন চালানো।

একটি interaction নির্দিষ্ট করার মাধ্যমে, অ্যাপটি বিশেষ ইন্টারেক্টিভ উপায়ে সাড়া দিতে পারে। উদাহরণস্বরূপ, interaction OPEN_DIALOG এ সেট করলে, অ্যাপটি একটি ডায়ালগ খুলতে পারে। এটি নির্দিষ্ট করা হলে, কোনো লোডিং ইন্ডিকেটর দেখানো হয় না। কোনো অ্যাড-অনের জন্য এটি নির্দিষ্ট করা হলে, সম্পূর্ণ কার্ডটি সরিয়ে ফেলা হয় এবং ক্লায়েন্টে কিছুই দেখানো হয় না।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

requiredWidgets[]

string

ঐচ্ছিক। একটি বৈধ সাবমিশনের জন্য এই অ্যাকশনটির যে উইজেটগুলোর প্রয়োজন, সেগুলোর নাম দিয়ে এই তালিকাটি পূরণ করুন।

এই অ্যাকশনটি চালু করার সময় এখানে তালিকাভুক্ত উইজেটগুলিতে কোনো মান না থাকলে, ফর্ম জমা দেওয়ার প্রক্রিয়াটি বাতিল হয়ে যায়।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

allWidgetsAreRequired

boolean

ঐচ্ছিক। যদি এটি সত্য হয়, তাহলে এই পদক্ষেপের জন্য সমস্ত উইজেট আবশ্যক বলে বিবেচিত হবে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

অ্যাকশনপ্যারামিটার

অ্যাকশন মেথড কল করার সময় সরবরাহ করার জন্য স্ট্রিং প্যারামিটারগুলোর তালিকা। উদাহরণস্বরূপ, তিনটি স্নুজ বাটনের কথা ভাবুন: এখনই স্নুজ করুন, একদিনের জন্য স্নুজ করুন, অথবা আগামী সপ্তাহের জন্য স্নুজ করুন। আপনি স্ট্রিং প্যারামিটারগুলোর তালিকায় স্নুজের ধরন এবং স্নুজের সময় পাস করে action method = snooze() ব্যবহার করতে পারেন।

আরও জানতে CommonEventObject দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "key": string,
  "value": string
}
ক্ষেত্র
key

string

অ্যাকশন স্ক্রিপ্টের প্যারামিটারের নাম।

value

string

প্যারামিটারটির মান।

লোড ইন্ডিকেটর

অ্যাকশনটি কল করার সময় যে লোডিং ইন্ডিকেটরটি প্রদর্শিত হয়, তা নির্দিষ্ট করে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

এনাম
SPINNER কন্টেন্ট লোড হচ্ছে বোঝাতে একটি স্পিনার প্রদর্শন করে।
NONE কিছুই প্রদর্শিত হচ্ছে না।

মিথস্ক্রিয়া

ঐচ্ছিক। ডায়ালগ খোলার সময় প্রয়োজন।

ব্যবহারকারীর সাথে কোনো ইন্টারঅ্যাকশনের জবাবে কী করতে হবে, যেমন ব্যবহারকারী কার্ড মেসেজে কোনো বাটনে ক্লিক করলে।

অনির্দিষ্ট থাকলে, অ্যাপটি স্বাভাবিকভাবে কোনো একটি action সম্পাদন করে—যেমন কোনো লিঙ্ক খোলা বা কোনো ফাংশন চালানো।

একটি interaction নির্দিষ্ট করার মাধ্যমে, অ্যাপটি বিশেষ ইন্টারেক্টিভ উপায়ে সাড়া দিতে পারে। উদাহরণস্বরূপ, interaction OPEN_DIALOG এ সেট করলে, অ্যাপটি একটি ডায়ালগ খুলতে পারে।

নির্দিষ্ট করা থাকলে, লোডিং ইন্ডিকেটর দেখানো হয় না। কোনো অ্যাড-অনের জন্য নির্দিষ্ট করা হলে, সম্পূর্ণ কার্ডটি সরিয়ে ফেলা হয় এবং ক্লায়েন্টে কিছুই দেখানো হয় না।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

এনাম
INTERACTION_UNSPECIFIED পূর্বনির্ধারিত মান। action স্বাভাবিকভাবে সম্পাদিত হবে।
OPEN_DIALOG

একটি ডায়ালগ খোলে, যা হলো একটি উইন্ডোযুক্ত, কার্ড-ভিত্তিক ইন্টারফেস এবং চ্যাট অ্যাপগুলো ব্যবহারকারীদের সাথে আলাপচারিতার জন্য এটি ব্যবহার করে।

শুধুমাত্র কার্ড মেসেজের বাটন-ক্লিকের প্রতিক্রিয়ায় চ্যাট অ্যাপে এটি সমর্থিত। কোনো অ্যাড-অনের জন্য নির্দিষ্ট করা হলে, সম্পূর্ণ কার্ডটি মুছে ফেলা হয় এবং ক্লায়েন্টে কিছুই দেখানো হয় না।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

ওপেনএএস

যখন একটি OnClick অ্যাকশন কোনো লিঙ্ক খোলে, তখন ক্লায়েন্ট সেটিকে একটি পূর্ণ-আকারের উইন্ডো হিসাবে (যদি ক্লায়েন্ট সেই ফ্রেমটি ব্যবহার করে থাকে) অথবা একটি ওভারলে (যেমন একটি পপ-আপ) হিসাবে খুলতে পারে। এর বাস্তবায়ন ক্লায়েন্ট প্ল্যাটফর্মের সক্ষমতার উপর নির্ভর করে, এবং ক্লায়েন্ট যদি নির্বাচিত মানটি সমর্থন না করে, তবে তা উপেক্ষা করা হতে পারে। FULL_SIZE সকল ক্লায়েন্ট দ্বারা সমর্থিত।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

এনাম
FULL_SIZE লিঙ্কটি একটি পূর্ণ আকারের উইন্ডো হিসাবে খোলে (যদি ক্লায়েন্ট সেই ফ্রেমটি ব্যবহার করে থাকে)।
OVERLAY লিঙ্কটি একটি ওভারলে হিসেবে খোলে, যেমন একটি পপ-আপ।

বন্ধ করুন

OnClick অ্যাকশনের মাধ্যমে খোলা কোনো লিঙ্ক বন্ধ করা হলে ক্লায়েন্ট কী করে

বাস্তবায়ন ক্লায়েন্ট প্ল্যাটফর্মের সক্ষমতার উপর নির্ভর করে। উদাহরণস্বরূপ, একটি ওয়েব ব্রাউজার একটি OnClose হ্যান্ডলার সহ একটি পপ-আপ উইন্ডোতে লিঙ্কটি খুলতে পারে।

যদি OnOpen এবং OnClose উভয় হ্যান্ডলারই সেট করা থাকে এবং ক্লায়েন্ট প্ল্যাটফর্ম উভয় মান সমর্থন করতে না পারে, তবে OnClose অগ্রাধিকার পাবে।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

এনাম
NOTHING ডিফল্ট মান। কার্ডটি রিলোড হয় না; কিছুই ঘটে না।
RELOAD

চাইল্ড উইন্ডোটি বন্ধ হওয়ার পর কার্ডটি পুনরায় লোড করে।

OpenAs.OVERLAY সাথে একত্রে ব্যবহার করা হলে, চাইল্ড উইন্ডোটি একটি মোডাল ডায়ালগ হিসেবে কাজ করে এবং চাইল্ড উইন্ডোটি বন্ধ না হওয়া পর্যন্ত প্যারেন্ট কার্ডটি ব্লক থাকে।

ওভারফ্লো মেনু

একটি উইজেট যা একটি পপ-আপ মেনু উপস্থাপন করে, যেখানে ব্যবহারকারীরা এক বা একাধিক অ্যাকশন চালু করতে পারেন। উদাহরণস্বরূপ, একটি কার্ডে অপ্রধান অ্যাকশনগুলো দেখানো। যখন অ্যাকশনগুলো উপলব্ধ জায়গায় জায়গা পায় না, তখন আপনি এই উইজেটটি ব্যবহার করতে পারেন। এটি ব্যবহার করতে, যে উইজেটগুলো এটিকে সমর্থন করে, তাদের OnClick অ্যাকশনে এই উইজেটটি নির্দিষ্ট করে দিন। উদাহরণস্বরূপ, একটি Button এ।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "items": [
    {
      object (OverflowMenuItem)
    }
  ]
}
ক্ষেত্র
items[]

object ( OverflowMenuItem )

প্রয়োজনীয়। মেনু বিকল্পগুলির তালিকা।

ওভারফ্লো মেনু আইটেম

এমন একটি বিকল্প যা ব্যবহারকারীরা ওভারফ্লো মেনুতে চালু করতে পারেন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "startIcon": {
    object (Icon)
  },
  "text": string,
  "onClick": {
    object (OnClick)
  },
  "disabled": boolean
}
ক্ষেত্র
startIcon

object ( Icon )

টেক্সটের সামনে প্রদর্শিত আইকনটি।

text

string

আবশ্যক। যে লেখাটি ব্যবহারকারীদের কাছে পণ্যটিকে শনাক্ত বা বর্ণনা করে।

onClick

object ( OnClick )

আবশ্যক। কোনো মেনু অপশন নির্বাচন করা হলে যে অ্যাকশনটি কার্যকর হয়। এই OnClick কোনো OverflowMenu থাকতে পারে না; কোনো OverflowMenu নির্দিষ্ট করা হলে তা বাদ দেওয়া হয় এবং মেনু আইটেমটি নিষ্ক্রিয় হয়ে যায়।

disabled

boolean

মেনু বিকল্পটি নিষ্ক্রিয় কিনা। ডিফল্টরূপে এটি নিষ্ক্রিয় থাকে।

আইকন

কার্ডের উইজেটে প্রদর্শিত একটি আইকন। গুগল চ্যাট অ্যাপে একটি উদাহরণের জন্য, ‘একটি আইকন যোগ করুন’ দেখুন।

অন্তর্নির্মিত এবং কাস্টম আইকন সমর্থন করে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "altText": string,
  "imageType": enum (ImageType),

  "knownIcon": string,
  "iconUrl": string,
  "materialIcon": {
    object (MaterialIcon)
  }
}
ক্ষেত্র
altText

string

ঐচ্ছিক। অ্যাক্সেসিবিলিটির জন্য ব্যবহৃত আইকনের একটি বিবরণ। যদি নির্দিষ্ট না করা হয়, তাহলে ডিফল্ট মান ' Button প্রদান করা হয়। একটি উত্তম অনুশীলন হিসেবে, আইকনটি কী প্রদর্শন করে এবং প্রযোজ্য ক্ষেত্রে, এটি কী করে, তার জন্য আপনার একটি সহায়ক বিবরণ সেট করা উচিত। উদাহরণস্বরূপ, A user's account portrait , অথবা Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat

যদি কোনো Button আইকন সেট করা থাকে, তাহলে ব্যবহারকারী যখন বাটনটির উপর মাউস নিয়ে যান, তখন altText সহায়ক টেক্সট হিসেবে প্রদর্শিত হয়। তবে, যদি বাটনটিতে কোনো text সেট করা থাকে, তাহলে আইকনের altText উপেক্ষা করা হয়।

imageType

enum ( ImageType )

ছবিতে প্রয়োগ করা ক্রপ স্টাইল। কিছু ক্ষেত্রে, CIRCLE ক্রপ প্রয়োগ করলে ছবিটি একটি বিল্ট-ইন আইকনের চেয়ে বড় আকারে প্রদর্শিত হয়।

ইউনিয়ন ফিল্ড icons । কার্ডের উইজেটে প্রদর্শিত আইকন। icons নিম্নলিখিতগুলোর মধ্যে যেকোনো একটি হতে পারে:
knownIcon

string

গুগল ওয়ার্কস্পেস দ্বারা প্রদত্ত অন্তর্নির্মিত আইকনগুলোর মধ্যে একটি প্রদর্শন করুন।

উদাহরণস্বরূপ, একটি বিমানের আইকন প্রদর্শন করতে AIRPLANE উল্লেখ করুন। বাসের জন্য BUS উল্লেখ করুন।

সমর্থিত আইকনগুলির সম্পূর্ণ তালিকার জন্য, অন্তর্নির্মিত আইকনগুলি দেখুন।

iconUrl

string

HTTPS URL-এ হোস্ট করা একটি কাস্টম আইকন প্রদর্শন করুন।

উদাহরণস্বরূপ:

"iconUrl":
"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

সমর্থিত ফাইল টাইপগুলোর মধ্যে .png এবং .jpg অন্তর্ভুক্ত।

materialIcon

object ( MaterialIcon )

গুগল ম্যাটেরিয়াল আইকনগুলোর মধ্যে একটি প্রদর্শন করুন।

উদাহরণস্বরূপ, একটি চেকবক্স আইকন প্রদর্শন করতে, ব্যবহার করুন

"materialIcon": {
  "name": "check_box"
}

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

ম্যাটেরিয়ালআইকন

একটি গুগল ম্যাটেরিয়াল আইকন , যাতে ২৫০০-এরও বেশি অপশন রয়েছে।

উদাহরণস্বরূপ, কাস্টমাইজড ওজন এবং গ্রেড সহ একটি চেকবক্স আইকন প্রদর্শন করতে, নিম্নলিখিতটি লিখুন:

{
  "name": "check_box",
  "fill": true,
  "weight": 300,
  "grade": -25
}

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

JSON উপস্থাপনা
{
  "name": string,
  "fill": boolean,
  "weight": integer,
  "grade": integer
}
ক্ষেত্র
name

string

গুগল ম্যাটেরিয়াল আইকনে আইকনের নাম হিসেবে check_box সংজ্ঞায়িত করা থাকে। যেকোনো অবৈধ নাম বাতিল করে একটি খালি স্ট্রিং দিয়ে প্রতিস্থাপন করা হয়, যার ফলে আইকনটি রেন্ডার হতে ব্যর্থ হয়।

fill

boolean

আইকনটি ভরাট অবস্থায় প্রদর্শিত হবে কিনা। এর ডিফল্ট মান হলো ফলস।

বিভিন্ন আইকন সেটিংস প্রিভিউ করতে, Google Font Icons- এ যান এবং Customize-এর অধীনে সেটিংস অ্যাডজাস্ট করুন।

weight

integer

আইকনের স্ট্রোকের পুরুত্ব। {100, 200, 300, 400, 500, 600, 700} থেকে বেছে নিন। এটি না থাকলে, ডিফল্ট মান হবে 400। অন্য কোনো মান নির্দিষ্ট করা হলে, ডিফল্ট মানটি ব্যবহৃত হবে।

বিভিন্ন আইকন সেটিংস প্রিভিউ করতে, Google Font Icons- এ যান এবং Customize-এর অধীনে সেটিংস অ্যাডজাস্ট করুন।

grade

integer

ওজন এবং গ্রেড একটি প্রতীকের পুরুত্বকে প্রভাবিত করে। ওজনের সমন্বয়ের চেয়ে গ্রেডের সমন্বয় আরও সূক্ষ্ম এবং প্রতীকের আকারের উপর এর প্রভাব সামান্য। {-২৫, ০, ২০০} থেকে বেছে নিন। এটি অনুপস্থিত থাকলে, ডিফল্ট মান ০ হবে। অন্য কোনো মান নির্দিষ্ট করা হলে, ডিফল্ট মানটি ব্যবহৃত হবে।

বিভিন্ন আইকন সেটিংস প্রিভিউ করতে, Google Font Icons- এ যান এবং Customize-এর অধীনে সেটিংস অ্যাডজাস্ট করুন।

সজ্জিত পাঠ্য

একটি উইজেট যা টেক্সটের সাথে ঐচ্ছিক অলঙ্করণ প্রদর্শন করে, যেমন টেক্সটের উপরে বা নীচে একটি লেবেল, টেক্সটের সামনে একটি আইকন, একটি সিলেকশন উইজেট, অথবা টেক্সটের পরে একটি বাটন। গুগল চ্যাট অ্যাপে একটি উদাহরণের জন্য, ‘অলঙ্করণমূলক টেক্সট সহ টেক্সট প্রদর্শন’ দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "icon": {
    object (Icon)
  },
  "startIcon": {
    object (Icon)
  },
  "startIconVerticalAlignment": enum (VerticalAlignment),
  "topLabel": string,
  "topLabelText": {
    object (TextParagraph)
  },
  "text": string,
  "contentText": {
    object (TextParagraph)
  },
  "wrapText": boolean,
  "bottomLabel": string,
  "bottomLabelText": {
    object (TextParagraph)
  },
  "onClick": {
    object (OnClick)
  },

  "button": {
    object (Button)
  },
  "switchControl": {
    object (SwitchControl)
  },
  "endIcon": {
    object (Icon)
  }
}
ক্ষেত্র
icon
(deprecated)

object ( Icon )

startIcon এর প্রচলনের কারণে এটি অপ্রচলিত হয়ে গেছে।

startIcon

object ( Icon )

টেক্সটের সামনে প্রদর্শিত আইকনটি।

startIconVerticalAlignment

enum ( VerticalAlignment )

ঐচ্ছিক। স্টার্ট আইকনের উল্লম্ব বিন্যাস। সেট না করা হলে, আইকনটি উল্লম্বভাবে কেন্দ্রে থাকবে।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

topLabel

string

text উপরে যে লেখাটি দেখা যায়, তা সর্বদা সংক্ষিপ্ত হয়ে যায়।

topLabelText

object ( TextParagraph )

topLabel এর TextParagraph সমতুল্য। সর্বদা সংক্ষিপ্ত করে। topLabel চেয়ে আরও জটিল ফরম্যাটিংয়ের সুযোগ দেয়।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

text

string

আবশ্যক। মূল পাঠ্য।

সাধারণ ফরম্যাটিং সমর্থন করে। টেক্সট ফরম্যাটিং সম্পর্কে আরও তথ্যের জন্য, Google Chat অ্যাপে টেক্সট ফরম্যাটিং এবং Google Workspace অ্যাড-অনগুলিতে টেক্সট ফরম্যাটিং দেখুন।

contentText

object ( TextParagraph )

TextParagraph হলো text এর সমতুল্য। এটি text এর চেয়ে আরও জটিল ফরম্যাটিং-এর সুযোগ দেয়।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

wrapText

boolean

টেক্সট র‍্যাপ করার সেটিং। যদি true , তাহলে টেক্সট র‍্যাপ হয়ে একাধিক লাইনে প্রদর্শিত হবে। অন্যথায়, টেক্সটটি সংক্ষিপ্ত হয়ে যাবে।

শুধুমাত্র text ক্ষেত্রে প্রযোজ্য, topLabel এবং bottomLabel ক্ষেত্রে নয়।

bottomLabel

string

যে লেখাটি text নিচে প্রদর্শিত হয়, তা সর্বদা টেক্সটকে ঘিরে রাখে।

bottomLabelText

object ( TextParagraph )

bottomLabel এর TextParagraph সমতুল্য। সর্বদা র‍্যাপ করে। bottomLabel চেয়ে আরও জটিল ফরম্যাটিংয়ের সুযোগ দেয়।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

onClick

object ( OnClick )

ব্যবহারকারীরা topLabel বা bottomLabel ক্লিক করলে এই অ্যাকশনটি সক্রিয় হয়।

ইউনিয়ন ফিল্ড control । একটি বাটন, সুইচ, চেকবক্স বা ছবি যা decoratedText ' উইজেটের টেক্সটের ডানদিকে প্রদর্শিত হয়। control নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
button

object ( Button )

এমন একটি বাটন, যেটিতে ক্লিক করে ব্যবহারকারী কোনো কাজ সম্পন্ন করতে পারেন।

switchControl

object ( SwitchControl )

একটি সুইচ উইজেট, যেটিতে ক্লিক করে ব্যবহারকারী এর অবস্থা পরিবর্তন করতে এবং কোনো একটি অ্যাকশন চালু করতে পারেন।

endIcon

object ( Icon )

লেখাটির পরে একটি আইকন প্রদর্শিত হয়।

অন্তর্নির্মিত এবং কাস্টম আইকন সমর্থন করে।

উল্লম্ব সারিবদ্ধকরণ

উল্লম্ব সারিবদ্ধকরণ বৈশিষ্ট্যকে বোঝায়।

এনাম
VERTICAL_ALIGNMENT_UNSPECIFIED অনির্দিষ্ট প্রকার। ব্যবহার করবেন না।
TOP শীর্ষ অবস্থানে সারিবদ্ধকরণ।
MIDDLE মধ্যবর্তী অবস্থানে সারিবদ্ধকরণ।
BOTTOM সর্বনিম্ন অবস্থানে সারিবদ্ধকরণ।

বোতাম

একটি টেক্সট, আইকন, অথবা টেক্সট ও আইকন সহ বাটন, যেটিতে ব্যবহারকারীরা ক্লিক করতে পারেন। গুগল চ্যাট অ্যাপে এর একটি উদাহরণের জন্য, ‘একটি বাটন যোগ করুন’ দেখুন।

একটি ইমেজকে ক্লিকযোগ্য বাটনে পরিণত করতে, একটি Image ( ImageComponent নয়) নির্দিষ্ট করুন এবং একটি onClick অ্যাকশন সেট করুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "text": string,
  "icon": {
    object (Icon)
  },
  "color": {
    object (Color)
  },
  "onClick": {
    object (OnClick)
  },
  "disabled": boolean,
  "altText": string,
  "type": enum (Type)
}
ক্ষেত্র
text

string

বাটনের ভিতরে লেখাটি প্রদর্শিত হয়েছে।

icon

object ( Icon )

বাটনের ভিতরে একটি আইকন প্রদর্শিত হয়। যদি icon এবং text উভয়ই সেট করা থাকে, তাহলে আইকনটি টেক্সটের আগে প্রদর্শিত হয়।

color

object ( Color )

ঐচ্ছিক। বাটনের রঙ। এটি সেট করা হলে, বাটনের type FILLED হিসেবে সেট করা হয় এবং পাঠযোগ্যতার জন্য texticon ফিল্ডের রঙ একটি বৈসাদৃশ্যপূর্ণ রঙে সেট করা হয়। উদাহরণস্বরূপ, যদি বাটনের রঙ নীল সেট করা হয়, তাহলে বাটনের ভেতরের যেকোনো টেক্সট বা আইকন সাদা রঙে সেট করা হবে।

বাটনের রঙ সেট করতে, red , green , এবং blue ফিল্ডগুলোর জন্য একটি মান নির্দিষ্ট করুন। মানটি অবশ্যই RGB রঙের মানের উপর ভিত্তি করে ০ থেকে ১-এর মধ্যে একটি ফ্লোট সংখ্যা হতে হবে, যেখানে 0 (০/২৫৫) রঙের অনুপস্থিতি এবং 1 (২৫৫/২৫৫) রঙের সর্বোচ্চ তীব্রতা বোঝায়।

উদাহরণস্বরূপ, নিম্নলিখিতটি রঙটিকে তার সর্বোচ্চ তীব্রতায় লালে সেট করে:

"color": {
   "red": 1,
   "green": 0,
   "blue": 0,
}

বাটনের রঙের জন্য alpha ফিল্ডটি উপলব্ধ নয়। এটি নির্দিষ্ট করা হলে, ফিল্ডটি উপেক্ষা করা হয়।

onClick

object ( OnClick )

আবশ্যক। ব্যবহারকারী বোতামে ক্লিক করলে যে কাজটি সম্পাদন করতে হবে, যেমন একটি হাইপারলিঙ্ক খোলা বা একটি কাস্টম ফাংশন চালানো।

disabled

boolean

যদি true , তাহলে বাটনটি একটি নিষ্ক্রিয় অবস্থায় প্রদর্শিত হয় এবং ব্যবহারকারীর কোনো কার্যকলাপে সাড়া দেয় না।

altText

string

অ্যাক্সেসিবিলিটির জন্য ব্যবহৃত বিকল্প টেক্সট।

বর্ণনামূলক টেক্সট সেট করুন যা ব্যবহারকারীদের জানিয়ে দেবে বাটনটি কী কাজ করে। উদাহরণস্বরূপ, যদি কোনো বাটন একটি হাইপারলিঙ্ক খোলে, তাহলে আপনি লিখতে পারেন: "একটি নতুন ব্রাউজার ট্যাব খোলে এবং https://developers.google.com/workspace/chat-এ থাকা গুগল চ্যাট ডেভেলপার ডকুমেন্টেশনে নিয়ে যায়"

type

enum ( Type )

ঐচ্ছিক। বাটনের ধরণ। সেট না করা থাকলে, বাটনের ধরণ ডিফল্টভাবে OUTLINED হয়। যদি color ফিল্ডটি সেট করা থাকে, তাহলে বাটনের ধরণ বাধ্যতামূলকভাবে FILLED যায় এবং এই ফিল্ডের জন্য সেট করা যেকোনো মান উপেক্ষা করা হয়।

রঙ

এটি RGBA কালার স্পেসের একটি রঙকে উপস্থাপন করে। এই উপস্থাপনাটি সংক্ষিপ্ততার চেয়ে বিভিন্ন ভাষার রঙের উপস্থাপনায় সহজে রূপান্তর করার জন্য ডিজাইন করা হয়েছে। উদাহরণস্বরূপ, এই উপস্থাপনার ফিল্ডগুলি জাভাতে java.awt.Color এর কনস্ট্রাক্টরে সহজেই সরবরাহ করা যায়; এটি iOS-এ UIColor-এর +colorWithRed:green:blue:alpha মেথডেও সহজেই সরবরাহ করা যায়; এবং, সামান্য পরিশ্রমে, জাভাস্ক্রিপ্টে এটিকে সহজেই একটি CSS rgba() স্ট্রিং-এ ফরম্যাট করা যায়।

এই রেফারেন্স পৃষ্ঠায় RGB মান ব্যাখ্যা করার জন্য কোন নির্দিষ্ট কালার স্পেস ব্যবহার করা উচিত—যেমন, sRGB, Adobe RGB, DCI-P3, এবং BT.2020—সে সম্পর্কে কোনো তথ্য নেই। ডিফল্টরূপে, অ্যাপ্লিকেশনগুলো sRGB কালার স্পেস ধরে নেবে।

যখন রঙের সমতা নির্ধারণ করার প্রয়োজন হয়, তখন অন্যভাবে নথিভুক্ত না থাকলে, বাস্তবায়ন দুটি রঙকে সমান বলে গণ্য করে যদি তাদের লাল, সবুজ, নীল এবং আলফা মানের প্রত্যেকটির পার্থক্য সর্বাধিক 1e-5 হয়।

উদাহরণ (জাভা):

 import com.google.type.Color;

 // ...
 public static java.awt.Color fromProto(Color protocolor) {
   float alpha = protocolor.hasAlpha()
       ? protocolor.getAlpha().getValue()
       : 1.0;

   return new java.awt.Color(
       protocolor.getRed(),
       protocolor.getGreen(),
       protocolor.getBlue(),
       alpha);
 }

 public static Color toProto(java.awt.Color color) {
   float red = (float) color.getRed();
   float green = (float) color.getGreen();
   float blue = (float) color.getBlue();
   float denominator = 255.0;
   Color.Builder resultBuilder =
       Color
           .newBuilder()
           .setRed(red / denominator)
           .setGreen(green / denominator)
           .setBlue(blue / denominator);
   int alpha = color.getAlpha();
   if (alpha != 255) {
     result.setAlpha(
         FloatValue
             .newBuilder()
             .setValue(((float) alpha) / denominator)
             .build());
   }
   return resultBuilder.build();
 }
 // ...

উদাহরণ (iOS / Obj-C):

 // ...
 static UIColor* fromProto(Color* protocolor) {
    float red = [protocolor red];
    float green = [protocolor green];
    float blue = [protocolor blue];
    FloatValue* alpha_wrapper = [protocolor alpha];
    float alpha = 1.0;
    if (alpha_wrapper != nil) {
      alpha = [alpha_wrapper value];
    }
    return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
 }

 static Color* toProto(UIColor* color) {
     CGFloat red, green, blue, alpha;
     if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
       return nil;
     }
     Color* result = [[Color alloc] init];
     [result setRed:red];
     [result setGreen:green];
     [result setBlue:blue];
     if (alpha <= 0.9999) {
       [result setAlpha:floatWrapperWithValue(alpha)];
     }
     [result autorelease];
     return result;
}
// ...

উদাহরণ (জাভাস্ক্রিপ্ট):

// ...

var protoToCssColor = function(rgb_color) {
   var redFrac = rgb_color.red || 0.0;
   var greenFrac = rgb_color.green || 0.0;
   var blueFrac = rgb_color.blue || 0.0;
   var red = Math.floor(redFrac * 255);
   var green = Math.floor(greenFrac * 255);
   var blue = Math.floor(blueFrac * 255);

   if (!('alpha' in rgb_color)) {
      return rgbToCssColor(red, green, blue);
   }

   var alphaFrac = rgb_color.alpha.value || 0.0;
   var rgbParams = [red, green, blue].join(',');
   return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
};

var rgbToCssColor = function(red, green, blue) {
  var rgbNumber = new Number((red << 16) | (green << 8) | blue);
  var hexString = rgbNumber.toString(16);
  var missingZeros = 6 - hexString.length;
  var resultBuilder = ['#'];
  for (var i = 0; i < missingZeros; i++) {
     resultBuilder.push('0');
  }
  resultBuilder.push(hexString);
  return resultBuilder.join('');
};

// ...
JSON উপস্থাপনা
{
  "red": number,
  "green": number,
  "blue": number,
  "alpha": number
}
ক্ষেত্র
red

number

রঙে লালের পরিমাণ, যা [0, 1] ব্যবধির একটি মান।

green

number

রঙে সবুজের পরিমাণ, যা [0, 1] ব্যবধির মধ্যে একটি মান।

blue

number

রঙটিতে নীলের পরিমাণ, যা [0, 1] ব্যবধির একটি মান।

alpha

number

এই রঙের যে অংশটুকু পিক্সেলে প্রয়োগ করা হবে। অর্থাৎ, চূড়ান্ত পিক্সেল রঙটি নিম্নলিখিত সমীকরণ দ্বারা সংজ্ঞায়িত করা হয়:

pixel color = alpha * (this color) + (1.0 - alpha) * (background color)

এর মানে হলো, ১.০ মানটি একটি নিরেট রঙকে বোঝায়, যেখানে ০.০ মানটি একটি সম্পূর্ণ স্বচ্ছ রঙকে বোঝায়। এখানে একটি সাধারণ ফ্লোট স্কেলারের পরিবর্তে একটি র‍্যাপার মেসেজ ব্যবহার করা হয়, যাতে ডিফল্ট মান এবং সেট না করা মানের মধ্যে পার্থক্য করা সম্ভব হয়। যদি এটি বাদ দেওয়া হয়, তবে এই কালার অবজেক্টটি একটি নিরেট রঙ হিসাবে রেন্ডার করা হয় (যেন আলফা মানকে স্পষ্টভাবে ১.০ দেওয়া হয়েছে)।

প্রকার

ঐচ্ছিক। বাটনের ধরণ । যদি color ক্ষেত্রটি সেট করা থাকে, তাহলে type বাধ্যতামূলকভাবে FILLED হবে।

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

এনাম
TYPE_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
OUTLINED আউটলাইন করা বাটনগুলো হলো মাঝারি গুরুত্বের বাটন। এগুলোতে সাধারণত এমন সব অ্যাকশন থাকে যা গুরুত্বপূর্ণ, কিন্তু কোনো চ্যাট অ্যাপ বা অ্যাড-অনের প্রধান অ্যাকশন নয়।
FILLED একটি ফিল্ড বাটনের কন্টেইনারটি একরঙা হয়। এর দৃশ্যমান প্রভাব সবচেয়ে বেশি এবং একটি চ্যাট অ্যাপ বা অ্যাড-অনের গুরুত্বপূর্ণ ও প্রধান কাজের জন্য এটি ব্যবহার করার পরামর্শ দেওয়া হয়।
FILLED_TONAL একটি ফিল্ড টোনাল বাটন হলো ফিল্ড এবং আউটলাইনড বাটনের মাঝামাঝি একটি বিকল্প ব্যবস্থা। যেসব ক্ষেত্রে একটি কম গুরুত্বপূর্ণ বাটনের ওপর আউটলাইন বাটনের চেয়ে কিছুটা বেশি জোর দেওয়ার প্রয়োজন হয়, সেখানে এগুলো উপযোগী।
BORDERLESS ডিফল্ট অবস্থায় একটি বাটনের কোনো অদৃশ্য কন্টেইনার থাকে না। এটি প্রায়শই সর্বনিম্ন অগ্রাধিকারের কাজগুলোর জন্য ব্যবহৃত হয়, বিশেষ করে যখন একাধিক অপশন দেখানো হয়।

সুইচকন্ট্রোল

একটি টগল-স্টাইলের সুইচ অথবা একটি decoratedText উইজেটের ভিতরে থাকা একটি চেকবক্স।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

শুধুমাত্র decoratedText উইজেটে সমর্থিত।

JSON উপস্থাপনা
{
  "name": string,
  "value": string,
  "selected": boolean,
  "onChangeAction": {
    object (Action)
  },
  "controlType": enum (ControlType)
}
ক্ষেত্র
name

string

ফর্ম ইনপুট ইভেন্টে সুইচ উইজেটটি যে নামে শনাক্ত করা হয়।

ফর্ম ইনপুট নিয়ে কাজ করার বিস্তারিত বিবরণের জন্য, ‘ফর্ম ডেটা গ্রহণ’ দেখুন।

value

string

ব্যবহারকারীর প্রবেশ করানো মান, যা ফর্ম ইনপুট ইভেন্টের অংশ হিসেবে ফেরত আসে।

ফর্ম ইনপুট নিয়ে কাজ করার বিস্তারিত বিবরণের জন্য, ‘ফর্ম ডেটা গ্রহণ’ দেখুন।

selected

boolean

true হলে, সুইচটি নির্বাচিত হয়।

onChangeAction

object ( Action )

সুইচের অবস্থা পরিবর্তিত হলে যে কাজটি সম্পাদন করতে হবে, যেমন কোন ফাংশনটি চালানো হবে।

controlType

enum ( ControlType )

ইউজার ইন্টারফেসে সুইচটি যেভাবে প্রদর্শিত হয়।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

নিয়ন্ত্রণ প্রকার

ইউজার ইন্টারফেসে সুইচটি যেভাবে প্রদর্শিত হয়।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

এনাম
SWITCH একটি টগল-স্টাইলের সুইচ।
CHECKBOX CHECK_BOX এর প্রচলনের কারণে এটি অপ্রচলিত হয়ে গেছে।
CHECK_BOX একটি চেকবক্স।

বাটনলিস্ট

আনুভূমিকভাবে সাজানো বাটনগুলির একটি তালিকা। গুগল চ্যাট অ্যাপে এর একটি উদাহরণের জন্য, ‘একটি বাটন যোগ করুন’ দেখুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "buttons": [
    {
      object (Button)
    }
  ]
}
ক্ষেত্র
buttons[]

object ( Button )

বোতামের একটি সারি।

টেক্সট ইনপুট

একটি ফিল্ড যেখানে ব্যবহারকারীরা টেক্সট লিখতে পারেন। এটি সাজেশন এবং অন-চেঞ্জ অ্যাকশন সমর্থন করে। এটি ফর্ম সাবমিশন ভ্যালিডেশন সমর্থন করে। যখন Action.all_widgets_are_required true সেট করা হয় অথবা এই উইজেটটি Action.required_widgets এ নির্দিষ্ট করা থাকে, তখন কোনো ভ্যালু প্রবেশ না করা পর্যন্ত সাবমিশন অ্যাকশনটি ব্লক করা থাকে। গুগল চ্যাট অ্যাপে একটি উদাহরণের জন্য, “Add a field in which a user can enter text” দেখুন।

চ্যাট অ্যাপগুলো ফর্ম ইনপুট ইভেন্টের সময় প্রবেশ করানো টেক্সটের মান গ্রহণ ও প্রক্রিয়া করতে পারে। ফর্ম ইনপুট নিয়ে কাজ করার বিষয়ে বিস্তারিত জানতে, ‘ফর্ম ডেটা গ্রহণ’ দেখুন।

ব্যবহারকারীদের কাছ থেকে অনির্দিষ্ট বা বিমূর্ত ডেটা সংগ্রহ করার প্রয়োজন হলে, টেক্সট ইনপুট ব্যবহার করুন। ব্যবহারকারীদের কাছ থেকে নির্দিষ্ট বা গণনাযোগ্য ডেটা সংগ্রহ করতে, SelectionInput উইজেটটি ব্যবহার করুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

JSON উপস্থাপনা
{
  "name": string,
  "label": string,
  "hintText": string,
  "value": string,
  "type": enum (Type),
  "onChangeAction": {
    object (Action)
  },
  "initialSuggestions": {
    object (Suggestions)
  },
  "autoCompleteAction": {
    object (Action)
  },
  "validation": {
    object (Validation)
  },
  "placeholderText": string,

  "hostAppDataSource": {
    object (HostAppDataSourceMarkup)
  }
}
ক্ষেত্র
name

string

ফর্ম ইনপুট ইভেন্টে টেক্সট ইনপুটটি যে নামে শনাক্ত করা হয়।

ফর্ম ইনপুট নিয়ে কাজ করার বিস্তারিত বিবরণের জন্য, ‘ফর্ম ডেটা গ্রহণ’ দেখুন।

label

string

ইউজার ইন্টারফেসে টেক্সট ইনপুট ফিল্ডের উপরে যে লেখাটি প্রদর্শিত হয়।

এমন টেক্সট নির্দিষ্ট করুন যা ব্যবহারকারীকে আপনার অ্যাপের প্রয়োজনীয় তথ্য প্রবেশ করাতে সাহায্য করবে। উদাহরণস্বরূপ, যদি আপনি কারও নাম জানতে চান, কিন্তু বিশেষভাবে তার পদবি প্রয়োজন হয়, তাহলে name এর পরিবর্তে surname লিখুন।

hintText নির্দিষ্ট করা না থাকলে এটি আবশ্যক। অন্যথায়, এটি ঐচ্ছিক।

hintText

string

টেক্সট ইনপুট ফিল্ডের নিচে যে লেখাটি ব্যবহারকারীদের একটি নির্দিষ্ট মান প্রবেশ করাতে সাহায্য করার জন্য প্রদর্শিত হয়। এই লেখাটি সর্বদা দৃশ্যমান থাকে।

label অনির্দিষ্ট থাকলে আবশ্যক। অন্যথায়, ঐচ্ছিক।

value

string

ব্যবহারকারীর প্রবেশ করানো মান, যা ফর্ম ইনপুট ইভেন্টের অংশ হিসেবে ফেরত আসে।

ফর্ম ইনপুট নিয়ে কাজ করার বিস্তারিত বিবরণের জন্য, ‘ফর্ম ডেটা গ্রহণ’ দেখুন।

type

enum ( Type )

ইউজার ইন্টারফেসে একটি টেক্সট ইনপুট ফিল্ড কীভাবে প্রদর্শিত হয়। উদাহরণস্বরূপ, ফিল্ডটি এক-লাইনের নাকি বহু-লাইনের।

onChangeAction

object ( Action )

টেক্সট ইনপুট ফিল্ডে কোনো পরিবর্তন ঘটলে কী করতে হবে। উদাহরণস্বরূপ, ব্যবহারকারী ফিল্ডটিতে কিছু যোগ করলে বা টেক্সট মুছে ফেললে।

যেসব কাজ করা যেতে পারে তার উদাহরণ হলো একটি কাস্টম ফাংশন চালানো অথবা গুগল চ্যাটে একটি ডায়ালগ খোলা।

initialSuggestions

object ( Suggestions )

ব্যবহারকারীরা প্রবেশ করাতে পারেন এমন প্রস্তাবিত মান। ব্যবহারকারীরা টেক্সট ইনপুট ফিল্ডের ভেতরে ক্লিক করলে এই মানগুলো প্রদর্শিত হয়। ব্যবহারকারীরা টাইপ করার সাথে সাথে, প্রস্তাবিত মানগুলো তাদের টাইপ করা লেখার সাথে মিলিয়ে স্বয়ংক্রিয়ভাবে ফিল্টার হয়ে যায়।

উদাহরণস্বরূপ, প্রোগ্রামিং ভাষার জন্য একটি টেক্সট ইনপুট ফিল্ডে Java, JavaScript, Python, এবং C++ এর মতো ভাষা সাজেস্ট করা হতে পারে। যখন ব্যবহারকারীরা Jav টাইপ করা শুরু করেন, তখন সাজেশনের তালিকাটি ফিল্টার হয়ে শুধু Java এবং JavaScript দেখায়।

প্রস্তাবিত মান ব্যবহারকারীদের এমন মান প্রবেশ করাতে সাহায্য করে যা আপনার অ্যাপ বুঝতে পারে। জাভাস্ক্রিপ্ট উল্লেখ করার সময়, কিছু ব্যবহারকারী javascript লিখতে পারেন এবং অন্যরা java scriptJavaScript প্রস্তাব করা হলে, ব্যবহারকারীরা আপনার অ্যাপের সাথে কীভাবে কাজ করবে তার একটি নির্দিষ্ট মান নির্ধারণ করা সম্ভব হয়।

নির্দিষ্ট করা হলে, TextInput.type সর্বদা SINGLE_LINE হয়, এমনকি যদি তা MULTIPLE_LINE এ সেট করা থাকে।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

autoCompleteAction

object ( Action )

ঐচ্ছিক। টেক্সট ইনপুট ফিল্ডটি যখন ব্যবহারকারীদের সাথে ইন্টারঅ্যাক্ট করে সাজেশন প্রদান করে, তখন কী পদক্ষেপ নেওয়া হবে তা নির্দিষ্ট করুন।

অনির্দিষ্ট থাকলে, পরামর্শগুলি initialSuggestions দ্বারা নির্ধারিত হয় এবং ক্লায়েন্ট দ্বারা প্রক্রিয়াকৃত হয়।

নির্দিষ্ট করা থাকলে, অ্যাপটি এখানে উল্লেখিত কাজটি গ্রহণ করে, যেমন একটি কাস্টম ফাংশন চালানো।

গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ, কিন্তু গুগল চ্যাট অ্যাপগুলির জন্য অনুপলব্ধ।

validation

object ( Validation )

এই টেক্সট ফিল্ডের জন্য প্রয়োজনীয় ইনপুট ফরম্যাট ভ্যালিডেশন নির্দিষ্ট করুন।

গুগল চ্যাট অ্যাপ এবং গুগল ওয়ার্কস্পেস অ্যাড-অনগুলির জন্য উপলব্ধ।

placeholderText

string

টেক্সট ইনপুট ফিল্ডটি খালি থাকলে যে লেখাটি প্রদর্শিত হয়। ব্যবহারকারীদের একটি মান প্রবেশ করাতে বলার জন্য এই লেখাটি ব্যবহার করুন। উদাহরণস্বরূপ, Enter a number from 0 to 100

গুগল চ্যাট অ্যাপের জন্য উপলব্ধ, কিন্তু গুগল ওয়ার্কস্পেস অ্যাড-অনের জন্য অনুপলব্ধ।

Union field data_source .

data_source can be only one of the following:

hostAppDataSource

object ( HostAppDataSourceMarkup )

A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

প্রকার

How a text input field appears in the user interface. For example, whether it's a single line input field, or a multi-line input. If initialSuggestions is specified, type is always SINGLE_LINE , even if it's set to MULTIPLE_LINE .

Available for Google Chat apps and Google Workspace add-ons.

এনাম
SINGLE_LINE The text input field has a fixed height of one line.
MULTIPLE_LINE The text input field has a fixed height of multiple lines.

RenderActions

A set of render instructions that tells a card to perform an action, or tells the add-on host app or the Chat app to perform an app-specific action.

Available for Google Chat apps and Google Workspace add-ons.

ক্ষেত্র
action

Action

পদক্ষেপ

ক্ষেত্র
navigations[]

Navigation

Pushes, pops, or updates a card.

Add-ons in Google Chat .

Add a new card to the stack (navigate forward). For Chat apps, only available for app home .

Available for Google Chat apps and Google Workspace add-ons.

navigations: {
  pushCard: CARD
}

Replace the top card with a new card. For Chat apps, only available for app home .

Available for Google Chat apps and Google Workspace add-ons.

navigations: {
  updateCard: CARD
}

পরামর্শ

Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed.

For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing Jav , the list of suggestions filters to show Java and JavaScript .

Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter javascript and others java script . Suggesting JavaScript can standardize how users interact with your app.

When specified, TextInput.type is always SINGLE_LINE , even if it's set to MULTIPLE_LINE .

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "items": [
    {
      object (SuggestionItem)
    }
  ]
}
ক্ষেত্র
items[]

object ( SuggestionItem )

A list of suggestions used for autocomplete recommendations in text input fields.

SuggestionItem

One suggested value that users can enter in a text input field.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{

  "text": string
}
ক্ষেত্র

Union field content .

content can be only one of the following:

text

string

The value of a suggested input to a text input field. This is equivalent to what users enter themselves.

Validation

Represents the necessary data for validating the widget it's attached to.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "characterLimit": integer,
  "inputType": enum (InputType)
}
ক্ষেত্র
characterLimit

integer

Specify the character limit for text input widgets. Note that this is only used for text input and is ignored for other widgets.

Available for Google Chat apps and Google Workspace add-ons.

inputType

enum ( InputType )

Specify the type of the input widgets.

Available for Google Chat apps and Google Workspace add-ons.

InputType

The type of the input widget.

এনাম
INPUT_TYPE_UNSPECIFIED Unspecified type. Do not use.
TEXT Regular text that accepts all characters.
INTEGER An integer value.
FLOAT A float value.
EMAIL An email address.
EMOJI_PICKER A emoji selected from system-provided emoji picker.

HostAppDataSourceMarkup

A data source from a Google Workspace application. The data source populates available items for a widget.

JSON উপস্থাপনা
{

  "chatDataSource": {
    object (ChatClientDataSourceMarkup)
  },
  "workflowDataSource": {
    object (WorkflowDataSourceMarkup)
  }
}
ক্ষেত্র
Union field data_source . The Google Workspace application that populates available items for a widget. data_source can be only one of the following:
chatDataSource

object ( ChatClientDataSourceMarkup )

A data source from Google Chat.

workflowDataSource

object ( WorkflowDataSourceMarkup )

A data source from Google Workflow.

ChatClientDataSourceMarkup

For a SelectionInput widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of.

Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{

  "spaceDataSource": {
    object (SpaceDataSource)
  }
}
ক্ষেত্র
Union field source . The Google Chat data source. source can be only one of the following:
spaceDataSource

object ( SpaceDataSource )

Google Chat spaces that the user is a member of.

SpaceDataSource

A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of.

Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{
  "defaultToCurrentSpace": boolean
}
ক্ষেত্র
defaultToCurrentSpace

boolean

If set to true , the multiselect menu selects the current Google Chat space as an item by default.

WorkflowDataSourceMarkup

* Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.

In a TextInput or SelectionInput widget with MULTI_SELECT type or a DateTimePicker , provide data source from Google.

JSON উপস্থাপনা
{
  "includeVariables": boolean,
  "type": enum (Type)
}
ক্ষেত্র
includeVariables

boolean

Whether to include variables from the previous step in the data source.

type

enum ( Type )

The type of data source.

প্রকার

An enum that represents the type of the workflow data source.

এনাম
UNKNOWN Default value. Don't use.
USER Google Workspace users. The user can only view and select users from their Google Workspace organization.
SPACE Google Chat spaces that the user is a member of.
USER_WITH_FREE_FORM Users can choose to view and select existing members from their Google Workspace organization or manually enter an email address or a valid domain.

SelectionInput

A widget that creates one or more UI items that users can select. Supports form submission validation for dropdown and multiselect menus only. When Action.all_widgets_are_required is set to true or this widget is specified in Action.required_widgets , the submission action is blocked unless a value is selected. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Add selectable UI elements .

Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data .

To collect undefined or abstract data from users, use the TextInput widget.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "name": string,
  "label": string,
  "type": enum (SelectionType),
  "items": [
    {
      object (SelectionItem)
    }
  ],
  "onChangeAction": {
    object (Action)
  },
  "multiSelectMinQueryLength": integer,
  "dataSourceConfigs": [
    {
      object (DataSourceConfig)
    }
  ],
  "multiSelectMaxSelectedItems": integer,
  "hintText": string,

  "externalDataSource": {
    object (Action)
  },
  "platformDataSource": {
    object (PlatformDataSource)
  }
}
ক্ষেত্র
name

string

Required. The name that identifies the selection input in a form input event.

For details about working with form inputs, see Receive form data .

label

string

The text that appears above the selection input field in the user interface.

Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".

type

enum ( SelectionType )

The type of items that are displayed to users in a SelectionInput widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.

items[]

object ( SelectionItem )

An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.

onChangeAction

object ( Action )

If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form.

For details about working with form inputs, see Receive form data .

multiSelectMinQueryLength

integer

For multiselect menus, the number of text characters that a user inputs before the menu returns suggested selection items.

If unset, the multiselect menu uses the following default values:

  • If the menu uses a static array of SelectionInput items, defaults to 0 characters and immediately populates items from the array.
  • If the menu uses a dynamic data source ( multi_select_data_source ), defaults to 3 characters before querying the data source to return suggested items.
dataSourceConfigs[]

object ( DataSourceConfig )

Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source.

If specified, the multiSelectMaxSelectedItems field, multiSelectMinQueryLength field, externalDataSource field and platformDataSource field are ignored.

Available for Google Workspace add-ons that extend Google Workspace Studio.

Available for the Dropdown widget in Google Chat apps. For the Dropdown widget in Google Chat apps, only one DataSourceConfig is supported. If multiple DataSourceConfig s are set, only the first one is used.

multiSelectMaxSelectedItems

integer

For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.

hintText

string

Optional. Text that appears below the selection input field meant to assist users by prompting them to enter a certain value. This text is always visible.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

Union field multi_select_data_source . For a multiselect menu, a data source that dynamically populates selection items.

Available for Google Chat apps and unavailable for Google Workspace add-ons. multi_select_data_source can be only one of the following:

externalDataSource

object ( Action )

An external data source, such as a relational database.

platformDataSource

object ( PlatformDataSource )

A data source from Google Workspace.

SelectionType

The format for the items that users can select. Different options support different types of interactions. For example, users can select multiple checkboxes, but can only select one item from a dropdown menu.

Each selection input supports one type of selection. Mixing checkboxes and switches, for example, isn't supported.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
CHECK_BOX A set of checkboxes. Users can select one or more checkboxes.
RADIO_BUTTON A set of radio buttons. Users can select one radio button.
SWITCH A set of switches. Users can turn on one or more switches.
DROPDOWN

A dropdown menu. Users can select one item from the menu.

For Google Chat apps, you can populate items using a dynamic data source and autosuggest items as users type in the menu. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To dynamically populate items for a dropdown menu, use one of the following types of data sources:

  • Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces.
  • External data: Items are populated from an external data source outside of Google Workspace.

For examples of how to implement dropdown menus for Chat apps, see Add a dropdown menu and Dynamically populate drop-down menus .

Available for Google Chat apps and Google Workspace add-ons.

MULTI_SELECT

A menu with a text box. Users can type and select one or more items. For Google Workspace add-ons, you must populate items using a static array of SelectionItem objects.

For Google Chat apps, you can also populate items using a dynamic data source and autosuggest items as users type in the menu. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To dynamically populate items for a multiselect menu, use one of the following types of data sources:

  • Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces.
  • External data: Items are populated from an external data source outside of Google Workspace.

For examples of how to implement multiselect menus for Chat apps, see Add a multiselect menu .

Available for Google Chat apps and Google Workspace add-ons.

SelectionItem

An item that users can select in a selection input, such as a checkbox or switch. Supports up to 100 items.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "text": string,
  "value": string,
  "selected": boolean,
  "bottomText": string,

  "startIconUri": string
}
ক্ষেত্র
text

string

The text that identifies or describes the item to users.

value

string

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data .

selected

boolean

Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.

bottomText

string

For multiselect menus, a text description or label that's displayed below the item's text field.

Union field start_icon . For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png . start_icon can be only one of the following:
startIconUri

string

PlatformDataSource

For a SelectionInput widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu.

Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{

  "commonDataSource": enum (CommonDataSource),
  "hostAppDataSource": {
    object (HostAppDataSourceMarkup)
  }
}
ক্ষেত্র
Union field data_source . The data source. data_source can be only one of the following:
commonDataSource

enum ( CommonDataSource )

A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.

hostAppDataSource

object ( HostAppDataSourceMarkup )

A data source that's unique to a Google Workspace host application, such spaces in Google Chat.

This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see Install the client libraries .

CommonDataSource

A data source shared by all Google Workspace applications .

Available for Google Chat apps and unavailable for Google Workspace add-ons.

এনাম
UNKNOWN Default value. Don't use.
USER Google Workspace users. The user can only view and select users from their Google Workspace organization.

DataSourceConfig

A configuration object that helps configure the data sources for a widget.

Available for Google Chat apps and Google Workspace add-ons that extend Google Workspace Studio.

JSON উপস্থাপনা
{

  "remoteDataSource": {
    object (Action)
  },
  "platformDataSource": {
    object (PlatformDataSource)
  }
  "minCharactersTrigger": integer
}
ক্ষেত্র
Union field data_source . The data source. data_source can be only one of the following:
remoteDataSource

object ( Action )

The data is from a remote data provider.

platformDataSource

object ( PlatformDataSource )

The data is from a Google Workspace application.

minCharactersTrigger

integer

The minimum number of characters the user must enter before this data provider is triggered (ie, before it starts returning results).

DateTimePicker

Lets users input a date, a time, or both a date and a time. Supports form submission validation. When Action.all_widgets_are_required is set to true or this widget is specified in Action.required_widgets , the submission action is blocked unless a value is selected. For an example in Google Chat apps, see Let a user pick a date and time .

Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "name": string,
  "label": string,
  "type": enum (DateTimePickerType),
  "valueMsEpoch": string,
  "timezoneOffsetDate": integer,
  "onChangeAction": {
    object (Action)
  },

  "hostAppDataSource": {
    object (HostAppDataSourceMarkup)
  }
}
ক্ষেত্র
name

string

The name by which the DateTimePicker is identified in a form input event.

For details about working with form inputs, see Receive form data .

label

string

The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as Appointment date or Appointment date and time .

type

enum ( DateTimePickerType )

Whether the widget supports inputting a date, a time, or the date and time.

valueMsEpoch

string ( int64 format)

The default value displayed in the widget, in milliseconds since Unix epoch time .

Specify the value based on the type of picker ( DateTimePickerType ):

  • DATE_AND_TIME : a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use 1672574400000 .
  • DATE_ONLY : a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use 1672531200000 .
  • TIME_ONLY : a time in UTC. For example, to represent 12:00 PM, use 43200000 (or 12 * 60 * 60 * 1000 ).
timezoneOffsetDate

integer

The number representing the time zone offset from UTC, in minutes. If set, the valueMsEpoch is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.

onChangeAction

object ( Action )

Triggered when the user clicks Save or Clear from the DateTimePicker interface.

Union field data_source . The data source specified to represent a date and time. data_source can be only one of the following:
hostAppDataSource

object ( HostAppDataSourceMarkup )

A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

DateTimePickerType

The format for the date and time in the DateTimePicker widget. Determines whether users can input a date, a time, or both a date and time.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
DATE_AND_TIME Users input a date and time.
DATE_ONLY Users input a date.
TIME_ONLY Users input a time.

Divider

This type has no fields.

Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see Add a horizontal divider between widgets .

Available for Google Chat apps and Google Workspace add-ons.

For example, the following JSON creates a divider:

"divider": {}

Grid

Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use Columns . For an example in Google Chat apps, see Display a Grid with a collection of items .

A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows.

Available for Google Chat apps and Google Workspace add-ons.

For example, the following JSON creates a 2 column grid with a single item:

"grid": {
  "title": "A fine collection of items",
  "columnCount": 2,
  "borderStyle": {
    "type": "STROKE",
    "cornerRadius": 4
  },
  "items": [
    {
      "image": {
        "imageUri": "https://www.example.com/image.png",
        "cropStyle": {
          "type": "SQUARE"
        },
        "borderStyle": {
          "type": "STROKE"
        }
      },
      "title": "An item",
      "textAlignment": "CENTER"
    }
  ],
  "onClick": {
    "openLink": {
      "url": "https://www.example.com"
    }
  }
}
JSON উপস্থাপনা
{
  "title": string,
  "items": [
    {
      object (GridItem)
    }
  ],
  "borderStyle": {
    object (BorderStyle)
  },
  "columnCount": integer,
  "onClick": {
    object (OnClick)
  }
}
ক্ষেত্র
title

string

The text that displays in the grid header.

items[]

object ( GridItem )

The items to display in the grid.

borderStyle

object ( BorderStyle )

The border style to apply to each grid item.

columnCount

integer

The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).

onClick

object ( OnClick )

This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.

GridItem

Represents an item in a grid layout. Items can contain text, an image, or both text and an image.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "id": string,
  "image": {
    object (ImageComponent)
  },
  "title": string,
  "subtitle": string,
  "layout": enum (GridItemLayout)
}
ক্ষেত্র
id

string

A user-specified identifier for this grid item. This identifier is returned in the parent grid's onClick callback parameters.

image

object ( ImageComponent )

The image that displays in the grid item.

title

string

The grid item's title.

subtitle

string

The grid item's subtitle.

layout

enum ( GridItemLayout )

The layout to use for the grid item.

ImageComponent

Represents an image.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "imageUri": string,
  "altText": string,
  "cropStyle": {
    object (ImageCropStyle)
  },
  "borderStyle": {
    object (BorderStyle)
  }
}
ক্ষেত্র
imageUri

string

The image URL.

altText

string

The accessibility label for the image.

cropStyle

object ( ImageCropStyle )

The crop style to apply to the image.

borderStyle

object ( BorderStyle )

The border style to apply to the image.

ImageCropStyle

Represents the crop style applied to an image.

Available for Google Chat apps and Google Workspace add-ons.

For example, here's how to apply a 16:9 aspect ratio:

cropStyle {
 "type": "RECTANGLE_CUSTOM",
 "aspectRatio": 16/9
}
JSON উপস্থাপনা
{
  "type": enum (ImageCropType),
  "aspectRatio": number
}
ক্ষেত্র
type

enum ( ImageCropType )

The crop type.

aspectRatio

number

The aspect ratio to use if the crop type is RECTANGLE_CUSTOM .

For example, here's how to apply a 16:9 aspect ratio:

cropStyle {
 "type": "RECTANGLE_CUSTOM",
 "aspectRatio": 16/9
}

ImageCropType

Represents the crop style applied to an image.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
IMAGE_CROP_TYPE_UNSPECIFIED Don't use. Unspecified.
SQUARE Default value. Applies a square crop.
CIRCLE Applies a circular crop.
RECTANGLE_CUSTOM Applies a rectangular crop with a custom aspect ratio. Set the custom aspect ratio with aspectRatio .
RECTANGLE_4_3 Applies a rectangular crop with a 4:3 aspect ratio.

BorderStyle

The style options for the border of a card or widget, including the border type and color.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "type": enum (BorderType),
  "strokeColor": {
    object (Color)
  },
  "cornerRadius": integer
}
ক্ষেত্র
type

enum ( BorderType )

The border type.

strokeColor

object ( Color )

The colors to use when the type is BORDER_TYPE_STROKE .

To set the stroke color, specify a value for the red , green , and blue fields. The value must be a float number between 0 and 1 based on the RGB color value, where 0 (0/255) represents the absence of color and 1 (255/255) represents the maximum intensity of the color.

For example, the following sets the color to red at its maximum intensity:

"color": {
   "red": 1,
   "green": 0,
   "blue": 0,
}

The alpha field is unavailable for stroke color. If specified, this field is ignored.

cornerRadius

integer

The corner radius for the border.

BorderType

Represents the border types applied to widgets.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
BORDER_TYPE_UNSPECIFIED Don't use. Unspecified.
NO_BORDER No border.
STROKE Default value. Outline.

GridItemLayout

Represents the various layout options available for a grid item.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
GRID_ITEM_LAYOUT_UNSPECIFIED Don't use. Unspecified.
TEXT_BELOW The title and subtitle are shown below the grid item's image.
TEXT_ABOVE The title and subtitle are shown above the grid item's image.

কলাম

The Columns widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see Display cards and dialogs in columns .

The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns.

Columns are displayed side-by-side. You can customize the width of each column using the HorizontalSizeStyle field. If the user's screen width is too narrow, the second column wraps below the first:

  • On web, the second column wraps if the screen width is less than or equal to 480 pixels.
  • On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt.
  • On Android devices, the second column wraps if the screen width is less than or equal to 320 dp.

To include more than two columns, or to use rows, use the Grid widget.

Available for Google Chat apps and Google Workspace add-ons. The add-on UIs that support columns include:

  • The dialog displayed when users open the add-on from an email draft.
  • The dialog displayed when users open the add-on from the Add attachment menu in a Google Calendar event.
JSON উপস্থাপনা
{
  "columnItems": [
    {
      object (Column)
    }
  ]
}
ক্ষেত্র
columnItems[]

object ( Column )

An array of columns. You can include up to 2 columns in a card or dialog.

Column

A column.

Google Workspace add-ons and Chat apps

JSON উপস্থাপনা
{
  "horizontalSizeStyle": enum (HorizontalSizeStyle),
  "horizontalAlignment": enum (HorizontalAlignment),
  "verticalAlignment": enum (VerticalAlignment),
  "widgets": [
    {
      object (Widgets)
    }
  ]
}
ক্ষেত্র
horizontalSizeStyle

enum ( HorizontalSizeStyle )

Specifies how a column fills the width of the card.

horizontalAlignment

enum ( HorizontalAlignment )

Specifies whether widgets align to the left, right, or center of a column.

verticalAlignment

enum ( VerticalAlignment )

Specifies whether widgets align to the top, bottom, or center of a column.

widgets[]

object ( Widgets )

An array of widgets included in a column. Widgets appear in the order that they are specified.

HorizontalSizeStyle

Specifies how a column fills the width of the card. The width of each column depends on both the HorizontalSizeStyle and the width of the widgets within the column.

Google Workspace add-ons and Chat apps

এনাম
HORIZONTAL_SIZE_STYLE_UNSPECIFIED Don't use. Unspecified.
FILL_AVAILABLE_SPACE Default value. Column fills the available space, up to 70% of the card's width. If both columns are set to FILL_AVAILABLE_SPACE , each column fills 50% of the space.
FILL_MINIMUM_SPACE Column fills the least amount of space possible and no more than 30% of the card's width.

HorizontalAlignment

Specifies whether widgets align to the left, right, or center of a column.

Available for Google Chat apps and unavailable for Google Workspace add-ons.

এনাম
HORIZONTAL_ALIGNMENT_UNSPECIFIED Don't use. Unspecified.
START Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.
CENTER Aligns widgets to the center of the column.
END Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left.

VerticalAlignment

Specifies whether widgets align to the top, bottom, or center of a column.

Google Workspace add-ons and Chat apps

এনাম
VERTICAL_ALIGNMENT_UNSPECIFIED Don't use. Unspecified.
CENTER Default value. Aligns widgets to the center of a column.
TOP Aligns widgets to the top of a column.
BOTTOM Aligns widgets to the bottom of a column.

উইজেট

The supported widgets that you can include in a column.

Google Workspace add-ons and Chat apps

JSON উপস্থাপনা
{

  "textParagraph": {
    object (TextParagraph)
  },
  "image": {
    object (Image)
  },
  "decoratedText": {
    object (DecoratedText)
  },
  "buttonList": {
    object (ButtonList)
  },
  "textInput": {
    object (TextInput)
  },
  "selectionInput": {
    object (SelectionInput)
  },
  "dateTimePicker": {
    object (DateTimePicker)
  },
  "chipList": {
    object (ChipList)
  }
}
ক্ষেত্র

Union field data .

data can be only one of the following:

textParagraph

object ( TextParagraph )

TextParagraph widget.

image

object ( Image )

Image widget.

decoratedText

object ( DecoratedText )

DecoratedText widget.

buttonList

object ( ButtonList )

ButtonList widget.

textInput

object ( TextInput )

TextInput widget.

selectionInput

object ( SelectionInput )

SelectionInput widget.

dateTimePicker

object ( DateTimePicker )

DateTimePicker widget.

chipList

object ( ChipList )

ChipList widget.

ChipList

A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "layout": enum (Layout),
  "chips": [
    {
      object (Chip)
    }
  ]
}
ক্ষেত্র
layout

enum ( Layout )

Specified chip list layout.

chips[]

object ( Chip )

An array of chips.

Layout

The chip list layout.

এনাম
LAYOUT_UNSPECIFIED Don't use. Unspecified.
WRAPPED Default value. The chip list wraps to the next line if there isn't enough horizontal space.
HORIZONTAL_SCROLLABLE The chips scroll horizontally if they don't fit in the available space.

চিপ

A text, icon, or text and icon chip that users can click.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "icon": {
    object (Icon)
  },
  "label": string,
  "onClick": {
    object (OnClick)
  },
  "enabled": boolean,
  "disabled": boolean,
  "altText": string
}
ক্ষেত্র
icon

object ( Icon )

The icon image. If both icon and text are set, then the icon appears before the text.

label

string

The text displayed inside the chip.

onClick

object ( OnClick )

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

enabled
(deprecated)

boolean

Whether the chip is in an active state and responds to user actions. Defaults to true . Deprecated. Use disabled instead.

disabled

boolean

Whether the chip is in an inactive state and ignores user actions. Defaults to false .

altText

string

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat" .

A carousel, also known as a slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget.

For example, this is a JSON representation of a carousel that contains three text paragraph widgets.

{
  "carouselCards": [
    {
      "widgets": [
        {
          "textParagraph": {
            "text": "First text paragraph in carousel",
          }
        }
      ]
    },
    {
      "widgets": [
        {
          "textParagraph": {
            "text": "Second text paragraph in carousel",
          }
        }
      ]
    },
    {
      "widgets": [
        {
          "textParagraph": {
            "text": "Third text paragraph in carousel",
          }
        }
      ]
    }
  ]
}

Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{
  "carouselCards": [
    {
      object (CarouselCard)
    }
  ]
}
ক্ষেত্র
carouselCards[]

object ( CarouselCard )

A list of cards included in the carousel.

CarouselCard

A card that can be displayed as a carousel item. Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{
  "widgets": [
    {
      object (NestedWidget)
    }
  ],
  "footerWidgets": [
    {
      object (NestedWidget)
    }
  ]
}
ক্ষেত্র
widgets[]

object ( NestedWidget )

A list of widgets displayed in the carousel card. The widgets are displayed in the order that they are specified.

footerWidgets[]

object ( NestedWidget )

A list of widgets displayed at the bottom of the carousel card. The widgets are displayed in the order that they are specified.

NestedWidget

A list of widgets that can be displayed in a containing layout, such as a CarouselCard . Available for Google Chat apps and unavailable for Google Workspace add-ons.

JSON উপস্থাপনা
{

  "textParagraph": {
    object (TextParagraph)
  },
  "buttonList": {
    object (ButtonList)
  },
  "image": {
    object (Image)
  }
}
ক্ষেত্র

Union field data .

data can be only one of the following:

textParagraph

object ( TextParagraph )

A text paragraph widget.

buttonList

object ( ButtonList )

A button list widget.

image

object ( Image )

An image widget.

দৃশ্যমানতা

Specifies whether an UI element is visible or hidden.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

এনাম
VISIBILITY_UNSPECIFIED Unspecified visibility. Do not use.
VISIBLE The UI element is visible.
HIDDEN The UI element is hidden.

EventAction

Represents an actionthat can be performed on an ui element.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "actionRuleId": string,
  "postEventTriggers": [
    {
      object (Trigger)
    }
  ],

  "commonWidgetAction": {
    object (CommonWidgetAction)
  }
}
ক্ষেত্র
actionRuleId

string

The unique identifier of the ActionRule.

postEventTriggers[]

object ( Trigger )

The list of triggers that will be triggered after the EventAction is executed.

Union field action . The action to perform. action can be only one of the following:
commonWidgetAction

object ( CommonWidgetAction )

Common widget action.

Trigger

Represents a trigger.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "actionRuleId": string
}
ক্ষেত্র
actionRuleId

string

The unique identifier of the ActionRule.

CommonWidgetAction

Represents an action that is not specific to a widget.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{

  "updateVisibilityAction": {
    object (UpdateVisibilityAction)
  }
}
ক্ষেত্র
Union field action . The action to perform. action can be only one of the following:
updateVisibilityAction

object ( UpdateVisibilityAction )

The action to update the visibility of a widget.

UpdateVisibilityAction

Represents an action that updates the visibility of a widget.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "visibility": enum (Visibility)
}
ক্ষেত্র
visibility

enum ( Visibility )

The new visibility.

CollapseControl

Represent an expand and collapse control.

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "horizontalAlignment": enum (HorizontalAlignment),
  "expandButton": {
    object (Button)
  },
  "collapseButton": {
    object (Button)
  }
}
ক্ষেত্র
horizontalAlignment

enum ( HorizontalAlignment )

The horizontal alignment of the expand and collapse button.

expandButton

object ( Button )

Optional. Define a customizable button to expand the section. Both expandButton and collapseButton field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used.

collapseButton

object ( Button )

Optional. Define a customizable button to collapse the section. Both expandButton and collapseButton field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used.

DividerStyle

The divider style of a card. Currently only used for dividers betweens card sections.

Available for Google Chat apps and Google Workspace add-ons.

এনাম
DIVIDER_STYLE_UNSPECIFIED Don't use. Unspecified.
SOLID_DIVIDER Default option. Render a solid divider.
NO_DIVIDER If set, no divider is rendered. This style completely removes the divider from the layout. The result is equivalent to not adding a divider at all.

CardAction

A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser.

Available for Google Workspace add-ons and unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "actionLabel": string,
  "onClick": {
    object (OnClick)
  }
}
ক্ষেত্র
actionLabel

string

The label that displays as the action menu item.

onClick

object ( OnClick )

The onClick action for this action item.

CardFixedFooter

A persistent (sticky) footer that that appears at the bottom of the card.

Setting fixedFooter without specifying a primaryButton or a secondaryButton causes an error.

For Chat apps, you can use fixed footers in dialogs , but not card messages . For an example in Google Chat apps, see Add a persistent footer .

Available for Google Chat apps and Google Workspace add-ons.

JSON উপস্থাপনা
{
  "primaryButton": {
    object (Button)
  },
  "secondaryButton": {
    object (Button)
  }
}
ক্ষেত্র
primaryButton

object ( Button )

The primary button of the fixed footer. The button must be a text button with text and color set.

secondaryButton

object ( Button )

The secondary button of the fixed footer. The button must be a text button with text and color set. If secondaryButton is set, you must also set primaryButton .

DisplayStyle

In Google Workspace add-ons, determines how a card is displayed.

Available for Google Workspace add-ons and unavailable for Google Chat apps.

এনাম
DISPLAY_STYLE_UNSPECIFIED Don't use. Unspecified.
PEEK The header of the card appears at the bottom of the sidebar, partially covering the current top card of the stack. Clicking the header pops the card into the card stack. If the card has no header, a generated header is used instead.
REPLACE Default value. The card is shown by replacing the view of the top card in the card stack.

ExpressionData

Represents the data that is used to evaluate an expression.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "id": string,
  "expression": string,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "eventActions": [
    {
      object (EventAction)
    }
  ]
}
ক্ষেত্র
id

string

The unique identifier of the ExpressionData.

expression

string

The uncompiled expression.

conditions[]

object ( Condition )

The list of conditions that are determined by the expression evaluation result.

eventActions[]

object ( EventAction )

The list of actions that the ExpressionData can be used.

অবস্থা

Represents a condition that can be used to trigger an action.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "actionRuleId": string,

  "expressionDataCondition": {
    object (ExpressionDataCondition)
  }
}
ক্ষেত্র
actionRuleId

string

The unique identifier of the ActionRule.

Union field condition . The condition. condition can be only one of the following:
expressionDataCondition

object ( ExpressionDataCondition )

The condition that is determined by the expression data.

ExpressionDataCondition

Represents a condition that is evaluated using CEL.

Available for Google Workspace add-ons that extend Google Workspace Studio. Unavailable for Google Chat apps.

JSON উপস্থাপনা
{
  "conditionType": enum (ConditionType)
}
ক্ষেত্র
conditionType

enum ( ConditionType )

The type of the condition.

ConditionType

The type of the condition.

এনাম
CONDITION_TYPE_UNSPECIFIED Unspecified condition type.
EXPRESSION_EVALUATION_SUCCESS The expression evaluation was successful.
EXPRESSION_EVALUATION_FAILURE The expression evaluation was unsuccessful.