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

#include <json_schema.h>

Inheritance diagram for google_discovery_api::JsonSchema::JsonSchemaVariant:

Classes

class  JsonSchemaVariantMap
 

Public Member Functions

 JsonSchemaVariant (const Json::Value &storage)
 
 JsonSchemaVariant (Json::Value *storage)
 
virtual ~JsonSchemaVariant ()
 
const StringPiece GetTypeName () const
 
bool has_discriminant () const
 
void clear_discriminant ()
 
const StringPiece get_discriminant () const
 
void set_discriminant (const StringPiece &value)
 
bool has_map () const
 
void clear_map ()
 
const client::JsonCppArray< JsonSchemaVariantMapget_map () const
 
client::JsonCppArray< JsonSchemaVariantMapmutable_map ()
 

Static Public Member Functions

static JsonSchemaVariantNew ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ JsonSchemaVariant() [1/2]

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

Standard constructor for an immutable data object instance.

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

◆ JsonSchemaVariant() [2/2]

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

Standard constructor for a mutable data object instance.

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

◆ ~JsonSchemaVariant()

google_discovery_api::JsonSchema::JsonSchemaVariant::~JsonSchemaVariant ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_discriminant()

void google_discovery_api::JsonSchema::JsonSchemaVariant::clear_discriminant ( )
inline

Clears the 'discriminant' attribute.

◆ clear_map()

void google_discovery_api::JsonSchema::JsonSchemaVariant::clear_map ( )
inline

Clears the 'map' attribute.

◆ get_discriminant()

const StringPiece google_discovery_api::JsonSchema::JsonSchemaVariant::get_discriminant ( ) const
inline

Get the value of the 'discriminant' attribute.

◆ get_map()

const client::JsonCppArray<JsonSchemaVariantMap > google_discovery_api::JsonSchema::JsonSchemaVariant::get_map ( ) const
inline

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

◆ GetTypeName()

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

Returns a string denoting the type of this data object.

Returns
google_discovery_api::JsonSchemaVariant

◆ has_discriminant()

bool google_discovery_api::JsonSchema::JsonSchemaVariant::has_discriminant ( ) const
inline

Determine if the 'discriminant' attribute was set.

Returns
true if the 'discriminant' attribute was set.

◆ has_map()

bool google_discovery_api::JsonSchema::JsonSchemaVariant::has_map ( ) const
inline

Determine if the 'map' attribute was set.

Returns
true if the 'map' attribute was set.

◆ mutable_map()

client::JsonCppArray<JsonSchemaVariantMap > google_discovery_api::JsonSchema::JsonSchemaVariant::mutable_map ( )
inline

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

The map of discriminant value to schema to use for parsing..

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

◆ New()

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

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_discriminant()

void google_discovery_api::JsonSchema::JsonSchemaVariant::set_discriminant ( const StringPiece &  value)
inline

Change the 'discriminant' attribute.

The name of the type discriminant property.

Parameters
[in]valueThe new value.

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