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

com.telnyx.sdk.model.Participant 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 com.telnyx.sdk.model.ParticipantConference;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.telnyx.sdk.JSON;


/**
 * Participant
 */
@JsonPropertyOrder({
  Participant.JSON_PROPERTY_RECORD_TYPE,
  Participant.JSON_PROPERTY_ID,
  Participant.JSON_PROPERTY_CALL_LEG_ID,
  Participant.JSON_PROPERTY_CALL_CONTROL_ID,
  Participant.JSON_PROPERTY_CONFERENCE,
  Participant.JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS,
  Participant.JSON_PROPERTY_CREATED_AT,
  Participant.JSON_PROPERTY_UPDATED_AT,
  Participant.JSON_PROPERTY_END_CONFERENCE_ON_EXIT,
  Participant.JSON_PROPERTY_SOFT_END_CONFERENCE_ON_EXIT,
  Participant.JSON_PROPERTY_STATUS,
  Participant.JSON_PROPERTY_MUTED,
  Participant.JSON_PROPERTY_ON_HOLD
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Participant {
  /**
   * Gets or Sets recordType
   */
  public enum RecordTypeEnum {
    PARTICIPANT("participant");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_RECORD_TYPE = "record_type";
  private RecordTypeEnum recordType;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_CALL_LEG_ID = "call_leg_id";
  private String callLegId;

  public static final String JSON_PROPERTY_CALL_CONTROL_ID = "call_control_id";
  private String callControlId;

  public static final String JSON_PROPERTY_CONFERENCE = "conference";
  private ParticipantConference conference;

  public static final String JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS = "whisper_call_control_ids";
  private List whisperCallControlIds = new ArrayList<>();

  public static final String JSON_PROPERTY_CREATED_AT = "created_at";
  private String createdAt;

  public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
  private String updatedAt;

  public static final String JSON_PROPERTY_END_CONFERENCE_ON_EXIT = "end_conference_on_exit";
  private Boolean endConferenceOnExit;

  public static final String JSON_PROPERTY_SOFT_END_CONFERENCE_ON_EXIT = "soft_end_conference_on_exit";
  private Boolean softEndConferenceOnExit;

  /**
   * The status of the participant with respect to the lifecycle within the conference
   */
  public enum StatusEnum {
    JOINING("joining"),
    
    JOINED("joined"),
    
    LEFT("left");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_STATUS = "status";
  private StatusEnum status;

  public static final String JSON_PROPERTY_MUTED = "muted";
  private Boolean muted;

  public static final String JSON_PROPERTY_ON_HOLD = "on_hold";
  private Boolean onHold;


  public Participant recordType(RecordTypeEnum recordType) {
    this.recordType = recordType;
    return this;
  }

   /**
   * Get recordType
   * @return recordType
  **/
  @ApiModelProperty(example = "participant", required = true, value = "")
  @JsonProperty(JSON_PROPERTY_RECORD_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public RecordTypeEnum getRecordType() {
    return recordType;
  }


  public void setRecordType(RecordTypeEnum recordType) {
    this.recordType = recordType;
  }


  public Participant id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Uniquely identifies the participant
   * @return id
  **/
  @ApiModelProperty(example = "3fa85f64-5717-4562-b3fc-2c963f66afa6", required = true, value = "Uniquely identifies the participant")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getId() {
    return id;
  }


  public void setId(String id) {
    this.id = id;
  }


  public Participant callLegId(String callLegId) {
    this.callLegId = callLegId;
    return this;
  }

   /**
   * Uniquely identifies the call leg associated with the participant
   * @return callLegId
  **/
  @ApiModelProperty(example = "3fa85f64-5717-4562-b3fc-2c963f66afa6", required = true, value = "Uniquely identifies the call leg associated with the participant")
  @JsonProperty(JSON_PROPERTY_CALL_LEG_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getCallLegId() {
    return callLegId;
  }


  public void setCallLegId(String callLegId) {
    this.callLegId = callLegId;
  }


  public Participant callControlId(String callControlId) {
    this.callControlId = callControlId;
    return this;
  }

   /**
   * Call Control ID associated with the partiipant of the conference
   * @return callControlId
  **/
  @ApiModelProperty(example = "v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ", required = true, value = "Call Control ID associated with the partiipant of the conference")
  @JsonProperty(JSON_PROPERTY_CALL_CONTROL_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getCallControlId() {
    return callControlId;
  }


  public void setCallControlId(String callControlId) {
    this.callControlId = callControlId;
  }


  public Participant conference(ParticipantConference conference) {
    this.conference = conference;
    return this;
  }

   /**
   * Get conference
   * @return conference
  **/
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_CONFERENCE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public ParticipantConference getConference() {
    return conference;
  }


  public void setConference(ParticipantConference conference) {
    this.conference = conference;
  }


  public Participant whisperCallControlIds(List whisperCallControlIds) {
    this.whisperCallControlIds = whisperCallControlIds;
    return this;
  }

  public Participant addWhisperCallControlIdsItem(String whisperCallControlIdsItem) {
    this.whisperCallControlIds.add(whisperCallControlIdsItem);
    return this;
  }

   /**
   * Array of unique call_control_ids the participant can whisper to..
   * @return whisperCallControlIds
  **/
  @ApiModelProperty(example = "[\"v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ\",\"v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw\"]", required = true, value = "Array of unique call_control_ids the participant can whisper to..")
  @JsonProperty(JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List getWhisperCallControlIds() {
    return whisperCallControlIds;
  }


  public void setWhisperCallControlIds(List whisperCallControlIds) {
    this.whisperCallControlIds = whisperCallControlIds;
  }


  public Participant createdAt(String createdAt) {
    this.createdAt = createdAt;
    return this;
  }

   /**
   * ISO 8601 formatted date of when the participant was created
   * @return createdAt
  **/
  @ApiModelProperty(example = "2019-01-23T18:10:02.574Z", required = true, value = "ISO 8601 formatted date of when the participant was created")
  @JsonProperty(JSON_PROPERTY_CREATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getCreatedAt() {
    return createdAt;
  }


  public void setCreatedAt(String createdAt) {
    this.createdAt = createdAt;
  }


  public Participant updatedAt(String updatedAt) {
    this.updatedAt = updatedAt;
    return this;
  }

   /**
   * ISO 8601 formatted date of when the participant was last updated
   * @return updatedAt
  **/
  @ApiModelProperty(example = "2019-01-23T18:10:02.574Z", required = true, value = "ISO 8601 formatted date of when the participant was last updated")
  @JsonProperty(JSON_PROPERTY_UPDATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getUpdatedAt() {
    return updatedAt;
  }


  public void setUpdatedAt(String updatedAt) {
    this.updatedAt = updatedAt;
  }


  public Participant endConferenceOnExit(Boolean endConferenceOnExit) {
    this.endConferenceOnExit = endConferenceOnExit;
    return this;
  }

   /**
   * Whether the conference will end and all remaining participants be hung up after the participant leaves the conference.
   * @return endConferenceOnExit
  **/
  @ApiModelProperty(example = "true", required = true, value = "Whether the conference will end and all remaining participants be hung up after the participant leaves the conference.")
  @JsonProperty(JSON_PROPERTY_END_CONFERENCE_ON_EXIT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getEndConferenceOnExit() {
    return endConferenceOnExit;
  }


  public void setEndConferenceOnExit(Boolean endConferenceOnExit) {
    this.endConferenceOnExit = endConferenceOnExit;
  }


  public Participant softEndConferenceOnExit(Boolean softEndConferenceOnExit) {
    this.softEndConferenceOnExit = softEndConferenceOnExit;
    return this;
  }

   /**
   * Whether the conference will end after the participant leaves the conference.
   * @return softEndConferenceOnExit
  **/
  @ApiModelProperty(example = "true", required = true, value = "Whether the conference will end after the participant leaves the conference.")
  @JsonProperty(JSON_PROPERTY_SOFT_END_CONFERENCE_ON_EXIT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getSoftEndConferenceOnExit() {
    return softEndConferenceOnExit;
  }


  public void setSoftEndConferenceOnExit(Boolean softEndConferenceOnExit) {
    this.softEndConferenceOnExit = softEndConferenceOnExit;
  }


  public Participant status(StatusEnum status) {
    this.status = status;
    return this;
  }

   /**
   * The status of the participant with respect to the lifecycle within the conference
   * @return status
  **/
  @ApiModelProperty(example = "joining", required = true, value = "The status of the participant with respect to the lifecycle within the conference")
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public StatusEnum getStatus() {
    return status;
  }


  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  public Participant muted(Boolean muted) {
    this.muted = muted;
    return this;
  }

   /**
   * Whether the participant is muted.
   * @return muted
  **/
  @ApiModelProperty(example = "true", required = true, value = "Whether the participant is muted.")
  @JsonProperty(JSON_PROPERTY_MUTED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getMuted() {
    return muted;
  }


  public void setMuted(Boolean muted) {
    this.muted = muted;
  }


  public Participant onHold(Boolean onHold) {
    this.onHold = onHold;
    return this;
  }

   /**
   * Whether the participant is put on_hold.
   * @return onHold
  **/
  @ApiModelProperty(example = "true", required = true, value = "Whether the participant is put on_hold.")
  @JsonProperty(JSON_PROPERTY_ON_HOLD)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getOnHold() {
    return onHold;
  }


  public void setOnHold(Boolean onHold) {
    this.onHold = onHold;
  }


  /**
   * Return true if this Participant object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Participant participant = (Participant) o;
    return Objects.equals(this.recordType, participant.recordType) &&
        Objects.equals(this.id, participant.id) &&
        Objects.equals(this.callLegId, participant.callLegId) &&
        Objects.equals(this.callControlId, participant.callControlId) &&
        Objects.equals(this.conference, participant.conference) &&
        Objects.equals(this.whisperCallControlIds, participant.whisperCallControlIds) &&
        Objects.equals(this.createdAt, participant.createdAt) &&
        Objects.equals(this.updatedAt, participant.updatedAt) &&
        Objects.equals(this.endConferenceOnExit, participant.endConferenceOnExit) &&
        Objects.equals(this.softEndConferenceOnExit, participant.softEndConferenceOnExit) &&
        Objects.equals(this.status, participant.status) &&
        Objects.equals(this.muted, participant.muted) &&
        Objects.equals(this.onHold, participant.onHold);
  }

  @Override
  public int hashCode() {
    return Objects.hash(recordType, id, callLegId, callControlId, conference, whisperCallControlIds, createdAt, updatedAt, endConferenceOnExit, softEndConferenceOnExit, status, muted, onHold);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Participant {\n");
    sb.append("    recordType: ").append(toIndentedString(recordType)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    callLegId: ").append(toIndentedString(callLegId)).append("\n");
    sb.append("    callControlId: ").append(toIndentedString(callControlId)).append("\n");
    sb.append("    conference: ").append(toIndentedString(conference)).append("\n");
    sb.append("    whisperCallControlIds: ").append(toIndentedString(whisperCallControlIds)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
    sb.append("    endConferenceOnExit: ").append(toIndentedString(endConferenceOnExit)).append("\n");
    sb.append("    softEndConferenceOnExit: ").append(toIndentedString(softEndConferenceOnExit)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    muted: ").append(toIndentedString(muted)).append("\n");
    sb.append("    onHold: ").append(toIndentedString(onHold)).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