/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeArtifact { namespace Model { /** *

l An error associated with package.

See Also:

AWS * API Reference

*/ class PackageVersionError { public: AWS_CODEARTIFACT_API PackageVersionError(); AWS_CODEARTIFACT_API PackageVersionError(Aws::Utils::Json::JsonView jsonValue); AWS_CODEARTIFACT_API PackageVersionError& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEARTIFACT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline const PackageVersionErrorCode& GetErrorCode() const{ return m_errorCode; } /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; } /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline void SetErrorCode(const PackageVersionErrorCode& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; } /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline void SetErrorCode(PackageVersionErrorCode&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); } /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline PackageVersionError& WithErrorCode(const PackageVersionErrorCode& value) { SetErrorCode(value); return *this;} /** *

The error code associated with the error. Valid error codes are:

    *
  • ALREADY_EXISTS

  • * MISMATCHED_REVISION

  • * MISMATCHED_STATUS

  • NOT_ALLOWED

    *
  • NOT_FOUND

  • SKIPPED *

*/ inline PackageVersionError& WithErrorCode(PackageVersionErrorCode&& value) { SetErrorCode(std::move(value)); return *this;} /** *

The error message associated with the error.

*/ inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; } /** *

The error message associated with the error.

*/ inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; } /** *

The error message associated with the error.

*/ inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; } /** *

The error message associated with the error.

*/ inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); } /** *

The error message associated with the error.

*/ inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); } /** *

The error message associated with the error.

*/ inline PackageVersionError& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;} /** *

The error message associated with the error.

*/ inline PackageVersionError& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;} /** *

The error message associated with the error.

*/ inline PackageVersionError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: PackageVersionErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace CodeArtifact } // namespace Aws