GoogleJsonSchema

data class GoogleJsonSchema(val id: String? = null, val description: String? = null, val location: String? = null, val metaRef: String? = null, val type: JsonSchemaType? = null, val format: String? = null, val default: String? = null, val pattern: String? = null, val maximum: String? = null, val minimum: String? = null, val readOnly: Boolean? = null, val required: Boolean? = null, val repeated: Boolean? = null, val enum: List<String>? = null, val enumDescriptions: List<String>? = null, val properties: Map<String, GoogleJsonSchema>? = null, val additionalProperties: GoogleJsonSchema? = null, val items: GoogleJsonSchema? = null, val annotations: GoogleJsonSchema.Annotations? = null, val variant: GoogleJsonSchema.Variant? = null)(source)

Data class representing the JSON schema as returned by the Google Discovery API.

Constructors

Link copied to clipboard
constructor(id: String? = null, description: String? = null, location: String? = null, metaRef: String? = null, type: JsonSchemaType? = null, format: String? = null, default: String? = null, pattern: String? = null, maximum: String? = null, minimum: String? = null, readOnly: Boolean? = null, required: Boolean? = null, repeated: Boolean? = null, enum: List<String>? = null, enumDescriptions: List<String>? = null, properties: Map<String, GoogleJsonSchema>? = null, additionalProperties: GoogleJsonSchema? = null, items: GoogleJsonSchema? = null, annotations: GoogleJsonSchema.Annotations? = null, variant: GoogleJsonSchema.Variant? = null)

Types

Link copied to clipboard
data class Annotations(val required: List<String>? = null)
Link copied to clipboard
data class Variant(val map: List<GoogleJsonSchema.Variant.Map>? = null, val discriminant: String? = null)

Properties

Link copied to clipboard

If this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.

Link copied to clipboard

Additional information about this property.

Link copied to clipboard
val default: String? = null

The default value of this property (if one exists).

Link copied to clipboard
val description: String? = null

A description of this object.

Link copied to clipboard
val enum: List<String>? = null

Values this parameter may take (if it is an enum).

Link copied to clipboard

The descriptions for the enums. Each position maps to the corresponding value in the "enum" array.

Link copied to clipboard

Gets the list of enums and their descriptions as a list of Pairs.

Link copied to clipboard
val format: String? = null

An additional regular expression or key that helps constrain the value.

Link copied to clipboard
val id: String? = null

Unique identifier for this schema.

Link copied to clipboard
val items: GoogleJsonSchema? = null

If this is a schema for an array, this property is the schema for each element in the array.

Link copied to clipboard
val location: String? = null

Whether this parameter goes in the query or the path for REST requests.

Link copied to clipboard
val maximum: String? = null

The maximum value of this parameter.

Link copied to clipboard
@SerialName(value = "$ref")
val metaRef: String? = null

A reference to another schema. The value of this property is the "id" of another schema.

Link copied to clipboard
val minimum: String? = null

The minimum value of this parameter.

Link copied to clipboard
val pattern: String? = null

The regular expression this parameter must conform to. Uses Java 6 regex format

Link copied to clipboard

If this is a schema for an object, list the schema for each property of this object.

Link copied to clipboard
val readOnly: Boolean? = null

The value is read-only, generated by the service. The value cannot be modified by the client.

Link copied to clipboard
val repeated: Boolean? = null

Whether this parameter may appear multiple times.

Link copied to clipboard
val required: Boolean? = null

Whether the parameter is required.

Link copied to clipboard

Gets the required annotations.

Link copied to clipboard
val type: JsonSchemaType? = null

The value type for this schema.

Link copied to clipboard

In a variant data type, the value of one property is used to determine how to interpret the entire entity.