ClassReference
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การอ้างอิงคลาสซึ่งใช้เพื่อประกาศประเภทของช่องหรือแสดงผลค่า Enum เป็นคลาสประเภทหนึ่งที่อ้างอิงถึงโดยใช้ ClassReference ได้
การแสดง YAML |
name: string
list: boolean |
ช่อง |
name |
string
ต้องระบุ ชื่อของประเภทในตัวหรือประเภทพารามิเตอร์ที่กำหนดเอง ตัวอย่าง: PizzaToppings , actions.type.Number
|
list |
boolean
ไม่บังคับ ระบุว่าประเภทข้อมูลแสดงรายการค่าหรือไม่
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eClassReference is used to define the type of a field or return value, including enums.\u003c/p\u003e\n"],["\u003cp\u003eIt is represented in YAML with a \u003ccode\u003ename\u003c/code\u003e field (required) indicating the type and an optional \u003ccode\u003elist\u003c/code\u003e field specifying if it's a list of values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e field can reference built-in types or custom types using their names.\u003c/p\u003e\n"]]],[],null,["# ClassReference\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n\nA reference to a class which is used to declare the type of a field or return value. Enums are also a type of class that can be referenced using ClassReference.\n\n| YAML representation ||\n|------------------------------------|---|\n| ``` name: string list: boolean ``` |\n\n| Fields ||\n|--------|------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Name of a built-in type or custom type of the parameter. Examples: `PizzaToppings`, `actions.type.Number` |\n| `list` | `boolean` Optional. Indicates whether the data type represents a list of values. |"]]