/* 
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

package dev.plexapi.sdk.models.operations;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;


public class GetSessionsStream {

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("albumGain")
    private Optional<String> albumGain;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("albumPeak")
    private Optional<String> albumPeak;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("albumRange")
    private Optional<String> albumRange;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("audioChannelLayout")
    private Optional<String> audioChannelLayout;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("bitDepth")
    private Optional<Integer> bitDepth;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("bitrate")
    private Optional<Integer> bitrate;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("channels")
    private Optional<Integer> channels;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("codec")
    private Optional<String> codec;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("displayTitle")
    private Optional<String> displayTitle;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("extendedDisplayTitle")
    private Optional<String> extendedDisplayTitle;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("gain")
    private Optional<String> gain;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("id")
    private Optional<String> id;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("index")
    private Optional<Integer> index;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("loudness")
    private Optional<String> loudness;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("lra")
    private Optional<String> lra;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("peak")
    private Optional<String> peak;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("samplingRate")
    private Optional<Integer> samplingRate;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("selected")
    private Optional<Boolean> selected;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("streamType")
    private Optional<Integer> streamType;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("location")
    private Optional<String> location;

    @JsonCreator
    public GetSessionsStream(
            @JsonProperty("albumGain") Optional<String> albumGain,
            @JsonProperty("albumPeak") Optional<String> albumPeak,
            @JsonProperty("albumRange") Optional<String> albumRange,
            @JsonProperty("audioChannelLayout") Optional<String> audioChannelLayout,
            @JsonProperty("bitDepth") Optional<Integer> bitDepth,
            @JsonProperty("bitrate") Optional<Integer> bitrate,
            @JsonProperty("channels") Optional<Integer> channels,
            @JsonProperty("codec") Optional<String> codec,
            @JsonProperty("displayTitle") Optional<String> displayTitle,
            @JsonProperty("extendedDisplayTitle") Optional<String> extendedDisplayTitle,
            @JsonProperty("gain") Optional<String> gain,
            @JsonProperty("id") Optional<String> id,
            @JsonProperty("index") Optional<Integer> index,
            @JsonProperty("loudness") Optional<String> loudness,
            @JsonProperty("lra") Optional<String> lra,
            @JsonProperty("peak") Optional<String> peak,
            @JsonProperty("samplingRate") Optional<Integer> samplingRate,
            @JsonProperty("selected") Optional<Boolean> selected,
            @JsonProperty("streamType") Optional<Integer> streamType,
            @JsonProperty("location") Optional<String> location) {
        Utils.checkNotNull(albumGain, "albumGain");
        Utils.checkNotNull(albumPeak, "albumPeak");
        Utils.checkNotNull(albumRange, "albumRange");
        Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
        Utils.checkNotNull(bitDepth, "bitDepth");
        Utils.checkNotNull(bitrate, "bitrate");
        Utils.checkNotNull(channels, "channels");
        Utils.checkNotNull(codec, "codec");
        Utils.checkNotNull(displayTitle, "displayTitle");
        Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
        Utils.checkNotNull(gain, "gain");
        Utils.checkNotNull(id, "id");
        Utils.checkNotNull(index, "index");
        Utils.checkNotNull(loudness, "loudness");
        Utils.checkNotNull(lra, "lra");
        Utils.checkNotNull(peak, "peak");
        Utils.checkNotNull(samplingRate, "samplingRate");
        Utils.checkNotNull(selected, "selected");
        Utils.checkNotNull(streamType, "streamType");
        Utils.checkNotNull(location, "location");
        this.albumGain = albumGain;
        this.albumPeak = albumPeak;
        this.albumRange = albumRange;
        this.audioChannelLayout = audioChannelLayout;
        this.bitDepth = bitDepth;
        this.bitrate = bitrate;
        this.channels = channels;
        this.codec = codec;
        this.displayTitle = displayTitle;
        this.extendedDisplayTitle = extendedDisplayTitle;
        this.gain = gain;
        this.id = id;
        this.index = index;
        this.loudness = loudness;
        this.lra = lra;
        this.peak = peak;
        this.samplingRate = samplingRate;
        this.selected = selected;
        this.streamType = streamType;
        this.location = location;
    }
    
    public GetSessionsStream() {
        this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

    @JsonIgnore
    public Optional<String> albumGain() {
        return albumGain;
    }

    @JsonIgnore
    public Optional<String> albumPeak() {
        return albumPeak;
    }

    @JsonIgnore
    public Optional<String> albumRange() {
        return albumRange;
    }

    @JsonIgnore
    public Optional<String> audioChannelLayout() {
        return audioChannelLayout;
    }

    @JsonIgnore
    public Optional<Integer> bitDepth() {
        return bitDepth;
    }

    @JsonIgnore
    public Optional<Integer> bitrate() {
        return bitrate;
    }

    @JsonIgnore
    public Optional<Integer> channels() {
        return channels;
    }

    @JsonIgnore
    public Optional<String> codec() {
        return codec;
    }

    @JsonIgnore
    public Optional<String> displayTitle() {
        return displayTitle;
    }

    @JsonIgnore
    public Optional<String> extendedDisplayTitle() {
        return extendedDisplayTitle;
    }

    @JsonIgnore
    public Optional<String> gain() {
        return gain;
    }

    @JsonIgnore
    public Optional<String> id() {
        return id;
    }

    @JsonIgnore
    public Optional<Integer> index() {
        return index;
    }

    @JsonIgnore
    public Optional<String> loudness() {
        return loudness;
    }

    @JsonIgnore
    public Optional<String> lra() {
        return lra;
    }

    @JsonIgnore
    public Optional<String> peak() {
        return peak;
    }

    @JsonIgnore
    public Optional<Integer> samplingRate() {
        return samplingRate;
    }

    @JsonIgnore
    public Optional<Boolean> selected() {
        return selected;
    }

    @JsonIgnore
    public Optional<Integer> streamType() {
        return streamType;
    }

    @JsonIgnore
    public Optional<String> location() {
        return location;
    }

    public final static Builder builder() {
        return new Builder();
    }

    public GetSessionsStream withAlbumGain(String albumGain) {
        Utils.checkNotNull(albumGain, "albumGain");
        this.albumGain = Optional.ofNullable(albumGain);
        return this;
    }

    public GetSessionsStream withAlbumGain(Optional<String> albumGain) {
        Utils.checkNotNull(albumGain, "albumGain");
        this.albumGain = albumGain;
        return this;
    }

    public GetSessionsStream withAlbumPeak(String albumPeak) {
        Utils.checkNotNull(albumPeak, "albumPeak");
        this.albumPeak = Optional.ofNullable(albumPeak);
        return this;
    }

    public GetSessionsStream withAlbumPeak(Optional<String> albumPeak) {
        Utils.checkNotNull(albumPeak, "albumPeak");
        this.albumPeak = albumPeak;
        return this;
    }

    public GetSessionsStream withAlbumRange(String albumRange) {
        Utils.checkNotNull(albumRange, "albumRange");
        this.albumRange = Optional.ofNullable(albumRange);
        return this;
    }

    public GetSessionsStream withAlbumRange(Optional<String> albumRange) {
        Utils.checkNotNull(albumRange, "albumRange");
        this.albumRange = albumRange;
        return this;
    }

    public GetSessionsStream withAudioChannelLayout(String audioChannelLayout) {
        Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
        this.audioChannelLayout = Optional.ofNullable(audioChannelLayout);
        return this;
    }

    public GetSessionsStream withAudioChannelLayout(Optional<String> audioChannelLayout) {
        Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
        this.audioChannelLayout = audioChannelLayout;
        return this;
    }

    public GetSessionsStream withBitDepth(int bitDepth) {
        Utils.checkNotNull(bitDepth, "bitDepth");
        this.bitDepth = Optional.ofNullable(bitDepth);
        return this;
    }

    public GetSessionsStream withBitDepth(Optional<Integer> bitDepth) {
        Utils.checkNotNull(bitDepth, "bitDepth");
        this.bitDepth = bitDepth;
        return this;
    }

    public GetSessionsStream withBitrate(int bitrate) {
        Utils.checkNotNull(bitrate, "bitrate");
        this.bitrate = Optional.ofNullable(bitrate);
        return this;
    }

    public GetSessionsStream withBitrate(Optional<Integer> bitrate) {
        Utils.checkNotNull(bitrate, "bitrate");
        this.bitrate = bitrate;
        return this;
    }

    public GetSessionsStream withChannels(int channels) {
        Utils.checkNotNull(channels, "channels");
        this.channels = Optional.ofNullable(channels);
        return this;
    }

    public GetSessionsStream withChannels(Optional<Integer> channels) {
        Utils.checkNotNull(channels, "channels");
        this.channels = channels;
        return this;
    }

    public GetSessionsStream withCodec(String codec) {
        Utils.checkNotNull(codec, "codec");
        this.codec = Optional.ofNullable(codec);
        return this;
    }

    public GetSessionsStream withCodec(Optional<String> codec) {
        Utils.checkNotNull(codec, "codec");
        this.codec = codec;
        return this;
    }

    public GetSessionsStream withDisplayTitle(String displayTitle) {
        Utils.checkNotNull(displayTitle, "displayTitle");
        this.displayTitle = Optional.ofNullable(displayTitle);
        return this;
    }

    public GetSessionsStream withDisplayTitle(Optional<String> displayTitle) {
        Utils.checkNotNull(displayTitle, "displayTitle");
        this.displayTitle = displayTitle;
        return this;
    }

    public GetSessionsStream withExtendedDisplayTitle(String extendedDisplayTitle) {
        Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
        this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle);
        return this;
    }

    public GetSessionsStream withExtendedDisplayTitle(Optional<String> extendedDisplayTitle) {
        Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
        this.extendedDisplayTitle = extendedDisplayTitle;
        return this;
    }

    public GetSessionsStream withGain(String gain) {
        Utils.checkNotNull(gain, "gain");
        this.gain = Optional.ofNullable(gain);
        return this;
    }

    public GetSessionsStream withGain(Optional<String> gain) {
        Utils.checkNotNull(gain, "gain");
        this.gain = gain;
        return this;
    }

    public GetSessionsStream withId(String id) {
        Utils.checkNotNull(id, "id");
        this.id = Optional.ofNullable(id);
        return this;
    }

    public GetSessionsStream withId(Optional<String> id) {
        Utils.checkNotNull(id, "id");
        this.id = id;
        return this;
    }

    public GetSessionsStream withIndex(int index) {
        Utils.checkNotNull(index, "index");
        this.index = Optional.ofNullable(index);
        return this;
    }

    public GetSessionsStream withIndex(Optional<Integer> index) {
        Utils.checkNotNull(index, "index");
        this.index = index;
        return this;
    }

    public GetSessionsStream withLoudness(String loudness) {
        Utils.checkNotNull(loudness, "loudness");
        this.loudness = Optional.ofNullable(loudness);
        return this;
    }

    public GetSessionsStream withLoudness(Optional<String> loudness) {
        Utils.checkNotNull(loudness, "loudness");
        this.loudness = loudness;
        return this;
    }

    public GetSessionsStream withLra(String lra) {
        Utils.checkNotNull(lra, "lra");
        this.lra = Optional.ofNullable(lra);
        return this;
    }

    public GetSessionsStream withLra(Optional<String> lra) {
        Utils.checkNotNull(lra, "lra");
        this.lra = lra;
        return this;
    }

    public GetSessionsStream withPeak(String peak) {
        Utils.checkNotNull(peak, "peak");
        this.peak = Optional.ofNullable(peak);
        return this;
    }

    public GetSessionsStream withPeak(Optional<String> peak) {
        Utils.checkNotNull(peak, "peak");
        this.peak = peak;
        return this;
    }

    public GetSessionsStream withSamplingRate(int samplingRate) {
        Utils.checkNotNull(samplingRate, "samplingRate");
        this.samplingRate = Optional.ofNullable(samplingRate);
        return this;
    }

    public GetSessionsStream withSamplingRate(Optional<Integer> samplingRate) {
        Utils.checkNotNull(samplingRate, "samplingRate");
        this.samplingRate = samplingRate;
        return this;
    }

    public GetSessionsStream withSelected(boolean selected) {
        Utils.checkNotNull(selected, "selected");
        this.selected = Optional.ofNullable(selected);
        return this;
    }

    public GetSessionsStream withSelected(Optional<Boolean> selected) {
        Utils.checkNotNull(selected, "selected");
        this.selected = selected;
        return this;
    }

    public GetSessionsStream withStreamType(int streamType) {
        Utils.checkNotNull(streamType, "streamType");
        this.streamType = Optional.ofNullable(streamType);
        return this;
    }

    public GetSessionsStream withStreamType(Optional<Integer> streamType) {
        Utils.checkNotNull(streamType, "streamType");
        this.streamType = streamType;
        return this;
    }

    public GetSessionsStream withLocation(String location) {
        Utils.checkNotNull(location, "location");
        this.location = Optional.ofNullable(location);
        return this;
    }

    public GetSessionsStream withLocation(Optional<String> location) {
        Utils.checkNotNull(location, "location");
        this.location = location;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetSessionsStream other = (GetSessionsStream) o;
        return 
            Objects.deepEquals(this.albumGain, other.albumGain) &&
            Objects.deepEquals(this.albumPeak, other.albumPeak) &&
            Objects.deepEquals(this.albumRange, other.albumRange) &&
            Objects.deepEquals(this.audioChannelLayout, other.audioChannelLayout) &&
            Objects.deepEquals(this.bitDepth, other.bitDepth) &&
            Objects.deepEquals(this.bitrate, other.bitrate) &&
            Objects.deepEquals(this.channels, other.channels) &&
            Objects.deepEquals(this.codec, other.codec) &&
            Objects.deepEquals(this.displayTitle, other.displayTitle) &&
            Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) &&
            Objects.deepEquals(this.gain, other.gain) &&
            Objects.deepEquals(this.id, other.id) &&
            Objects.deepEquals(this.index, other.index) &&
            Objects.deepEquals(this.loudness, other.loudness) &&
            Objects.deepEquals(this.lra, other.lra) &&
            Objects.deepEquals(this.peak, other.peak) &&
            Objects.deepEquals(this.samplingRate, other.samplingRate) &&
            Objects.deepEquals(this.selected, other.selected) &&
            Objects.deepEquals(this.streamType, other.streamType) &&
            Objects.deepEquals(this.location, other.location);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            albumGain,
            albumPeak,
            albumRange,
            audioChannelLayout,
            bitDepth,
            bitrate,
            channels,
            codec,
            displayTitle,
            extendedDisplayTitle,
            gain,
            id,
            index,
            loudness,
            lra,
            peak,
            samplingRate,
            selected,
            streamType,
            location);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetSessionsStream.class,
                "albumGain", albumGain,
                "albumPeak", albumPeak,
                "albumRange", albumRange,
                "audioChannelLayout", audioChannelLayout,
                "bitDepth", bitDepth,
                "bitrate", bitrate,
                "channels", channels,
                "codec", codec,
                "displayTitle", displayTitle,
                "extendedDisplayTitle", extendedDisplayTitle,
                "gain", gain,
                "id", id,
                "index", index,
                "loudness", loudness,
                "lra", lra,
                "peak", peak,
                "samplingRate", samplingRate,
                "selected", selected,
                "streamType", streamType,
                "location", location);
    }
    
    public final static class Builder {
 
        private Optional<String> albumGain = Optional.empty();
 
        private Optional<String> albumPeak = Optional.empty();
 
        private Optional<String> albumRange = Optional.empty();
 
        private Optional<String> audioChannelLayout = Optional.empty();
 
        private Optional<Integer> bitDepth = Optional.empty();
 
        private Optional<Integer> bitrate = Optional.empty();
 
        private Optional<Integer> channels = Optional.empty();
 
        private Optional<String> codec = Optional.empty();
 
        private Optional<String> displayTitle = Optional.empty();
 
        private Optional<String> extendedDisplayTitle = Optional.empty();
 
        private Optional<String> gain = Optional.empty();
 
        private Optional<String> id = Optional.empty();
 
        private Optional<Integer> index = Optional.empty();
 
        private Optional<String> loudness = Optional.empty();
 
        private Optional<String> lra = Optional.empty();
 
        private Optional<String> peak = Optional.empty();
 
        private Optional<Integer> samplingRate = Optional.empty();
 
        private Optional<Boolean> selected = Optional.empty();
 
        private Optional<Integer> streamType = Optional.empty();
 
        private Optional<String> location = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

        public Builder albumGain(String albumGain) {
            Utils.checkNotNull(albumGain, "albumGain");
            this.albumGain = Optional.ofNullable(albumGain);
            return this;
        }

        public Builder albumGain(Optional<String> albumGain) {
            Utils.checkNotNull(albumGain, "albumGain");
            this.albumGain = albumGain;
            return this;
        }

        public Builder albumPeak(String albumPeak) {
            Utils.checkNotNull(albumPeak, "albumPeak");
            this.albumPeak = Optional.ofNullable(albumPeak);
            return this;
        }

        public Builder albumPeak(Optional<String> albumPeak) {
            Utils.checkNotNull(albumPeak, "albumPeak");
            this.albumPeak = albumPeak;
            return this;
        }

        public Builder albumRange(String albumRange) {
            Utils.checkNotNull(albumRange, "albumRange");
            this.albumRange = Optional.ofNullable(albumRange);
            return this;
        }

        public Builder albumRange(Optional<String> albumRange) {
            Utils.checkNotNull(albumRange, "albumRange");
            this.albumRange = albumRange;
            return this;
        }

        public Builder audioChannelLayout(String audioChannelLayout) {
            Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
            this.audioChannelLayout = Optional.ofNullable(audioChannelLayout);
            return this;
        }

        public Builder audioChannelLayout(Optional<String> audioChannelLayout) {
            Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
            this.audioChannelLayout = audioChannelLayout;
            return this;
        }

        public Builder bitDepth(int bitDepth) {
            Utils.checkNotNull(bitDepth, "bitDepth");
            this.bitDepth = Optional.ofNullable(bitDepth);
            return this;
        }

        public Builder bitDepth(Optional<Integer> bitDepth) {
            Utils.checkNotNull(bitDepth, "bitDepth");
            this.bitDepth = bitDepth;
            return this;
        }

        public Builder bitrate(int bitrate) {
            Utils.checkNotNull(bitrate, "bitrate");
            this.bitrate = Optional.ofNullable(bitrate);
            return this;
        }

        public Builder bitrate(Optional<Integer> bitrate) {
            Utils.checkNotNull(bitrate, "bitrate");
            this.bitrate = bitrate;
            return this;
        }

        public Builder channels(int channels) {
            Utils.checkNotNull(channels, "channels");
            this.channels = Optional.ofNullable(channels);
            return this;
        }

        public Builder channels(Optional<Integer> channels) {
            Utils.checkNotNull(channels, "channels");
            this.channels = channels;
            return this;
        }

        public Builder codec(String codec) {
            Utils.checkNotNull(codec, "codec");
            this.codec = Optional.ofNullable(codec);
            return this;
        }

        public Builder codec(Optional<String> codec) {
            Utils.checkNotNull(codec, "codec");
            this.codec = codec;
            return this;
        }

        public Builder displayTitle(String displayTitle) {
            Utils.checkNotNull(displayTitle, "displayTitle");
            this.displayTitle = Optional.ofNullable(displayTitle);
            return this;
        }

        public Builder displayTitle(Optional<String> displayTitle) {
            Utils.checkNotNull(displayTitle, "displayTitle");
            this.displayTitle = displayTitle;
            return this;
        }

        public Builder extendedDisplayTitle(String extendedDisplayTitle) {
            Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
            this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle);
            return this;
        }

        public Builder extendedDisplayTitle(Optional<String> extendedDisplayTitle) {
            Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
            this.extendedDisplayTitle = extendedDisplayTitle;
            return this;
        }

        public Builder gain(String gain) {
            Utils.checkNotNull(gain, "gain");
            this.gain = Optional.ofNullable(gain);
            return this;
        }

        public Builder gain(Optional<String> gain) {
            Utils.checkNotNull(gain, "gain");
            this.gain = gain;
            return this;
        }

        public Builder id(String id) {
            Utils.checkNotNull(id, "id");
            this.id = Optional.ofNullable(id);
            return this;
        }

        public Builder id(Optional<String> id) {
            Utils.checkNotNull(id, "id");
            this.id = id;
            return this;
        }

        public Builder index(int index) {
            Utils.checkNotNull(index, "index");
            this.index = Optional.ofNullable(index);
            return this;
        }

        public Builder index(Optional<Integer> index) {
            Utils.checkNotNull(index, "index");
            this.index = index;
            return this;
        }

        public Builder loudness(String loudness) {
            Utils.checkNotNull(loudness, "loudness");
            this.loudness = Optional.ofNullable(loudness);
            return this;
        }

        public Builder loudness(Optional<String> loudness) {
            Utils.checkNotNull(loudness, "loudness");
            this.loudness = loudness;
            return this;
        }

        public Builder lra(String lra) {
            Utils.checkNotNull(lra, "lra");
            this.lra = Optional.ofNullable(lra);
            return this;
        }

        public Builder lra(Optional<String> lra) {
            Utils.checkNotNull(lra, "lra");
            this.lra = lra;
            return this;
        }

        public Builder peak(String peak) {
            Utils.checkNotNull(peak, "peak");
            this.peak = Optional.ofNullable(peak);
            return this;
        }

        public Builder peak(Optional<String> peak) {
            Utils.checkNotNull(peak, "peak");
            this.peak = peak;
            return this;
        }

        public Builder samplingRate(int samplingRate) {
            Utils.checkNotNull(samplingRate, "samplingRate");
            this.samplingRate = Optional.ofNullable(samplingRate);
            return this;
        }

        public Builder samplingRate(Optional<Integer> samplingRate) {
            Utils.checkNotNull(samplingRate, "samplingRate");
            this.samplingRate = samplingRate;
            return this;
        }

        public Builder selected(boolean selected) {
            Utils.checkNotNull(selected, "selected");
            this.selected = Optional.ofNullable(selected);
            return this;
        }

        public Builder selected(Optional<Boolean> selected) {
            Utils.checkNotNull(selected, "selected");
            this.selected = selected;
            return this;
        }

        public Builder streamType(int streamType) {
            Utils.checkNotNull(streamType, "streamType");
            this.streamType = Optional.ofNullable(streamType);
            return this;
        }

        public Builder streamType(Optional<Integer> streamType) {
            Utils.checkNotNull(streamType, "streamType");
            this.streamType = streamType;
            return this;
        }

        public Builder location(String location) {
            Utils.checkNotNull(location, "location");
            this.location = Optional.ofNullable(location);
            return this;
        }

        public Builder location(Optional<String> location) {
            Utils.checkNotNull(location, "location");
            this.location = location;
            return this;
        }
        
        public GetSessionsStream build() {
            return new GetSessionsStream(
                albumGain,
                albumPeak,
                albumRange,
                audioChannelLayout,
                bitDepth,
                bitrate,
                channels,
                codec,
                displayTitle,
                extendedDisplayTitle,
                gain,
                id,
                index,
                loudness,
                lra,
                peak,
                samplingRate,
                selected,
                streamType,
                location);
        }
    }
}

