@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PostContentRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, SignerTypeAware
NOOP
Constructor and Description |
---|
PostContentRequest() |
Modifier and Type | Method and Description |
---|---|
PostContentRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getAccept()
You pass this value as the
Accept HTTP header. |
String |
getBotAlias()
Alias of the Amazon Lex bot.
|
String |
getBotName()
Name of the Amazon Lex bot.
|
String |
getContentType()
You pass this values as the
Content-Type HTTP header. |
InputStream |
getInputStream()
User input in PCM or Opus audio format or text format as described in the
Content-Type HTTP header. |
String |
getSessionAttributes()
You pass this value in the
x-amz-lex-session-attributes HTTP header. |
String |
getSignerType() |
String |
getUserId()
ID of the client application user.
|
int |
hashCode() |
void |
setAccept(String accept)
You pass this value as the
Accept HTTP header. |
void |
setBotAlias(String botAlias)
Alias of the Amazon Lex bot.
|
void |
setBotName(String botName)
Name of the Amazon Lex bot.
|
void |
setContentType(String contentType)
You pass this values as the
Content-Type HTTP header. |
void |
setInputStream(InputStream inputStreamValue)
User input in PCM or Opus audio format or text format as described in the
Content-Type HTTP header. |
void |
setSessionAttributes(String sessionAttributes)
You pass this value in the
x-amz-lex-session-attributes HTTP header. |
void |
setUserId(String userId)
ID of the client application user.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
PostContentRequest |
withAccept(String accept)
You pass this value as the
Accept HTTP header. |
PostContentRequest |
withBotAlias(String botAlias)
Alias of the Amazon Lex bot.
|
PostContentRequest |
withBotName(String botName)
Name of the Amazon Lex bot.
|
PostContentRequest |
withContentType(String contentType)
You pass this values as the
Content-Type HTTP header. |
PostContentRequest |
withInputStream(InputStream inputStreamValue)
User input in PCM or Opus audio format or text format as described in the
Content-Type HTTP header. |
PostContentRequest |
withSessionAttributes(String sessionAttributes)
You pass this value in the
x-amz-lex-session-attributes HTTP header. |
PostContentRequest |
withUserId(String userId)
ID of the client application user.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setBotName(String botName)
Name of the Amazon Lex bot.
botName
- Name of the Amazon Lex bot.public String getBotName()
Name of the Amazon Lex bot.
public PostContentRequest withBotName(String botName)
Name of the Amazon Lex bot.
botName
- Name of the Amazon Lex bot.public void setBotAlias(String botAlias)
Alias of the Amazon Lex bot.
botAlias
- Alias of the Amazon Lex bot.public String getBotAlias()
Alias of the Amazon Lex bot.
public PostContentRequest withBotAlias(String botAlias)
Alias of the Amazon Lex bot.
botAlias
- Alias of the Amazon Lex bot.public void setUserId(String userId)
ID of the client application user. Typically, each of your application users should have a unique ID. The application developer decides the user IDs. At runtime, each request must include the user ID. Note the following considerations:
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
userId
- ID of the client application user. Typically, each of your application users should have a unique ID. The
application developer decides the user IDs. At runtime, each request must include the user ID. Note the
following considerations:
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
public String getUserId()
ID of the client application user. Typically, each of your application users should have a unique ID. The application developer decides the user IDs. At runtime, each request must include the user ID. Note the following considerations:
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
public PostContentRequest withUserId(String userId)
ID of the client application user. Typically, each of your application users should have a unique ID. The application developer decides the user IDs. At runtime, each request must include the user ID. Note the following considerations:
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
userId
- ID of the client application user. Typically, each of your application users should have a unique ID. The
application developer decides the user IDs. At runtime, each request must include the user ID. Note the
following considerations:
If you want a user to start conversation on one device and continue the conversation on another device, you might choose a user-specific identifier, such as the user's login, or Amazon Cognito user ID (assuming your application is using Amazon Cognito).
If you want the same user to be able to have two independent conversations on two different devices, you might choose device-specific identifier, such as device ID, or some globally unique identifier.
public void setSessionAttributes(String sessionAttributes)
You pass this value in the x-amz-lex-session-attributes
HTTP header. The value must be map (keys and
values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to maintains the
slot data during the in-progress conversation to book a hotel or book a car. For more information, see Details of Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to determine
the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
This field's value must be valid JSON according to RFC 7159, including the opening and closing braces. For example: '{"key": "value"}'.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
sessionAttributes
- You pass this value in the x-amz-lex-session-attributes
HTTP header. The value must be map
(keys and values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to
maintains the slot data during the in-progress conversation to book a hotel or book a car. For more
information, see Details of
Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to
determine the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
public String getSessionAttributes()
You pass this value in the x-amz-lex-session-attributes
HTTP header. The value must be map (keys and
values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to maintains the
slot data during the in-progress conversation to book a hotel or book a car. For more information, see Details of Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to determine
the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
This field's value will be valid JSON according to RFC 7159, including the opening and closing braces. For example: '{"key": "value"}'.
x-amz-lex-session-attributes
HTTP header. The value must be map
(keys and values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to
maintains the slot data during the in-progress conversation to book a hotel or book a car. For more
information, see Details of
Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to
determine the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
public PostContentRequest withSessionAttributes(String sessionAttributes)
You pass this value in the x-amz-lex-session-attributes
HTTP header. The value must be map (keys and
values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to maintains the
slot data during the in-progress conversation to book a hotel or book a car. For more information, see Details of Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to determine
the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
This field's value must be valid JSON according to RFC 7159, including the opening and closing braces. For example: '{"key": "value"}'.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
sessionAttributes
- You pass this value in the x-amz-lex-session-attributes
HTTP header. The value must be map
(keys and values must be strings) that is JSON serialized and then base64 encoded.
A session represents dialog between a user and Amazon Lex. At runtime, a client application can pass contextual information, in the request to Amazon Lex. For example,
You might use session attributes to track the requestID of user requests.
In Getting Started Exercise 1, the example bot uses the price session attribute to maintain the price of flowers ordered (for example, "price":25). The code hook (Lambda function) sets this attribute based on the type of flowers ordered. For more information, see Review the Details of Information Flow.
In the BookTrip bot exercise, the bot uses the currentReservation
session attribute to
maintains the slot data during the in-progress conversation to book a hotel or book a car. For more
information, see Details of
Information Flow.
Amazon Lex passes these session attributes to the Lambda functions configured for the intent In the your Lambda function, you can use the session attributes for initialization and customization (prompts). Some examples are:
Initialization - In a pizza ordering bot, if you pass user location (for example,
"Location : 111 Maple Street"
), then your Lambda function might use this information to
determine the closest pizzeria to place the order (and perhaps set the storeAddress slot value as well).
Personalized prompts - For example, you can configure prompts to refer to the user by name (for example, "Hey [firstName], what toppings would you like?"). You can pass the user's name as a session attribute ("firstName": "Joe") so that Amazon Lex can substitute the placeholder to provide a personalized prompt to the user ("Hey Joe, what toppings would you like?").
Amazon Lex does not persist session attributes.
If you configured a code hook for the intent, Amazon Lex passes the incoming session attributes to the Lambda function. The Lambda function must return these session attributes if you want Amazon Lex to return them to the client.
If there is no code hook configured for the intent Amazon Lex simply returns the session attributes to the client application.
public void setContentType(String contentType)
You pass this values as the Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
contentType
- You pass this values as the Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
public String getContentType()
You pass this values as the Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
public PostContentRequest withContentType(String contentType)
You pass this values as the Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
contentType
- You pass this values as the Content-Type
HTTP header.
Indicates the audio format or text. The header value must start with one of the following prefixes:
PCM format
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
Opus format
audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=1; frame-size-milliseconds=1.1
Text format
text/plain; charset=utf-8
public void setAccept(String accept)
You pass this value as the Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the Accept
HTTP
header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses Amazon
Polly to generate the speech (using the configuration you specified in the Accept
header). For
example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
accept
- You pass this value as the Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the
Accept
HTTP header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses
Amazon Polly to generate the speech (using the configuration you specified in the Accept
header). For example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in
the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
public String getAccept()
You pass this value as the Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the Accept
HTTP
header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses Amazon
Polly to generate the speech (using the configuration you specified in the Accept
header). For
example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the
Accept
HTTP header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses
Amazon Polly to generate the speech (using the configuration you specified in the Accept
header). For example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in
the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
public PostContentRequest withAccept(String accept)
You pass this value as the Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the Accept
HTTP
header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses Amazon
Polly to generate the speech (using the configuration you specified in the Accept
header). For
example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
accept
- You pass this value as the Accept
HTTP header.
The message Amazon Lex returns in the response can be either text or speech based on the
Accept
HTTP header value in the request.
If the value is text/plain; charset=utf-8
, Amazon Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech in the response. Amazon Lex uses
Amazon Polly to generate the speech (using the configuration you specified in the Accept
header). For example, if you specify audio/mpeg
as the value, Amazon Lex returns speech in
the MPEG format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm
text/plain; charset=utf-8
audio/* (defaults to mpeg)
public void setInputStream(InputStream inputStreamValue)
User input in PCM or Opus audio format or text format as described in the Content-Type
HTTP header.
inputStreamValue
- User input in PCM or Opus audio format or text format as described in the Content-Type
HTTP
header.public InputStream getInputStream()
User input in PCM or Opus audio format or text format as described in the Content-Type
HTTP header.
Content-Type
HTTP
header.public PostContentRequest withInputStream(InputStream inputStreamValue)
User input in PCM or Opus audio format or text format as described in the Content-Type
HTTP header.
inputStreamValue
- User input in PCM or Opus audio format or text format as described in the Content-Type
HTTP
header.public String toString()
toString
in class Object
Object.toString()
public PostContentRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
public String getSignerType()
getSignerType
in interface SignerTypeAware
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.