All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.voice.models.svaml.ActionRunMenu Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.sinch.sdk.domains.voice.models.svaml;

import com.sinch.sdk.core.models.OptionalValue;
import java.util.Collection;

public class ActionRunMenu extends Action {

  private final OptionalValue barge;
  private final OptionalValue locale;
  private final OptionalValue mainMenu;
  private final OptionalValue enableVoice;
  private final OptionalValue> menus;

  private ActionRunMenu(
      OptionalValue barge,
      OptionalValue locale,
      OptionalValue mainMenu,
      OptionalValue enableVoice,
      OptionalValue> menus) {
    this.barge = barge;
    this.locale = locale;
    this.mainMenu = mainMenu;
    this.enableVoice = enableVoice;
    this.menus = menus;
  }

  public OptionalValue getBarge() {
    return barge;
  }

  public OptionalValue getLocale() {
    return locale;
  }

  public OptionalValue getMainMenu() {
    return mainMenu;
  }

  public OptionalValue getEnableVoice() {
    return enableVoice;
  }

  public OptionalValue> getMenus() {
    return menus;
  }

  @Override
  public String toString() {
    return "ActionRunMenu{"
        + "barge="
        + barge
        + ", locale='"
        + locale
        + '\''
        + ", mainMenu='"
        + mainMenu
        + '\''
        + ", enableVoice="
        + enableVoice
        + ", menus="
        + menus
        + "} "
        + super.toString();
  }

  public static Builder builder() {
    return new Builder<>();
  }

  public static class Builder> {

    OptionalValue barge = OptionalValue.empty();
    OptionalValue locale = OptionalValue.empty();
    OptionalValue mainMenu = OptionalValue.empty();
    OptionalValue enableVoice = OptionalValue.empty();
    OptionalValue> menus = OptionalValue.empty();

    public Builder setBarge(Boolean barge) {
      this.barge = OptionalValue.of(barge);
      return this;
    }

    public Builder setLocale(String locale) {
      this.locale = OptionalValue.of(locale);
      return this;
    }

    public Builder setMainMenu(String mainMenu) {
      this.mainMenu = OptionalValue.of(mainMenu);
      return this;
    }

    public Builder setEnableVoice(Boolean enableVoice) {
      this.enableVoice = OptionalValue.of(enableVoice);
      return this;
    }

    public Builder setMenus(Collection menus) {
      this.menus = OptionalValue.of(menus);
      return this;
    }

    public ActionRunMenu build() {
      return new ActionRunMenu(barge, locale, mainMenu, enableVoice, menus);
    }

    @SuppressWarnings("unchecked")
    protected B self() {
      return (B) this;
    }
  }
}