1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ecr/ECR_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/DateTime.h> 11 #include <aws/ecr/model/LifecyclePolicyRuleAction.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace ECR 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>The result of the lifecycle policy preview.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewResult">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_ECR_API LifecyclePolicyPreviewResult 35 { 36 public: 37 LifecyclePolicyPreviewResult(); 38 LifecyclePolicyPreviewResult(Aws::Utils::Json::JsonView jsonValue); 39 LifecyclePolicyPreviewResult& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The list of tags associated with this image.</p> 45 */ GetImageTags()46 inline const Aws::Vector<Aws::String>& GetImageTags() const{ return m_imageTags; } 47 48 /** 49 * <p>The list of tags associated with this image.</p> 50 */ ImageTagsHasBeenSet()51 inline bool ImageTagsHasBeenSet() const { return m_imageTagsHasBeenSet; } 52 53 /** 54 * <p>The list of tags associated with this image.</p> 55 */ SetImageTags(const Aws::Vector<Aws::String> & value)56 inline void SetImageTags(const Aws::Vector<Aws::String>& value) { m_imageTagsHasBeenSet = true; m_imageTags = value; } 57 58 /** 59 * <p>The list of tags associated with this image.</p> 60 */ SetImageTags(Aws::Vector<Aws::String> && value)61 inline void SetImageTags(Aws::Vector<Aws::String>&& value) { m_imageTagsHasBeenSet = true; m_imageTags = std::move(value); } 62 63 /** 64 * <p>The list of tags associated with this image.</p> 65 */ WithImageTags(const Aws::Vector<Aws::String> & value)66 inline LifecyclePolicyPreviewResult& WithImageTags(const Aws::Vector<Aws::String>& value) { SetImageTags(value); return *this;} 67 68 /** 69 * <p>The list of tags associated with this image.</p> 70 */ WithImageTags(Aws::Vector<Aws::String> && value)71 inline LifecyclePolicyPreviewResult& WithImageTags(Aws::Vector<Aws::String>&& value) { SetImageTags(std::move(value)); return *this;} 72 73 /** 74 * <p>The list of tags associated with this image.</p> 75 */ AddImageTags(const Aws::String & value)76 inline LifecyclePolicyPreviewResult& AddImageTags(const Aws::String& value) { m_imageTagsHasBeenSet = true; m_imageTags.push_back(value); return *this; } 77 78 /** 79 * <p>The list of tags associated with this image.</p> 80 */ AddImageTags(Aws::String && value)81 inline LifecyclePolicyPreviewResult& AddImageTags(Aws::String&& value) { m_imageTagsHasBeenSet = true; m_imageTags.push_back(std::move(value)); return *this; } 82 83 /** 84 * <p>The list of tags associated with this image.</p> 85 */ AddImageTags(const char * value)86 inline LifecyclePolicyPreviewResult& AddImageTags(const char* value) { m_imageTagsHasBeenSet = true; m_imageTags.push_back(value); return *this; } 87 88 89 /** 90 * <p>The <code>sha256</code> digest of the image manifest.</p> 91 */ GetImageDigest()92 inline const Aws::String& GetImageDigest() const{ return m_imageDigest; } 93 94 /** 95 * <p>The <code>sha256</code> digest of the image manifest.</p> 96 */ ImageDigestHasBeenSet()97 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; } 98 99 /** 100 * <p>The <code>sha256</code> digest of the image manifest.</p> 101 */ SetImageDigest(const Aws::String & value)102 inline void SetImageDigest(const Aws::String& value) { m_imageDigestHasBeenSet = true; m_imageDigest = value; } 103 104 /** 105 * <p>The <code>sha256</code> digest of the image manifest.</p> 106 */ SetImageDigest(Aws::String && value)107 inline void SetImageDigest(Aws::String&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::move(value); } 108 109 /** 110 * <p>The <code>sha256</code> digest of the image manifest.</p> 111 */ SetImageDigest(const char * value)112 inline void SetImageDigest(const char* value) { m_imageDigestHasBeenSet = true; m_imageDigest.assign(value); } 113 114 /** 115 * <p>The <code>sha256</code> digest of the image manifest.</p> 116 */ WithImageDigest(const Aws::String & value)117 inline LifecyclePolicyPreviewResult& WithImageDigest(const Aws::String& value) { SetImageDigest(value); return *this;} 118 119 /** 120 * <p>The <code>sha256</code> digest of the image manifest.</p> 121 */ WithImageDigest(Aws::String && value)122 inline LifecyclePolicyPreviewResult& WithImageDigest(Aws::String&& value) { SetImageDigest(std::move(value)); return *this;} 123 124 /** 125 * <p>The <code>sha256</code> digest of the image manifest.</p> 126 */ WithImageDigest(const char * value)127 inline LifecyclePolicyPreviewResult& WithImageDigest(const char* value) { SetImageDigest(value); return *this;} 128 129 130 /** 131 * <p>The date and time, expressed in standard JavaScript date format, at which the 132 * current image was pushed to the repository.</p> 133 */ GetImagePushedAt()134 inline const Aws::Utils::DateTime& GetImagePushedAt() const{ return m_imagePushedAt; } 135 136 /** 137 * <p>The date and time, expressed in standard JavaScript date format, at which the 138 * current image was pushed to the repository.</p> 139 */ ImagePushedAtHasBeenSet()140 inline bool ImagePushedAtHasBeenSet() const { return m_imagePushedAtHasBeenSet; } 141 142 /** 143 * <p>The date and time, expressed in standard JavaScript date format, at which the 144 * current image was pushed to the repository.</p> 145 */ SetImagePushedAt(const Aws::Utils::DateTime & value)146 inline void SetImagePushedAt(const Aws::Utils::DateTime& value) { m_imagePushedAtHasBeenSet = true; m_imagePushedAt = value; } 147 148 /** 149 * <p>The date and time, expressed in standard JavaScript date format, at which the 150 * current image was pushed to the repository.</p> 151 */ SetImagePushedAt(Aws::Utils::DateTime && value)152 inline void SetImagePushedAt(Aws::Utils::DateTime&& value) { m_imagePushedAtHasBeenSet = true; m_imagePushedAt = std::move(value); } 153 154 /** 155 * <p>The date and time, expressed in standard JavaScript date format, at which the 156 * current image was pushed to the repository.</p> 157 */ WithImagePushedAt(const Aws::Utils::DateTime & value)158 inline LifecyclePolicyPreviewResult& WithImagePushedAt(const Aws::Utils::DateTime& value) { SetImagePushedAt(value); return *this;} 159 160 /** 161 * <p>The date and time, expressed in standard JavaScript date format, at which the 162 * current image was pushed to the repository.</p> 163 */ WithImagePushedAt(Aws::Utils::DateTime && value)164 inline LifecyclePolicyPreviewResult& WithImagePushedAt(Aws::Utils::DateTime&& value) { SetImagePushedAt(std::move(value)); return *this;} 165 166 167 /** 168 * <p>The type of action to be taken.</p> 169 */ GetAction()170 inline const LifecyclePolicyRuleAction& GetAction() const{ return m_action; } 171 172 /** 173 * <p>The type of action to be taken.</p> 174 */ ActionHasBeenSet()175 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } 176 177 /** 178 * <p>The type of action to be taken.</p> 179 */ SetAction(const LifecyclePolicyRuleAction & value)180 inline void SetAction(const LifecyclePolicyRuleAction& value) { m_actionHasBeenSet = true; m_action = value; } 181 182 /** 183 * <p>The type of action to be taken.</p> 184 */ SetAction(LifecyclePolicyRuleAction && value)185 inline void SetAction(LifecyclePolicyRuleAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } 186 187 /** 188 * <p>The type of action to be taken.</p> 189 */ WithAction(const LifecyclePolicyRuleAction & value)190 inline LifecyclePolicyPreviewResult& WithAction(const LifecyclePolicyRuleAction& value) { SetAction(value); return *this;} 191 192 /** 193 * <p>The type of action to be taken.</p> 194 */ WithAction(LifecyclePolicyRuleAction && value)195 inline LifecyclePolicyPreviewResult& WithAction(LifecyclePolicyRuleAction&& value) { SetAction(std::move(value)); return *this;} 196 197 198 /** 199 * <p>The priority of the applied rule.</p> 200 */ GetAppliedRulePriority()201 inline int GetAppliedRulePriority() const{ return m_appliedRulePriority; } 202 203 /** 204 * <p>The priority of the applied rule.</p> 205 */ AppliedRulePriorityHasBeenSet()206 inline bool AppliedRulePriorityHasBeenSet() const { return m_appliedRulePriorityHasBeenSet; } 207 208 /** 209 * <p>The priority of the applied rule.</p> 210 */ SetAppliedRulePriority(int value)211 inline void SetAppliedRulePriority(int value) { m_appliedRulePriorityHasBeenSet = true; m_appliedRulePriority = value; } 212 213 /** 214 * <p>The priority of the applied rule.</p> 215 */ WithAppliedRulePriority(int value)216 inline LifecyclePolicyPreviewResult& WithAppliedRulePriority(int value) { SetAppliedRulePriority(value); return *this;} 217 218 private: 219 220 Aws::Vector<Aws::String> m_imageTags; 221 bool m_imageTagsHasBeenSet; 222 223 Aws::String m_imageDigest; 224 bool m_imageDigestHasBeenSet; 225 226 Aws::Utils::DateTime m_imagePushedAt; 227 bool m_imagePushedAtHasBeenSet; 228 229 LifecyclePolicyRuleAction m_action; 230 bool m_actionHasBeenSet; 231 232 int m_appliedRulePriority; 233 bool m_appliedRulePriorityHasBeenSet; 234 }; 235 236 } // namespace Model 237 } // namespace ECR 238 } // namespace Aws 239