gemini_rs/
types.rs

1//! Contains every type used in the library
2
3use std::collections::BTreeMap;
4
5use serde::{Deserialize, Serialize};
6use serde_json::Value;
7
8/// The producer of the content
9#[derive(Debug, Deserialize, Serialize, Clone, Copy)]
10#[serde(rename_all = "lowercase")]
11pub enum Role {
12    User,
13    Model,
14}
15
16#[derive(Debug, Deserialize)]
17#[serde(untagged)]
18pub enum ApiResponse<T> {
19    Ok(T),
20    Err(ApiError),
21}
22
23#[derive(Debug, Deserialize)]
24pub struct ApiError {
25    pub error: ErrorDetail,
26}
27
28#[derive(Debug, Deserialize)]
29pub struct ErrorDetail {
30    pub code: u16,
31    pub message: String,
32    pub status: Status,
33    #[serde(default)]
34    pub details: Vec<ErrorInfo>,
35}
36
37#[derive(Debug, Deserialize)]
38pub struct ErrorInfo {
39    #[serde(rename = "@type")]
40    pub r#type: String,
41    #[serde(default)]
42    pub reason: Option<String>,
43    #[serde(default)]
44    pub domain: Option<String>,
45    #[serde(default)]
46    pub metadata: Option<BTreeMap<String, String>>,
47}
48
49/// Common backend error codes you may encounter
50///
51/// Use the [API Reference](https://ai.google.dev/gemini-api/docs/troubleshooting#error-codes) for
52/// troubleshooting steps
53#[derive(Debug, Deserialize)]
54#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
55pub enum Status {
56    /// The request body is malformed
57    InvalidArgument,
58    /// Gemini API free tier is not available in your country. Please enable billing on your project in Google AI Studio.
59    FailedPrecondition,
60    /// Your API key doesn't have the required permissions.
61    PermissionDenied,
62    /// The requested resource wasn't found.
63    NotFound,
64    /// You've exceeded the rate limit.
65    ResourceExhausted,
66    /// An unexpected error occurred on Google's side.
67    Internal,
68    /// The service may be temporarily overloaded or down.
69    Unavailable,
70    /// The service is unable to finish processing within the deadline.
71    DeadlineExceeded,
72}
73
74/// Response from [crate::Client::models] containing a paginated list of Models
75///
76/// [API Reference](https://ai.google.dev/api/models#response-body_1)
77#[derive(Deserialize, Debug)]
78#[serde(rename_all = "camelCase")]
79pub struct Models {
80    pub models: Vec<Model>,
81    pub next_page_token: Option<String>,
82}
83
84/// Information about a Generative Language Model
85///
86/// [API Reference](https://ai.google.dev/api/models#Model)
87#[derive(Debug, Default, Deserialize)]
88#[serde(rename_all = "camelCase")]
89pub struct Model {
90    pub name: String,
91    pub version: String,
92    pub display_name: String,
93    pub description: String,
94    pub input_token_limit: i32,
95    pub output_token_limit: i32,
96    pub supported_generation_methods: Vec<String>,
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub temperature: Option<f32>,
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub top_p: Option<f32>,
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub top_k: Option<i32>,
103}
104
105/// Response from the model supporting multiple candidate responses
106///
107/// [API Reference](https://ai.google.dev/api/generate-content#generatecontentresponse)
108#[derive(Debug, Deserialize)]
109#[serde(rename_all = "camelCase")]
110pub struct Response {
111    pub candidates: Vec<Candidate>,
112    pub prompt_feedback: Option<PromptFeedback>,
113    pub usage_metadata: Option<UsageMetadata>,
114}
115
116impl std::fmt::Display for Response {
117    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
118        f.write_str(
119            self.candidates[0].content.parts[0]
120                .text
121                .as_deref()
122                .unwrap_or_default(),
123        )
124    }
125}
126
127/// Metadata on the generation request's token usage
128///
129/// [API Reference](https://ai.google.dev/api/generate-content#UsageMetadata)
130#[derive(Debug, Deserialize)]
131#[serde(rename_all = "camelCase")]
132pub struct UsageMetadata {
133    pub prompt_token_count: u64,
134    pub candidates_token_count: u64,
135}
136
137/// A response candidate generated from the model
138///
139/// [API Reference](https://ai.google.dev/api/generate-content#candidate)
140#[derive(Debug, Deserialize)]
141#[serde(rename_all = "camelCase")]
142pub struct Candidate {
143    pub content: Content,
144    pub finish_reason: Option<FinishReason>,
145    pub index: Option<i32>,
146    #[serde(default)]
147    pub safety_ratings: Vec<SafetyRating>,
148}
149
150/// A set of the feedback metadata the prompt specified in [GenerateContentRequest.content].
151///
152/// [API Reference](https://ai.google.dev/api/generate-content#PromptFeedback)
153#[derive(Debug, Deserialize)]
154pub struct PromptFeedback {
155    #[serde(rename = "safetyRatings")]
156    pub safety_ratings: Vec<SafetyRating>,
157}
158
159/// Safety rating for a piece of content
160///
161/// The safety rating contains the category of harm and the harm probability level in that category for a piece of content.
162/// Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.
163///
164/// [API Reference](https://ai.google.dev/api/generate-content#safetyrating)
165#[derive(Debug, Deserialize)]
166pub struct SafetyRating {
167    pub category: HarmCategory,
168    pub probability: HarmProbability,
169    #[serde(default)]
170    pub blocked: bool,
171}
172
173#[derive(Debug, Serialize, Deserialize, Clone)]
174pub struct FunctionCall {
175    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
176    pub id: Option<String>,
177    pub name: String,
178    pub args: Value,
179}
180
181/// The base structured datatype containing multi-part content of a message
182///
183/// [API Reference](https://ai.google.dev/api/caching#Content)
184#[derive(Debug, Deserialize, Serialize, Clone)]
185pub struct Content {
186    pub role: Role,
187    #[serde(default)]
188    pub parts: Vec<Part>,
189}
190
191/// A datatype containing media that is part of a multi-part Content message
192///
193/// [API Reference](https://ai.google.dev/api/caching#Part)
194#[derive(Debug, Default, Deserialize, Serialize, Clone)]
195#[serde(rename_all = "camelCase")]
196pub struct Part {
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub text: Option<String>,
199    #[serde(skip_serializing_if = "Option::is_none")]
200    pub inline_data: Option<InlineData>,
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub file_data: Option<FileData>,
203    #[serde(skip_serializing_if = "Option::is_none")]
204    pub video_metadata: Option<VideoMetadata>,
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub executable_code: Option<ExecutableCode>,
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub code_execution_result: Option<CodeExecutionResult>,
209    #[serde(rename = "functionCall", skip_serializing_if = "Option::is_none")]
210    pub function_call: Option<FunctionCall>,
211}
212
213impl Part {
214    pub fn text(text: &str) -> Self {
215        Self {
216            text: Some(text.into()),
217            ..Default::default()
218        }
219    }
220}
221
222/// Metadata for a video File
223///
224/// [API Reference](https://ai.google.dev/api/files#VideoFileMetadata)
225#[derive(Debug, Deserialize, Serialize, Clone)]
226#[serde(rename_all = "camelCase")]
227pub struct VideoMetadata {
228    pub start_offset: StartOffset,
229    pub end_offset: EndOffset,
230}
231
232#[derive(Debug, Deserialize, Serialize, Clone)]
233pub struct EndOffset {
234    pub seconds: i32,
235    pub nanos: i32,
236}
237
238#[derive(Debug, Deserialize, Serialize, Clone)]
239pub struct StartOffset {
240    pub seconds: i32,
241    pub nanos: i32,
242}
243
244/// URI based data
245///
246/// [API Reference](https://ai.google.dev/api/caching#FileData)
247#[derive(Debug, Deserialize, Serialize, Clone)]
248pub struct FileData {
249    pub mime_type: String,
250    pub file_uri: String,
251}
252
253/// Inline media bytes (stored as a base64 string for some reason) //todo
254///
255/// [API Reference](https://ai.google.dev/api/caching#Blob)
256#[derive(Debug, Deserialize, Serialize, Clone)]
257pub struct InlineData {
258    pub mime_type: String,
259    pub data: String,
260}
261
262/// Defines the reason why the model stopped generating tokens
263///
264/// [API Reference](https://ai.google.dev/api/generate-content#FinishReason)
265#[derive(Debug, Serialize, Deserialize)]
266#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
267pub enum FinishReason {
268    /// Default value. This value is unused.
269    FinishReasonUnspecified,
270    /// Natural stop point of the model or provided stop sequence
271    Stop,
272    /// The maximum number of tokens as specified in the request was reached
273    MaxTokens,
274    /// The response candidate content was flagged for safety reasons
275    Safety,
276    /// The response candidate content was flagged for recitation reasons
277    Recitation,
278    /// The response candidate content was flagged for using an unsupported language
279    Language,
280    /// Unknown reason
281    Other,
282    /// Token generation stopped because the content contains forbidden terms
283    Blocklist,
284    /// Token generation stopped for potentially containing prohibited content
285    ProhibitedContent,
286    /// Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII)
287    Spii,
288    /// The function call generated by the model is invalid
289    MalformedFunctionCall,
290    /// Token generation stopped because generated images contain safety violations
291    ImageSafety,
292}
293
294/// The category of a rating
295///
296/// These categories cover various kinds of harms that developers may wish to adjust
297///
298/// [API Reference](https://ai.google.dev/api/generate-content#harmcategory)
299#[derive(Debug, Serialize, Deserialize, Clone)]
300#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
301pub enum HarmCategory {
302    /// Category is unspecified
303    HarmCategoryUnspecified,
304    /// PaLM - Negative or harmful comments targeting identity and/or protected attribute
305    HarmCategoryDerogatory,
306    /// PaLM - Content that is rude, disrespectful, or profane
307    HarmCategoryToxicity,
308    /// PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore
309    HarmCategoryViolence,
310    /// PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore
311    HarmCategorySexual,
312    /// PaLM - Promotes unchecked medical advice
313    HarmCategoryMedical,
314    /// PaLM - Dangerous content that promotes, facilitates, or encourages harmful acts
315    HarmCategoryDangerous,
316    /// Gemini - Harassment content
317    HarmCategoryHarassment,
318    /// Gemini - Hate speech and content
319    HarmCategoryHateSpeech,
320    /// Gemini - Sexually explicit content
321    HarmCategorySexuallyExplicit,
322    /// Gemini - Dangerous content
323    HarmCategoryDangerousContent,
324    /// Gemini - Content that may be used to harm civic integrity
325    HarmCategoryCivicIntegrity,
326}
327
328/// Block at and beyond a specified harm probability
329///
330/// [API Reference](https://ai.google.dev/api/generate-content#HarmBlockThreshold)
331#[derive(Debug, Deserialize, Serialize, Clone)]
332#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
333pub enum HarmBlockThreshold {
334    /// Threshold is unspecified
335    HarmBlockThresholdUnspecified,
336    /// Content with [HarmProbability::Negligible] will be allowed
337    BlockLowAndAbove,
338    /// Content with [HarmProbability::Negligible] and [HarmProbability::Low] will be allowed
339    BlockMedAndAbove,
340    /// Content with [HarmProbability::Negligible], [HarmProbability::Low], and
341    /// [HarmProbability::Medium] will be allowed
342    BlockOnlyHigh,
343    /// All content will be allowed
344    BlockNone,
345    /// Turn off the safety filter
346    OFF,
347}
348
349/// The probability that a piece of content is harmful
350///
351/// The classification system gives the probability of the content being unsafe. This does not
352/// indicate the severity of harm for a piece of content.
353///
354/// [API Reference](https://ai.google.dev/api/generate-content#HarmProbability)
355#[derive(Debug, Deserialize, Serialize)]
356#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
357pub enum HarmProbability {
358    /// Probability is unspecified
359    HarmProbabilityUnspecified,
360    /// Content has a negligible chance of being unsafe
361    Negligible,
362    /// Content has a low chance of being unsafe
363    Low,
364    /// Content has a medium chance of being unsafe
365    Medium,
366    /// Content has a high chance of being unsafe
367    High,
368}
369
370/// GoogleSearch tool type.
371///
372/// Tool to support Google Search in Model. Powered by Google.
373///
374/// [API Reference](https://ai.google.dev/api/caching#GoogleSearch)
375#[derive(Debug, Clone, Deserialize, Serialize)]
376pub struct GoogleSearchTool {}
377
378/// Tool that executes code generated by the model, and automatically returns the result to the model
379///
380/// See also [ExecutableCode] and [CodeExecutionResult] which are only generated when using this tool
381///
382/// [API Reference](https://ai.google.dev/api/caching#CodeExecution)
383#[derive(Debug, Clone, Deserialize, Serialize)]
384pub struct CodeExecutionTool {}
385
386/// Tool details that the model may use to generate response
387///
388/// A `Tool` is a piece of code that enables the system to interact with external systems to perform
389/// an action, or set of actions, outside of knowledge and scope of the model.
390///
391/// [API Reference](https://ai.google.dev/api/caching#Tool)
392#[derive(Debug, Clone, Serialize)]
393pub struct Tools {
394    #[serde(skip_serializing_if = "Option::is_none")]
395    #[serde(rename = "functionDeclarations")]
396    pub function_declarations: Option<Vec<FunctionDeclaration>>,
397    #[serde(skip_serializing_if = "Option::is_none")]
398    pub google_search: Option<GoogleSearchTool>,
399    #[serde(skip_serializing_if = "Option::is_none")]
400    pub code_execution: Option<CodeExecutionTool>,
401}
402
403/// Structured representation of a function declaration
404///
405/// Defined by the OpenAPI 3.03 specification.
406/// `FunctionDeclaration` is a representation of a block of code that can be used in [Tools] by the model and executed by the client.
407///
408/// [API Reference](https://ai.google.dev/api/caching#FunctionDeclaration)
409#[derive(Debug, Clone, Deserialize, Serialize)]
410pub struct FunctionDeclaration {
411    pub name: String,
412    pub description: String,
413    /// Defines the input parameters the function expects
414    ///
415    /// Use the [API Reference](https://ai.google.dev/gemini-api/docs/function-calling#function_declarations)
416    /// to see how to structure the parameters.
417    pub parameters: Value,
418}
419
420/// Request to generate content from the model
421///
422/// [API Reference](https://ai.google.dev/api/generate-content#request-body)
423#[derive(Debug, Default, Clone, Serialize)]
424pub struct GenerateContent {
425    pub contents: Vec<Content>,
426    #[serde(skip_serializing_if = "Vec::is_empty")]
427    pub tools: Vec<Tools>,
428    #[serde(
429        default,
430        rename = "toolConfig",
431        skip_serializing_if = "Option::is_none"
432    )]
433    pub tool_config: Option<ToolConfig>,
434    #[serde(skip_serializing_if = "Vec::is_empty")]
435    #[serde(default, rename = "safetySettings")]
436    pub safety_settings: Vec<SafetySettings>,
437    #[serde(skip_serializing_if = "Option::is_none")]
438    #[serde(default, rename = "system_instruction")]
439    pub system_instruction: Option<SystemInstructionContent>,
440    #[serde(skip_serializing_if = "Option::is_none")]
441    #[serde(default, rename = "generationConfig")]
442    pub generation_config: Option<GenerationConfig>,
443}
444
445/// System instructions are used to provide the model with additional context or instructions
446///
447/// Similar to the [Content] struct, but specifically for system instructions.
448#[derive(Debug, Clone, Deserialize, Serialize)]
449pub struct SystemInstructionContent {
450    #[serde(default)]
451    pub parts: Vec<SystemInstructionPart>,
452}
453
454/// A part of the system instruction content
455#[derive(Debug, Clone, Deserialize, Serialize)]
456#[serde(rename_all = "camelCase")]
457pub struct SystemInstructionPart {
458    #[serde(skip_serializing_if = "Option::is_none")]
459    pub text: Option<String>,
460}
461
462/// Configuration options for model generation and outputs.
463///
464/// Not all parameters are configurable for every model.
465///
466/// [API Reference](https://ai.google.dev/api/generate-content#v1beta.GenerationConfig)
467#[derive(Debug, Deserialize, Serialize, Default, Clone)]
468#[serde(rename_all = "camelCase")]
469pub struct GenerationConfig {
470    pub temperature: Option<f32>,
471    pub top_p: Option<f32>,
472    pub top_k: Option<i32>,
473    pub candidate_count: Option<i32>,
474    pub max_output_tokens: Option<i32>,
475    pub stop_sequences: Option<Vec<String>>,
476    pub response_mime_type: Option<String>,
477    pub response_schema: Option<Schema>,
478    #[serde(rename = "thinkingConfig", skip_serializing_if = "Option::is_none")]
479    pub thinking_config: Option<ThinkingConfig>,
480}
481
482/// Config for thinking features
483///
484/// [API Reference](https://ai.google.dev/api/generate-content#ThinkingConfig)
485#[derive(Debug, Default, Serialize, Deserialize, Clone)]
486#[serde(rename_all = "camelCase")]
487pub struct ThinkingConfig {
488    #[serde(rename = "thinkingBudget", skip_serializing_if = "Option::is_none")]
489    pub thinking_budget: Option<u16>, // 0~24576
490    #[serde(rename = "includeThoughts", skip_serializing_if = "Option::is_none")]
491    pub include_thoughts: Option<bool>,
492}
493
494/// Safety setting, affecting the safety-blocking behavior
495///
496/// Passing a safety setting for a category changes the allowed probability that content is blocked.
497///
498/// [API Reference](https://ai.google.dev/api/generate-content#safetysetting)
499#[derive(Debug, Deserialize, Serialize, Clone)]
500pub struct SafetySettings {
501    pub category: HarmCategory,
502    pub threshold: HarmBlockThreshold,
503}
504
505/// The Schema object allows the definition of input and output data types.
506///
507/// These types can be objects, but also primitives and arrays.
508/// Represents a select subset of an [OpenAPI 3.0 schema
509/// object](https://spec.openapis.org/oas/v3.0.3#schema).
510///
511/// [API Reference](https://ai.google.dev/api/caching#Schema)
512#[derive(Debug, Serialize, Deserialize, Clone, Default)]
513#[serde(rename_all = "camelCase")]
514pub struct Schema {
515    #[serde(rename = "type")]
516    pub schema_type: Option<Type>,
517    pub format: Option<String>,
518    pub title: Option<String>,
519    pub description: Option<String>,
520    pub nullable: Option<bool>,
521    #[serde(rename = "enum")]
522    pub enum_values: Option<Vec<String>>,
523    #[serde(rename = "maxItems")]
524    pub max_items: Option<String>,
525    #[serde(rename = "minItems")]
526    pub min_items: Option<String>,
527    pub properties: Option<BTreeMap<String, Schema>>,
528    pub required: Option<Vec<String>>,
529    #[serde(rename = "propertyOrdering")]
530    pub property_ordering: Option<Vec<String>>,
531    pub items: Option<Box<Schema>>,
532}
533
534/// The Tool configuration containing parameters for specifying [Tools] use in the request
535///
536/// [API Reference](https://ai.google.dev/api/caching#ToolConfig)
537#[derive(Debug, Clone, Deserialize, Serialize)]
538#[serde(rename_all = "camelCase")]
539pub struct ToolConfig {
540    #[serde(skip_serializing_if = "Option::is_none")]
541    pub function_calling_config: Option<FunctionCallingConfig>,
542}
543
544/// Configuration for specifying function calling behavior
545///
546/// [API Reference](https://ai.google.dev/api/caching#FunctionCallingConfig)
547#[derive(Debug, Clone, Deserialize, Serialize)]
548#[serde(rename_all = "camelCase")]
549pub struct FunctionCallingConfig {
550    #[serde(skip_serializing_if = "Option::is_none")]
551    pub mode: Option<FunctionCallingMode>,
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub allowed_function_names: Option<Vec<String>>,
554}
555
556/// Defines the execution behavior for function calling by defining the execution mode
557///
558/// [API Reference](https://ai.google.dev/api/caching#Mode_1)
559#[derive(Debug, Clone, Deserialize, Serialize)]
560#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
561pub enum FunctionCallingMode {
562    /// Unspecified function calling mode. This value should not be used.
563    ModeUnspecified,
564    /// Default model behavior, model decides to predict either a function call or a natural language response.
565    Auto,
566    /// Model is constrained to always predicting a function call only. If "allowedFunctionNames" are set, the predicted function call will be limited to any one of "allowedFunctionNames", else the predicted function call will be any one of the provided "functionDeclarations".
567    Any,
568    /// Model will not predict any function call. Model behavior is same as when not passing any function declarations.
569    None,
570    /// Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding.
571    Validated,
572}
573
574/// Code generated by the model that is meant to be executed, and the result returned to the model
575///
576/// Only generated when using the [CodeExecutionTool] tool, in which the code will be automatically executed, and a corresponding [CodeExecutionResult] will also be generated.
577#[derive(Debug, Deserialize, Serialize, Clone)]
578pub struct ExecutableCode {
579    #[serde(rename = "language")]
580    pub language: ProgrammingLanguage,
581    #[serde(rename = "code")]
582    pub code: String,
583}
584
585/// Supported programming languages for the generated code
586///
587/// [API Reference](https://ai.google.dev/api/caching#Language)
588#[derive(Debug, Deserialize, Serialize, Clone)]
589#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
590pub enum ProgrammingLanguage {
591    /// Unspecified language. This value should not be used.
592    LanguageUnspecified,
593    /// Python >= 3.10, with numpy and simpy available.
594    Python,
595}
596
597/// Enumeration of possible outcomes of the [CodeExecutionTool]
598///
599/// [API Reference](https://ai.google.dev/api/caching#Outcome)
600#[derive(Debug, Deserialize, Serialize, Clone)]
601#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
602pub enum Outcome {
603    /// Unspecified status. This value should not be used.
604    OutcomeUnspecified,
605    /// Code execution completed successfully.
606    OutcomeOk,
607    /// Code execution finished but with a failure. stderr should contain the reason.
608    OutcomeError,
609    /// Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
610    OutcomeDeadlineExceeded,
611}
612
613/// The result output from a [FunctionCall]
614///
615/// [API Reference](https://ai.google.dev/api/caching#FunctionResponse)
616#[derive(Debug, Deserialize, Serialize, Clone)]
617pub struct FunctionResponse {
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub id: Option<String>,
620    pub name: String,
621    #[serde(skip_serializing_if = "Option::is_none")]
622    //Optional. The function parameters and values in JSON object format.
623    pub args: Option<Value>,
624}
625
626/// Result of executing the [ExecutableCode]
627///
628/// [API Reference](https://ai.google.dev/api/caching#CodeExecutionResult)
629#[derive(Debug, Deserialize, Serialize, Clone)]
630pub struct CodeExecutionResult {
631    pub outcome: Outcome,
632    #[serde(skip_serializing_if = "Option::is_none")]
633    pub output: Option<String>,
634}
635
636/// Definitions of the types of data that can be used in [Schema]
637///
638/// Copied from [serde_json](https://docs.rs/serde_json/1.0.140/serde_json/value/enum.Value.html)
639#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
640#[serde(rename_all = "lowercase")]
641pub enum Type {
642    Object,
643    Array,
644    String,
645    Integer,
646    Number,
647    Boolean,
648}