public sealed class OpenApiSchema : IMessage<OpenApiSchema>, IEquatable<OpenApiSchema>, IDeepCloneable<OpenApiSchema>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class OpenApiSchema.
Schema is used to define the format of input/output data. Represents a select
subset of an OpenAPI 3.0 schema
object. More fields may
be added in the future as needed.
Optional. Possible values of the element of Type.STRING with enum format.
For example we can define an Enum Direction as :
{type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
Optional. The format of the data.
Supported formats:
for NUMBER type: "float", "double"
for INTEGER type: "int32", "int64"
for STRING type: "email", "byte", etc
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOpenApiSchema\u003c/code\u003e class in the Vertex AI v1beta1 API is used to define the format of input/output data and represents a subset of an OpenAPI 3.0 schema object.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing various functionalities such as deep cloning and message handling.\u003c/p\u003e\n"],["\u003cp\u003eIt supports different data types with optional fields for validation, including \u003ccode\u003eEnum\u003c/code\u003e, \u003ccode\u003eFormat\u003c/code\u003e, \u003ccode\u003eMaxItems\u003c/code\u003e, \u003ccode\u003eMinLength\u003c/code\u003e, and \u003ccode\u003ePattern\u003c/code\u003e to refine the data structure, including the ability to define properties and their order.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties such as \u003ccode\u003eDefault\u003c/code\u003e, \u003ccode\u003eDescription\u003c/code\u003e, and \u003ccode\u003eExample\u003c/code\u003e to help define and document the schema.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers constructors, \u003ccode\u003eOpenApiSchema()\u003c/code\u003e and \u003ccode\u003eOpenApiSchema(OpenApiSchema other)\u003c/code\u003e, allowing for default creation or copying from another instance.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class OpenApiSchema (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.OpenApiSchema)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.OpenApiSchema) \n\n public sealed class OpenApiSchema : IMessage\u003cOpenApiSchema\u003e, IEquatable\u003cOpenApiSchema\u003e, IDeepCloneable\u003cOpenApiSchema\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class OpenApiSchema.\n\nSchema is used to define the format of input/output data. Represents a select\nsubset of an [OpenAPI 3.0 schema\nobject](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may\nbe added in the future as needed. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OpenApiSchema \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OpenApiSchema](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.OpenApiSchema), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OpenApiSchema](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.OpenApiSchema), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OpenApiSchema](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.OpenApiSchema), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### OpenApiSchema()\n\n public OpenApiSchema()\n\n### OpenApiSchema(OpenApiSchema)\n\n public OpenApiSchema(OpenApiSchema other)\n\nProperties\n----------\n\n### AdditionalProperties\n\n public Value AdditionalProperties { get; set; }\n\nOptional. Can either be a boolean or an object; controls the presence of\nadditional properties.\n\n### AnyOf\n\n public RepeatedField\u003cOpenApiSchema\u003e AnyOf { get; }\n\nOptional. The value should be validated against any (one or more) of the\nsubschemas in the list.\n\n### Default\n\n public Value Default { get; set; }\n\nOptional. Default value of the data.\n\n### Defs\n\n public MapField\u003cstring, OpenApiSchema\u003e Defs { get; }\n\nOptional. A map of definitions for use by `ref`\nOnly allowed at the root of the schema.\n\n### Description\n\n public string Description { get; set; }\n\nOptional. The description of the data.\n\n### Enum\n\n public RepeatedField\u003cstring\u003e Enum { get; }\n\nOptional. Possible values of the element of Type.STRING with enum format.\nFor example we can define an Enum Direction as :\n{type:STRING, format:enum, enum:\\[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"\\]}\n\n### Example\n\n public Value Example { get; set; }\n\nOptional. Example of the object. Will only populated when the object is the\nroot.\n\n### Format\n\n public string Format { get; set; }\n\nOptional. The format of the data.\nSupported formats:\nfor NUMBER type: \"float\", \"double\"\nfor INTEGER type: \"int32\", \"int64\"\nfor STRING type: \"email\", \"byte\", etc\n\n### Items\n\n public OpenApiSchema Items { get; set; }\n\nOptional. SCHEMA FIELDS FOR TYPE ARRAY\nSchema of the elements of Type.ARRAY.\n\n### MaxItems\n\n public long MaxItems { get; set; }\n\nOptional. Maximum number of the elements for Type.ARRAY.\n\n### MaxLength\n\n public long MaxLength { get; set; }\n\nOptional. Maximum length of the Type.STRING\n\n### MaxProperties\n\n public long MaxProperties { get; set; }\n\nOptional. Maximum number of the properties for Type.OBJECT.\n\n### Maximum\n\n public double Maximum { get; set; }\n\nOptional. Maximum value of the Type.INTEGER and Type.NUMBER\n\n### MinItems\n\n public long MinItems { get; set; }\n\nOptional. Minimum number of the elements for Type.ARRAY.\n\n### MinLength\n\n public long MinLength { get; set; }\n\nOptional. SCHEMA FIELDS FOR TYPE STRING\nMinimum length of the Type.STRING\n\n### MinProperties\n\n public long MinProperties { get; set; }\n\nOptional. Minimum number of the properties for Type.OBJECT.\n\n### Minimum\n\n public double Minimum { get; set; }\n\nOptional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER\nMinimum value of the Type.INTEGER and Type.NUMBER\n\n### Nullable\n\n public bool Nullable { get; set; }\n\nOptional. Indicates if the value may be null.\n\n### Pattern\n\n public string Pattern { get; set; }\n\nOptional. Pattern of the Type.STRING to restrict a string to a regular\nexpression.\n\n### Properties\n\n public MapField\u003cstring, OpenApiSchema\u003e Properties { get; }\n\nOptional. SCHEMA FIELDS FOR TYPE OBJECT\nProperties of Type.OBJECT.\n\n### PropertyOrdering\n\n public RepeatedField\u003cstring\u003e PropertyOrdering { get; }\n\nOptional. The order of the properties.\nNot a standard field in open api spec. Only used to support the order of\nthe properties.\n\n### Ref\n\n public string Ref { get; set; }\n\nOptional. Allows indirect references between schema nodes. The value should\nbe a valid reference to a child of the root `defs`.\n\nFor example, the following schema defines a reference to a schema node\nnamed \"Pet\":\n\ntype: object\nproperties:\npet:\nref: #/defs/Pet\ndefs:\nPet:\ntype: object\nproperties:\nname:\ntype: string\n\nThe value of the \"pet\" property is a reference to the schema node\nnamed \"Pet\".\nSee details in\n\u003chttps://json-schema.org/understanding-json-schema/structuring\u003e\n\n### Required\n\n public RepeatedField\u003cstring\u003e Required { get; }\n\nOptional. Required properties of Type.OBJECT.\n\n### Title\n\n public string Title { get; set; }\n\nOptional. The title of the Schema.\n\n### Type\n\n public Type Type { get; set; }\n\nOptional. The type of the data."]]