Move Azure::MatchConditions and Azure::ModifiedConditions (#1810)
Move `Azure::MatchConditions` and `Azure::ModifiedConditions` (#1810)
This commit is contained in:
parent
90cd888a63
commit
e4b5b806d0
@ -9,7 +9,7 @@
|
||||
### Breaking Changes
|
||||
|
||||
- Removed `Azure::Core::Http::HttpPipeline` by making it internal, used only within the SDK.
|
||||
- Split `Azure::Core::RequestConditions` into `Azure::Core::MatchConditions` and `Azure::Core::ModifiedConditions`.
|
||||
- Split `Azure::Core::RequestConditions` into `Azure::MatchConditions` and `Azure::ModifiedConditions`.
|
||||
- Removed `TransportKind` enum from `Azure::Core::Http`.
|
||||
- Added `Azure::Core::Operation<T>::GetRawResponse().`
|
||||
- Renamed `NoRevoke` to `EnableCertificateRevocationListCheck` for `Azure::Core::Http::CurlTransportSSLOptions`.
|
||||
|
||||
@ -12,22 +12,22 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Azure { namespace Core {
|
||||
namespace Azure {
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests.
|
||||
*/
|
||||
struct MatchConditions
|
||||
{
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that match the value specified.
|
||||
*/
|
||||
ETag IfMatch;
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests.
|
||||
* @brief Optionally limit requests to resources that do not match the value specified. Specify
|
||||
* ETag::Any() to limit requests to resources that do not exist.
|
||||
*/
|
||||
struct MatchConditions
|
||||
{
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that match the value specified.
|
||||
*/
|
||||
Azure::ETag IfMatch;
|
||||
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that do not match the value specified. Specify
|
||||
* Azure::ETag::Any() to limit requests to resources that do not exist.
|
||||
*/
|
||||
Azure::ETag IfNoneMatch;
|
||||
};
|
||||
}} // namespace Azure::Core
|
||||
ETag IfNoneMatch;
|
||||
};
|
||||
} // namespace Azure
|
||||
|
||||
@ -13,22 +13,22 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Azure { namespace Core {
|
||||
namespace Azure {
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on modification time.
|
||||
*/
|
||||
struct ModifiedConditions
|
||||
{
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that have only been modified since this point
|
||||
* in time.
|
||||
*/
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfModifiedSince;
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on modification time.
|
||||
* @brief Optionally limit requests to resources that have remained unmodified.
|
||||
*/
|
||||
struct ModifiedConditions
|
||||
{
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that have only been modified since this point
|
||||
* in time.
|
||||
*/
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfModifiedSince;
|
||||
|
||||
/**
|
||||
* @brief Optionally limit requests to resources that have remained unmodified.
|
||||
*/
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfUnmodifiedSince;
|
||||
};
|
||||
}} // namespace Azure::Core
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfUnmodifiedSince;
|
||||
};
|
||||
} // namespace Azure
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
using namespace Azure::Core;
|
||||
using namespace Azure;
|
||||
|
||||
TEST(ModifiedConditions, Basic)
|
||||
{
|
||||
|
||||
@ -38,8 +38,8 @@ TEST(SimplifiedHeader, core)
|
||||
EXPECT_NO_THROW(Azure::Core::Http::RawResponse r(
|
||||
1, 1, Azure::Core::Http::HttpStatusCode::Accepted, "phrase"));
|
||||
EXPECT_NO_THROW(Azure::Core::Logger::Listener ll = nullptr);
|
||||
EXPECT_NO_THROW(Azure::Core::MatchConditions mc);
|
||||
EXPECT_NO_THROW(Azure::Core::ModifiedConditions mc);
|
||||
EXPECT_NO_THROW(Azure::MatchConditions mc);
|
||||
EXPECT_NO_THROW(Azure::ModifiedConditions mc);
|
||||
EXPECT_NO_THROW(Azure::Core::Nullable<int> n);
|
||||
EXPECT_NO_THROW(Azure::Core::Uuid::CreateUuid());
|
||||
EXPECT_NO_THROW(Azure::Core::RequestFailedException("foo"));
|
||||
|
||||
@ -21,7 +21,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for a container.
|
||||
*/
|
||||
struct BlobContainerAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
struct BlobContainerAccessConditions : public Azure::ModifiedConditions,
|
||||
public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
@ -42,8 +42,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for a blob.
|
||||
*/
|
||||
struct BlobAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
struct BlobAccessConditions : public Azure::ModifiedConditions,
|
||||
public Azure::MatchConditions,
|
||||
public LeaseAccessConditions,
|
||||
public TagAccessConditions
|
||||
{
|
||||
@ -52,8 +52,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for blob lease operations.
|
||||
*/
|
||||
struct LeaseBlobAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
struct LeaseBlobAccessConditions : public Azure::ModifiedConditions,
|
||||
public Azure::MatchConditions,
|
||||
public TagAccessConditions
|
||||
{
|
||||
};
|
||||
@ -789,7 +789,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional conditions that the source must meet to perform this operation.
|
||||
*/
|
||||
struct : public Azure::Core::ModifiedConditions, public Azure::Core::MatchConditions
|
||||
struct : public Azure::ModifiedConditions, public Azure::MatchConditions
|
||||
{
|
||||
} SourceAccessConditions;
|
||||
};
|
||||
|
||||
@ -44,16 +44,15 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
/**
|
||||
* @brief Specifies access conditions for a file system.
|
||||
*/
|
||||
struct FileSystemAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public LeaseAccessConditions
|
||||
struct FileSystemAccessConditions : public Azure::ModifiedConditions, public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Specifies access conditions for a path.
|
||||
*/
|
||||
struct PathAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
struct PathAccessConditions : public Azure::ModifiedConditions,
|
||||
public Azure::MatchConditions,
|
||||
public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
|
||||
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user