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

nl.vpro.nep.sam.model.StreamWithoutRequiredPropertiesAttributes Maven / Gradle / Ivy

There is a newer version: 8.3.1
Show newest version
/*
 * Stream Access Manager
 * Get access to a stream in order to view it
 *
 * The version of the OpenAPI document: 4.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package nl.vpro.nep.sam.model;

import java.util.Objects;
import java.util.Arrays;
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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import nl.vpro.nep.sam.model.StreamProfileItemAttributes;
import nl.vpro.nep.sam.model.StreamTypeEnum;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;

/**
 * StreamWithoutRequiredPropertiesAttributes
 */
@JsonPropertyOrder({
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_STREAM_TYPE,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_START_TIME,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_STOP_TIME,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_CHANNEL,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_STATUS,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_LEGACY,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_VERSION,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_DRM,
  StreamWithoutRequiredPropertiesAttributes.JSON_PROPERTY_PROFILES
})
@JsonTypeName("StreamWithoutRequiredProperties_attributes")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-18T10:26:20.602909888Z[Etc/UTC]", comments = "Generator version: 7.6.0")
public class StreamWithoutRequiredPropertiesAttributes {
  public static final String JSON_PROPERTY_STREAM_TYPE = "streamType";
  private StreamTypeEnum streamType;

  public static final String JSON_PROPERTY_START_TIME = "startTime";
  private String startTime;

  public static final String JSON_PROPERTY_STOP_TIME = "stopTime";
  private String stopTime;

  public static final String JSON_PROPERTY_CHANNEL = "channel";
  private String channel;

  /**
   * The status of the stream (offline or online)
   */
  public enum StatusEnum {
    OFFLINE("offline"),
    
    ONLINE("online");

    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_LEGACY = "legacy";
  private Boolean legacy = false;

  public static final String JSON_PROPERTY_VERSION = "version";
  private Integer version;

  public static final String JSON_PROPERTY_DRM = "drm";
  private Boolean drm = true;

  public static final String JSON_PROPERTY_PROFILES = "profiles";
  private List<@Valid StreamProfileItemAttributes> profiles = new ArrayList<>();

  public StreamWithoutRequiredPropertiesAttributes() {
  }

  public StreamWithoutRequiredPropertiesAttributes streamType(StreamTypeEnum streamType) {
    
    this.streamType = streamType;
    return this;
  }

   /**
   * Get streamType
   * @return streamType
  **/
  @jakarta.annotation.Nullable
  @Valid

  @JsonProperty(JSON_PROPERTY_STREAM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public StreamTypeEnum getStreamType() {
    return streamType;
  }


  @JsonProperty(JSON_PROPERTY_STREAM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStreamType(StreamTypeEnum streamType) {
    this.streamType = streamType;
  }

  public StreamWithoutRequiredPropertiesAttributes startTime(String startTime) {
    
    this.startTime = startTime;
    return this;
  }

   /**
   * The start time of the stream
   * @return startTime
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_START_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStartTime() {
    return startTime;
  }


  @JsonProperty(JSON_PROPERTY_START_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStartTime(String startTime) {
    this.startTime = startTime;
  }

  public StreamWithoutRequiredPropertiesAttributes stopTime(String stopTime) {
    
    this.stopTime = stopTime;
    return this;
  }

   /**
   * The stop time of the stream
   * @return stopTime
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_STOP_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStopTime() {
    return stopTime;
  }


  @JsonProperty(JSON_PROPERTY_STOP_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStopTime(String stopTime) {
    this.stopTime = stopTime;
  }

  public StreamWithoutRequiredPropertiesAttributes channel(String channel) {
    
    this.channel = channel;
    return this;
  }

   /**
   * The stream id of the channel where this stream is broadcasted
   * @return channel
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_CHANNEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getChannel() {
    return channel;
  }


  @JsonProperty(JSON_PROPERTY_CHANNEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setChannel(String channel) {
    this.channel = channel;
  }

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

   /**
   * The status of the stream (offline or online)
   * @return status
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public StatusEnum getStatus() {
    return status;
  }


  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  public StreamWithoutRequiredPropertiesAttributes legacy(Boolean legacy) {
    
    this.legacy = legacy;
    return this;
  }

   /**
   * Flags if the stream has not been migrated to the new cdn yet, default: false
   * @return legacy
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_LEGACY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getLegacy() {
    return legacy;
  }


  @JsonProperty(JSON_PROPERTY_LEGACY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLegacy(Boolean legacy) {
    this.legacy = legacy;
  }

  public StreamWithoutRequiredPropertiesAttributes version(Integer version) {
    
    this.version = version;
    return this;
  }

   /**
   * Get version
   * @return version
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getVersion() {
    return version;
  }


  @JsonProperty(JSON_PROPERTY_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setVersion(Integer version) {
    this.version = version;
  }

  public StreamWithoutRequiredPropertiesAttributes drm(Boolean drm) {
    
    this.drm = drm;
    return this;
  }

   /**
   * Indicates if the stream has drm encryption or not, default: true
   * @return drm
  **/
  @jakarta.annotation.Nullable

  @JsonProperty(JSON_PROPERTY_DRM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getDrm() {
    return drm;
  }


  @JsonProperty(JSON_PROPERTY_DRM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDrm(Boolean drm) {
    this.drm = drm;
  }

  public StreamWithoutRequiredPropertiesAttributes profiles(List<@Valid StreamProfileItemAttributes> profiles) {
    
    this.profiles = profiles;
    return this;
  }

  public StreamWithoutRequiredPropertiesAttributes addProfilesItem(StreamProfileItemAttributes profilesItem) {
    if (this.profiles == null) {
      this.profiles = new ArrayList<>();
    }
    this.profiles.add(profilesItem);
    return this;
  }

   /**
   * Get profiles
   * @return profiles
  **/
  @jakarta.annotation.Nullable
  @Valid

  @JsonProperty(JSON_PROPERTY_PROFILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<@Valid StreamProfileItemAttributes> getProfiles() {
    return profiles;
  }


  @JsonProperty(JSON_PROPERTY_PROFILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProfiles(List<@Valid StreamProfileItemAttributes> profiles) {
    this.profiles = profiles;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StreamWithoutRequiredPropertiesAttributes streamWithoutRequiredPropertiesAttributes = (StreamWithoutRequiredPropertiesAttributes) o;
    return Objects.equals(this.streamType, streamWithoutRequiredPropertiesAttributes.streamType) &&
        Objects.equals(this.startTime, streamWithoutRequiredPropertiesAttributes.startTime) &&
        Objects.equals(this.stopTime, streamWithoutRequiredPropertiesAttributes.stopTime) &&
        Objects.equals(this.channel, streamWithoutRequiredPropertiesAttributes.channel) &&
        Objects.equals(this.status, streamWithoutRequiredPropertiesAttributes.status) &&
        Objects.equals(this.legacy, streamWithoutRequiredPropertiesAttributes.legacy) &&
        Objects.equals(this.version, streamWithoutRequiredPropertiesAttributes.version) &&
        Objects.equals(this.drm, streamWithoutRequiredPropertiesAttributes.drm) &&
        Objects.equals(this.profiles, streamWithoutRequiredPropertiesAttributes.profiles);
  }

  @Override
  public int hashCode() {
    return Objects.hash(streamType, startTime, stopTime, channel, status, legacy, version, drm, profiles);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StreamWithoutRequiredPropertiesAttributes {\n");
    sb.append("    streamType: ").append(toIndentedString(streamType)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    stopTime: ").append(toIndentedString(stopTime)).append("\n");
    sb.append("    channel: ").append(toIndentedString(channel)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    legacy: ").append(toIndentedString(legacy)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    drm: ").append(toIndentedString(drm)).append("\n");
    sb.append("    profiles: ").append(toIndentedString(profiles)).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 - 2025 Weber Informatics LLC | Privacy Policy