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

Describes a resource error.

See Also:

AWS * API Reference

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

The error code.

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

The error code.

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

The error code.

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

The error code.

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

The error code.

*/ inline ResourceError& WithErrorCode(const FleetErrorCode& value) { SetErrorCode(value); return *this;} /** *

The error code.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

*/ inline ResourceError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} /** *

The time the error occurred.

*/ inline const Aws::Utils::DateTime& GetErrorTimestamp() const{ return m_errorTimestamp; } /** *

The time the error occurred.

*/ inline bool ErrorTimestampHasBeenSet() const { return m_errorTimestampHasBeenSet; } /** *

The time the error occurred.

*/ inline void SetErrorTimestamp(const Aws::Utils::DateTime& value) { m_errorTimestampHasBeenSet = true; m_errorTimestamp = value; } /** *

The time the error occurred.

*/ inline void SetErrorTimestamp(Aws::Utils::DateTime&& value) { m_errorTimestampHasBeenSet = true; m_errorTimestamp = std::move(value); } /** *

The time the error occurred.

*/ inline ResourceError& WithErrorTimestamp(const Aws::Utils::DateTime& value) { SetErrorTimestamp(value); return *this;} /** *

The time the error occurred.

*/ inline ResourceError& WithErrorTimestamp(Aws::Utils::DateTime&& value) { SetErrorTimestamp(std::move(value)); return *this;} private: FleetErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; Aws::Utils::DateTime m_errorTimestamp; bool m_errorTimestampHasBeenSet = false; }; } // namespace Model } // namespace AppStream } // namespace Aws