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

com.sinch.sdk.domains.voice.models.svaml.Menu 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 Menu {

  private final OptionalValue id;
  private final OptionalValue mainPrompt;
  private final OptionalValue repeatPrompt;
  private final OptionalValue repeats;
  private final OptionalValue maxDigits;
  private final OptionalValue timeoutMills;
  private final OptionalValue maxTimeoutMills;
  private final OptionalValue> options;

  private Menu(
      OptionalValue id,
      OptionalValue mainPrompt,
      OptionalValue repeatPrompt,
      OptionalValue repeats,
      OptionalValue maxDigits,
      OptionalValue timeoutMills,
      OptionalValue maxTimeoutMills,
      OptionalValue> options) {
    this.id = id;
    this.mainPrompt = mainPrompt;
    this.repeatPrompt = repeatPrompt;
    this.repeats = repeats;
    this.maxDigits = maxDigits;
    this.timeoutMills = timeoutMills;
    this.maxTimeoutMills = maxTimeoutMills;
    this.options = options;
  }

  public OptionalValue getId() {
    return id;
  }

  public OptionalValue getMainPrompt() {
    return mainPrompt;
  }

  public OptionalValue getRepeatPrompt() {
    return repeatPrompt;
  }

  public OptionalValue getRepeats() {
    return repeats;
  }

  public OptionalValue getMaxDigits() {
    return maxDigits;
  }

  public OptionalValue getTimeoutMills() {
    return timeoutMills;
  }

  public OptionalValue getMaxTimeoutMills() {
    return maxTimeoutMills;
  }

  public OptionalValue> getOptions() {
    return options;
  }

  @Override
  public String toString() {
    return "Menu{"
        + "id='"
        + id
        + '\''
        + ", mainPrompt='"
        + mainPrompt
        + '\''
        + ", repeatPrompt='"
        + repeatPrompt
        + '\''
        + ", repeats="
        + repeats
        + ", maxDigits="
        + maxDigits
        + ", timeoutMills="
        + timeoutMills
        + ", maxTimeoutMills="
        + maxTimeoutMills
        + ", options="
        + options
        + '}';
  }

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

  public static class Builder {

    OptionalValue id = OptionalValue.empty();
    OptionalValue mainPrompt = OptionalValue.empty();
    OptionalValue repeatPrompt = OptionalValue.empty();
    OptionalValue repeats = OptionalValue.empty();
    OptionalValue maxDigits = OptionalValue.empty();
    OptionalValue timeoutMills = OptionalValue.empty();
    OptionalValue maxTimeoutMills = OptionalValue.empty();
    OptionalValue> options = OptionalValue.empty();

    public Builder setId(String id) {
      this.id = OptionalValue.of(id);
      return this;
    }

    public Builder setMainPrompt(String mainPrompt) {
      this.mainPrompt = OptionalValue.of(mainPrompt);
      return this;
    }

    public Builder setRepeatPrompt(String repeatPrompt) {
      this.repeatPrompt = OptionalValue.of(repeatPrompt);
      return this;
    }

    public Builder setRepeats(Integer repeats) {
      this.repeats = OptionalValue.of(repeats);
      return this;
    }

    public Builder setMaxDigits(Integer maxDigits) {
      this.maxDigits = OptionalValue.of(maxDigits);
      return this;
    }

    public Builder setTimeoutMills(Integer timeoutMills) {
      this.timeoutMills = OptionalValue.of(timeoutMills);
      return this;
    }

    public Builder setMaxTimeoutMills(Integer maxTimeoutMills) {
      this.maxTimeoutMills = OptionalValue.of(maxTimeoutMills);
      return this;
    }

    public Builder setOptions(Collection options) {
      this.options = OptionalValue.of(options);
      return this;
    }

    public Menu build() {
      return new Menu(
          id, mainPrompt, repeatPrompt, repeats, maxDigits, timeoutMills, maxTimeoutMills, options);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy