/** * 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 StorageGateway { namespace Model { /** *

An internal server error has occurred because the service is unavailable. For * more information, see the error and message fields.

See Also:

* AWS * API Reference

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

A human-readable message describing the error that occurred.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

A human-readable message describing the error that occurred.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

A human-readable message describing the error that occurred.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

A human-readable message describing the error that occurred.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

A human-readable message describing the error that occurred.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

A human-readable message describing the error that occurred.

*/ inline ServiceUnavailableError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

A human-readable message describing the error that occurred.

*/ inline ServiceUnavailableError& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

A human-readable message describing the error that occurred.

*/ inline ServiceUnavailableError& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline const StorageGatewayError& GetError() const{ return m_error; } /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; } /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline void SetError(const StorageGatewayError& value) { m_errorHasBeenSet = true; m_error = value; } /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline void SetError(StorageGatewayError&& value) { m_errorHasBeenSet = true; m_error = std::move(value); } /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline ServiceUnavailableError& WithError(const StorageGatewayError& value) { SetError(value); return *this;} /** *

A StorageGatewayError that provides more information about the cause * of the error.

*/ inline ServiceUnavailableError& WithError(StorageGatewayError&& value) { SetError(std::move(value)); return *this;} private: Aws::String m_message; bool m_messageHasBeenSet = false; StorageGatewayError m_error; bool m_errorHasBeenSet = false; }; } // namespace Model } // namespace StorageGateway } // namespace Aws