Tabnine Logo
Intent.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
com.amazon.speech.slu.Intent

Best Java code snippets using com.amazon.speech.slu.Intent.getName (Showing top 20 results out of 315)

origin: alexa/skill-samples-java

/**
 * Helper method that will get the intent name from a provided Intent object. If a name does not
 * exist then this method will return null.
 * @param intent intent object provided from a skill request.
 * @return intent name or null.
 */
private String getIntentName(Intent intent) {
  return (intent != null) ? intent.getName() : null;
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  Session session = requestEnvelope.getSession();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      session.getSessionId());
  initializeComponents();
  Intent intent = request.getIntent();
  if ("NewGameIntent".equals(intent.getName())) {
    return scoreKeeperManager.getNewGameIntentResponse(session, skillContext);
  } else if ("AddPlayerIntent".equals(intent.getName())) {
    return scoreKeeperManager.getAddPlayerIntentResponse(intent, session, skillContext);
  } else if ("AddScoreIntent".equals(intent.getName())) {
    return scoreKeeperManager.getAddScoreIntentResponse(intent, session, skillContext);
  } else if ("TellScoresIntent".equals(intent.getName())) {
    return scoreKeeperManager.getTellScoresIntentResponse(intent, session);
  } else if ("ResetPlayersIntent".equals(intent.getName())) {
    return scoreKeeperManager.getResetPlayersIntentResponse(intent, session);
  } else if ("AMAZON.HelpIntent".equals(intent.getName())) {
    return scoreKeeperManager.getHelpIntentResponse(intent, session, skillContext);
  } else if ("AMAZON.CancelIntent".equals(intent.getName())) {
    return scoreKeeperManager.getExitIntentResponse(intent, session, skillContext);
  } else if ("AMAZON.StopIntent".equals(intent.getName())) {
    return scoreKeeperManager.getExitIntentResponse(intent, session, skillContext);
  } else {
    throw new IllegalArgumentException("Unrecognized intent: " + intent.getName());
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  Session session = requestEnvelope.getSession();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      session.getSessionId());
  initializeComponents();
  Intent intent = request.getIntent();
  if ("NewGameIntent".equals(intent.getName())) {
    return scoreKeeperManager.getNewGameIntentResponse(session, skillContext);
  } else if ("AddPlayerIntent".equals(intent.getName())) {
    return scoreKeeperManager.getAddPlayerIntentResponse(intent, session, skillContext);
  } else if ("AddScoreIntent".equals(intent.getName())) {
    return scoreKeeperManager.getAddScoreIntentResponse(intent, session, skillContext);
  } else if ("TellScoresIntent".equals(intent.getName())) {
    return scoreKeeperManager.getTellScoresIntentResponse(intent, session);
  } else if ("ResetPlayersIntent".equals(intent.getName())) {
    return scoreKeeperManager.getResetPlayersIntentResponse(intent, session);
  } else if ("AMAZON.HelpIntent".equals(intent.getName())) {
    return scoreKeeperManager.getHelpIntentResponse(intent, session, skillContext);
  } else if ("AMAZON.CancelIntent".equals(intent.getName())) {
    return scoreKeeperManager.getExitIntentResponse(intent, session, skillContext);
  } else if ("AMAZON.StopIntent".equals(intent.getName())) {
    return scoreKeeperManager.getExitIntentResponse(intent, session, skillContext);
  } else {
    throw new IllegalArgumentException("Unrecognized intent: " + intent.getName());
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("HelloWorldIntent".equals(intentName)) {
    return getHelloResponse();
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelpResponse();
  } else {
    return getAskResponse("HelloWorld", "This is unsupported.  Please try something else.");
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("HelloWorldIntent".equals(intentName)) {
    return getHelloResponse();
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelpResponse();
  } else {
    return getAskResponse("HelloWorld", "This is unsupported.  Please try something else.");
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  Session session = requestEnvelope.getSession();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(), session);
  // Get intent from the request object.
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  // Note: If the session is started with an intent, no welcome message will be rendered;
  // rather, the intent specific response will be returned.
  if ("MyColorIsIntent".equals(intentName)) {
    return setColorInSession(intent, session);
  } else if ("WhatsMyColorIntent".equals(intentName)) {
    return getColorFromSession(intent, session);
  } else {
    String errorSpeech = "This is unsupported.  Please try something else.";
    return getSpeechletResponse(errorSpeech, errorSpeech, true);
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  Session session = requestEnvelope.getSession();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(), session);
  // Get intent from the request object.
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  // Note: If the session is started with an intent, no welcome message will be rendered;
  // rather, the intent specific response will be returned.
  if ("MyColorIsIntent".equals(intentName)) {
    return setColorInSession(intent, session);
  } else if ("WhatsMyColorIntent".equals(intentName)) {
    return getColorFromSession(intent, session);
  } else {
    String errorSpeech = "This is unsupported.  Please try something else.";
    return getSpeechletResponse(errorSpeech, errorSpeech, true);
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("RecipeIntent".equals(intentName)) {
    return getRecipe(intent);
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelp();
  } else if ("AMAZON.StopIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else if ("AMAZON.CancelIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else {
    String errorSpeech = "This is unsupported.  Please try something else.";
    return newAskResponse(errorSpeech, errorSpeech);
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("GetNewFactIntent".equals(intentName)) {
    return getNewFactResponse();
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelpResponse();
  } else if ("AMAZON.StopIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else if ("AMAZON.CancelIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else {
    return getAskResponse("SpaceGeek", "This is unsupported.  Please try something else.");
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("GetNewFactIntent".equals(intentName)) {
    return getNewFactResponse();
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelpResponse();
  } else if ("AMAZON.StopIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else if ("AMAZON.CancelIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else {
    return getAskResponse("SpaceGeek", "This is unsupported.  Please try something else.");
  }
}
origin: alexa/skill-samples-java

@Override
public SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest> requestEnvelope) {
  IntentRequest request = requestEnvelope.getRequest();
  log.info("onIntent requestId={}, sessionId={}", request.getRequestId(),
      requestEnvelope.getSession().getSessionId());
  Intent intent = request.getIntent();
  String intentName = (intent != null) ? intent.getName() : null;
  if ("RecipeIntent".equals(intentName)) {
    return getRecipe(intent);
  } else if ("AMAZON.HelpIntent".equals(intentName)) {
    return getHelp();
  } else if ("AMAZON.StopIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else if ("AMAZON.CancelIntent".equals(intentName)) {
    PlainTextOutputSpeech outputSpeech = new PlainTextOutputSpeech();
    outputSpeech.setText("Goodbye");
    return SpeechletResponse.newTellResponse(outputSpeech);
  } else {
    String errorSpeech = "This is unsupported.  Please try something else.";
    return newAskResponse(errorSpeech, errorSpeech);
  }
}
origin: alexa/skill-samples-java

String intentName = (intent != null) ? intent.getName() : null;
origin: alexa/skill-samples-java

String intentName = (intent != null) ? intent.getName() : null;
origin: alexa/skill-samples-java

    requestEnvelope.getSession().getSessionId());
String intentName = requestEnvelope.getRequest().getIntent().getName();
origin: alexa/skill-samples-java

@Override
public SkillRequestInformation parseRequestEnvelope(SpeechletRequestEnvelope envelope) {
  IntentRequest request = (IntentRequest) envelope.getRequest();
  Intent intent = request.getIntent();
  SkillRequestInformation skillRequestInformation = new SkillRequestInformation();
  skillRequestInformation.setRequestType(SkillRequestInformation.RequestType.INTENT_REQUEST);
  skillRequestInformation.setIntentName(intent.getName());
  skillRequestInformation.setSlots(intent.getSlots());
  skillRequestInformation.setToken(getDisplayStateToken(envelope));
  return skillRequestInformation;
}
origin: alexa/skill-samples-java

String intentName = intent.getName();
origin: alexa/skill-samples-java

String intentName = (intent != null) ? intent.getName() : null;
origin: alexa/skill-samples-java

@Override
public SkillRequestInformation parseRequestEnvelope(SpeechletRequestEnvelope envelope) {
  IntentRequest request = (IntentRequest) envelope.getRequest();
  Intent intent = request.getIntent();
  SkillRequestInformation skillRequestInformation = new SkillRequestInformation();
  skillRequestInformation.setRequestType(SkillRequestInformation.RequestType.INTENT_REQUEST);
  skillRequestInformation.setIntentName(intent.getName());
  skillRequestInformation.setSlots(intent.getSlots());
  skillRequestInformation.setToken(getDisplayStateToken(envelope));
  return skillRequestInformation;
}
origin: alexa/skill-samples-java

String intentName = intent.getName();
origin: vqtran/EchoQuery

String intentName = intent.getName();
com.amazon.speech.sluIntentgetName

Popular methods of Intent

  • getSlot
  • getSlots
  • builder

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Menu (java.awt)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now