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

Errors that occurred during the portfolio share operation.

See * Also:

AWS * API Reference

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

List of accounts impacted by the error.

*/ inline const Aws::Vector& GetAccounts() const{ return m_accounts; } /** *

List of accounts impacted by the error.

*/ inline bool AccountsHasBeenSet() const { return m_accountsHasBeenSet; } /** *

List of accounts impacted by the error.

*/ inline void SetAccounts(const Aws::Vector& value) { m_accountsHasBeenSet = true; m_accounts = value; } /** *

List of accounts impacted by the error.

*/ inline void SetAccounts(Aws::Vector&& value) { m_accountsHasBeenSet = true; m_accounts = std::move(value); } /** *

List of accounts impacted by the error.

*/ inline ShareError& WithAccounts(const Aws::Vector& value) { SetAccounts(value); return *this;} /** *

List of accounts impacted by the error.

*/ inline ShareError& WithAccounts(Aws::Vector&& value) { SetAccounts(std::move(value)); return *this;} /** *

List of accounts impacted by the error.

*/ inline ShareError& AddAccounts(const Aws::String& value) { m_accountsHasBeenSet = true; m_accounts.push_back(value); return *this; } /** *

List of accounts impacted by the error.

*/ inline ShareError& AddAccounts(Aws::String&& value) { m_accountsHasBeenSet = true; m_accounts.push_back(std::move(value)); return *this; } /** *

List of accounts impacted by the error.

*/ inline ShareError& AddAccounts(const char* value) { m_accountsHasBeenSet = true; m_accounts.push_back(value); return *this; } /** *

Information about the error.

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

Information about the error.

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

Information about the error.

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

Information about the error.

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

Information about the error.

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

Information about the error.

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

Information about the error.

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

Information about the error.

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

Error type that happened when processing the operation.

*/ inline const Aws::String& GetError() const{ return m_error; } /** *

Error type that happened when processing the operation.

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

Error type that happened when processing the operation.

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

Error type that happened when processing the operation.

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

Error type that happened when processing the operation.

*/ inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); } /** *

Error type that happened when processing the operation.

*/ inline ShareError& WithError(const Aws::String& value) { SetError(value); return *this;} /** *

Error type that happened when processing the operation.

*/ inline ShareError& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;} /** *

Error type that happened when processing the operation.

*/ inline ShareError& WithError(const char* value) { SetError(value); return *this;} private: Aws::Vector m_accounts; bool m_accountsHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::String m_error; bool m_errorHasBeenSet = false; }; } // namespace Model } // namespace ServiceCatalog } // namespace Aws