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/codeartifact/CodeArtifact_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/codeartifact/model/PackageVersionStatus.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace CodeArtifact 23 { 24 namespace Model 25 { 26 27 /** 28 * <p> Details about a package version, including its status, version, and 29 * revision. The <a 30 * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html">ListPackageVersions</a> 31 * operation returns a list of <code>PackageVersionSummary</code> objects. 32 * </p><p><h3>See Also:</h3> <a 33 * href="http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/PackageVersionSummary">AWS 34 * API Reference</a></p> 35 */ 36 class AWS_CODEARTIFACT_API PackageVersionSummary 37 { 38 public: 39 PackageVersionSummary(); 40 PackageVersionSummary(Aws::Utils::Json::JsonView jsonValue); 41 PackageVersionSummary& operator=(Aws::Utils::Json::JsonView jsonValue); 42 Aws::Utils::Json::JsonValue Jsonize() const; 43 44 45 /** 46 * <p> Information about a package version. </p> 47 */ GetVersion()48 inline const Aws::String& GetVersion() const{ return m_version; } 49 50 /** 51 * <p> Information about a package version. </p> 52 */ VersionHasBeenSet()53 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } 54 55 /** 56 * <p> Information about a package version. </p> 57 */ SetVersion(const Aws::String & value)58 inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } 59 60 /** 61 * <p> Information about a package version. </p> 62 */ SetVersion(Aws::String && value)63 inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } 64 65 /** 66 * <p> Information about a package version. </p> 67 */ SetVersion(const char * value)68 inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } 69 70 /** 71 * <p> Information about a package version. </p> 72 */ WithVersion(const Aws::String & value)73 inline PackageVersionSummary& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} 74 75 /** 76 * <p> Information about a package version. </p> 77 */ WithVersion(Aws::String && value)78 inline PackageVersionSummary& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} 79 80 /** 81 * <p> Information about a package version. </p> 82 */ WithVersion(const char * value)83 inline PackageVersionSummary& WithVersion(const char* value) { SetVersion(value); return *this;} 84 85 86 /** 87 * <p> The revision associated with a package version. </p> 88 */ GetRevision()89 inline const Aws::String& GetRevision() const{ return m_revision; } 90 91 /** 92 * <p> The revision associated with a package version. </p> 93 */ RevisionHasBeenSet()94 inline bool RevisionHasBeenSet() const { return m_revisionHasBeenSet; } 95 96 /** 97 * <p> The revision associated with a package version. </p> 98 */ SetRevision(const Aws::String & value)99 inline void SetRevision(const Aws::String& value) { m_revisionHasBeenSet = true; m_revision = value; } 100 101 /** 102 * <p> The revision associated with a package version. </p> 103 */ SetRevision(Aws::String && value)104 inline void SetRevision(Aws::String&& value) { m_revisionHasBeenSet = true; m_revision = std::move(value); } 105 106 /** 107 * <p> The revision associated with a package version. </p> 108 */ SetRevision(const char * value)109 inline void SetRevision(const char* value) { m_revisionHasBeenSet = true; m_revision.assign(value); } 110 111 /** 112 * <p> The revision associated with a package version. </p> 113 */ WithRevision(const Aws::String & value)114 inline PackageVersionSummary& WithRevision(const Aws::String& value) { SetRevision(value); return *this;} 115 116 /** 117 * <p> The revision associated with a package version. </p> 118 */ WithRevision(Aws::String && value)119 inline PackageVersionSummary& WithRevision(Aws::String&& value) { SetRevision(std::move(value)); return *this;} 120 121 /** 122 * <p> The revision associated with a package version. </p> 123 */ WithRevision(const char * value)124 inline PackageVersionSummary& WithRevision(const char* value) { SetRevision(value); return *this;} 125 126 127 /** 128 * <p> A string that contains the status of the package version. It can be one of 129 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 130 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 131 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 132 * </li> </ul> 133 */ GetStatus()134 inline const PackageVersionStatus& GetStatus() const{ return m_status; } 135 136 /** 137 * <p> A string that contains the status of the package version. It can be one of 138 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 139 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 140 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 141 * </li> </ul> 142 */ StatusHasBeenSet()143 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 144 145 /** 146 * <p> A string that contains the status of the package version. It can be one of 147 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 148 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 149 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 150 * </li> </ul> 151 */ SetStatus(const PackageVersionStatus & value)152 inline void SetStatus(const PackageVersionStatus& value) { m_statusHasBeenSet = true; m_status = value; } 153 154 /** 155 * <p> A string that contains the status of the package version. It can be one of 156 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 157 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 158 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 159 * </li> </ul> 160 */ SetStatus(PackageVersionStatus && value)161 inline void SetStatus(PackageVersionStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 162 163 /** 164 * <p> A string that contains the status of the package version. It can be one of 165 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 166 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 167 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 168 * </li> </ul> 169 */ WithStatus(const PackageVersionStatus & value)170 inline PackageVersionSummary& WithStatus(const PackageVersionStatus& value) { SetStatus(value); return *this;} 171 172 /** 173 * <p> A string that contains the status of the package version. It can be one of 174 * the following: </p> <ul> <li> <p> <code>Published</code> </p> </li> <li> <p> 175 * <code>Unfinished</code> </p> </li> <li> <p> <code>Unlisted</code> </p> </li> 176 * <li> <p> <code>Archived</code> </p> </li> <li> <p> <code>Disposed</code> </p> 177 * </li> </ul> 178 */ WithStatus(PackageVersionStatus && value)179 inline PackageVersionSummary& WithStatus(PackageVersionStatus&& value) { SetStatus(std::move(value)); return *this;} 180 181 private: 182 183 Aws::String m_version; 184 bool m_versionHasBeenSet; 185 186 Aws::String m_revision; 187 bool m_revisionHasBeenSet; 188 189 PackageVersionStatus m_status; 190 bool m_statusHasBeenSet; 191 }; 192 193 } // namespace Model 194 } // namespace CodeArtifact 195 } // namespace Aws 196