discovery  v1
Classes | Public Member Functions | Static Public Member Functions | List of all members
google_discovery_api::JsonSchema Class Reference

#include <json_schema.h>

Inheritance diagram for google_discovery_api::JsonSchema:

Classes

class  JsonSchemaAnnotations
 
class  JsonSchemaVariant
 

Public Member Functions

 JsonSchema (const Json::Value &storage)
 
 JsonSchema (Json::Value *storage)
 
virtual ~JsonSchema ()
 
const StringPiece GetTypeName () const
 
bool has_ref () const
 
void clear_ref ()
 
const StringPiece get_ref () const
 
void set_ref (const StringPiece &value)
 
bool has_additional_properties () const
 
void clear_additional_properties ()
 
const JsonSchema get_additional_properties () const
 
JsonSchema mutable_additionalProperties ()
 
bool has_annotations () const
 
void clear_annotations ()
 
const JsonSchemaAnnotations get_annotations () const
 
JsonSchemaAnnotations mutable_annotations ()
 
bool has_default () const
 
void clear_default ()
 
const StringPiece get_default () const
 
void set_default (const StringPiece &value)
 
bool has_description () const
 
void clear_description ()
 
const StringPiece get_description () const
 
void set_description (const StringPiece &value)
 
bool has_enum () const
 
void clear_enum ()
 
const client::JsonCppArray< string > get_enum () const
 
client::JsonCppArray< string > mutable_enum ()
 
bool has_enum_descriptions () const
 
void clear_enum_descriptions ()
 
const client::JsonCppArray< string > get_enum_descriptions () const
 
client::JsonCppArray< string > mutable_enumDescriptions ()
 
bool has_format () const
 
void clear_format ()
 
const StringPiece get_format () const
 
void set_format (const StringPiece &value)
 
bool has_id () const
 
void clear_id ()
 
const StringPiece get_id () const
 
void set_id (const StringPiece &value)
 
bool has_items () const
 
void clear_items ()
 
const JsonSchema get_items () const
 
JsonSchema mutable_items ()
 
bool has_location () const
 
void clear_location ()
 
const StringPiece get_location () const
 
void set_location (const StringPiece &value)
 
bool has_maximum () const
 
void clear_maximum ()
 
const StringPiece get_maximum () const
 
void set_maximum (const StringPiece &value)
 
bool has_minimum () const
 
void clear_minimum ()
 
const StringPiece get_minimum () const
 
void set_minimum (const StringPiece &value)
 
bool has_pattern () const
 
void clear_pattern ()
 
const StringPiece get_pattern () const
 
void set_pattern (const StringPiece &value)
 
bool has_properties () const
 
void clear_properties ()
 
const client::JsonCppAssociativeArray< JsonSchemaget_properties () const
 
client::JsonCppAssociativeArray< JsonSchemamutable_properties ()
 
bool has_read_only () const
 
void clear_read_only ()
 
bool get_read_only () const
 
void set_read_only (bool value)
 
bool has_repeated () const
 
void clear_repeated ()
 
bool get_repeated () const
 
void set_repeated (bool value)
 
bool has_required () const
 
void clear_required ()
 
bool get_required () const
 
void set_required (bool value)
 
bool has_type () const
 
void clear_type ()
 
const StringPiece get_type () const
 
void set_type (const StringPiece &value)
 
bool has_variant () const
 
void clear_variant ()
 
const JsonSchemaVariant get_variant () const
 
JsonSchemaVariant mutable_variant ()
 

Static Public Member Functions

static JsonSchemaNew ()
 

Detailed Description

No description provided.

Constructor & Destructor Documentation

◆ JsonSchema() [1/2]

google_discovery_api::JsonSchema::JsonSchema ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ JsonSchema() [2/2]

google_discovery_api::JsonSchema::JsonSchema ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~JsonSchema()

google_discovery_api::JsonSchema::~JsonSchema ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_additional_properties()

void google_discovery_api::JsonSchema::clear_additional_properties ( )
inline

Clears the 'additionalProperties' attribute.

◆ clear_annotations()

void google_discovery_api::JsonSchema::clear_annotations ( )
inline

Clears the 'annotations' attribute.

◆ clear_default()

void google_discovery_api::JsonSchema::clear_default ( )
inline

Clears the 'default' attribute.

◆ clear_description()

void google_discovery_api::JsonSchema::clear_description ( )
inline

Clears the 'description' attribute.

◆ clear_enum()

void google_discovery_api::JsonSchema::clear_enum ( )
inline

Clears the 'enum' attribute.

◆ clear_enum_descriptions()

void google_discovery_api::JsonSchema::clear_enum_descriptions ( )
inline

Clears the 'enumDescriptions' attribute.

◆ clear_format()

void google_discovery_api::JsonSchema::clear_format ( )
inline

Clears the 'format' attribute.

◆ clear_id()

void google_discovery_api::JsonSchema::clear_id ( )
inline

Clears the 'id' attribute.

◆ clear_items()

void google_discovery_api::JsonSchema::clear_items ( )
inline

Clears the 'items' attribute.

◆ clear_location()

void google_discovery_api::JsonSchema::clear_location ( )
inline

Clears the 'location' attribute.

◆ clear_maximum()

void google_discovery_api::JsonSchema::clear_maximum ( )
inline

Clears the 'maximum' attribute.

◆ clear_minimum()

void google_discovery_api::JsonSchema::clear_minimum ( )
inline

Clears the 'minimum' attribute.

◆ clear_pattern()

void google_discovery_api::JsonSchema::clear_pattern ( )
inline

Clears the 'pattern' attribute.

◆ clear_properties()

void google_discovery_api::JsonSchema::clear_properties ( )
inline

Clears the 'properties' attribute.

◆ clear_read_only()

void google_discovery_api::JsonSchema::clear_read_only ( )
inline

Clears the 'readOnly' attribute.

◆ clear_ref()

void google_discovery_api::JsonSchema::clear_ref ( )
inline

Clears the '$ref' attribute.

◆ clear_repeated()

void google_discovery_api::JsonSchema::clear_repeated ( )
inline

Clears the 'repeated' attribute.

◆ clear_required()

void google_discovery_api::JsonSchema::clear_required ( )
inline

Clears the 'required' attribute.

◆ clear_type()

void google_discovery_api::JsonSchema::clear_type ( )
inline

Clears the 'type' attribute.

◆ clear_variant()

void google_discovery_api::JsonSchema::clear_variant ( )
inline

Clears the 'variant' attribute.

◆ get_additional_properties()

const JsonSchema google_discovery_api::JsonSchema::get_additional_properties ( ) const

Get a reference to the value of the 'additionalProperties' attribute.

◆ get_annotations()

const JsonSchemaAnnotations google_discovery_api::JsonSchema::get_annotations ( ) const
inline

Get a reference to the value of the 'annotations' attribute.

◆ get_default()

const StringPiece google_discovery_api::JsonSchema::get_default ( ) const
inline

Get the value of the 'default' attribute.

◆ get_description()

const StringPiece google_discovery_api::JsonSchema::get_description ( ) const
inline

Get the value of the 'description' attribute.

◆ get_enum()

const client::JsonCppArray<string > google_discovery_api::JsonSchema::get_enum ( ) const
inline

Get a reference to the value of the 'enum' attribute.

◆ get_enum_descriptions()

const client::JsonCppArray<string > google_discovery_api::JsonSchema::get_enum_descriptions ( ) const
inline

Get a reference to the value of the 'enumDescriptions' attribute.

◆ get_format()

const StringPiece google_discovery_api::JsonSchema::get_format ( ) const
inline

Get the value of the 'format' attribute.

◆ get_id()

const StringPiece google_discovery_api::JsonSchema::get_id ( ) const
inline

Get the value of the 'id' attribute.

◆ get_items()

const JsonSchema google_discovery_api::JsonSchema::get_items ( ) const

Get a reference to the value of the 'items' attribute.

◆ get_location()

const StringPiece google_discovery_api::JsonSchema::get_location ( ) const
inline

Get the value of the 'location' attribute.

◆ get_maximum()

const StringPiece google_discovery_api::JsonSchema::get_maximum ( ) const
inline

Get the value of the 'maximum' attribute.

◆ get_minimum()

const StringPiece google_discovery_api::JsonSchema::get_minimum ( ) const
inline

Get the value of the 'minimum' attribute.

◆ get_pattern()

const StringPiece google_discovery_api::JsonSchema::get_pattern ( ) const
inline

Get the value of the 'pattern' attribute.

◆ get_properties()

const client::JsonCppAssociativeArray<JsonSchema > google_discovery_api::JsonSchema::get_properties ( ) const

Get a reference to the value of the 'properties' attribute.

◆ get_read_only()

bool google_discovery_api::JsonSchema::get_read_only ( ) const
inline

Get the value of the 'readOnly' attribute.

◆ get_ref()

const StringPiece google_discovery_api::JsonSchema::get_ref ( ) const
inline

Get the value of the '$ref' attribute.

◆ get_repeated()

bool google_discovery_api::JsonSchema::get_repeated ( ) const
inline

Get the value of the 'repeated' attribute.

◆ get_required()

bool google_discovery_api::JsonSchema::get_required ( ) const
inline

Get the value of the 'required' attribute.

◆ get_type()

const StringPiece google_discovery_api::JsonSchema::get_type ( ) const
inline

Get the value of the 'type' attribute.

◆ get_variant()

const JsonSchemaVariant google_discovery_api::JsonSchema::get_variant ( ) const
inline

Get a reference to the value of the 'variant' attribute.

◆ GetTypeName()

const StringPiece google_discovery_api::JsonSchema::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_discovery_api::JsonSchema

◆ has_additional_properties()

bool google_discovery_api::JsonSchema::has_additional_properties ( ) const
inline

Determine if the 'additionalProperties' attribute was set.

Returns
true if the 'additionalProperties' attribute was set.

◆ has_annotations()

bool google_discovery_api::JsonSchema::has_annotations ( ) const
inline

Determine if the 'annotations' attribute was set.

Returns
true if the 'annotations' attribute was set.

◆ has_default()

bool google_discovery_api::JsonSchema::has_default ( ) const
inline

Determine if the 'default' attribute was set.

Returns
true if the 'default' attribute was set.

◆ has_description()

bool google_discovery_api::JsonSchema::has_description ( ) const
inline

Determine if the 'description' attribute was set.

Returns
true if the 'description' attribute was set.

◆ has_enum()

bool google_discovery_api::JsonSchema::has_enum ( ) const
inline

Determine if the 'enum' attribute was set.

Returns
true if the 'enum' attribute was set.

◆ has_enum_descriptions()

bool google_discovery_api::JsonSchema::has_enum_descriptions ( ) const
inline

Determine if the 'enumDescriptions' attribute was set.

Returns
true if the 'enumDescriptions' attribute was set.

◆ has_format()

bool google_discovery_api::JsonSchema::has_format ( ) const
inline

Determine if the 'format' attribute was set.

Returns
true if the 'format' attribute was set.

◆ has_id()

bool google_discovery_api::JsonSchema::has_id ( ) const
inline

Determine if the 'id' attribute was set.

Returns
true if the 'id' attribute was set.

◆ has_items()

bool google_discovery_api::JsonSchema::has_items ( ) const
inline

Determine if the 'items' attribute was set.

Returns
true if the 'items' attribute was set.

◆ has_location()

bool google_discovery_api::JsonSchema::has_location ( ) const
inline

Determine if the 'location' attribute was set.

Returns
true if the 'location' attribute was set.

◆ has_maximum()

bool google_discovery_api::JsonSchema::has_maximum ( ) const
inline

Determine if the 'maximum' attribute was set.

Returns
true if the 'maximum' attribute was set.

◆ has_minimum()

bool google_discovery_api::JsonSchema::has_minimum ( ) const
inline

Determine if the 'minimum' attribute was set.

Returns
true if the 'minimum' attribute was set.

◆ has_pattern()

bool google_discovery_api::JsonSchema::has_pattern ( ) const
inline

Determine if the 'pattern' attribute was set.

Returns
true if the 'pattern' attribute was set.

◆ has_properties()

bool google_discovery_api::JsonSchema::has_properties ( ) const
inline

Determine if the 'properties' attribute was set.

Returns
true if the 'properties' attribute was set.

◆ has_read_only()

bool google_discovery_api::JsonSchema::has_read_only ( ) const
inline

Determine if the 'readOnly' attribute was set.

Returns
true if the 'readOnly' attribute was set.

◆ has_ref()

bool google_discovery_api::JsonSchema::has_ref ( ) const
inline

Determine if the '$ref' attribute was set.

Returns
true if the '$ref' attribute was set.

◆ has_repeated()

bool google_discovery_api::JsonSchema::has_repeated ( ) const
inline

Determine if the 'repeated' attribute was set.

Returns
true if the 'repeated' attribute was set.

◆ has_required()

bool google_discovery_api::JsonSchema::has_required ( ) const
inline

Determine if the 'required' attribute was set.

Returns
true if the 'required' attribute was set.

◆ has_type()

bool google_discovery_api::JsonSchema::has_type ( ) const
inline

Determine if the 'type' attribute was set.

Returns
true if the 'type' attribute was set.

◆ has_variant()

bool google_discovery_api::JsonSchema::has_variant ( ) const
inline

Determine if the 'variant' attribute was set.

Returns
true if the 'variant' attribute was set.

◆ mutable_additionalProperties()

JsonSchema google_discovery_api::JsonSchema::mutable_additionalProperties ( )

Gets a reference to a mutable value of the 'additionalProperties' property.

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

Returns
The result can be modified to change the attribute value.

◆ mutable_annotations()

JsonSchemaAnnotations google_discovery_api::JsonSchema::mutable_annotations ( )
inline

Gets a reference to a mutable value of the 'annotations' property.

Additional information about this property.

Returns
The result can be modified to change the attribute value.

◆ mutable_enum()

client::JsonCppArray<string > google_discovery_api::JsonSchema::mutable_enum ( )
inline

Gets a reference to a mutable value of the 'enum' property.

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

Returns
The result can be modified to change the attribute value.

◆ mutable_enumDescriptions()

client::JsonCppArray<string > google_discovery_api::JsonSchema::mutable_enumDescriptions ( )
inline

Gets a reference to a mutable value of the 'enumDescriptions' property.

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

Returns
The result can be modified to change the attribute value.

◆ mutable_items()

JsonSchema google_discovery_api::JsonSchema::mutable_items ( )

Gets a reference to a mutable value of the 'items' property.

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

Returns
The result can be modified to change the attribute value.

◆ mutable_properties()

client::JsonCppAssociativeArray<JsonSchema > google_discovery_api::JsonSchema::mutable_properties ( )

Gets a reference to a mutable value of the 'properties' property.

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

Returns
The result can be modified to change the attribute value.

◆ mutable_variant()

JsonSchemaVariant google_discovery_api::JsonSchema::mutable_variant ( )
inline

Gets a reference to a mutable value of the 'variant' property.

In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of descriminant values to schema names.

Returns
The result can be modified to change the attribute value.

◆ New()

JsonSchema * google_discovery_api::JsonSchema::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_default()

void google_discovery_api::JsonSchema::set_default ( const StringPiece &  value)
inline

Change the 'default' attribute.

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

Parameters
[in]valueThe new value.

◆ set_description()

void google_discovery_api::JsonSchema::set_description ( const StringPiece &  value)
inline

Change the 'description' attribute.

A description of this object.

Parameters
[in]valueThe new value.

◆ set_format()

void google_discovery_api::JsonSchema::set_format ( const StringPiece &  value)
inline

Change the 'format' attribute.

An additional regular expression or key that helps constrain the value. For more details see: http://tools.ietf.org/html/draft-zyp-json- schema-03#section-5.23.

Parameters
[in]valueThe new value.

◆ set_id()

void google_discovery_api::JsonSchema::set_id ( const StringPiece &  value)
inline

Change the 'id' attribute.

Unique identifier for this schema.

Parameters
[in]valueThe new value.

◆ set_location()

void google_discovery_api::JsonSchema::set_location ( const StringPiece &  value)
inline

Change the 'location' attribute.

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

Parameters
[in]valueThe new value.

◆ set_maximum()

void google_discovery_api::JsonSchema::set_maximum ( const StringPiece &  value)
inline

Change the 'maximum' attribute.

The maximum value of this parameter.

Parameters
[in]valueThe new value.

◆ set_minimum()

void google_discovery_api::JsonSchema::set_minimum ( const StringPiece &  value)
inline

Change the 'minimum' attribute.

The minimum value of this parameter.

Parameters
[in]valueThe new value.

◆ set_pattern()

void google_discovery_api::JsonSchema::set_pattern ( const StringPiece &  value)
inline

Change the 'pattern' attribute.

The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html.

Parameters
[in]valueThe new value.

◆ set_read_only()

void google_discovery_api::JsonSchema::set_read_only ( bool  value)
inline

Change the 'readOnly' attribute.

The value is read-only, generated by the service. The value cannot be modified by the client. If the value is included in a POST, PUT, or PATCH request, it is ignored by the service.

Parameters
[in]valueThe new value.

◆ set_ref()

void google_discovery_api::JsonSchema::set_ref ( const StringPiece &  value)
inline

Change the '$ref' attribute.

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

Parameters
[in]valueThe new value.

◆ set_repeated()

void google_discovery_api::JsonSchema::set_repeated ( bool  value)
inline

Change the 'repeated' attribute.

Whether this parameter may appear multiple times.

Parameters
[in]valueThe new value.

◆ set_required()

void google_discovery_api::JsonSchema::set_required ( bool  value)
inline

Change the 'required' attribute.

Whether the parameter is required.

Parameters
[in]valueThe new value.

◆ set_type()

void google_discovery_api::JsonSchema::set_type ( const StringPiece &  value)
inline

Change the 'type' attribute.

The value type for this schema. A list of values can be found here: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: