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

Represents the data structure of a method's request or response payload.

*

A request model defines the data structure of the * client-supplied request payload. A response model defines the data structure of * the response payload returned by the back end. Although not required, models are * useful for mapping payloads between the front end and back end.

A model * is used for generating an API's SDK, validating the input request body, and * creating a skeletal mapping template.

See Also:

AWS * API Reference

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The identifier for the model resource.

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

The name of the model. Must be an alphanumeric string.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the model. Must be an alphanumeric string.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the model. Must be an alphanumeric string.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the model. Must be an alphanumeric string.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the model. Must be an alphanumeric string.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the model. Must be an alphanumeric string.

*/ inline Model& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the model. Must be an alphanumeric string.

*/ inline Model& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the model. Must be an alphanumeric string.

*/ inline Model& WithName(const char* value) { SetName(value); return *this;} /** *

The description of the model.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the model.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the model.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the model.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the model.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the model.

*/ inline Model& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the model.

*/ inline Model& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the model.

*/ inline Model& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline const Aws::String& GetSchema() const{ return m_schema; } /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline bool SchemaHasBeenSet() const { return m_schemaHasBeenSet; } /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline void SetSchema(const Aws::String& value) { m_schemaHasBeenSet = true; m_schema = value; } /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline void SetSchema(Aws::String&& value) { m_schemaHasBeenSet = true; m_schema = std::move(value); } /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline void SetSchema(const char* value) { m_schemaHasBeenSet = true; m_schema.assign(value); } /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline Model& WithSchema(const Aws::String& value) { SetSchema(value); return *this;} /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline Model& WithSchema(Aws::String&& value) { SetSchema(std::move(value)); return *this;} /** *

The schema for the model. For application/json models, this * should be JSON schema draft 4 model. Do not include "\* /" characters * in the description of any properties because such "\* /" characters may be * interpreted as the closing marker for comments in some languages, such as Java * or JavaScript, causing the installation of your API's SDK generated by API * Gateway to fail.

*/ inline Model& WithSchema(const char* value) { SetSchema(value); return *this;} /** *

The content-type for the model.

*/ inline const Aws::String& GetContentType() const{ return m_contentType; } /** *

The content-type for the model.

*/ inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; } /** *

The content-type for the model.

*/ inline void SetContentType(const Aws::String& value) { m_contentTypeHasBeenSet = true; m_contentType = value; } /** *

The content-type for the model.

*/ inline void SetContentType(Aws::String&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); } /** *

The content-type for the model.

*/ inline void SetContentType(const char* value) { m_contentTypeHasBeenSet = true; m_contentType.assign(value); } /** *

The content-type for the model.

*/ inline Model& WithContentType(const Aws::String& value) { SetContentType(value); return *this;} /** *

The content-type for the model.

*/ inline Model& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;} /** *

The content-type for the model.

*/ inline Model& WithContentType(const char* value) { SetContentType(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; Aws::String m_schema; bool m_schemaHasBeenSet; Aws::String m_contentType; bool m_contentTypeHasBeenSet; }; } // namespace Model } // namespace APIGateway } // namespace Aws