ObjectSchema class
Stay organized with collections
Save and categorize content based on your preferences.
Schema class for "object" types. The properties
param must be a map of Schema
objects.
Signature:
export declare class ObjectSchema extends Schema
Extends: Schema
Constructors
Properties
ObjectSchema.(constructor)
Constructs a new instance of the ObjectSchema
class
Signature:
constructor(schemaParams: SchemaParams, properties: {
[k: string]: TypedSchema;
}, optionalProperties?: string[]);
Parameters
Parameter |
Type |
Description |
schemaParams |
SchemaParams |
|
properties |
{ [k: string]: TypedSchema; } |
|
optionalProperties |
string[] |
|
ObjectSchema.optionalProperties
Signature:
optionalProperties: string[];
ObjectSchema.properties
Signature:
properties: {
[k: string]: TypedSchema;
};
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# ObjectSchema class\n\nSchema class for \"object\" types. The `properties` param must be a map of `Schema` objects.\n\n**Signature:** \n\n export declare class ObjectSchema extends Schema \n\n**Extends:** [Schema](./ai.schema.md#schema_class)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|-------------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------|\n| [(constructor)(schemaParams, properties, optionalProperties)](./ai.objectschema.md#objectschemaconstructor) | | Constructs a new instance of the `ObjectSchema` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|---------------------------------------------------------------------------|-----------|--------------------------------------------------------|-------------|\n| [optionalProperties](./ai.objectschema.md#objectschemaoptionalproperties) | | string\\[\\] | |\n| [properties](./ai.objectschema.md#objectschemaproperties) | | { \\[k: string\\]: [TypedSchema](./ai.md#typedschema); } | |\n\nObjectSchema.(constructor)\n--------------------------\n\nConstructs a new instance of the `ObjectSchema` class\n\n**Signature:** \n\n constructor(schemaParams: SchemaParams, properties: {\n [k: string]: TypedSchema;\n }, optionalProperties?: string[]);\n\n#### Parameters\n\n| Parameter | Type | Description |\n|--------------------|-------------------------------------------------------------|-------------|\n| schemaParams | [SchemaParams](./ai.schemaparams.md#schemaparams_interface) | |\n| properties | { \\[k: string\\]: [TypedSchema](./ai.md#typedschema); } | |\n| optionalProperties | string\\[\\] | |\n\nObjectSchema.optionalProperties\n-------------------------------\n\n**Signature:** \n\n optionalProperties: string[];\n\nObjectSchema.properties\n-----------------------\n\n**Signature:** \n\n properties: {\n [k: string]: TypedSchema;\n };"]]