@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Model extends Object implements Serializable, Cloneable, StructuredPojo
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.
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
Model |
clone() |
boolean |
equals(Object obj) |
String |
getContentType()
The content-type for the model.
|
String |
getDescription()
The description of the model.
|
String |
getId()
The identifier for the model resource.
|
String |
getName()
The name of the model.
|
String |
getSchema()
The schema for the model.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setContentType(String contentType)
The content-type for the model.
|
void |
setDescription(String description)
The description of the model.
|
void |
setId(String id)
The identifier for the model resource.
|
void |
setName(String name)
The name of the model.
|
void |
setSchema(String schema)
The schema for the model.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Model |
withContentType(String contentType)
The content-type for the model.
|
Model |
withDescription(String description)
The description of the model.
|
Model |
withId(String id)
The identifier for the model resource.
|
Model |
withName(String name)
The name of the model.
|
Model |
withSchema(String schema)
The schema for the model.
|
public void setId(String id)
The identifier for the model resource.
id
- The identifier for the model resource.public String getId()
The identifier for the model resource.
public Model withId(String id)
The identifier for the model resource.
id
- The identifier for the model resource.public void setName(String name)
The name of the model. Must be an alphanumeric string.
name
- The name of the model. Must be an alphanumeric string.public String getName()
The name of the model. Must be an alphanumeric string.
public Model withName(String name)
The name of the model. Must be an alphanumeric string.
name
- The name of the model. Must be an alphanumeric string.public void setDescription(String description)
The description of the model.
description
- The description of the model.public String getDescription()
The description of the model.
public Model withDescription(String description)
The description of the model.
description
- The description of the model.public void setSchema(String schema)
The schema for the model. For application/json
models, this should be JSON-schema draft v4 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.
schema
- The schema for the model. For application/json
models, this should be JSON-schema draft v4 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.public String getSchema()
The schema for the model. For application/json
models, this should be JSON-schema draft v4 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.
application/json
models, this should be JSON-schema draft v4 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.public Model withSchema(String schema)
The schema for the model. For application/json
models, this should be JSON-schema draft v4 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.
schema
- The schema for the model. For application/json
models, this should be JSON-schema draft v4 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.public void setContentType(String contentType)
The content-type for the model.
contentType
- The content-type for the model.public String getContentType()
The content-type for the model.
public Model withContentType(String contentType)
The content-type for the model.
contentType
- The content-type for the model.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.