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.

CreateModelInput

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

type CreateModelInput struct { ContentType *string `locationName:"contentType" type:"string" required:"true"` Description *string `locationName:"description" type:"string"` Name *string `locationName:"name" type:"string" required:"true"` RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` Schema *string `locationName:"schema" type:"string"` }

Request to add a new Model to an existing RestApi resource.

ContentType

Type: *string

[Required] The content-type for the model.

ContentType is a required field

Description

Type: *string

The description of the model.

Name

Type: *string

[Required] The name of the model. Must be alphanumeric.

Name is a required field

RestApiId

Type: *string

[Required] The RestApi identifier under which the Model will be created.

RestApiId is a required field

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.

Method

GoString

func (s CreateModelInput) GoString() string

GoString returns the string representation

SetContentType

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

SetContentType sets the ContentType field's value.

SetDescription

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

SetDescription sets the Description field's value.

SetName

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

SetName sets the Name field's value.

SetRestApiId

func (s *CreateModelInput) SetRestApiId(v string) *CreateModelInput

SetRestApiId sets the RestApiId field's value.

SetSchema

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

SetSchema sets the Schema field's value.

String

func (s CreateModelInput) String() string

String returns the string representation

Validate

func (s *CreateModelInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: