-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed04eb6
commit 2db6407
Showing
10 changed files
with
375 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.101 | ||
3.1.102 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
kvs/include/huaweicloud/kvs/v1/model/Returned_segment_item.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
|
||
#ifndef HUAWEICLOUD_SDK_KVS_V1_MODEL_Returned_segment_item_H_ | ||
#define HUAWEICLOUD_SDK_KVS_V1_MODEL_Returned_segment_item_H_ | ||
|
||
#include <huaweicloud/core/bson/Defines.h> | ||
#include <huaweicloud/core/bson/Builder.h> | ||
#include <huaweicloud/core/bson/Viewer.h> | ||
|
||
#include <huaweicloud/kvs/v1/KvsExport.h> | ||
|
||
#include <huaweicloud/core/utils/ModelBase.h> | ||
#include <huaweicloud/core/utils/Utils.h> | ||
#include <huaweicloud/core/http/HttpResponse.h> | ||
|
||
#include <huaweicloud/core/bson/Bson.h> | ||
|
||
namespace HuaweiCloud { | ||
namespace Sdk { | ||
namespace Kvs { | ||
namespace V1 { | ||
namespace Model { | ||
|
||
using namespace HuaweiCloud::Sdk::Core::Utils; | ||
using namespace HuaweiCloud::Sdk::Core::Http; | ||
/// <summary> | ||
/// 采样段的起始终止主键对。 | ||
/// </summary> | ||
class HUAWEICLOUD_KVS_V1_EXPORT Returned_segment_item | ||
: public ModelBase | ||
{ | ||
public: | ||
Returned_segment_item(); | ||
virtual ~Returned_segment_item(); | ||
|
||
///////////////////////////////////////////// | ||
/// ModelBase overrides | ||
|
||
void validate() override; | ||
bool fromBson(const Viewer &viewer) override; | ||
bool toBson(Builder &builder) const override; | ||
///////////////////////////////////////////// | ||
/// Returned_segment_item members | ||
|
||
/// <summary> | ||
/// 采样段区间起始值。 | ||
/// </summary> | ||
|
||
Document getSegmentMinKey() const; | ||
bool segmentMinKeyIsSet() const; | ||
void unsetsegmentMinKey(); | ||
void setSegmentMinKey(const Document& value); | ||
|
||
/// <summary> | ||
/// 采样段区间终止值。 | ||
/// </summary> | ||
|
||
Document getSegmentMaxKey() const; | ||
bool segmentMaxKeyIsSet() const; | ||
void unsetsegmentMaxKey(); | ||
void setSegmentMaxKey(const Document& value); | ||
|
||
|
||
protected: | ||
Document segmentMinKey_; | ||
bool segmentMinKeyIsSet_; | ||
Document segmentMaxKey_; | ||
bool segmentMaxKeyIsSet_; | ||
|
||
}; | ||
|
||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
#endif // HUAWEICLOUD_SDK_KVS_V1_MODEL_Returned_segment_item_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
|
||
|
||
#include "huaweicloud/kvs/v1/model/Returned_segment_item.h" | ||
#include <huaweicloud/core/utils/Utils.h> | ||
namespace HuaweiCloud { | ||
namespace Sdk { | ||
namespace Kvs { | ||
namespace V1 { | ||
namespace Model { | ||
|
||
|
||
|
||
|
||
Returned_segment_item::Returned_segment_item() | ||
{ | ||
segmentMinKeyIsSet_ = false; | ||
segmentMaxKeyIsSet_ = false; | ||
} | ||
|
||
Returned_segment_item::~Returned_segment_item() = default; | ||
|
||
void Returned_segment_item::validate() | ||
{ | ||
} | ||
|
||
bool Returned_segment_item::toBson(Builder &builder) const | ||
{ | ||
|
||
if (segmentMinKeyIsSet_ && !bson_append(builder, "segment_min_key", segmentMinKey_)) { | ||
return false; | ||
} | ||
if (segmentMaxKeyIsSet_ && !bson_append(builder, "segment_max_key", segmentMaxKey_)) { | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
bool Returned_segment_item::fromBson(const Viewer &viewer) | ||
{ | ||
|
||
Viewer::Iterator it = viewer.begin(); | ||
while (it != viewer.end()) { | ||
const std::string &key = it->key(); | ||
|
||
if (key == "segment_min_key") { | ||
if (!bson_get(it, segmentMinKey_)) { | ||
return false; | ||
} | ||
segmentMinKeyIsSet_ = true; | ||
++it; | ||
continue; | ||
} | ||
|
||
if (key == "segment_max_key") { | ||
if (!bson_get(it, segmentMaxKey_)) { | ||
return false; | ||
} | ||
segmentMaxKeyIsSet_ = true; | ||
++it; | ||
continue; | ||
} | ||
|
||
++it; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
Document Returned_segment_item::getSegmentMinKey() const | ||
{ | ||
return segmentMinKey_; | ||
} | ||
|
||
void Returned_segment_item::setSegmentMinKey(const Document& value) | ||
{ | ||
segmentMinKey_ = value; | ||
segmentMinKeyIsSet_ = true; | ||
} | ||
|
||
bool Returned_segment_item::segmentMinKeyIsSet() const | ||
{ | ||
return segmentMinKeyIsSet_; | ||
} | ||
|
||
void Returned_segment_item::unsetsegmentMinKey() | ||
{ | ||
segmentMinKeyIsSet_ = false; | ||
} | ||
|
||
Document Returned_segment_item::getSegmentMaxKey() const | ||
{ | ||
return segmentMaxKey_; | ||
} | ||
|
||
void Returned_segment_item::setSegmentMaxKey(const Document& value) | ||
{ | ||
segmentMaxKey_ = value; | ||
segmentMaxKeyIsSet_ = true; | ||
} | ||
|
||
bool Returned_segment_item::segmentMaxKeyIsSet() const | ||
{ | ||
return segmentMaxKeyIsSet_; | ||
} | ||
|
||
void Returned_segment_item::unsetsegmentMaxKey() | ||
{ | ||
segmentMaxKeyIsSet_ = false; | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.