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

com.sinch.sdk.domains.voice.models.svaml.ActionConnectMxp 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 com.sinch.sdk.core.utils.Pair;
import com.sinch.sdk.domains.voice.models.Destination;
import java.util.Collection;

public class ActionConnectMxp extends Action {

  private final OptionalValue destination;
  private final OptionalValue>> callheaders;

  private ActionConnectMxp(
      OptionalValue destination,
      OptionalValue>> callheaders) {
    this.destination = destination;
    this.callheaders = callheaders;
  }

  public OptionalValue getDestination() {
    return destination;
  }

  public OptionalValue>> getCallheaders() {
    return callheaders;
  }

  @Override
  public String toString() {
    return "ActionConnectMxp{"
        + "destination="
        + destination
        + ", callheaders="
        + callheaders
        + "} "
        + super.toString();
  }

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

  public static class Builder> {

    OptionalValue destination = OptionalValue.empty();
    OptionalValue>> callheaders = OptionalValue.empty();

    public Builder setDestination(Destination destination) {
      this.destination = OptionalValue.of(destination);
      return this;
    }

    public Builder setCallheaders(Collection> callheaders) {
      this.callheaders = OptionalValue.of(callheaders);
      return this;
    }

    public ActionConnectMxp build() {
      return new ActionConnectMxp(destination, callheaders);
    }

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