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 18 #include <alibabacloud/oss/Export.h> 19 #include <alibabacloud/oss/Types.h> 20 #include <string> 21 #include <vector> 22 namespace AlibabaCloud 23 { 24 namespace OSS 25 { 26 class ALIBABACLOUD_OSS_EXPORT InventoryFilter 27 { 28 public: 29 InventoryFilter(); 30 InventoryFilter(const std::string& prefix); Prefix()31 const std::string& Prefix() const { return prefix_; } setPrefix(const std::string & prefix)32 void setPrefix(const std::string& prefix) { prefix_ = prefix; } 33 private: 34 std::string prefix_; 35 }; 36 37 class ALIBABACLOUD_OSS_EXPORT InventorySSEOSS 38 { 39 public: 40 InventorySSEOSS(); 41 }; 42 43 class ALIBABACLOUD_OSS_EXPORT InventorySSEKMS 44 { 45 public: 46 InventorySSEKMS(); 47 InventorySSEKMS(const std::string& key); KeyId()48 const std::string& KeyId() const { return keyId_; } setKeyId(const std::string & key)49 void setKeyId(const std::string& key) { keyId_ = key; } 50 private: 51 std::string keyId_; 52 }; 53 54 class ALIBABACLOUD_OSS_EXPORT InventoryEncryption 55 { 56 public: 57 InventoryEncryption(); 58 InventoryEncryption(const InventorySSEOSS& value); 59 InventoryEncryption(const InventorySSEKMS& value); 60 SSEOSS()61 const InventorySSEOSS& SSEOSS() const { return inventorySSEOSS_; } setSSEOSS(const InventorySSEOSS & value)62 void setSSEOSS(const InventorySSEOSS& value) { inventorySSEOSS_ = value; inventorySSEOSIsSet_ = true; } hasSSEOSS()63 bool hasSSEOSS() const { return inventorySSEOSIsSet_; } 64 SSEKMS()65 const InventorySSEKMS& SSEKMS() const { return inventorySSEKMS_; } setSSEKMS(const InventorySSEKMS & value)66 void setSSEKMS(const InventorySSEKMS& value) { inventorySSEKMS_ = value; inventorySSEKMSIsSet_ = true; } hasSSEKMS()67 bool hasSSEKMS() const { return inventorySSEKMSIsSet_; } 68 69 private: 70 InventorySSEOSS inventorySSEOSS_; 71 bool inventorySSEOSIsSet_; 72 73 InventorySSEKMS inventorySSEKMS_; 74 bool inventorySSEKMSIsSet_; 75 }; 76 77 class ALIBABACLOUD_OSS_EXPORT InventoryOSSBucketDestination 78 { 79 public: 80 InventoryOSSBucketDestination(); Format()81 InventoryFormat Format() const { return format_; } AccountId()82 const std::string& AccountId() const { return accountId_; } RoleArn()83 const std::string& RoleArn() const { return roleArn_; } Bucket()84 const std::string& Bucket() const { return bucket_; } Prefix()85 const std::string& Prefix() const { return prefix_; } Encryption()86 const InventoryEncryption& Encryption() const { return encryption_; } 87 setFormat(InventoryFormat format)88 void setFormat(InventoryFormat format) { format_ = format; } setAccountId(const std::string & accountId)89 void setAccountId(const std::string& accountId) { accountId_ = accountId; } setRoleArn(const std::string & roleArn)90 void setRoleArn(const std::string& roleArn) { roleArn_ = roleArn; } setBucket(const std::string & bucket)91 void setBucket(const std::string& bucket) { bucket_ = bucket; } setPrefix(const std::string & prefix)92 void setPrefix(const std::string& prefix) { prefix_ = prefix; } setEncryption(const InventoryEncryption & encryption)93 void setEncryption(const InventoryEncryption& encryption) { encryption_ = encryption; } 94 95 private: 96 InventoryFormat format_; 97 std::string accountId_; 98 std::string roleArn_; 99 std::string bucket_; 100 std::string prefix_; 101 InventoryEncryption encryption_; 102 }; 103 104 class InventoryDestination 105 { 106 public: InventoryDestination()107 InventoryDestination() {} InventoryDestination(const InventoryOSSBucketDestination & destination)108 InventoryDestination(const InventoryOSSBucketDestination& destination):InventoryOSSBucketDestination_(destination){} OSSBucketDestination()109 const InventoryOSSBucketDestination& OSSBucketDestination() const { return InventoryOSSBucketDestination_; } setOSSBucketDestination(const InventoryOSSBucketDestination & destination)110 void setOSSBucketDestination(const InventoryOSSBucketDestination& destination) { InventoryOSSBucketDestination_ = destination; } 111 private: 112 InventoryOSSBucketDestination InventoryOSSBucketDestination_; 113 }; 114 115 using InventoryOptionalFields = std::vector<InventoryOptionalField>; 116 117 class ALIBABACLOUD_OSS_EXPORT InventoryConfiguration 118 { 119 public: 120 InventoryConfiguration(); Id()121 const std::string& Id() const { return id_; } IsEnabled()122 bool IsEnabled() const { return isEnabled_; } Filter()123 const InventoryFilter& Filter() const { return filter_; } Destination()124 const InventoryDestination& Destination() const { return destination_; } Schedule()125 const InventoryFrequency& Schedule() const { return schedule_; } IncludedObjectVersions()126 const InventoryIncludedObjectVersions& IncludedObjectVersions() const { return includedObjectVersions_; } OptionalFields()127 const InventoryOptionalFields& OptionalFields() const { return optionalFields_; } 128 setId(const std::string & id)129 void setId(const std::string& id) { id_ = id; } setIsEnabled(bool isEnabled)130 void setIsEnabled(bool isEnabled) { isEnabled_ = isEnabled; } setFilter(const InventoryFilter & prefix)131 void setFilter(const InventoryFilter& prefix) { filter_ = prefix; } setDestination(const InventoryDestination & destination)132 void setDestination(const InventoryDestination& destination) { destination_ = destination; } setSchedule(const InventoryFrequency & schedule)133 void setSchedule(const InventoryFrequency& schedule) { schedule_ = schedule; } setIncludedObjectVersions(const InventoryIncludedObjectVersions & includedObjectVersions)134 void setIncludedObjectVersions(const InventoryIncludedObjectVersions& includedObjectVersions) { includedObjectVersions_ = includedObjectVersions; } setOptionalFields(const InventoryOptionalFields & opt)135 void setOptionalFields(const InventoryOptionalFields& opt) { optionalFields_ = opt; } 136 137 private: 138 std::string id_; 139 bool isEnabled_; 140 InventoryFilter filter_; 141 InventoryDestination destination_; 142 InventoryFrequency schedule_; 143 InventoryIncludedObjectVersions includedObjectVersions_; 144 InventoryOptionalFields optionalFields_; 145 }; 146 147 using InventoryConfigurationList = std::vector<InventoryConfiguration>; 148 } 149 } 150