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

com.telnyx.sdk.model.StartRecordingRequest Maven / Gradle / Ivy

There is a newer version: 3.6.0
Show newest version
/*
 * Telnyx API
 * SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.telnyx.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.telnyx.sdk.JSON;


/**
 * StartRecordingRequest
 */
@JsonPropertyOrder({
  StartRecordingRequest.JSON_PROPERTY_FORMAT,
  StartRecordingRequest.JSON_PROPERTY_CHANNELS,
  StartRecordingRequest.JSON_PROPERTY_CLIENT_STATE,
  StartRecordingRequest.JSON_PROPERTY_COMMAND_ID,
  StartRecordingRequest.JSON_PROPERTY_PLAY_BEEP
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class StartRecordingRequest {
  /**
   * The audio file format used when storing the call recording. Can be either `mp3` or `wav`.
   */
  public enum FormatEnum {
    WAV("wav"),
    
    MP3("mp3");

    private String value;

    FormatEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static FormatEnum fromValue(String value) {
      for (FormatEnum b : FormatEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_FORMAT = "format";
  private FormatEnum format;

  /**
   * When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.
   */
  public enum ChannelsEnum {
    SINGLE("single"),
    
    DUAL("dual");

    private String value;

    ChannelsEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static ChannelsEnum fromValue(String value) {
      for (ChannelsEnum b : ChannelsEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_CHANNELS = "channels";
  private ChannelsEnum channels;

  public static final String JSON_PROPERTY_CLIENT_STATE = "client_state";
  private String clientState;

  public static final String JSON_PROPERTY_COMMAND_ID = "command_id";
  private String commandId;

  public static final String JSON_PROPERTY_PLAY_BEEP = "play_beep";
  private Boolean playBeep;


  public StartRecordingRequest format(FormatEnum format) {
    this.format = format;
    return this;
  }

   /**
   * The audio file format used when storing the call recording. Can be either `mp3` or `wav`.
   * @return format
  **/
  @ApiModelProperty(example = "mp3", required = true, value = "The audio file format used when storing the call recording. Can be either `mp3` or `wav`.")
  @JsonProperty(JSON_PROPERTY_FORMAT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public FormatEnum getFormat() {
    return format;
  }


  public void setFormat(FormatEnum format) {
    this.format = format;
  }


  public StartRecordingRequest channels(ChannelsEnum channels) {
    this.channels = channels;
    return this;
  }

   /**
   * When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.
   * @return channels
  **/
  @ApiModelProperty(example = "single", required = true, value = "When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.")
  @JsonProperty(JSON_PROPERTY_CHANNELS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public ChannelsEnum getChannels() {
    return channels;
  }


  public void setChannels(ChannelsEnum channels) {
    this.channels = channels;
  }


  public StartRecordingRequest clientState(String clientState) {
    this.clientState = clientState;
    return this;
  }

   /**
   * Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
   * @return clientState
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "aGF2ZSBhIG5pY2UgZGF5ID1d", value = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.")
  @JsonProperty(JSON_PROPERTY_CLIENT_STATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getClientState() {
    return clientState;
  }


  public void setClientState(String clientState) {
    this.clientState = clientState;
  }


  public StartRecordingRequest commandId(String commandId) {
    this.commandId = commandId;
    return this;
  }

   /**
   * Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.
   * @return commandId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "891510ac-f3e4-11e8-af5b-de00688a4901", value = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.")
  @JsonProperty(JSON_PROPERTY_COMMAND_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getCommandId() {
    return commandId;
  }


  public void setCommandId(String commandId) {
    this.commandId = commandId;
  }


  public StartRecordingRequest playBeep(Boolean playBeep) {
    this.playBeep = playBeep;
    return this;
  }

   /**
   * If enabled, a beep sound will be played at the start of a recording.
   * @return playBeep
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "If enabled, a beep sound will be played at the start of a recording.")
  @JsonProperty(JSON_PROPERTY_PLAY_BEEP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getPlayBeep() {
    return playBeep;
  }


  public void setPlayBeep(Boolean playBeep) {
    this.playBeep = playBeep;
  }


  /**
   * Return true if this StartRecordingRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StartRecordingRequest startRecordingRequest = (StartRecordingRequest) o;
    return Objects.equals(this.format, startRecordingRequest.format) &&
        Objects.equals(this.channels, startRecordingRequest.channels) &&
        Objects.equals(this.clientState, startRecordingRequest.clientState) &&
        Objects.equals(this.commandId, startRecordingRequest.commandId) &&
        Objects.equals(this.playBeep, startRecordingRequest.playBeep);
  }

  @Override
  public int hashCode() {
    return Objects.hash(format, channels, clientState, commandId, playBeep);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StartRecordingRequest {\n");
    sb.append("    format: ").append(toIndentedString(format)).append("\n");
    sb.append("    channels: ").append(toIndentedString(channels)).append("\n");
    sb.append("    clientState: ").append(toIndentedString(clientState)).append("\n");
    sb.append("    commandId: ").append(toIndentedString(commandId)).append("\n");
    sb.append("    playBeep: ").append(toIndentedString(playBeep)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy