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

A collection of authorization information.

See Also:

AWS API * Reference

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

The type of action for which the principal is being authorized.

*/ inline const ActionType& GetActionType() const{ return m_actionType; } /** *

The type of action for which the principal is being authorized.

*/ inline bool ActionTypeHasBeenSet() const { return m_actionTypeHasBeenSet; } /** *

The type of action for which the principal is being authorized.

*/ inline void SetActionType(const ActionType& value) { m_actionTypeHasBeenSet = true; m_actionType = value; } /** *

The type of action for which the principal is being authorized.

*/ inline void SetActionType(ActionType&& value) { m_actionTypeHasBeenSet = true; m_actionType = std::move(value); } /** *

The type of action for which the principal is being authorized.

*/ inline AuthInfo& WithActionType(const ActionType& value) { SetActionType(value); return *this;} /** *

The type of action for which the principal is being authorized.

*/ inline AuthInfo& WithActionType(ActionType&& value) { SetActionType(std::move(value)); return *this;} /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline const Aws::Vector& GetResources() const{ return m_resources; } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline void SetResources(const Aws::Vector& value) { m_resourcesHasBeenSet = true; m_resources = value; } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline void SetResources(Aws::Vector&& value) { m_resourcesHasBeenSet = true; m_resources = std::move(value); } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline AuthInfo& WithResources(const Aws::Vector& value) { SetResources(value); return *this;} /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline AuthInfo& WithResources(Aws::Vector&& value) { SetResources(std::move(value)); return *this;} /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline AuthInfo& AddResources(const Aws::String& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline AuthInfo& AddResources(Aws::String&& value) { m_resourcesHasBeenSet = true; m_resources.push_back(std::move(value)); return *this; } /** *

The resources for which the principal is being authorized to perform the * specified action.

*/ inline AuthInfo& AddResources(const char* value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; } private: ActionType m_actionType; bool m_actionTypeHasBeenSet = false; Aws::Vector m_resources; bool m_resourcesHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws