AWS SDK for C++

AWS SDK for C++ Version 1.11.907

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aws::Utils::Document Class Reference

#include <Document.h>

Public Member Functions

 
 Document (const Aws::String &value)
 
 Document (Aws::IStream &istream)
 
 Document (const Document &value)
 
 Document (Document &&value)
 
 Document (const Json::JsonView &view)
 
 
Document & operator= (const Document &other)
 
 
 
bool operator== (const Document &other) const
 
bool operator!= (const Document &other) const
 
Document & WithString (const Aws::String &key, const Aws::String &value)
 
Document & WithString (const char *key, const Aws::String &value)
 
Document & AsString (const Aws::String &value)
 
Document & WithBool (const Aws::String &key, bool value)
 
Document & WithBool (const char *key, bool value)
 
Document & AsBool (bool value)
 
Document & WithInteger (const Aws::String &key, int value)
 
Document & WithInteger (const char *key, int value)
 
Document & AsInteger (int value)
 
Document & WithInt64 (const Aws::String &key, long long value)
 
Document & WithInt64 (const char *key, long long value)
 
Document & AsInt64 (long long value)
 
Document & WithDouble (const Aws::String &key, double value)
 
Document & WithDouble (const char *key, double value)
 
Document & AsDouble (double value)
 
Document & WithArray (const Aws::String &key, const Array< Aws::String > &array)
 
Document & WithArray (const char *key, const Array< Aws::String > &array)
 
Document & WithArray (const Aws::String &key, const Array< Document > &array)
 
Document & WithArray (const Aws::String &key, Array< Document > &&array)
 
Document & AsArray (const Array< Document > &array)
 
Document & AsArray (Array< Document > &&array)
 
Document & WithObject (const Aws::String &key, const Document &value)
 
Document & WithObject (const char *key, const Document &value)
 
Document & WithObject (const Aws::String &key, Document &&value)
 
Document & WithObject (const char *key, Document &&value)
 
Document & AsObject (const Document &value)
 
 
bool WasParseSuccessful () const
 
const Aws::String & GetErrorMessage () const
 
DocumentView View () const
 
 

Detailed Description

A Document type represents open content that is serialized using the same format as its surroundings and requires no additional encoding or escaping. Document types provide a JSON "view" of data regardless of the underlying protocol. This normalized JSON interface makes document types protocol-agnostic. Clients can use the data stored in a document without prior knowledge of the protocol by interacting with the normalized JSON view of the data. Document types are only initially supported in JSON protocol, so it's identical to Aws::Utils::Json::JsonValue and Aws::Utils::Json::JsonView at this moment.

Definition at line 35 of file Document.h.

Constructor & Destructor Documentation

◆ Document() [1/6]

Aws::Utils::Document::Document ( )

Constructs empty Document.

◆ Document() [2/6]

Aws::Utils::Document::Document ( const Aws::String &  value)

Constructs a Document by parsing the input string.

◆ Document() [3/6]

Aws::Utils::Document::Document ( Aws::IStream &  istream)

Constructs a Document by parsing the text in the input stream.

◆ Document() [4/6]

Aws::Utils::Document::Document ( const Document &  value)

Performs a deep copy of the Document parameter. Prefer using a DocumentView if copying is not needed.

◆ Document() [5/6]

Aws::Utils::Document::Document ( Document &&  value)

Moves the ownership of the internal Document. No copying is performed.

◆ Document() [6/6]

Aws::Utils::Document::Document ( const Json::JsonView &  view)

Performs a deep copy of the JsonView parameter.

◆ ~Document()

Aws::Utils::Document::~Document ( )

Member Function Documentation

◆ AsArray() [1/2]

Document & Aws::Utils::Document::AsArray ( Array< Document > &&  array)

Converts the current Document to an array whose values are moved from the array parameter.

◆ AsArray() [2/2]

Document & Aws::Utils::Document::AsArray ( const Array< Document > &  array)

Converts the current Document to an array whose values are deep-copied from the array parameter.

◆ AsBool()

Document & Aws::Utils::Document::AsBool ( bool  value)

Converts the current Document to a bool.

◆ AsDouble()

Document & Aws::Utils::Document::AsDouble ( double  value)

Converts the current Document to a double.

◆ AsInt64()

Document & Aws::Utils::Document::AsInt64 ( long long  value)

Converts the current Document to a 64-bit integer.

◆ AsInteger()

Document & Aws::Utils::Document::AsInteger ( int  value)

Converts the current Document to an integer.

◆ AsObject() [1/2]

Document & Aws::Utils::Document::AsObject ( const Document &  value)

Converts the current Document to a Document object by deep-copying the parameter.

◆ AsObject() [2/2]

Document & Aws::Utils::Document::AsObject ( Document &&  value)

Converts the current Document to a Document object by moving from the parameter.

◆ AsString()

Document & Aws::Utils::Document::AsString ( const Aws::String &  value)

Converts the current Document to a string.

◆ GetErrorMessage()

const Aws::String & Aws::Utils::Document::GetErrorMessage ( ) const
inline

Returns the last error message from a failed parse attempt. Returns empty string if no error.

Definition at line 200 of file Document.h.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::Utils::Document::Jsonize ( ) const

Convert this document to a JsonValue

◆ operator!=()

bool Aws::Utils::Document::operator!= ( const Document &  other) const

◆ operator=() [1/3]

Document & Aws::Utils::Document::operator= ( const Document &  other)

Performs a deep copy of the Document parameter.

◆ operator=() [2/3]

Document & Aws::Utils::Document::operator= ( const Json::JsonView &  view)

Performs a deep copy of the JsonView parameter.

◆ operator=() [3/3]

Document & Aws::Utils::Document::operator= ( Document &&  other)

Moves the ownership of the internal Document of the parameter to the current object. No copying is performed. A Document currently owned by the object will be freed prior to copying.

Warning
This will result in invalidating any outstanding views of the current Document. However, views to the moved-from Document would still valid.

◆ operator==()

bool Aws::Utils::Document::operator== ( const Document &  other) const

◆ View()

DocumentView Aws::Utils::Document::View ( ) const

Creates a view from the current Document.

◆ WasParseSuccessful()

bool Aws::Utils::Document::WasParseSuccessful ( ) const
inline

Returns true if the last parse request was successful. If this returns false, you can call GetErrorMessage() to find the cause.

Definition at line 192 of file Document.h.

◆ WithArray() [1/4]

Document & Aws::Utils::Document::WithArray ( const Aws::String &  key,
Array< Document > &&  array 
)

Adds an array of arbitrary Document objects to the top level of this Document at key. The values in the array parameter will be moved-from.

◆ WithArray() [2/4]

Document & Aws::Utils::Document::WithArray ( const Aws::String &  key,
const Array< Aws::String > &  array 
)

Adds an array of strings to the top level of this Document at key.

◆ WithArray() [3/4]

Document & Aws::Utils::Document::WithArray ( const Aws::String &  key,
const Array< Document > &  array 
)

Adds an array of arbitrary Document objects to the top level of this Document at key. The values in the array parameter will be deep-copied.

◆ WithArray() [4/4]

Document & Aws::Utils::Document::WithArray ( const char *  key,
const Array< Aws::String > &  array 
)

◆ WithBool() [1/2]

Document & Aws::Utils::Document::WithBool ( const Aws::String &  key,
bool  value 
)

Adds a bool value with key to the top level of this Document.

◆ WithBool() [2/2]

Document & Aws::Utils::Document::WithBool ( const char *  key,
bool  value 
)

◆ WithDouble() [1/2]

Document & Aws::Utils::Document::WithDouble ( const Aws::String &  key,
double  value 
)

Adds a double value at key at the top level of this Document.

◆ WithDouble() [2/2]

Document & Aws::Utils::Document::WithDouble ( const char *  key,
double  value 
)

◆ WithInt64() [1/2]

Document & Aws::Utils::Document::WithInt64 ( const Aws::String &  key,
long long  value 
)

Adds a 64-bit integer value at key to the top level of this Document.

◆ WithInt64() [2/2]

Document & Aws::Utils::Document::WithInt64 ( const char *  key,
long long  value 
)

◆ WithInteger() [1/2]

Document & Aws::Utils::Document::WithInteger ( const Aws::String &  key,
int  value 
)

Adds an integer value at key at the top level of this Document.

◆ WithInteger() [2/2]

Document & Aws::Utils::Document::WithInteger ( const char *  key,
int  value 
)

◆ WithObject() [1/4]

Document & Aws::Utils::Document::WithObject ( const Aws::String &  key,
const Document &  value 
)

Adds a Document object to the top level of this Document at key. The object parameter is deep-copied.

◆ WithObject() [2/4]

Document & Aws::Utils::Document::WithObject ( const Aws::String &  key,
Document &&  value 
)

Adds a Document object to the top level of this Document at key.

◆ WithObject() [3/4]

Document & Aws::Utils::Document::WithObject ( const char *  key,
const Document &  value 
)

◆ WithObject() [4/4]

Document & Aws::Utils::Document::WithObject ( const char *  key,
Document &&  value 
)

◆ WithString() [1/2]

Document & Aws::Utils::Document::WithString ( const Aws::String &  key,
const Aws::String &  value 
)

Adds a string to the top level of this Document with key.

◆ WithString() [2/2]

Document & Aws::Utils::Document::WithString ( const char *  key,
const Aws::String &  value 
)

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