AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

Model

import "github.com/aws/aws-sdk-go/service/apigateway"

type Model struct { ContentType *string `locationName:"contentType" type:"string"` Description *string `locationName:"description" type:"string"` Id *string `locationName:"id" type:"string"` Name *string `locationName:"name" type:"string"` Schema *string `locationName:"schema" type:"string"` }

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.

Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html)

ContentType

Type: *string

The content-type for the model.

Description

Type: *string

The description of the model.

Id

Type: *string

The identifier for the model resource.

Name

Type: *string

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

Schema

Type: *string

The schema for the model. For application/json models, this should be JSON schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) 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.

Method

GoString

func (s Model) GoString() string

GoString returns the string representation

SetContentType

func (s *Model) SetContentType(v string) *Model

SetContentType sets the ContentType field's value.

SetDescription

func (s *Model) SetDescription(v string) *Model

SetDescription sets the Description field's value.

SetId

func (s *Model) SetId(v string) *Model

SetId sets the Id field's value.

SetName

func (s *Model) SetName(v string) *Model

SetName sets the Name field's value.

SetSchema

func (s *Model) SetSchema(v string) *Model

SetSchema sets the Schema field's value.

String

func (s Model) String() string

String returns the string representation

On this page: