Package google.apps.card.v1

সূচক

অ্যাকশন

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
function

string

একটি কাস্টম ফাংশন যা কন্টেনিং এলিমেন্টে ক্লিক করলে বা অন্যথায় সক্রিয় হলে ব্যবহার করা হয়।

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

parameters[]

ActionParameter

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

load_indicator

LoadIndicator

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

persist_values

bool

অ্যাকশনের পরেও ফর্মের মান টিকে থাকে কিনা তা নির্দেশ করে। ডিফল্ট মান হল false

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

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

interaction

Interaction

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

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

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

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

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

required_widgets[]

string

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

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

all_widgets_are_required

bool

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

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

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

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
key

string

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

value

string

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

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

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

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

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

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

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

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

এনামস
INTERACTION_UNSPECIFIED ডিফল্ট মান। action স্বাভাবিকভাবে কার্যকর হয়।
OPEN_DIALOG

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

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

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

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

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

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

বর্ডারস্টাইল

কার্ড বা উইজেটের বর্ডারের স্টাইলের বিকল্প, যার মধ্যে বর্ডারের ধরণ এবং রঙ অন্তর্ভুক্ত।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
type

BorderType

সীমানার ধরণ।

stroke_color

Color

BORDER_TYPE_STROKE টাইপ হলে যে রঙগুলি ব্যবহার করতে হবে।

স্ট্রোকের রঙ নির্ধারণ করতে, red , green এবং blue ক্ষেত্রের জন্য একটি মান নির্দিষ্ট করুন। মানটি RGB রঙের মানের উপর ভিত্তি করে 0 এবং 1 এর মধ্যে একটি ফ্লোট সংখ্যা হতে হবে, যেখানে 0 (0/255) রঙের অনুপস্থিতি এবং 1 (255/255) রঙের সর্বাধিক তীব্রতা প্রতিনিধিত্ব করে।

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

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

স্ট্রোক রঙের জন্য alpha ক্ষেত্রটি অনুপলব্ধ। যদি নির্দিষ্ট করা থাকে, তাহলে এই ক্ষেত্রটি উপেক্ষা করা হবে।

corner_radius

int32

সীমানার কোণার ব্যাসার্ধ।

বর্ডারটাইপ

উইজেটে প্রয়োগ করা সীমানা প্রকারগুলি উপস্থাপন করে।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

এনামস
BORDER_TYPE_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
NO_BORDER কোন সীমানা নেই।
STROKE ডিফল্ট মান। রূপরেখা।

বোতাম

একটি টেক্সট, আইকন, অথবা টেক্সট এবং আইকন বোতাম যা ব্যবহারকারীরা ক্লিক করতে পারেন। Google Chat অ্যাপের উদাহরণের জন্য, একটি বোতাম যোগ করুন দেখুন।

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
text

string

বোতামের ভেতরে প্রদর্শিত লেখা।

icon

Icon

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

color

Color

ঐচ্ছিক। বোতামের রঙ। যদি সেট করা থাকে, তাহলে বোতামের type FILLED তে সেট করা হয় এবং পাঠযোগ্যতার জন্য text এবং icon ক্ষেত্রের রঙ একটি বিপরীত রঙে সেট করা হয়। উদাহরণস্বরূপ, যদি বোতামের রঙ নীল তে সেট করা থাকে, তাহলে বোতামের যেকোনো পাঠ্য বা আইকন সাদা তে সেট করা হয়।

বোতামের রঙ সেট করতে, red , green এবং blue ক্ষেত্রের জন্য একটি মান নির্দিষ্ট করুন। মানটি RGB রঙের মানের উপর ভিত্তি করে 0 এবং 1 এর মধ্যে একটি ফ্লোট নম্বর হতে হবে, যেখানে 0 (0/255) রঙের অনুপস্থিতি এবং 1 (255/255) রঙের সর্বাধিক তীব্রতা প্রতিনিধিত্ব করে।

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

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

বোতামের রঙের জন্য alpha ক্ষেত্রটি অনুপলব্ধ। যদি নির্দিষ্ট করা থাকে, তাহলে এই ক্ষেত্রটি উপেক্ষা করা হবে।

on_click

OnClick

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

disabled

bool

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

alt_text

string

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

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

type

Type

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

আদর্শ

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

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

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

বোতাম তালিকা

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
buttons[]

Button

বোতামের একটি অ্যারে।

কার্ড

Google Chat মেসেজ বা Google Workspace অ্যাড-অনে প্রদর্শিত একটি কার্ড ইন্টারফেস।

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

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

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

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

দ্রষ্টব্য: আপনি প্রতিটি কার্ডে সর্বাধিক ১০০টি উইজেট যোগ করতে পারবেন। এই সীমার বাইরে থাকা যেকোনো উইজেট উপেক্ষা করা হবে। এই সীমা Google Chat অ্যাপের কার্ড মেসেজ এবং ডায়ালগ এবং Google Workspace অ্যাড-অনের কার্ডের ক্ষেত্রে প্রযোজ্য।

উদাহরণ: Google Chat অ্যাপের জন্য কার্ড মেসেজ

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

Google Chat-এ নমুনা কার্ড মেসেজ তৈরি করতে, নিম্নলিখিত 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"
                             }
                           ]
                         }
                       }
                     }
                   ]
                 }
               }
             ]
           }
         ]
       }
    }
  ]
}
ক্ষেত্র
header

CardHeader

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

sections[]

Section

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

section_divider_style

DividerStyle

হেডার, বিভাগ এবং ফুটারের মধ্যে বিভাজক শৈলী।

card_actions[]

CardAction

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

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

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

"card_actions": [
  {
    "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

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

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

display_style

DisplayStyle

Google Workspace অ্যাড-অনগুলিতে, peekCardHeader এর প্রদর্শন বৈশিষ্ট্য সেট করে।

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

peek_card_header

CardHeader

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

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

expression_data[]

ExpressionData

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

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

কার্ডঅ্যাকশন

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

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

ক্ষেত্র
action_label

string

অ্যাকশন মেনু আইটেম হিসেবে প্রদর্শিত লেবেল।

on_click

OnClick

এই অ্যাকশন আইটেমের জন্য onClick অ্যাকশন।

কার্ডফিক্সডফুটার

কার্ডের নীচে প্রদর্শিত একটি স্থায়ী (আঠালো) ফুটার।

primaryButton বা secondaryButton নির্দিষ্ট না করে fixedFooter সেট করলে ত্রুটি দেখা দেয়।

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
primary_button

Button

স্থির পাদলেখের প্রাথমিক বোতাম। বোতামটি অবশ্যই টেক্সট এবং রঙের সেট সহ একটি টেক্সট বোতাম হতে হবে।

secondary_button

Button

স্থির পাদলেখের সেকেন্ডারি বোতাম। বোতামটি অবশ্যই টেক্সট এবং রঙের সেট সহ একটি টেক্সট বোতাম হতে হবে। যদি secondaryButton সেট করা থাকে, তাহলে আপনাকে primaryButton ও সেট করতে হবে।

কার্ডহেডার

একটি কার্ড হেডার প্রতিনিধিত্ব করে। Google Chat অ্যাপের উদাহরণের জন্য, একটি হেডার যোগ করুন দেখুন।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
title

string

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

subtitle

string

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

image_type

ImageType

ছবিটি কাটছাঁট করার জন্য ব্যবহৃত আকৃতি।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

image_url

string

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

image_alt_text

string

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

ডিসপ্লেস্টাইল

Google Workspace অ্যাড-অনগুলিতে, একটি কার্ড কীভাবে প্রদর্শিত হবে তা নির্ধারণ করে।

Google Workspace অ্যাড-অনের জন্য উপলব্ধ এবং Google Chat অ্যাপের জন্য অনুপলব্ধ।

এনামস
DISPLAY_STYLE_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
PEEK কার্ডের হেডারটি সাইডবারের নীচে প্রদর্শিত হয়, যা স্ট্যাকের বর্তমান উপরের কার্ডটিকে আংশিকভাবে ঢেকে রাখে। হেডারে ক্লিক করলে কার্ডটি কার্ড স্ট্যাকে পপ হয়ে যায়। যদি কার্ডের কোনও হেডার না থাকে, তাহলে একটি জেনারেটেড হেডার ব্যবহার করা হয়।
REPLACE ডিফল্ট মান। কার্ড স্ট্যাকের উপরের কার্ডের ভিউ প্রতিস্থাপন করে কার্ডটি দেখানো হয়।

ডিভাইডারস্টাইল

একটি কার্ডের ডিভাইডার স্টাইল। বর্তমানে শুধুমাত্র কার্ডের বিভাগগুলির মধ্যে ডিভাইডারগুলির জন্য ব্যবহৃত হয়।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

এনামস
DIVIDER_STYLE_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
SOLID_DIVIDER ডিফল্ট বিকল্প। একটি কঠিন বিভাজক রেন্ডার করুন।
NO_DIVIDER যদি সেট করা থাকে, তাহলে কোনও ডিভাইডার রেন্ডার করা হবে না। এই স্টাইলটি লেআউট থেকে ডিভাইডারটিকে সম্পূর্ণরূপে সরিয়ে দেয়। ফলাফলটি কোনও ডিভাইডার যোগ না করার সমতুল্য।

নেস্টেড উইজেট

CarouselCard মতো ধারণকারী লেআউটে প্রদর্শিত হতে পারে এমন উইজেটের একটি তালিকা। Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

ক্ষেত্র

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

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

text_paragraph

TextParagraph

একটি টেক্সট অনুচ্ছেদ উইজেট।

button_list

ButtonList

একটি বোতাম তালিকা উইজেট।

image

Image

একটি চিত্র উইজেট।

বিভাগ

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
header

string

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

widgets[]

Widget

বিভাগের সমস্ত উইজেট। কমপক্ষে একটি উইজেট থাকতে হবে।

collapsible

bool

এই অংশটি সঙ্কুচিত করা যাবে কিনা তা নির্দেশ করে।

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

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

uncollapsible_widgets_count

int32

একটি অংশ আড়াল করার পরেও দৃশ্যমান থাকা অসংলগ্ন উইজেটের সংখ্যা।

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

id

string

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

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

collapse_control

CollapseControl

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

দৃশ্যমানতা

একটি UI উপাদান দৃশ্যমান নাকি লুকানো তা নির্দিষ্ট করে।

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

এনামস
VISIBILITY_UNSPECIFIED অনির্দিষ্ট দৃশ্যমানতা। ব্যবহার করবেন না।
VISIBLE UI উপাদানটি দৃশ্যমান।
HIDDEN UI উপাদানটি লুকানো আছে।

একটি ক্যারোজেল, যা স্লাইডার নামেও পরিচিত, স্লাইডশো ফর্ম্যাটে উইজেটগুলির একটি তালিকা ঘোরায় এবং প্রদর্শন করে, বোতামগুলি পূর্ববর্তী বা পরবর্তী উইজেটে নেভিগেট করে।

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

{
  "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",
          }
        }
      ]
    }
  ]
}

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

ক্ষেত্র
carousel_cards[]

CarouselCard

ক্যারোজেলে অন্তর্ভুক্ত কার্ডের একটি তালিকা।

ক্যারোজেলকার্ড

একটি কার্ড যা ক্যারোজেল আইটেম হিসেবে প্রদর্শিত হতে পারে। Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

ক্ষেত্র
widgets[]

NestedWidget

ক্যারোজেল কার্ডে প্রদর্শিত উইজেটগুলির একটি তালিকা। উইজেটগুলি নির্দিষ্ট ক্রমে প্রদর্শিত হয়।

footer_widgets[]

NestedWidget

ক্যারোজেল কার্ডের নীচে প্রদর্শিত উইজেটগুলির একটি তালিকা। উইজেটগুলি নির্দিষ্ট ক্রমে প্রদর্শিত হয়।

চিপ

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
icon

Icon

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

label

string

চিপের ভিতরে প্রদর্শিত টেক্সট।

on_click

OnClick

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

enabled
(deprecated)

bool

চিপটি সক্রিয় অবস্থায় আছে কিনা এবং ব্যবহারকারীর ক্রিয়াকলাপে সাড়া দেয় কিনা। ডিফল্টভাবে true হয়। অবচিত। পরিবর্তে disabled ব্যবহার করুন।

disabled

bool

চিপটি নিষ্ক্রিয় অবস্থায় আছে কিনা এবং ব্যবহারকারীর ক্রিয়া উপেক্ষা করছে কিনা। ডিফল্টভাবে false থাকে।

alt_text

string

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

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

চিপলিস্ট

অনুভূমিকভাবে সাজানো চিপগুলির একটি তালিকা, যা হয় অনুভূমিকভাবে স্ক্রোল করা যেতে পারে অথবা পরবর্তী লাইনে মোড়ানো যেতে পারে।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
layout

Layout

নির্দিষ্ট চিপ তালিকার লেআউট।

chips[]

Chip

চিপসের একটি সমাহার।

লেআউট

চিপ তালিকার লেআউট।

এনামস
LAYOUT_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
WRAPPED ডিফল্ট মান। পর্যাপ্ত অনুভূমিক স্থান না থাকলে চিপ তালিকাটি পরবর্তী লাইনে মোড়ানো হয়।
HORIZONTAL_SCROLLABLE যদি চিপগুলি উপলব্ধ স্থানে না ফিট করে তবে অনুভূমিকভাবে স্ক্রোল করে।

CollapseControl সম্পর্কে

একটি সম্প্রসারণ এবং পতন নিয়ন্ত্রণ প্রতিনিধিত্ব করে।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
horizontal_alignment

HorizontalAlignment

প্রসারিত এবং আড়াল করার বোতামের অনুভূমিক সারিবদ্ধকরণ।

expand_button

Button

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

collapse_button

Button

ঐচ্ছিক। বিভাগটি আড়াল করার জন্য একটি কাস্টমাইজযোগ্য বোতাম নির্ধারণ করুন। expand_button এবং collapse_button উভয় ক্ষেত্রই সেট করতে হবে। শুধুমাত্র একটি ক্ষেত্র সেট কার্যকর হবে না। যদি এই ক্ষেত্রটি সেট না করা থাকে, তাহলে ডিফল্ট বোতামটি ব্যবহার করা হবে।

কলাম

Columns উইজেটটি একটি কার্ড বা ডায়ালগে সর্বাধিক 2টি কলাম প্রদর্শন করে। আপনি প্রতিটি কলামে উইজেট যোগ করতে পারেন; উইজেটগুলি নির্দিষ্ট ক্রমে প্রদর্শিত হয়। Google Chat অ্যাপে উদাহরণস্বরূপ, কলামে কার্ড এবং ডায়ালগ প্রদর্শন করুন দেখুন।

প্রতিটি কলামের উচ্চতা লম্বা কলামের উপর নির্ভর করে নির্ধারিত হয়। উদাহরণস্বরূপ, যদি প্রথম কলামটি দ্বিতীয় কলামের চেয়ে লম্বা হয়, তাহলে উভয় কলামেরই প্রথম কলামের উচ্চতা থাকবে। যেহেতু প্রতিটি কলামে আলাদা সংখ্যক উইজেট থাকতে পারে, তাই আপনি সারি নির্ধারণ করতে পারবেন না বা কলামের মধ্যে উইজেট সারিবদ্ধ করতে পারবেন না।

কলামগুলি পাশাপাশি প্রদর্শিত হয়। আপনি HorizontalSizeStyle ক্ষেত্রটি ব্যবহার করে প্রতিটি কলামের প্রস্থ কাস্টমাইজ করতে পারেন। যদি ব্যবহারকারীর স্ক্রিনের প্রস্থ খুব সংকীর্ণ হয়, তাহলে দ্বিতীয় কলামটি প্রথমটির নীচে মোড়ানো হবে:

  • ওয়েবে, স্ক্রিনের প্রস্থ 480 পিক্সেলের কম বা সমান হলে দ্বিতীয় কলামটি মোড়ানো হয়।
  • iOS ডিভাইসে, স্ক্রিনের প্রস্থ 300 পয়েন্টের কম বা সমান হলে দ্বিতীয় কলামটি মোড়ানো হয়।
  • অ্যান্ড্রয়েড ডিভাইসে, স্ক্রিনের প্রস্থ 320 dp এর কম বা সমান হলে দ্বিতীয় কলামটি মোড়ানো হয়।

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ। কলাম সমর্থনকারী অ্যাড-অন UI গুলির মধ্যে রয়েছে:

  • ব্যবহারকারীরা যখন ইমেল ড্রাফ্ট থেকে অ্যাড-অনটি খোলেন তখন ডায়ালগটি প্রদর্শিত হয়।
  • ব্যবহারকারীরা যখন Google Calendar ইভেন্টে "অ্যাটাচমেন্ট যোগ করুন" মেনু থেকে অ্যাড-অনটি খোলেন তখন ডায়ালগটি প্রদর্শিত হয়।
ক্ষেত্র
column_items[]

Column

কলামের একটি অ্যারে। আপনি একটি কার্ড বা ডায়ালগে সর্বাধিক 2টি কলাম অন্তর্ভুক্ত করতে পারেন।

কলাম

একটি কলাম।

Google Workspace অ্যাড-অন এবং চ্যাট অ্যাপ

ক্ষেত্র
horizontal_size_style

HorizontalSizeStyle

একটি কলাম কার্ডের প্রস্থ কীভাবে পূরণ করে তা নির্দিষ্ট করে।

horizontal_alignment

HorizontalAlignment

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

vertical_alignment

VerticalAlignment

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

widgets[]

Widgets

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

অনুভূমিক আকারের স্টাইল

একটি কলাম কার্ডের প্রস্থ কীভাবে পূরণ করে তা নির্দিষ্ট করে। প্রতিটি কলামের প্রস্থ HorizontalSizeStyle এবং কলামের মধ্যে থাকা উইজেটের প্রস্থ উভয়ের উপর নির্ভর করে।

Google Workspace অ্যাড-অন এবং চ্যাট অ্যাপ

এনামস
HORIZONTAL_SIZE_STYLE_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
FILL_AVAILABLE_SPACE ডিফল্ট মান। কলামটি কার্ডের প্রস্থের ৭০% পর্যন্ত উপলব্ধ স্থান পূরণ করে। যদি উভয় কলাম FILL_AVAILABLE_SPACE তে সেট করা থাকে, তাহলে প্রতিটি কলাম ৫০% স্থান পূরণ করে।
FILL_MINIMUM_SPACE কলামটি যতটা সম্ভব কম জায়গা পূরণ করে এবং কার্ডের প্রস্থের ৩০% এর বেশি নয়।

উল্লম্ব প্রান্তিককরণ

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

Google Workspace অ্যাড-অন এবং চ্যাট অ্যাপ

এনামস
VERTICAL_ALIGNMENT_UNSPECIFIED ব্যবহার করবেন না। অনির্দিষ্ট।
CENTER ডিফল্ট মান। একটি কলামের কেন্দ্রে উইজেটগুলিকে সারিবদ্ধ করে।
TOP একটি কলামের শীর্ষে উইজেটগুলিকে সারিবদ্ধ করে।
BOTTOM একটি কলামের নীচে উইজেটগুলিকে সারিবদ্ধ করে।

উইজেট

সমর্থিত উইজেট যা আপনি একটি কলামে অন্তর্ভুক্ত করতে পারেন।

Google Workspace অ্যাড-অন এবং চ্যাট অ্যাপ

ক্ষেত্র

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

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

text_paragraph

TextParagraph

TextParagraph উইজেট।

image

Image

Image উইজেট।

decorated_text

DecoratedText

DecoratedText উইজেট।

button_list

ButtonList

ButtonList উইজেট।

text_input

TextInput

TextInput উইজেট।

selection_input

SelectionInput

SelectionInput উইজেট।

date_time_picker

DateTimePicker

DateTimePicker উইজেট।

chip_list

ChipList

ChipList উইজেট।

অবস্থা

এমন একটি অবস্থা প্রতিনিধিত্ব করে যা একটি ক্রিয়া ট্রিগার করতে ব্যবহার করা যেতে পারে।

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

ক্ষেত্র
action_rule_id

string

অ্যাকশনরুলের অনন্য শনাক্তকারী।

ইউনিয়ন ক্ষেত্রের condition । শর্ত। condition নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
expression_data_condition

ExpressionDataCondition

রাশির তথ্য দ্বারা নির্ধারিত অবস্থা।

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

CEL ব্যবহার করে মূল্যায়ন করা একটি শর্ত প্রতিনিধিত্ব করে।

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

ক্ষেত্র
condition_type

ConditionType

অবস্থার ধরণ।

শর্তের ধরণ

অবস্থার ধরণ।

এনামস
CONDITION_TYPE_UNSPECIFIED অনির্দিষ্ট অবস্থার ধরণ।
EXPRESSION_EVALUATION_SUCCESS রাশির মূল্যায়ন সফল হয়েছে।
EXPRESSION_EVALUATION_FAILURE রাশির মূল্যায়ন ব্যর্থ হয়েছে।

ডেটাসোর্সকনফিগ

একটি কনফিগারেশন অবজেক্ট যা একটি উইজেটের জন্য ডেটা সোর্স কনফিগার করতে সাহায্য করে।

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

ক্ষেত্র
Union ফিল্ড data_source । ডেটা সোর্স। data_source নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
remote_data_source

Action

ডেটাটি একটি দূরবর্তী ডেটা প্রদানকারীর কাছ থেকে এসেছে।

platform_data_source

PlatformDataSource

এই তথ্যটি একটি Google Workspace অ্যাপ্লিকেশন থেকে নেওয়া হয়েছে।

min_characters_trigger

int32

এই ডেটা প্রোভাইডারটি চালু হওয়ার আগে (অর্থাৎ, ফলাফল ফেরত দেওয়া শুরু করার আগে) ব্যবহারকারীকে সর্বনিম্ন কতগুলি অক্ষর লিখতে হবে।

তারিখ সময় পিকার

ব্যবহারকারীদের একটি তারিখ, সময়, অথবা তারিখ এবং সময় উভয়ই ইনপুট করতে দেয়। ফর্ম জমা দেওয়ার বৈধতা সমর্থন করে। যখন Action.all_widgets_are_required true সেট করা থাকে অথবা এই উইজেটটি Action.required_widgets এ নির্দিষ্ট করা থাকে, তখন একটি মান নির্বাচন না করা পর্যন্ত জমা দেওয়ার ক্রিয়াটি ব্লক করা হয়। Google Chat অ্যাপের উদাহরণের জন্য, ব্যবহারকারীকে একটি তারিখ এবং সময় বেছে নিতে দিন দেখুন।

ব্যবহারকারীরা টেক্সট ইনপুট করতে পারেন অথবা তারিখ এবং সময় নির্বাচন করতে পিকার ব্যবহার করতে পারেন। যদি ব্যবহারকারীরা একটি ভুল তারিখ বা সময় ইনপুট করেন, তাহলে পিকারটি একটি ত্রুটি দেখায় যা ব্যবহারকারীদের সঠিকভাবে তথ্য ইনপুট করতে অনুরোধ করে।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
name

string

একটি ফর্ম ইনপুট ইভেন্টে DateTimePicker যে নাম দ্বারা চিহ্নিত করা হয়।

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

label

string

যে টেক্সট ব্যবহারকারীদের একটি তারিখ, সময়, অথবা একটি তারিখ এবং সময় ইনপুট করতে অনুরোধ করে। উদাহরণস্বরূপ, যদি ব্যবহারকারীরা একটি অ্যাপয়েন্টমেন্ট নির্ধারণ করেন, তাহলে Appointment date বা Appointment date and time এর মতো একটি লেবেল ব্যবহার করুন।

type

DateTimePickerType

উইজেটটি তারিখ, সময়, অথবা তারিখ এবং সময় ইনপুট করা সমর্থন করে কিনা।

value_ms_epoch

int64

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

পিকারের ধরণের উপর ভিত্তি করে মান নির্দিষ্ট করুন ( DateTimePickerType ):

  • DATE_AND_TIME : UTC-তে একটি ক্যালেন্ডার তারিখ এবং সময়। উদাহরণস্বরূপ, ১ জানুয়ারী, ২০২৩ তারিখের ১২:০০ PM UTC-তে প্রতিনিধিত্ব করতে, 1672574400000 ব্যবহার করুন।
  • DATE_ONLY : 00:00:00 UTC-তে একটি ক্যালেন্ডার তারিখ। উদাহরণস্বরূপ, 1 জানুয়ারী, 2023 উপস্থাপন করতে, 1672531200000 ব্যবহার করুন।
  • TIME_ONLY : UTC-তে একটি সময়। উদাহরণস্বরূপ, দুপুর ১২:০০ টা বোঝাতে, 43200000 (অথবা 12 * 60 * 60 * 1000 ) ব্যবহার করুন।
timezone_offset_date

int32

UTC থেকে মিনিটে অফসেট করা সময় অঞ্চলের সংখ্যা। সেট করা থাকলে, নির্দিষ্ট সময় অঞ্চলে value_ms_epoch প্রদর্শিত হয়। সেট না করা থাকলে, মানটি ব্যবহারকারীর সময় অঞ্চল সেটিংয়ে ডিফল্ট হয়।

on_change_action

Action

ব্যবহারকারী যখন DateTimePicker ইন্টারফেস থেকে Save অথবা Clear এ ক্লিক করেন তখন এটি ট্রিগার হয়।

Union ফিল্ড data_source । তারিখ এবং সময় প্রতিনিধিত্ব করার জন্য নির্দিষ্ট করা ডেটা সোর্স। data_source নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
host_app_data_source

HostAppDataSourceMarkup

একটি ডেটা সোর্স যা Google Workspace হোস্ট অ্যাপ্লিকেশনের জন্য অনন্য, যেমন Gmail ইমেল, Google ক্যালেন্ডার ইভেন্ট, অথবা Google Chat মেসেজ।

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

তারিখ সময় পিকার প্রকার

DateTimePicker উইজেটে তারিখ এবং সময়ের ফর্ম্যাট। ব্যবহারকারীরা তারিখ, সময়, অথবা তারিখ এবং সময় উভয়ই ইনপুট করতে পারবেন কিনা তা নির্ধারণ করে।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

এনামস
DATE_AND_TIME ব্যবহারকারীরা একটি তারিখ এবং সময় ইনপুট করে।
DATE_ONLY ব্যবহারকারীরা একটি তারিখ ইনপুট করেন।
TIME_ONLY ব্যবহারকারীরা একটি সময় ইনপুট করেন।

সজ্জিতপাঠ্য

একটি উইজেট যা ঐচ্ছিক সাজসজ্জা সহ টেক্সট প্রদর্শন করে যেমন টেক্সটের উপরে বা নীচে একটি লেবেল, টেক্সটের সামনে একটি আইকন, একটি নির্বাচন উইজেট, অথবা টেক্সটের পরে একটি বোতাম। Google Chat অ্যাপের উদাহরণের জন্য, "ডেকোরেটরি টেক্সট সহ টেক্সট প্রদর্শন করুন" দেখুন।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

ক্ষেত্র
icon
(deprecated)

Icon

startIcon এর পক্ষে বন্ধ করা হয়েছে।

start_icon

Icon

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

start_icon_vertical_alignment

VerticalAlignment

ঐচ্ছিক। শুরু আইকনের উল্লম্ব সারিবদ্ধকরণ। যদি সেট না করা থাকে, তাহলে আইকনটি উল্লম্বভাবে কেন্দ্রীভূত হবে।

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

top_label

string

text উপরে যে টেক্সটটি প্রদর্শিত হবে। সর্বদা ছোট করে কাটা হবে।

top_label_text

TextParagraph

TextParagraph top_label এর সমতুল্য। সর্বদা ছোট করে। top_label এর চেয়ে জটিল ফর্ম্যাটিং করার অনুমতি দেয়।

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

text

string

প্রয়োজনীয়। প্রাথমিক লেখা।

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

content_text

TextParagraph

TextParagraph text সমতুল্য। text চেয়ে আরও জটিল ফর্ম্যাটিং করার অনুমতি দেয়।

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

wrap_text

bool

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

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

bottom_label

string

text নিচে যে লেখাটি প্রদর্শিত হবে। সর্বদা মোড়ানো থাকে।

bottom_label_text

TextParagraph

TextParagraph bottom_label এর সমতুল্য। সর্বদা মোড়ানো হয়। bottom_label চেয়ে আরও জটিল বিন্যাসের জন্য অনুমতি দেয়।

Google Chat অ্যাপের জন্য উপলব্ধ এবং Google Workspace অ্যাড-অনের জন্য অনুপলব্ধ।

on_click

OnClick

ব্যবহারকারীরা যখন topLabel অথবা bottomLabel ক্লিক করেন তখন এই ক্রিয়াটি ট্রিগার হয়।

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

Button

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

switch_control

SwitchControl

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

end_icon

Icon

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

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

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

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

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

ক্ষেত্র
name

string

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

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

value

string

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

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

selected

bool

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

on_change_action

Action

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

control_type

ControlType

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

নিয়ন্ত্রণের ধরণ

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

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

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

বিভাজক

এই ধরণের কোনও ক্ষেত্র নেই।

উইজেটগুলির মধ্যে একটি বিভাজককে অনুভূমিক রেখা হিসেবে প্রদর্শন করে। Google Chat অ্যাপগুলিতে উদাহরণস্বরূপ, উইজেটগুলির মধ্যে একটি অনুভূমিক বিভাজক যোগ করুন দেখুন।

Google Chat অ্যাপ এবং Google Workspace অ্যাড-অনের জন্য উপলব্ধ।

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

"divider": {}

ইভেন্টঅ্যাকশন

একটি ui উপাদানে সম্পাদিত হতে পারে এমন একটি ক্রিয়া প্রতিনিধিত্ব করে।

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

ক্ষেত্র
action_rule_id

string

অ্যাকশনরুলের অনন্য শনাক্তকারী।

post_event_triggers[]

Trigger

EventAction কার্যকর হওয়ার পরে ট্রিগার করা হবে এমন ট্রিগারগুলির তালিকা।

ইউনিয়ন ফিল্ড action । যে অ্যাকশনটি সম্পাদন করতে হবে। action নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
common_widget_action

CommonWidgetAction

সাধারণ উইজেট অ্যাকশন।

CommonWidgetঅ্যাকশন

এমন একটি ক্রিয়া প্রতিনিধিত্ব করে যা কোনও উইজেটের সাথে নির্দিষ্ট নয়।

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

ক্ষেত্র
ইউনিয়ন ফিল্ড action । যে অ্যাকশনটি সম্পাদন করতে হবে। action নিম্নলিখিতগুলির মধ্যে কেবল একটি হতে পারে:
update_visibility_action

UpdateVisibilityAction

একটি উইজেটের দৃশ্যমানতা আপডেট করার ক্রিয়া।

আপডেট দৃশ্যমানতাঅ্যাকশন

একটি উইজেটের দৃশ্যমানতা আপডেট করে এমন একটি ক্রিয়া প্রতিনিধিত্ব করে।

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

ক্ষেত্র
visibility

Visibility

নতুন দৃশ্যমানতা।

এক্সপ্রেশনডেটা

একটি রাশি মূল্যায়ন করতে ব্যবহৃত ডেটা প্রতিনিধিত্ব করে।

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

ক্ষেত্র
id

string

এক্সপ্রেশনডেটার অনন্য শনাক্তকারী।

expression

string

অসংকলিত অভিব্যক্তি।

conditions[]

Condition

রাশি মূল্যায়ন ফলাফল দ্বারা নির্ধারিত শর্তগুলির তালিকা।

event_actions[]

EventAction

এক্সপ্রেশনডেটা ব্যবহার করা যেতে পারে এমন কর্মের তালিকা।

গ্রিড

আইটেমের সংগ্রহ সহ একটি গ্রিড প্রদর্শন করে। আইটেমগুলিতে কেবল টেক্সট বা ছবি অন্তর্ভুক্ত থাকতে পারে। প্রতিক্রিয়াশীল কলামের জন্য, অথবা টেক্সট বা ছবির চেয়ে বেশি অন্তর্ভুক্ত করতে, Columns ব্যবহার করুন। Google Chat অ্যাপে উদাহরণস্বরূপ, আইটেমের সংগ্রহ সহ একটি গ্রিড প্রদর্শন করুন দেখুন।

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"
    }
  }
}
ক্ষেত্র
title

string

The text that displays in the grid header.

items[]

GridItem

The items to display in the grid.

border_style

BorderStyle

The border style to apply to each grid item.

column_count

int32

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).

on_click

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.

ক্ষেত্র
id

string

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

image

ImageComponent

The image that displays in the grid item.

title

string

The grid item's title.

subtitle

string

The grid item's subtitle.

layout

GridItemLayout

The layout to use for the grid item.

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.

আইকন

An icon displayed in a widget on a card. For an example in Google Chat apps, see Add an icon .

Supports built-in and custom icons.

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

ক্ষেত্র
alt_text

string

Optional. A description of the icon used for accessibility. If unspecified, the default value Button is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, A user's account portrait , or Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat .

If the icon is set in a Button , the altText appears as helper text when the user hovers over the button. However, if the button also sets text , the icon's altText is ignored.

image_type

ImageType

The crop style applied to the image. In some cases, applying a CIRCLE crop causes the image to be drawn larger than a built-in icon.

Union field icons . The icon displayed in the widget on the card. icons can be only one of the following:
known_icon

string

Display one of the built-in icons provided by Google Workspace.

For example, to display an airplane icon, specify AIRPLANE . For a bus, specify BUS .

For a full list of supported icons, see built-in icons .

icon_url

string

Display a custom icon hosted at an HTTPS URL.

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

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

Supported file types include .png and .jpg .

material_icon

MaterialIcon

Display one of the Google Material Icons .

For example, to display a checkbox icon , use

"material_icon": {
  "name": "check_box"
}

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

ভাবমূর্তি

An image that is specified by a URL and can have an onClick action. For an example, see Add an image .

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

ক্ষেত্র
image_url

string

The HTTPS URL that hosts the image.

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

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

OnClick

When a user clicks the image, the click triggers this action.

alt_text

string

The alternative text of this image that's used for accessibility.

ImageComponent

Represents an image.

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

ক্ষেত্র
image_uri

string

The image URL.

alt_text

string

The accessibility label for the image.

crop_style

ImageCropStyle

The crop style to apply to the image.

border_style

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
}
ক্ষেত্র
type

ImageCropType

The crop type.

aspect_ratio

double

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.

MaterialIcon

A Google Material Icon , which includes over 2500+ options.

For example, to display a checkbox icon with customized weight and grade, write the following:

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

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

ক্ষেত্র
name

string

The icon name defined in the Google Material Icon , for example, check_box . Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

fill

bool

Whether the icon renders as filled. Default value is false.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize .

weight

int32

The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize .

grade

int32

Weight and grade affect a symbol's thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize .

অনক্লিক

Represents how to respond when users click an interactive element on a card, such as a button.

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

ক্ষেত্র

Union field data .

data can be only one of the following:

action

Action

If specified, an action is triggered by this onClick .

card

Card

A new card is pushed to the card stack after clicking if specified.

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

overflow_menu

OverflowMenu

If specified, this onClick opens an overflow menu.

OnClose

What the client does when a link opened by an OnClick action is closed.

Implementation depends on client platform capabilities. For example, a web browser might open a link in a pop-up window with an OnClose handler.

If both OnOpen and OnClose handlers are set, and the client platform can't support both values, OnClose takes precedence.

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

এনামস
NOTHING Default value. The card doesn't reload; nothing happens.
RELOAD

Reloads the card after the child window closes.

If used in conjunction with OpenAs.OVERLAY , the child window acts as a modal dialog and the parent card is blocked until the child window closes.

OpenAs

When an OnClick action opens a link, then the client can either open it as a full-size window (if that's the frame used by the client), or an overlay (such as a pop-up). The implementation depends on the client platform capabilities, and the value selected might be ignored if the client doesn't support it. FULL_SIZE is supported by all clients.

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

এনামস
FULL_SIZE The link opens as a full-size window (if that's the frame used by the client).
OVERLAY The link opens as an overlay, such as a pop-up.

OverflowMenu

A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the OnClick action of widgets that support it. For example, in a Button .

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

ক্ষেত্র
items[]

OverflowMenuItem

Required. The list of menu options.

OverflowMenuItem

An option that users can invoke in an overflow menu.

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

ক্ষেত্র
start_icon

Icon

The icon displayed in front of the text.

text

string

Required. The text that identifies or describes the item to users.

on_click

OnClick

Required. The action invoked when a menu option is selected. This OnClick cannot contain an OverflowMenu , any specified OverflowMenu is dropped and the menu item disabled.

disabled

bool

Whether the menu option is disabled. Defaults to false.

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.

ক্ষেত্র
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

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[]

SelectionItem

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

on_change_action

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 .

multi_select_min_query_length

int32

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.
data_source_configs[]

DataSourceConfig

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

If specified, the multi_select_max_selected_items field, multi_select_min_query_length field, external_data_source field and platform_data_source field are ignored.

Available for Google Workspace add-ons that extend Google Workspace Studio. Available for the Dropdown widget widget in Google Chat apps as part of the Developer Preview Program .

multi_select_max_selected_items

int32

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

hint_text

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:

external_data_source

Action

An external data source, such as a relational database.

platform_data_source

PlatformDataSource

A data source from Google Workspace.

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.

ক্ষেত্র
Union field data_source . The data source. data_source can be only one of the following:
common_data_source

CommonDataSource

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

host_app_data_source

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.

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.

ক্ষেত্র
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

bool

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.

bottom_text

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:
start_icon_uri

string

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, as part of the Developer Preview Program , 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.

পরামর্শ

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.

ক্ষেত্র
items[]

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.

ক্ষেত্র

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.

টেক্সটইনপুট

A field in which users can enter text. Supports suggestions and on-change actions. 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 entered. For an example in Google Chat apps, see Add a field in which a user can enter text .

Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data .

When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget.

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

ক্ষেত্র
name

string

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

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

label

string

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

Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write surname instead of name .

Required if hintText is unspecified. Otherwise, optional.

hint_text

string

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

Required if label is unspecified. Otherwise, optional.

value

string

The value entered by a user, returned as part of a form input event.

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

type

Type

How a text input field appears in the user interface. For example, whether the field is single or multi-line.

on_change_action

Action

What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

Examples of actions to take include running a custom function or opening a dialog in Google Chat.

initial_suggestions

Suggestions

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 just 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.

auto_complete_action

Action

Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

If specified, the app takes the action specified here, such as running a custom function.

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

validation

Validation

Specify the input format validation necessary for this text field.

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

placeholder_text

string

Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, Enter a number from 0 to 100 .

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

Union field data_source .

data_source can be only one of the following:

host_app_data_source

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.

TextParagraph

A paragraph of text that supports formatting. For an example in Google Chat apps, see Add a paragraph of formatted text . For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons .

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

ক্ষেত্র
text

string

The text that's shown in the widget.

max_lines

int32

The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a show more button. If the text is equal or shorter than the specified maximum number of lines, a show more button isn't displayed.

The default value is 0, in which case all context is displayed. Negative values are ignored.

text_syntax

TextSyntax

The syntax of the text. If not set, the text is rendered as HTML.

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

TextSyntax

Syntax to use for formatting text.

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

এনামস
TEXT_SYNTAX_UNSPECIFIED The text is rendered as HTML if unspecified.
HTML The text is rendered as HTML. This is the default value.
MARKDOWN The text is rendered as Markdown.

ট্রিগার

Represents a trigger.

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

ক্ষেত্র
action_rule_id

string

The unique identifier of the ActionRule.

বৈধতা

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

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

ক্ষেত্র
character_limit

int32

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.

input_type

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.

উইজেট

Each card is made up of widgets.

A widget is a composite object that can represent one of text, images, buttons, and other object types.

ক্ষেত্র
horizontal_alignment

HorizontalAlignment

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

id

string

A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of [a-zA-Z0-9-]+ .

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

visibility

Visibility

Specifies whether the widget is visible or hidden. The default value is VISIBLE .

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

event_actions[]

EventAction

Specifies the event actions that can be performed on the widget.

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

Union field data . A widget can only have one of the following items. You can use multiple widget fields to display more items. data can be only one of the following:
text_paragraph

TextParagraph

Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons .

For example, the following JSON creates a bolded text:

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

Image

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

For example, the following JSON creates an image with alternative text:

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

DecoratedText

Displays a decorated text item.

For example, the following JSON creates a decorated text widget showing email address:

"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"
  }
}
button_list

ButtonList

A list of buttons.

For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link:

"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"
        }
      }
    }
  ]
}
text_input

TextInput

Displays a text box that users can type into.

For example, the following JSON creates a text input for an email address:

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

As another example, the following JSON creates a text input for a programming language with static suggestions:

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

SelectionInput

Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus.

For example, the following JSON creates a dropdown menu that lets users choose a size:

"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
    }
  ]
}
date_time_picker

DateTimePicker

Displays a widget that lets users input a date, time, or date and time.

For example, the following JSON creates a date time picker to schedule an appointment:

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

Divider

Displays a horizontal line divider between widgets.

For example, the following JSON creates a divider:

"divider": {
}
grid

Grid

Displays a grid with a collection of items.

A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of 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"
    }
  }
}
columns

Columns

Displays up to 2 columns.

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

For example, the following JSON creates 2 columns that each contain text paragraphs:

"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

Carousel

A carousel contains a collection of nested widgets. For example, this is a JSON representation of a carousel that contains two text paragraphs.

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

ChipList

A list of chips.

For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link:

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

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.

ImageType

The shape used to crop the image.

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

এনামস
SQUARE Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3.
CIRCLE Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3.

VerticalAlignment

Represents vertical alignment attribute.

এনামস
VERTICAL_ALIGNMENT_UNSPECIFIED Unspecified type. Do not use.
TOP Alignment to the top position.
MIDDLE Alignment to the middle position.
BOTTOM Alignment to the bottom position.