use AccessCondition provided by Azure::Core (#1775)
This commit is contained in:
parent
3eab83a635
commit
813980da8f
@ -9,6 +9,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <azure/core/match_conditions.hpp>
|
||||
#include <azure/core/modified_conditions.hpp>
|
||||
#include <azure/storage/common/access_conditions.hpp>
|
||||
#include <azure/storage/common/storage_retry_policy.hpp>
|
||||
|
||||
@ -19,7 +21,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for a container.
|
||||
*/
|
||||
struct BlobContainerAccessConditions : public ModifiedTimeConditions, public LeaseAccessConditions
|
||||
struct BlobContainerAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
|
||||
@ -39,8 +42,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for a blob.
|
||||
*/
|
||||
struct BlobAccessConditions : public ModifiedTimeConditions,
|
||||
public ETagAccessConditions,
|
||||
struct BlobAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
public LeaseAccessConditions,
|
||||
public TagAccessConditions
|
||||
{
|
||||
@ -49,8 +52,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies access conditions for blob lease operations.
|
||||
*/
|
||||
struct LeaseBlobAccessConditions : public ModifiedTimeConditions,
|
||||
public ETagAccessConditions,
|
||||
struct LeaseBlobAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
public TagAccessConditions
|
||||
{
|
||||
};
|
||||
@ -804,7 +807,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional conditions that the source must meet to perform this operation.
|
||||
*/
|
||||
struct : public ModifiedTimeConditions, public ETagAccessConditions
|
||||
struct : public Azure::Core::ModifiedConditions, public Azure::Core::MatchConditions
|
||||
{
|
||||
} SourceAccessConditions;
|
||||
};
|
||||
|
||||
@ -12,43 +12,6 @@
|
||||
|
||||
namespace Azure { namespace Storage {
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on modification time value.
|
||||
*/
|
||||
struct ModifiedTimeConditions
|
||||
{
|
||||
/**
|
||||
* @brief Specify this header to perform the operation only if the resource has been
|
||||
* modified since the specified time. This timestamp will be truncated to second.
|
||||
*/
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfModifiedSince;
|
||||
|
||||
/**
|
||||
* @brief Specify this header to perform the operation only if the resource has not been
|
||||
* modified since the specified date/time. This timestamp will be truncated to second.
|
||||
*/
|
||||
Azure::Core::Nullable<Azure::Core::DateTime> IfUnmodifiedSince;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on and ETag value.
|
||||
*/
|
||||
struct ETagAccessConditions
|
||||
{
|
||||
/**
|
||||
* @brief Specify this header to perform the operation only if the resource's ETag
|
||||
* matches the value specified.
|
||||
*/
|
||||
Azure::Core::ETag IfMatch;
|
||||
|
||||
/**
|
||||
* @brief Specify this header to perform the operation only if the resource's ETag does
|
||||
* not match the value specified. Specify Azure::Core::ETag::Any() to perform the operation
|
||||
* only if the resource does not exist, and fail the operation if it does exist.
|
||||
*/
|
||||
Azure::Core::ETag IfNoneMatch;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Specifies HTTP options for conditional requests based on lease.
|
||||
*/
|
||||
|
||||
@ -62,15 +62,16 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
/**
|
||||
* @brief Specifies access conditions for a file system.
|
||||
*/
|
||||
struct FileSystemAccessConditions : public ModifiedTimeConditions, public LeaseAccessConditions
|
||||
struct FileSystemAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Specifies access conditions for a path.
|
||||
*/
|
||||
struct PathAccessConditions : public ModifiedTimeConditions,
|
||||
public ETagAccessConditions,
|
||||
struct PathAccessConditions : public Azure::Core::ModifiedConditions,
|
||||
public Azure::Core::MatchConditions,
|
||||
public LeaseAccessConditions
|
||||
{
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user