public final class JsonSchema extends GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the API Discovery Service. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonSchema.Annotations
Additional information about this property.
|
static class |
JsonSchema.Variant
In a variant data type, the value of one property is used to determine how to interpret the
entire entity.
|
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
JsonSchema() |
| Modifier and Type | Method and Description |
|---|---|
JsonSchema |
clone() |
String |
get$ref()
A reference to another schema.
|
JsonSchema |
getAdditionalProperties()
If this is a schema for an object, this property is the schema for any additional properties
with dynamic keys on this object.
|
JsonSchema.Annotations |
getAnnotations()
Additional information about this property.
|
String |
getDefault()
The default value of this property (if one exists).
|
String |
getDescription()
A description of this object.
|
List<String> |
getEnum()
Values this parameter may take (if it is an enum).
|
List<String> |
getEnumDescriptions()
The descriptions for the enums.
|
String |
getFormat()
An additional regular expression or key that helps constrain the value.
|
String |
getId()
Unique identifier for this schema.
|
JsonSchema |
getItems()
If this is a schema for an array, this property is the schema for each element in the array.
|
String |
getLocation()
Whether this parameter goes in the query or the path for REST requests.
|
String |
getMaximum()
The maximum value of this parameter.
|
String |
getMinimum()
The minimum value of this parameter.
|
String |
getPattern()
The regular expression this parameter must conform to.
|
Map<String,JsonSchema> |
getProperties()
If this is a schema for an object, list the schema for each property of this object.
|
Boolean |
getReadOnly()
The value is read-only, generated by the service.
|
Boolean |
getRepeated()
Whether this parameter may appear multiple times.
|
Boolean |
getRequired()
Whether the parameter is required.
|
String |
getType()
The value type for this schema.
|
JsonSchema.Variant |
getVariant()
In a variant data type, the value of one property is used to determine how to interpret the
entire entity.
|
JsonSchema |
set(String fieldName,
Object value) |
JsonSchema |
set$ref(String $ref)
A reference to another schema.
|
JsonSchema |
setAdditionalProperties(JsonSchema additionalProperties)
If this is a schema for an object, this property is the schema for any additional properties
with dynamic keys on this object.
|
JsonSchema |
setAnnotations(JsonSchema.Annotations annotations)
Additional information about this property.
|
JsonSchema |
setDefault(String default__)
The default value of this property (if one exists).
|
JsonSchema |
setDescription(String description)
A description of this object.
|
JsonSchema |
setEnum(List<String> enum__)
Values this parameter may take (if it is an enum).
|
JsonSchema |
setEnumDescriptions(List<String> enumDescriptions)
The descriptions for the enums.
|
JsonSchema |
setFormat(String format)
An additional regular expression or key that helps constrain the value.
|
JsonSchema |
setId(String id)
Unique identifier for this schema.
|
JsonSchema |
setItems(JsonSchema items)
If this is a schema for an array, this property is the schema for each element in the array.
|
JsonSchema |
setLocation(String location)
Whether this parameter goes in the query or the path for REST requests.
|
JsonSchema |
setMaximum(String maximum)
The maximum value of this parameter.
|
JsonSchema |
setMinimum(String minimum)
The minimum value of this parameter.
|
JsonSchema |
setPattern(String pattern)
The regular expression this parameter must conform to.
|
JsonSchema |
setProperties(Map<String,JsonSchema> properties)
If this is a schema for an object, list the schema for each property of this object.
|
JsonSchema |
setReadOnly(Boolean readOnly)
The value is read-only, generated by the service.
|
JsonSchema |
setRepeated(Boolean repeated)
Whether this parameter may appear multiple times.
|
JsonSchema |
setRequired(Boolean required)
Whether the parameter is required.
|
JsonSchema |
setType(String type)
The value type for this schema.
|
JsonSchema |
setVariant(JsonSchema.Variant variant)
In a variant data type, the value of one property is used to determine how to interpret the
entire entity.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic String get$ref()
null for nonepublic JsonSchema set$ref(String $ref)
$ref - $ref or null for nonepublic JsonSchema getAdditionalProperties()
null for nonepublic JsonSchema setAdditionalProperties(JsonSchema additionalProperties)
additionalProperties - additionalProperties or null for nonepublic JsonSchema.Annotations getAnnotations()
null for nonepublic JsonSchema setAnnotations(JsonSchema.Annotations annotations)
annotations - annotations or null for nonepublic String getDefault()
null for nonepublic JsonSchema setDefault(String default__)
default__ - default__ or null for nonepublic String getDescription()
null for nonepublic JsonSchema setDescription(String description)
description - description or null for nonepublic List<String> getEnum()
null for nonepublic JsonSchema setEnum(List<String> enum__)
enum__ - enum__ or null for nonepublic List<String> getEnumDescriptions()
null for nonepublic JsonSchema setEnumDescriptions(List<String> enumDescriptions)
enumDescriptions - enumDescriptions or null for nonepublic String getFormat()
null for nonepublic JsonSchema setFormat(String format)
format - format or null for nonepublic String getId()
null for nonepublic JsonSchema setId(String id)
id - id or null for nonepublic JsonSchema getItems()
null for nonepublic JsonSchema setItems(JsonSchema items)
items - items or null for nonepublic String getLocation()
null for nonepublic JsonSchema setLocation(String location)
location - location or null for nonepublic String getMaximum()
null for nonepublic JsonSchema setMaximum(String maximum)
maximum - maximum or null for nonepublic String getMinimum()
null for nonepublic JsonSchema setMinimum(String minimum)
minimum - minimum or null for nonepublic String getPattern()
null for nonepublic JsonSchema setPattern(String pattern)
pattern - pattern or null for nonepublic Map<String,JsonSchema> getProperties()
null for nonepublic JsonSchema setProperties(Map<String,JsonSchema> properties)
properties - properties or null for nonepublic Boolean getReadOnly()
null for nonepublic JsonSchema setReadOnly(Boolean readOnly)
readOnly - readOnly or null for nonepublic Boolean getRepeated()
null for nonepublic JsonSchema setRepeated(Boolean repeated)
repeated - repeated or null for nonepublic Boolean getRequired()
null for nonepublic JsonSchema setRequired(Boolean required)
required - required or null for nonepublic String getType()
null for nonepublic JsonSchema setType(String type)
type - type or null for nonepublic JsonSchema.Variant getVariant()
null for nonepublic JsonSchema setVariant(JsonSchema.Variant variant)
variant - variant or null for nonepublic JsonSchema set(String fieldName, Object value)
set in class GenericJsonpublic JsonSchema clone()
clone in class GenericJsonCopyright © 2011–2022 Google. All rights reserved.