azure-core
Loading...
Searching...
No Matches
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 class  ETagComparison { Strong , Weak }
 The comparison type. More...
 

Public Member Functions

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

Static Public Member Functions

static bool Equals (const ETag &left, const ETag &right, const ETagComparison comparisonKind=ETagComparison::Strong)
 Indicates whether two Azure::ETag values are equal.
 
static const ETagAny ()
 Azure::ETag representing everything.
 

Member Enumeration Documentation

◆ ETagComparison

enum class Azure::ETag::ETagComparison
strong

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()

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

◆ Equals()

static bool Azure::ETag::Equals ( const ETag left,
const ETag right,
const ETagComparison  comparisonKind = ETagComparison::Strong 
)
inlinestatic
Parameters
leftAzure::ETag to compare.
rightAzure::ETag to compare.
comparisonKindDetermines what Azure::ETag::ETagComparison to perform, default is Azure::ETag::ETagComparison Strong.
Returns
true if ETag matches; otherwise, false.

◆ 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::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 file: