azure-core
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Azure::Core::PagedResponse< T > Class Template Reference

The base type and behavior for a paged response. More...

#include <paged_response.hpp>

Public Member Functions

virtual ~PagedResponse ()=default
 Destructs PagedResponse. More...
 
bool HasPage () const
 Checks if a page exists. More...
 
void MoveToNextPage (const Azure::Core::Context &context=Azure::Core::Context())
 Moves to the next page of the response. More...
 

Public Attributes

std::string CurrentPageToken
 The token used to fetch the current page. More...
 
Azure::Nullable< std::string > NextPageToken
 The token for getting the next page. More...
 
std::unique_ptr< Azure::Core::Http::RawResponseRawResponse
 The HTTP response returned by the service. More...
 

Protected Member Functions

 PagedResponse ()=default
 Constructs a default instance of PagedResponse. More...
 
 PagedResponse (PagedResponse &&)=default
 Constructs PagedResponse by moving in another instance. More...
 
PagedResponseoperator= (PagedResponse &&)=default
 Assigns another instance of PagedResponse by moving it in. More...
 

Detailed Description

template<class T>
class Azure::Core::PagedResponse< T >

Remarks
The template is used for static-inheritance.
T classes must implement the way to get and move to the next page.
Template Parameters
TA class type for static-inheritance.

Constructor & Destructor Documentation

◆ PagedResponse() [1/2]

template<class T >
Azure::Core::PagedResponse< T >::PagedResponse ( )
protecteddefault

◆ PagedResponse() [2/2]

template<class T >
Azure::Core::PagedResponse< T >::PagedResponse ( PagedResponse< T > &&  )
protecteddefault

◆ ~PagedResponse()

template<class T >
virtual Azure::Core::PagedResponse< T >::~PagedResponse ( )
virtualdefault

Member Function Documentation

◆ HasPage()

template<class T >
bool Azure::Core::PagedResponse< T >::HasPage ( ) const
inline
Note
Returns false after the last page.
Returns
true if there are additional pages; otherwise, false.

◆ MoveToNextPage()

template<class T >
void Azure::Core::PagedResponse< T >::MoveToNextPage ( const Azure::Core::Context context = Azure::Core::Context())
inline
Note
Calling this method on the last page will set HasPage() to false.
Parameters
contextA context to control the request lifetime.

◆ operator=()

template<class T >
PagedResponse& Azure::Core::PagedResponse< T >::operator= ( PagedResponse< T > &&  )
protecteddefault

Member Data Documentation

◆ CurrentPageToken

template<class T >
std::string Azure::Core::PagedResponse< T >::CurrentPageToken

◆ NextPageToken

template<class T >
Azure::Nullable<std::string> Azure::Core::PagedResponse< T >::NextPageToken
Note
If there are no more pages, this field becomes an empty string.
Assumes all services will include NextPageToken in the payload, it is set to either null or empty for the last page or to a value used for getting the next page.

◆ RawResponse

template<class T >
std::unique_ptr<Azure::Core::Http::RawResponse> Azure::Core::PagedResponse< T >::RawResponse

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