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

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

  private final OptionalValue> ids;
  private final OptionalValue locale;

  private InstructionPlayFiles(
      OptionalValue> ids, OptionalValue locale) {
    this.ids = ids;
    this.locale = locale;
  }

  public OptionalValue> getIds() {
    return ids;
  }

  public OptionalValue getLocale() {
    return locale;
  }

  @Override
  public String toString() {
    return "InstructionPlayFiles{"
        + "ids="
        + ids
        + ", locale='"
        + locale
        + '\''
        + "} "
        + super.toString();
  }

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

  public static class Builder> {

    OptionalValue> ids = OptionalValue.empty();
    OptionalValue locale = OptionalValue.empty();

    public Builder setIds(Collection ids) {
      this.ids = OptionalValue.of(ids);
      return this;
    }

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

    public InstructionPlayFiles build() {
      return new InstructionPlayFiles(ids, locale);
    }

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