missing line for single docs (#2264)
* missing line for single docs * format
This commit is contained in:
parent
743399eca4
commit
f4febae12c
@ -26,17 +26,17 @@ Some operations take a long time to complete and require polling for their statu
|
||||
|
||||
You can intermittently poll whether the operation has finished by using the `Poll()` method on the returned `Operation<T>` and track progress of the operation using `Value()`. Alternatively, if you just want to wait until the operation completes, you can use `PollUntilDone()`.
|
||||
|
||||
```C++
|
||||
```{.cpp}
|
||||
SomeServiceClient client;
|
||||
|
||||
auto operation = *client.StartSomeLongRunningOperation();
|
||||
|
||||
while (!operation.IsDone())
|
||||
{
|
||||
{
|
||||
std::unique_ptr<Http::RawResponse> response = operation.Poll();
|
||||
|
||||
auto partialResult = operation.Value();
|
||||
|
||||
|
||||
// Your per-polling custom logic goes here, such as logging progress.
|
||||
|
||||
// You can also try to abort the operation if it doesn't complete in time.
|
||||
@ -50,11 +50,12 @@ auto finalResult = operation.Value();
|
||||
|
||||
### HTTP Transport adapter
|
||||
|
||||
Out of the box, the Azure SDK for C++ supports the libcurl and WinHTTP libraries as HTTP stacks for communicating with Azure services over the network. The SDK also provides a mechanism for `customer-implemented` *HTTP transport adapter*. [You can learn more about the transport adapter in this doc](https://github.com/Azure/azure-sdk-for-cpp/blob/master/doc/HttpTransportAdapter.md#http-transport-adapter).
|
||||
Out of the box, the Azure SDK for C++ supports the libcurl and WinHTTP libraries as HTTP stacks for communicating with Azure services over the network. The SDK also provides a mechanism for `customer-implemented` _HTTP transport adapter_. [You can learn more about the transport adapter in this doc](https://github.com/Azure/azure-sdk-for-cpp/blob/master/doc/HttpTransportAdapter.md#http-transport-adapter).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Three main ways of troubleshooting failures are:
|
||||
|
||||
- Inspecting exceptions
|
||||
- Enabling logging (`Available in future release`)
|
||||
- Distributed tracing (`Available in future release`)
|
||||
@ -64,9 +65,10 @@ Three main ways of troubleshooting failures are:
|
||||
Explore and install available Azure SDK libraries.
|
||||
|
||||
## Contributing
|
||||
|
||||
For details on contributing to this repository, see the [contributing guide][azure_sdk_for_cpp_contributing].
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.microsoft.com.
|
||||
|
||||
@ -78,16 +80,17 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
### Additional Helpful Links for Contributors
|
||||
### Additional Helpful Links for Contributors
|
||||
|
||||
Many people all over the world have helped make this project better. You'll want to check out:
|
||||
Many people all over the world have helped make this project better. You'll want to check out:
|
||||
|
||||
* [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22)
|
||||
* [How to build and test your change][azure_sdk_for_cpp_contributing_developer_guide]
|
||||
* [How you can make a change happen!][azure_sdk_for_cpp_contributing_pull_requests]
|
||||
* Frequently Asked Questions (FAQ) and Conceptual Topics in the detailed [Azure SDK for C++ wiki](https://github.com/azure/azure-sdk-for-cpp/wiki).
|
||||
- [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22)
|
||||
- [How to build and test your change][azure_sdk_for_cpp_contributing_developer_guide]
|
||||
- [How you can make a change happen!][azure_sdk_for_cpp_contributing_pull_requests]
|
||||
- Frequently Asked Questions (FAQ) and Conceptual Topics in the detailed [Azure SDK for C++ wiki](https://github.com/azure/azure-sdk-for-cpp/wiki).
|
||||
|
||||
<!-- ### Community-->
|
||||
|
||||
### Reporting security issues and security bugs
|
||||
|
||||
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <secure@microsoft.com>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue).
|
||||
@ -97,6 +100,7 @@ Security issues and bugs should be reported privately, via email, to the Microso
|
||||
Azure SDK for C++ is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-cpp/blob/master/sdk/core/azure-core/LICENSE) license.
|
||||
|
||||
<!-- LINKS -->
|
||||
|
||||
[azure_sdk_for_cpp_contributing]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md
|
||||
[azure_sdk_for_cpp_contributing_developer_guide]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#developer-guide
|
||||
[azure_sdk_for_cpp_contributing_pull_requests]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests
|
||||
|
||||
@ -25,6 +25,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief A type alias of `std::set<std::string>` with case-insensitive element comparison.
|
||||
*
|
||||
*/
|
||||
using CaseInsensitiveSet
|
||||
= std::set<std::string, _internal::StringExtensions::CaseInsensitiveComparator>;
|
||||
|
||||
@ -39,11 +39,13 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief A context is a node within a tree that represents deadlines and key/value pairs.
|
||||
*
|
||||
*/
|
||||
class Context final {
|
||||
public:
|
||||
/**
|
||||
* @brief A context key.
|
||||
*
|
||||
*/
|
||||
class Key final {
|
||||
Key const* m_uniqueAddress;
|
||||
@ -114,11 +116,13 @@ namespace Azure { namespace Core {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new context with no deadline, and no value associated.
|
||||
*
|
||||
*/
|
||||
Context() : m_contextSharedState(std::make_shared<ContextSharedState>()) {}
|
||||
|
||||
/**
|
||||
* @brief Copy constructor.
|
||||
*
|
||||
*/
|
||||
Context& operator=(const Context&) = default;
|
||||
|
||||
@ -188,6 +192,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Cancels the context.
|
||||
*
|
||||
*/
|
||||
void Cancel()
|
||||
{
|
||||
@ -203,6 +208,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Throw an exception if the context was cancelled.
|
||||
*
|
||||
*/
|
||||
void ThrowIfCancelled() const
|
||||
{
|
||||
@ -214,6 +220,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief The application context (root).
|
||||
*
|
||||
*/
|
||||
static AZ_CORE_DLLEXPORT Context ApplicationContext;
|
||||
};
|
||||
|
||||
@ -22,33 +22,39 @@ namespace Azure { namespace Core { namespace Credentials {
|
||||
|
||||
/**
|
||||
* @brief Represents an access token.
|
||||
*
|
||||
*/
|
||||
struct AccessToken final
|
||||
{
|
||||
/**
|
||||
* @brief Token string.
|
||||
*
|
||||
*/
|
||||
std::string Token;
|
||||
|
||||
/**
|
||||
* @brief Token expiration.
|
||||
*
|
||||
*/
|
||||
DateTime ExpiresOn;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Defines context for getting token.
|
||||
*
|
||||
*/
|
||||
struct TokenRequestContext final
|
||||
{
|
||||
/**
|
||||
* @brief Authentication scopes.
|
||||
*
|
||||
*/
|
||||
std::vector<std::string> Scopes;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Token credential.
|
||||
*
|
||||
*/
|
||||
class TokenCredential {
|
||||
public:
|
||||
@ -76,6 +82,7 @@ namespace Azure { namespace Core { namespace Credentials {
|
||||
|
||||
/**
|
||||
* @brief An exception that gets thrown when authentication error occurs.
|
||||
*
|
||||
*/
|
||||
class AuthenticationException final : public std::exception {
|
||||
std::string m_message;
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
namespace Azure { namespace Core { namespace Credentials {
|
||||
/**
|
||||
* @brief Defines options for #Azure::Core::Credentials::TokenCredential.
|
||||
*
|
||||
*/
|
||||
struct TokenCredentialOptions : public Azure::Core::_internal::ClientOptions
|
||||
{
|
||||
|
||||
@ -46,6 +46,7 @@ namespace Azure { namespace Core { namespace Cryptography {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a default instance of #Azure::Core::Cryptography::Hash.
|
||||
*
|
||||
*/
|
||||
Hash() = default;
|
||||
|
||||
@ -107,6 +108,7 @@ namespace Azure { namespace Core { namespace Cryptography {
|
||||
|
||||
/**
|
||||
* @brief Cleanup any state when destroying the instance of #Azure::Core::Cryptography::Hash.
|
||||
*
|
||||
*/
|
||||
virtual ~Hash() = default;
|
||||
|
||||
@ -127,11 +129,13 @@ namespace Azure { namespace Core { namespace Cryptography {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a default instance of #Azure::Core::Cryptography::Md5Hash.
|
||||
*
|
||||
*/
|
||||
Md5Hash();
|
||||
|
||||
/**
|
||||
* @brief Cleanup any state when destroying the instance of #Azure::Core::Cryptography::Md5Hash.
|
||||
*
|
||||
*/
|
||||
~Md5Hash() override;
|
||||
|
||||
|
||||
@ -115,6 +115,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Construct an instance of #Azure::DateTime from base class.
|
||||
*
|
||||
*/
|
||||
constexpr DateTime(time_point const& timePoint) : time_point(timePoint) {}
|
||||
|
||||
@ -139,6 +140,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Defines the format applied to the fraction part of any #Azure::DateTime.
|
||||
*
|
||||
*/
|
||||
enum class TimeFractionFormat
|
||||
{
|
||||
@ -155,6 +157,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Defines the supported date and time string formats.
|
||||
*
|
||||
*/
|
||||
enum class DateFormat
|
||||
{
|
||||
|
||||
@ -15,11 +15,13 @@
|
||||
namespace Azure { namespace Core { namespace Diagnostics {
|
||||
/**
|
||||
* @brief Log message handler.
|
||||
*
|
||||
*/
|
||||
class Logger final {
|
||||
public:
|
||||
/**
|
||||
* @brief Log message level.
|
||||
*
|
||||
*/
|
||||
// https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/LogLevel.java
|
||||
enum class Level : int
|
||||
|
||||
@ -17,6 +17,7 @@ namespace Azure {
|
||||
|
||||
/**
|
||||
* @brief Represents an HTTP validator.
|
||||
*
|
||||
*/
|
||||
class ETag final {
|
||||
// ETag is a validator based on https://tools.ietf.org/html/rfc7232#section-2.3.2
|
||||
@ -26,6 +27,7 @@ private:
|
||||
public:
|
||||
/**
|
||||
* @brief The comparison type.
|
||||
*
|
||||
*/
|
||||
enum class ETagComparison
|
||||
{
|
||||
@ -117,6 +119,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Construct an empty (null) #Azure::Core::ETag.
|
||||
*
|
||||
*/
|
||||
ETag() = default;
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
/********************* Exceptions **********************/
|
||||
/**
|
||||
* @brief HTTP transport layer error.
|
||||
*
|
||||
*/
|
||||
class TransportException final : public Azure::Core::RequestFailedException {
|
||||
public:
|
||||
@ -91,6 +92,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* HTTP request method.
|
||||
*
|
||||
*/
|
||||
class HttpMethod final {
|
||||
public:
|
||||
@ -117,6 +119,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief HTTP request.
|
||||
*
|
||||
*/
|
||||
class Request final {
|
||||
friend class Azure::Core::Http::Policies::_internal::RetryPolicy;
|
||||
@ -227,16 +230,19 @@ namespace Azure { namespace Core { namespace Http {
|
||||
// Methods used by transport layer (and logger) to send request
|
||||
/**
|
||||
* @brief Get HTTP method.
|
||||
*
|
||||
*/
|
||||
HttpMethod GetMethod() const;
|
||||
|
||||
/**
|
||||
* @brief Get HTTP headers.
|
||||
*
|
||||
*/
|
||||
CaseInsensitiveMap GetHeaders() const;
|
||||
|
||||
/**
|
||||
* @brief Get HTTP body as #Azure::Core::IO::BodyStream.
|
||||
*
|
||||
*/
|
||||
Azure::Core::IO::BodyStream* GetBodyStream() { return this->m_bodyStream; }
|
||||
|
||||
@ -248,11 +254,13 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Get URL.
|
||||
*
|
||||
*/
|
||||
Url& GetUrl() { return this->m_url; }
|
||||
|
||||
/**
|
||||
* @brief Get URL.
|
||||
*
|
||||
*/
|
||||
Url const& GetUrl() const { return this->m_url; }
|
||||
};
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
namespace Azure { namespace Core { namespace Http {
|
||||
/**
|
||||
* @brief Defines the possible HTTP status codes.
|
||||
*
|
||||
*/
|
||||
enum class HttpStatusCode
|
||||
{
|
||||
|
||||
@ -51,26 +51,31 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
|
||||
/**
|
||||
* @brief Retry options.
|
||||
*
|
||||
*/
|
||||
struct RetryOptions final
|
||||
{
|
||||
/**
|
||||
* @brief Maximum number of attempts to retry.
|
||||
*
|
||||
*/
|
||||
int32_t MaxRetries = 3;
|
||||
|
||||
/**
|
||||
* @brief Mimimum amount of time between retry attempts.
|
||||
*
|
||||
*/
|
||||
std::chrono::milliseconds RetryDelay = std::chrono::seconds(4);
|
||||
|
||||
/**
|
||||
* @brief Mimimum amount of time between retry attempts.
|
||||
*
|
||||
*/
|
||||
decltype(RetryDelay) MaxRetryDelay = std::chrono::minutes(2);
|
||||
|
||||
/**
|
||||
* @brief HTTP status codes to retry on.
|
||||
*
|
||||
*/
|
||||
std::set<HttpStatusCode> StatusCodes{
|
||||
HttpStatusCode::RequestTimeout,
|
||||
@ -83,16 +88,19 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
|
||||
/**
|
||||
* @brief Log options.
|
||||
*
|
||||
*/
|
||||
struct LogOptions final
|
||||
{
|
||||
/**
|
||||
* @brief HTTP query parameters that are allowed to be logged.
|
||||
*
|
||||
*/
|
||||
std::set<std::string> AllowedHttpQueryParameters;
|
||||
|
||||
/**
|
||||
* @brief HTTP headers that are allowed to be logged.
|
||||
*
|
||||
*/
|
||||
Azure::Core::CaseInsensitiveSet AllowedHttpHeaders = _detail::g_defaultAllowedHttpHeaders;
|
||||
};
|
||||
@ -231,6 +239,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
|
||||
/**
|
||||
* @brief HTTP retry policy.
|
||||
*
|
||||
*/
|
||||
class RetryPolicy
|
||||
#if !defined(TESTING_BUILD)
|
||||
@ -299,6 +308,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructs HTTP request ID policy.
|
||||
*
|
||||
*/
|
||||
explicit RequestIdPolicy() {}
|
||||
|
||||
@ -364,6 +374,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
|
||||
/**
|
||||
* @brief Bearer Token authentication policy.
|
||||
*
|
||||
*/
|
||||
class BearerTokenAuthenticationPolicy final : public HttpPolicy {
|
||||
private:
|
||||
@ -415,6 +426,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructs HTTP logging policy.
|
||||
*
|
||||
*/
|
||||
explicit LogPolicy(LogOptions options) : m_options(std::move(options)) {}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
namespace Azure { namespace Core { namespace Http {
|
||||
/**
|
||||
* @brief Raw HTTP response.
|
||||
*
|
||||
*/
|
||||
class RawResponse final {
|
||||
|
||||
@ -112,21 +113,25 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Get HTTP status code of the HTTP response.
|
||||
*
|
||||
*/
|
||||
HttpStatusCode GetStatusCode() const;
|
||||
|
||||
/**
|
||||
* @brief Get HTTP reason phrase code of the HTTP response.
|
||||
*
|
||||
*/
|
||||
std::string const& GetReasonPhrase() const;
|
||||
|
||||
/**
|
||||
* @brief Get HTTP response headers.
|
||||
*
|
||||
*/
|
||||
CaseInsensitiveMap const& GetHeaders() const;
|
||||
|
||||
/**
|
||||
* @brief Get HTTP response body as #Azure::Core::IO::BodyStream.
|
||||
*
|
||||
*/
|
||||
std::unique_ptr<Azure::Core::IO::BodyStream> ExtractBodyStream()
|
||||
{
|
||||
@ -136,11 +141,13 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Get HTTP response body as vector of bytes.
|
||||
*
|
||||
*/
|
||||
std::vector<uint8_t>& GetBody() { return this->m_body; }
|
||||
|
||||
/**
|
||||
* @brief Get HTTP response body as vector of bytes.
|
||||
*
|
||||
*/
|
||||
std::vector<uint8_t> const& GetBody() const { return this->m_body; }
|
||||
};
|
||||
|
||||
@ -15,6 +15,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Base class for all HTTP transport implementations.
|
||||
*
|
||||
*/
|
||||
class HttpTransport {
|
||||
public:
|
||||
|
||||
@ -87,16 +87,19 @@ namespace Azure { namespace Core { namespace _internal {
|
||||
|
||||
/**
|
||||
* @brief Specify the number of retries and other retry-related options.
|
||||
*
|
||||
*/
|
||||
Azure::Core::Http::Policies::RetryOptions Retry;
|
||||
|
||||
/**
|
||||
* @brief Customized HTTP client. We're going to use the default one if this is empty.
|
||||
*
|
||||
*/
|
||||
Azure::Core::Http::Policies::TransportOptions Transport;
|
||||
|
||||
/**
|
||||
* @brief Telemetry options.
|
||||
*
|
||||
*/
|
||||
Azure::Core::Http::Policies::TelemetryOptions Telemetry;
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ namespace Azure { namespace Core { namespace IO { namespace _internal {
|
||||
|
||||
/**
|
||||
* @brief Gets a singleton instance of a #Azure::Core::IO::_internal::NullBodyStream.
|
||||
*
|
||||
*/
|
||||
static NullBodyStream* GetNullBodyStream()
|
||||
{
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
namespace Azure { namespace Core { namespace IO {
|
||||
|
||||
/**
|
||||
*@brief Used to read data to/from a service.
|
||||
* @brief Used to read data to/from a service.
|
||||
*
|
||||
*/
|
||||
class BodyStream {
|
||||
private:
|
||||
@ -113,6 +114,7 @@ namespace Azure { namespace Core { namespace IO {
|
||||
|
||||
/**
|
||||
* @brief #Azure::Core::IO::BodyStream providing data from an initialized memory buffer.
|
||||
*
|
||||
*/
|
||||
class MemoryBodyStream final : public BodyStream {
|
||||
private:
|
||||
|
||||
@ -16,6 +16,7 @@ namespace Azure {
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests.
|
||||
*
|
||||
*/
|
||||
struct MatchConditions
|
||||
{
|
||||
@ -23,6 +24,7 @@ struct MatchConditions
|
||||
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that match the value specified.
|
||||
*
|
||||
*/
|
||||
ETag IfMatch;
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ namespace Azure {
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on modification time.
|
||||
*
|
||||
*/
|
||||
struct ModifiedConditions
|
||||
{
|
||||
@ -34,6 +35,7 @@ struct ModifiedConditions
|
||||
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that have remained unmodified.
|
||||
*
|
||||
*/
|
||||
Azure::Nullable<Azure::DateTime> IfUnmodifiedSince;
|
||||
};
|
||||
|
||||
@ -39,6 +39,7 @@ template <class T> class Nullable final {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a #Azure::Nullable that represents the absence of value.
|
||||
*
|
||||
*/
|
||||
constexpr Nullable() : m_disengaged{}, m_hasValue(false) {}
|
||||
|
||||
@ -74,6 +75,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Destroy the contained value, if there is one.
|
||||
*
|
||||
*/
|
||||
~Nullable()
|
||||
{
|
||||
@ -85,6 +87,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Destroy any contained value, if there is one.
|
||||
*
|
||||
*/
|
||||
void Reset() noexcept /* enforces termination */
|
||||
{
|
||||
@ -218,6 +221,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Get the contained value.
|
||||
*
|
||||
*/
|
||||
const T& Value() const& noexcept
|
||||
{
|
||||
@ -228,6 +232,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Get the contained value reference.
|
||||
*
|
||||
*/
|
||||
T& Value() & noexcept
|
||||
{
|
||||
@ -238,6 +243,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Get the contained value (as rvalue reference).
|
||||
*
|
||||
*/
|
||||
T&& Value() && noexcept
|
||||
{
|
||||
@ -250,6 +256,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief `operator bool` on the condition of #Azure::Nullable::HasValue.
|
||||
*
|
||||
*/
|
||||
constexpr explicit operator bool() const noexcept { return HasValue(); }
|
||||
|
||||
|
||||
@ -105,6 +105,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Returns the current #Azure::Core::OperationStatus of the long-running operation.
|
||||
*
|
||||
*/
|
||||
OperationStatus Status() const noexcept { return m_status; }
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Long-running operation states.
|
||||
*
|
||||
*/
|
||||
class OperationStatus final {
|
||||
std::string m_value;
|
||||
@ -68,27 +69,33 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief The `std::string` representation of the operation status.
|
||||
*
|
||||
*/
|
||||
const std::string& Get() const noexcept { return m_value; }
|
||||
|
||||
/**
|
||||
* @brief The #Azure::Core::Operation is Not Started.
|
||||
*
|
||||
*/
|
||||
AZ_CORE_DLLEXPORT static const OperationStatus NotStarted;
|
||||
/**
|
||||
* @brief The #Azure::Core::Operation is Running.
|
||||
*
|
||||
*/
|
||||
AZ_CORE_DLLEXPORT static const OperationStatus Running;
|
||||
/**
|
||||
* @brief The #Azure::Core::Operation Succeeded.
|
||||
*
|
||||
*/
|
||||
AZ_CORE_DLLEXPORT static const OperationStatus Succeeded;
|
||||
/**
|
||||
* @brief The #Azure::Core::Operation was Cancelled.
|
||||
*
|
||||
*/
|
||||
AZ_CORE_DLLEXPORT static const OperationStatus Cancelled;
|
||||
/**
|
||||
* @brief The #Azure::Core::Operation Failed.
|
||||
*
|
||||
*/
|
||||
AZ_CORE_DLLEXPORT static const OperationStatus Failed;
|
||||
};
|
||||
|
||||
@ -189,6 +189,7 @@ namespace Azure { namespace Core {
|
||||
/************** API to read values from Url ***************/
|
||||
/**
|
||||
* @brief Get URL host.
|
||||
*
|
||||
*/
|
||||
const std::string& GetHost() const { return m_host; }
|
||||
|
||||
@ -224,6 +225,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Get the URL scheme.
|
||||
*
|
||||
*/
|
||||
const std::string& GetScheme() const { return m_scheme; };
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
namespace Azure { namespace Core {
|
||||
/**
|
||||
* @brief Universally unique identifier.
|
||||
*
|
||||
*/
|
||||
class Uuid final {
|
||||
|
||||
@ -76,6 +77,7 @@ namespace Azure { namespace Core {
|
||||
|
||||
/**
|
||||
* @brief Create a new random UUID.
|
||||
*
|
||||
*/
|
||||
static Uuid CreateUuid()
|
||||
{
|
||||
|
||||
@ -64,11 +64,13 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Update last usage time for the connection.
|
||||
*
|
||||
*/
|
||||
virtual void UpdateLastUsageTime() = 0;
|
||||
|
||||
/**
|
||||
* @brief Checks whether this CURL connection is expired.
|
||||
*
|
||||
*/
|
||||
virtual bool IsExpired() = 0;
|
||||
|
||||
@ -105,6 +107,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief CURL HTTP connection.
|
||||
*
|
||||
*/
|
||||
class CurlConnection final : public CurlNetworkConnection {
|
||||
private:
|
||||
@ -152,6 +155,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Update last usage time for the connection.
|
||||
*
|
||||
*/
|
||||
void UpdateLastUsageTime() override
|
||||
{
|
||||
|
||||
@ -24,6 +24,7 @@ namespace Azure { namespace Core { namespace _internal {
|
||||
|
||||
/**
|
||||
* @brief HkeyHolder ensures native handle resource is released.
|
||||
*
|
||||
*/
|
||||
class HkeyHolder final {
|
||||
private:
|
||||
|
||||
@ -64,11 +64,13 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Update last usage time for the connection.
|
||||
*
|
||||
*/
|
||||
virtual void UpdateLastUsageTime() = 0;
|
||||
|
||||
/**
|
||||
* @brief Checks whether this CURL connection is expired.
|
||||
*
|
||||
*/
|
||||
virtual bool IsExpired() = 0;
|
||||
|
||||
@ -105,6 +107,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief CURL HTTP connection.
|
||||
*
|
||||
*/
|
||||
class CurlConnection final : public CurlNetworkConnection {
|
||||
private:
|
||||
@ -152,6 +155,7 @@ namespace Azure { namespace Core { namespace Http {
|
||||
|
||||
/**
|
||||
* @brief Update last usage time for the connection.
|
||||
*
|
||||
*/
|
||||
void UpdateLastUsageTime() override
|
||||
{
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
namespace Azure { namespace Core { namespace _detail {
|
||||
/**
|
||||
* @brief Provides version information.
|
||||
*
|
||||
*/
|
||||
class PackageVersion final {
|
||||
public:
|
||||
|
||||
@ -24,6 +24,7 @@ namespace Azure { namespace Identity {
|
||||
|
||||
/**
|
||||
* @brief Defines options for token authentication.
|
||||
*
|
||||
*/
|
||||
struct ClientSecretCredentialOptions final
|
||||
: public Azure::Core::Credentials::TokenCredentialOptions
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
namespace Azure { namespace Identity {
|
||||
/**
|
||||
* @brief An environment credential.
|
||||
*
|
||||
*/
|
||||
class EnvironmentCredential final : public Core::Credentials::TokenCredential {
|
||||
std::unique_ptr<TokenCredential> m_credentialImpl;
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
namespace Azure { namespace Identity { namespace _detail {
|
||||
/**
|
||||
* @brief Provides version information.
|
||||
*
|
||||
*/
|
||||
class PackageVersion final {
|
||||
public:
|
||||
|
||||
@ -17,6 +17,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal
|
||||
|
||||
/**
|
||||
* @brief Provides conversion methods for base64url.
|
||||
*
|
||||
*/
|
||||
struct Base64Url final
|
||||
{
|
||||
|
||||
@ -25,6 +25,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal
|
||||
|
||||
/**
|
||||
* @brief The HTTP pipeline used by KeyVault clients.
|
||||
*
|
||||
*/
|
||||
class KeyVaultPipeline final {
|
||||
Azure::Core::Url m_vaultUrl;
|
||||
|
||||
@ -16,6 +16,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal
|
||||
|
||||
/**
|
||||
* @brief Provides convertion methods for unix time to Azure Core Datetime.
|
||||
*
|
||||
*/
|
||||
class UnixTimeConverter final {
|
||||
public:
|
||||
|
||||
@ -25,11 +25,13 @@ namespace Azure { namespace Security { namespace KeyVault {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a default instance of #SHA256.
|
||||
*
|
||||
*/
|
||||
SHA256();
|
||||
|
||||
/**
|
||||
* @brief Cleanup any state when destroying the instance of #SHA256.
|
||||
*
|
||||
*/
|
||||
~SHA256(){};
|
||||
|
||||
@ -75,11 +77,13 @@ namespace Azure { namespace Security { namespace KeyVault {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a default instance of #SHA384.
|
||||
*
|
||||
*/
|
||||
SHA384();
|
||||
|
||||
/**
|
||||
* @brief Cleanup any state when destroying the instance of #SHA384.
|
||||
*
|
||||
*/
|
||||
~SHA384(){};
|
||||
|
||||
@ -125,11 +129,13 @@ namespace Azure { namespace Security { namespace KeyVault {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a default instance of #SHA512.
|
||||
*
|
||||
*/
|
||||
SHA512();
|
||||
|
||||
/**
|
||||
* @brief Cleanup any state when destroying the instance of #SHA512.
|
||||
*
|
||||
*/
|
||||
~SHA512(){};
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
namespace Azure { namespace Security { namespace KeyVault { namespace Common { namespace _detail {
|
||||
/**
|
||||
* @brief Provides version information.
|
||||
*
|
||||
*/
|
||||
class PackageVersion final {
|
||||
public:
|
||||
|
||||
@ -42,6 +42,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
{
|
||||
/**
|
||||
* @brief Specify the key version to get.
|
||||
*
|
||||
*/
|
||||
std::string Version;
|
||||
};
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
namespace Azure { namespace Security { namespace KeyVault { namespace Keys { namespace _detail {
|
||||
/**
|
||||
* @brief Provides version information.
|
||||
*
|
||||
*/
|
||||
class PackageVersion final {
|
||||
public:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user