InventoryConfiguration.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #pragma once
  17. #include <alibabacloud/oss/Export.h>
  18. #include <alibabacloud/oss/Types.h>
  19. #include <string>
  20. #include <vector>
  21. namespace AlibabaCloud
  22. {
  23. namespace OSS
  24. {
  25. class ALIBABACLOUD_OSS_EXPORT InventoryFilter
  26. {
  27. public:
  28. InventoryFilter();
  29. InventoryFilter(const std::string& prefix);
  30. const std::string& Prefix() const { return prefix_; }
  31. void setPrefix(const std::string& prefix) { prefix_ = prefix; }
  32. private:
  33. std::string prefix_;
  34. };
  35. class ALIBABACLOUD_OSS_EXPORT InventorySSEOSS
  36. {
  37. public:
  38. InventorySSEOSS();
  39. };
  40. class ALIBABACLOUD_OSS_EXPORT InventorySSEKMS
  41. {
  42. public:
  43. InventorySSEKMS();
  44. InventorySSEKMS(const std::string& key);
  45. const std::string& KeyId() const { return keyId_; }
  46. void setKeyId(const std::string& key) { keyId_ = key; }
  47. private:
  48. std::string keyId_;
  49. };
  50. class ALIBABACLOUD_OSS_EXPORT InventoryEncryption
  51. {
  52. public:
  53. InventoryEncryption();
  54. InventoryEncryption(const InventorySSEOSS& value);
  55. InventoryEncryption(const InventorySSEKMS& value);
  56. const InventorySSEOSS& SSEOSS() const { return inventorySSEOSS_; }
  57. void setSSEOSS(const InventorySSEOSS& value) { inventorySSEOSS_ = value; inventorySSEOSIsSet_ = true; }
  58. bool hasSSEOSS() const { return inventorySSEOSIsSet_; }
  59. const InventorySSEKMS& SSEKMS() const { return inventorySSEKMS_; }
  60. void setSSEKMS(const InventorySSEKMS& value) { inventorySSEKMS_ = value; inventorySSEKMSIsSet_ = true; }
  61. bool hasSSEKMS() const { return inventorySSEKMSIsSet_; }
  62. private:
  63. InventorySSEOSS inventorySSEOSS_;
  64. bool inventorySSEOSIsSet_;
  65. InventorySSEKMS inventorySSEKMS_;
  66. bool inventorySSEKMSIsSet_;
  67. };
  68. class ALIBABACLOUD_OSS_EXPORT InventoryOSSBucketDestination
  69. {
  70. public:
  71. InventoryOSSBucketDestination();
  72. InventoryFormat Format() const { return format_; }
  73. const std::string& AccountId() const { return accountId_; }
  74. const std::string& RoleArn() const { return roleArn_; }
  75. const std::string& Bucket() const { return bucket_; }
  76. const std::string& Prefix() const { return prefix_; }
  77. const InventoryEncryption& Encryption() const { return encryption_; }
  78. void setFormat(InventoryFormat format) { format_ = format; }
  79. void setAccountId(const std::string& accountId) { accountId_ = accountId; }
  80. void setRoleArn(const std::string& roleArn) { roleArn_ = roleArn; }
  81. void setBucket(const std::string& bucket) { bucket_ = bucket; }
  82. void setPrefix(const std::string& prefix) { prefix_ = prefix; }
  83. void setEncryption(const InventoryEncryption& encryption) { encryption_ = encryption; }
  84. private:
  85. InventoryFormat format_;
  86. std::string accountId_;
  87. std::string roleArn_;
  88. std::string bucket_;
  89. std::string prefix_;
  90. InventoryEncryption encryption_;
  91. };
  92. class InventoryDestination
  93. {
  94. public:
  95. InventoryDestination() {}
  96. InventoryDestination(const InventoryOSSBucketDestination& destination):InventoryOSSBucketDestination_(destination){}
  97. const InventoryOSSBucketDestination& OSSBucketDestination() const { return InventoryOSSBucketDestination_; }
  98. void setOSSBucketDestination(const InventoryOSSBucketDestination& destination) { InventoryOSSBucketDestination_ = destination; }
  99. private:
  100. InventoryOSSBucketDestination InventoryOSSBucketDestination_;
  101. };
  102. using InventoryOptionalFields = std::vector<InventoryOptionalField>;
  103. class ALIBABACLOUD_OSS_EXPORT InventoryConfiguration
  104. {
  105. public:
  106. InventoryConfiguration();
  107. const std::string& Id() const { return id_; }
  108. bool IsEnabled() const { return isEnabled_; }
  109. const InventoryFilter& Filter() const { return filter_; }
  110. const InventoryDestination& Destination() const { return destination_; }
  111. const InventoryFrequency& Schedule() const { return schedule_; }
  112. const InventoryIncludedObjectVersions& IncludedObjectVersions() const { return includedObjectVersions_; }
  113. const InventoryOptionalFields& OptionalFields() const { return optionalFields_; }
  114. void setId(const std::string& id) { id_ = id; }
  115. void setIsEnabled(bool isEnabled) { isEnabled_ = isEnabled; }
  116. void setFilter(const InventoryFilter& prefix) { filter_ = prefix; }
  117. void setDestination(const InventoryDestination& destination) { destination_ = destination; }
  118. void setSchedule(const InventoryFrequency& schedule) { schedule_ = schedule; }
  119. void setIncludedObjectVersions(const InventoryIncludedObjectVersions& includedObjectVersions) { includedObjectVersions_ = includedObjectVersions; }
  120. void setOptionalFields(const InventoryOptionalFields& opt) { optionalFields_ = opt; }
  121. private:
  122. std::string id_;
  123. bool isEnabled_;
  124. InventoryFilter filter_;
  125. InventoryDestination destination_;
  126. InventoryFrequency schedule_;
  127. InventoryIncludedObjectVersions includedObjectVersions_;
  128. InventoryOptionalFields optionalFields_;
  129. };
  130. using InventoryConfigurationList = std::vector<InventoryConfiguration>;
  131. }
  132. }