public sealed class Schema : IMessage<Schema>, IEquatable<Schema>, IDeepCloneable<Schema>, IBufferMessage, IMessage
Reference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class Schema.
Represents a select subset of an OpenAPI 3.0 schema object.
Namespace
Google.Cloud.Ces.V1Assembly
Google.Cloud.Ces.V1.dll
Constructors
Schema()
public Schema()
Schema(Schema)
public Schema(Schema other)
Properties
AdditionalProperties
public Schema AdditionalProperties { get; set; }
Optional. Can either be a boolean or an object, controls the presence of additional properties.
AnyOf
public RepeatedField<Schema> AnyOf { get; }
Optional. The value should be validated against any (one or more) of the subschemas in the list.
Default
public Value Default { get; set; }
Optional. Default value of the data.
Defs
public MapField<string, Schema> Defs { get; }
Optional. A map of definitions for use by ref
. Only allowed at the root
of the schema.
Description
public string Description { get; set; }
Optional. The description of the data.
Enum
public RepeatedField<string> Enum { get; }
Optional. Possible values of the element of primitive type with enum format. Examples:
- We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
- We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}
HasMaximum
public bool HasMaximum { get; }
Gets whether the "maximum" field is set
HasMinimum
public bool HasMinimum { get; }
Gets whether the "minimum" field is set
Items
public Schema Items { get; set; }
Optional. Schema of the elements of Type.ARRAY.
MaxItems
public long MaxItems { get; set; }
Optional. Maximum number of the elements for Type.ARRAY.
Maximum
public double Maximum { get; set; }
Optional. Maximum value for Type.INTEGER and Type.NUMBER.
MinItems
public long MinItems { get; set; }
Optional. Minimum number of the elements for Type.ARRAY.
Minimum
public double Minimum { get; set; }
Optional. Minimum value for Type.INTEGER and Type.NUMBER.
Nullable
public bool Nullable { get; set; }
Optional. Indicates if the value may be null.
PrefixItems
public RepeatedField<Schema> PrefixItems { get; }
Optional. Schemas of initial elements of Type.ARRAY.
Properties
public MapField<string, Schema> Properties { get; }
Optional. Properties of Type.OBJECT.
Ref
public string Ref { get; set; }
Optional. Allows indirect references between schema nodes. The value should
be a valid reference to a child of the root defs
.
For example, the following schema defines a reference to a schema node named "Pet":
type: object
properties:
pet:
ref: #/defs/Pet
defs:
Pet:
type: object
properties:
name:
type: string
The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring .
Required
public RepeatedField<string> Required { get; }
Optional. Required properties of Type.OBJECT.
Title
public string Title { get; set; }
Optional. The title of the schema.
Type
public Schema.Types.Type Type { get; set; }
Required. The type of the data.
UniqueItems
public bool UniqueItems { get; set; }
Optional. Indicate the items in the array must be unique. Only applies to TYPE.ARRAY.

