azure-core
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Azure::ETag Class Referencefinal

Represents an HTTP validator.

#include <etag.hpp>

Public Types

enum  ETagComparison { Strong, Weak }
 The comparison type. More...
 

Public Member Functions

 ETag ()=default
 Constructs an empty (null) ETag. More...
 
 ETag (std::string etag)
 Constructs an ETag with string representation. More...
 
bool HasValue () const
 Whether ETag is present. More...
 
const std::string & ToString () const
 Returns the resource metadata represented as a string. More...
 
bool operator== (const ETag &other) const
 Compare with other ETag for equality. More...
 
bool operator!= (const ETag &other) const
 Compare with other ETag for inequality. More...
 
bool IsWeak () const
 Specifies whether the #Azure::Core::ETag is strong or weak. More...
 

Static Public Member Functions

static bool Equals (const ETag &left, const ETag &right, const ETagComparison comparisonKind=ETagComparison::Strong)
 
static const ETagAny ()
 #Azure::Core::ETag representing everything. More...
 

Member Enumeration Documentation

◆ ETagComparison

Constructor & Destructor Documentation

◆ ETag() [1/2]

Azure::ETag::ETag ( )
default

◆ ETag() [2/2]

Azure::ETag::ETag ( std::string  etag)
inlineexplicit
Parameters
etagThe string value representation.

Member Function Documentation

◆ Any()

const ETag & ETag::Any ( )
static
Note
The any #Azure::Core::ETag is *, (unquoted). It is NOT the same as "*".

◆ HasValue()

bool Azure::ETag::HasValue ( ) const
inline
Returns
true if ETag has a value; otherwise, false.

◆ IsWeak()

bool Azure::ETag::IsWeak ( ) const
inline
Returns
true if #Azure::Core::ETag is a weak validator; otherwise, false.

◆ operator!=()

bool Azure::ETag::operator!= ( const ETag other) const
inline
Parameters
otherOther ETag to compare with.
Returns
true if ETag instances are not equal according to strong validation; otherwise, false.

◆ operator==()

bool Azure::ETag::operator== ( const ETag other) const
inline
Parameters
otherOther ETag to compare with.
Returns
true if ETag instances are equal according to strong validation; otherwise, false.

◆ ToString()

const std::string& Azure::ETag::ToString ( ) const
inline
Returns
#std::string

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