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

Error associated with a resource returned for a Get or List resource * response.

See Also:

AWS * API Reference

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

The Amazon Web Services account ID of the resource owner.

*/ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** *

The Amazon Web Services account ID of the resource owner.

*/ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** *

The Amazon Web Services account ID of the resource owner.

*/ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** *

The Amazon Web Services account ID of the resource owner.

*/ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** *

The Amazon Web Services account ID of the resource owner.

*/ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** *

The Amazon Web Services account ID of the resource owner.

*/ inline ErrorResponse& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** *

The Amazon Web Services account ID of the resource owner.

*/ inline ErrorResponse& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID of the resource owner.

*/ inline ErrorResponse& WithAccountId(const char* value) { SetAccountId(value); return *this;} /** *

Additional details about the error.

*/ inline const Aws::Map& GetAdditionalDetails() const{ return m_additionalDetails; } /** *

Additional details about the error.

*/ inline bool AdditionalDetailsHasBeenSet() const { return m_additionalDetailsHasBeenSet; } /** *

Additional details about the error.

*/ inline void SetAdditionalDetails(const Aws::Map& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails = value; } /** *

Additional details about the error.

*/ inline void SetAdditionalDetails(Aws::Map&& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails = std::move(value); } /** *

Additional details about the error.

*/ inline ErrorResponse& WithAdditionalDetails(const Aws::Map& value) { SetAdditionalDetails(value); return *this;} /** *

Additional details about the error.

*/ inline ErrorResponse& WithAdditionalDetails(Aws::Map&& value) { SetAdditionalDetails(std::move(value)); return *this;} /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(const Aws::String& key, const Aws::String& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(key, value); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(Aws::String&& key, const Aws::String& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(std::move(key), value); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(const Aws::String& key, Aws::String&& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(key, std::move(value)); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(Aws::String&& key, Aws::String&& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(std::move(key), std::move(value)); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(const char* key, Aws::String&& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(key, std::move(value)); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(Aws::String&& key, const char* value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(std::move(key), value); return *this; } /** *

Additional details about the error.

*/ inline ErrorResponse& AddAdditionalDetails(const char* key, const char* value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails.emplace(key, value); return *this; } /** *

The error code associated with the error.

*/ inline const ErrorCode& GetCode() const{ return m_code; } /** *

The error code associated with the error.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The error code associated with the error.

*/ inline void SetCode(const ErrorCode& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The error code associated with the error.

*/ inline void SetCode(ErrorCode&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The error code associated with the error.

*/ inline ErrorResponse& WithCode(const ErrorCode& value) { SetCode(value); return *this;} /** *

The error code associated with the error.

*/ inline ErrorResponse& WithCode(ErrorCode&& value) { SetCode(std::move(value)); return *this;} /** *

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The message associated with the error.

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

The ID of the resource.

*/ inline const Aws::String& GetResourceIdentifier() const{ return m_resourceIdentifier; } /** *

The ID of the resource.

*/ inline bool ResourceIdentifierHasBeenSet() const { return m_resourceIdentifierHasBeenSet; } /** *

The ID of the resource.

*/ inline void SetResourceIdentifier(const Aws::String& value) { m_resourceIdentifierHasBeenSet = true; m_resourceIdentifier = value; } /** *

The ID of the resource.

*/ inline void SetResourceIdentifier(Aws::String&& value) { m_resourceIdentifierHasBeenSet = true; m_resourceIdentifier = std::move(value); } /** *

The ID of the resource.

*/ inline void SetResourceIdentifier(const char* value) { m_resourceIdentifierHasBeenSet = true; m_resourceIdentifier.assign(value); } /** *

The ID of the resource.

*/ inline ErrorResponse& WithResourceIdentifier(const Aws::String& value) { SetResourceIdentifier(value); return *this;} /** *

The ID of the resource.

*/ inline ErrorResponse& WithResourceIdentifier(Aws::String&& value) { SetResourceIdentifier(std::move(value)); return *this;} /** *

The ID of the resource.

*/ inline ErrorResponse& WithResourceIdentifier(const char* value) { SetResourceIdentifier(value); return *this;} /** *

The type of resource.

*/ inline const ErrorResourceType& GetResourceType() const{ return m_resourceType; } /** *

The type of resource.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of resource.

*/ inline void SetResourceType(const ErrorResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of resource.

*/ inline void SetResourceType(ErrorResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of resource.

*/ inline ErrorResponse& WithResourceType(const ErrorResourceType& value) { SetResourceType(value); return *this;} /** *

The type of resource.

*/ inline ErrorResponse& WithResourceType(ErrorResourceType&& value) { SetResourceType(std::move(value)); return *this;} private: Aws::String m_accountId; bool m_accountIdHasBeenSet = false; Aws::Map m_additionalDetails; bool m_additionalDetailsHasBeenSet = false; ErrorCode m_code; bool m_codeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::String m_resourceIdentifier; bool m_resourceIdentifierHasBeenSet = false; ErrorResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; }; } // namespace Model } // namespace MigrationHubRefactorSpaces } // namespace Aws