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

Represents an API resource.

See Also:

AWS * API Reference

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

The resource's identifier.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The resource's identifier.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The resource's identifier.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The resource's identifier.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The resource's identifier.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The resource's identifier.

*/ inline Resource& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The resource's identifier.

*/ inline Resource& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The resource's identifier.

*/ inline Resource& WithId(const char* value) { SetId(value); return *this;} /** *

The parent resource's identifier.

*/ inline const Aws::String& GetParentId() const{ return m_parentId; } /** *

The parent resource's identifier.

*/ inline bool ParentIdHasBeenSet() const { return m_parentIdHasBeenSet; } /** *

The parent resource's identifier.

*/ inline void SetParentId(const Aws::String& value) { m_parentIdHasBeenSet = true; m_parentId = value; } /** *

The parent resource's identifier.

*/ inline void SetParentId(Aws::String&& value) { m_parentIdHasBeenSet = true; m_parentId = std::move(value); } /** *

The parent resource's identifier.

*/ inline void SetParentId(const char* value) { m_parentIdHasBeenSet = true; m_parentId.assign(value); } /** *

The parent resource's identifier.

*/ inline Resource& WithParentId(const Aws::String& value) { SetParentId(value); return *this;} /** *

The parent resource's identifier.

*/ inline Resource& WithParentId(Aws::String&& value) { SetParentId(std::move(value)); return *this;} /** *

The parent resource's identifier.

*/ inline Resource& WithParentId(const char* value) { SetParentId(value); return *this;} /** *

The last path segment for this resource.

*/ inline const Aws::String& GetPathPart() const{ return m_pathPart; } /** *

The last path segment for this resource.

*/ inline bool PathPartHasBeenSet() const { return m_pathPartHasBeenSet; } /** *

The last path segment for this resource.

*/ inline void SetPathPart(const Aws::String& value) { m_pathPartHasBeenSet = true; m_pathPart = value; } /** *

The last path segment for this resource.

*/ inline void SetPathPart(Aws::String&& value) { m_pathPartHasBeenSet = true; m_pathPart = std::move(value); } /** *

The last path segment for this resource.

*/ inline void SetPathPart(const char* value) { m_pathPartHasBeenSet = true; m_pathPart.assign(value); } /** *

The last path segment for this resource.

*/ inline Resource& WithPathPart(const Aws::String& value) { SetPathPart(value); return *this;} /** *

The last path segment for this resource.

*/ inline Resource& WithPathPart(Aws::String&& value) { SetPathPart(std::move(value)); return *this;} /** *

The last path segment for this resource.

*/ inline Resource& WithPathPart(const char* value) { SetPathPart(value); return *this;} /** *

The full path for this resource.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The full path for this resource.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The full path for this resource.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The full path for this resource.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The full path for this resource.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The full path for this resource.

*/ inline Resource& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The full path for this resource.

*/ inline Resource& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The full path for this resource.

*/ inline Resource& WithPath(const char* value) { SetPath(value); return *this;} /** *

Gets an API resource's method of a given HTTP verb.

*/ inline const Aws::Map& GetResourceMethods() const{ return m_resourceMethods; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline bool ResourceMethodsHasBeenSet() const { return m_resourceMethodsHasBeenSet; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline void SetResourceMethods(const Aws::Map& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods = value; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline void SetResourceMethods(Aws::Map&& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods = std::move(value); } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& WithResourceMethods(const Aws::Map& value) { SetResourceMethods(value); return *this;} /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& WithResourceMethods(Aws::Map&& value) { SetResourceMethods(std::move(value)); return *this;} /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(const Aws::String& key, const Method& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(key, value); return *this; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(Aws::String&& key, const Method& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(std::move(key), value); return *this; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(const Aws::String& key, Method&& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(key, std::move(value)); return *this; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(Aws::String&& key, Method&& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(std::move(key), std::move(value)); return *this; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(const char* key, Method&& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(key, std::move(value)); return *this; } /** *

Gets an API resource's method of a given HTTP verb.

*/ inline Resource& AddResourceMethods(const char* key, const Method& value) { m_resourceMethodsHasBeenSet = true; m_resourceMethods.emplace(key, value); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; } inline void SetRequestId(const Aws::String& value) { m_requestIdHasBeenSet = true; m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestIdHasBeenSet = true; m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestIdHasBeenSet = true; m_requestId.assign(value); } inline Resource& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline Resource& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline Resource& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_parentId; bool m_parentIdHasBeenSet = false; Aws::String m_pathPart; bool m_pathPartHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; Aws::Map m_resourceMethods; bool m_resourceMethodsHasBeenSet = false; Aws::String m_requestId; bool m_requestIdHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws