/* 
 * 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.Double;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;

/**
 * GetHomeDataResponseBody - Home Data
 */

public class GetHomeDataResponseBody {

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("guestUserID")
    private Optional<Double> guestUserID;

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

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

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

    @JsonCreator
    public GetHomeDataResponseBody(
            @JsonProperty("id") Optional<Double> id,
            @JsonProperty("name") Optional<String> name,
            @JsonProperty("guestUserID") Optional<Double> guestUserID,
            @JsonProperty("guestUserUUID") Optional<String> guestUserUUID,
            @JsonProperty("guestEnabled") Optional<Boolean> guestEnabled,
            @JsonProperty("subscription") Optional<Boolean> subscription) {
        Utils.checkNotNull(id, "id");
        Utils.checkNotNull(name, "name");
        Utils.checkNotNull(guestUserID, "guestUserID");
        Utils.checkNotNull(guestUserUUID, "guestUserUUID");
        Utils.checkNotNull(guestEnabled, "guestEnabled");
        Utils.checkNotNull(subscription, "subscription");
        this.id = id;
        this.name = name;
        this.guestUserID = guestUserID;
        this.guestUserUUID = guestUserUUID;
        this.guestEnabled = guestEnabled;
        this.subscription = subscription;
    }
    
    public GetHomeDataResponseBody() {
        this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

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

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

    @JsonIgnore
    public Optional<Double> guestUserID() {
        return guestUserID;
    }

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

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

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

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

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

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

    public GetHomeDataResponseBody withName(String name) {
        Utils.checkNotNull(name, "name");
        this.name = Optional.ofNullable(name);
        return this;
    }

    public GetHomeDataResponseBody withName(Optional<String> name) {
        Utils.checkNotNull(name, "name");
        this.name = name;
        return this;
    }

    public GetHomeDataResponseBody withGuestUserID(double guestUserID) {
        Utils.checkNotNull(guestUserID, "guestUserID");
        this.guestUserID = Optional.ofNullable(guestUserID);
        return this;
    }

    public GetHomeDataResponseBody withGuestUserID(Optional<Double> guestUserID) {
        Utils.checkNotNull(guestUserID, "guestUserID");
        this.guestUserID = guestUserID;
        return this;
    }

    public GetHomeDataResponseBody withGuestUserUUID(String guestUserUUID) {
        Utils.checkNotNull(guestUserUUID, "guestUserUUID");
        this.guestUserUUID = Optional.ofNullable(guestUserUUID);
        return this;
    }

    public GetHomeDataResponseBody withGuestUserUUID(Optional<String> guestUserUUID) {
        Utils.checkNotNull(guestUserUUID, "guestUserUUID");
        this.guestUserUUID = guestUserUUID;
        return this;
    }

    public GetHomeDataResponseBody withGuestEnabled(boolean guestEnabled) {
        Utils.checkNotNull(guestEnabled, "guestEnabled");
        this.guestEnabled = Optional.ofNullable(guestEnabled);
        return this;
    }

    public GetHomeDataResponseBody withGuestEnabled(Optional<Boolean> guestEnabled) {
        Utils.checkNotNull(guestEnabled, "guestEnabled");
        this.guestEnabled = guestEnabled;
        return this;
    }

    public GetHomeDataResponseBody withSubscription(boolean subscription) {
        Utils.checkNotNull(subscription, "subscription");
        this.subscription = Optional.ofNullable(subscription);
        return this;
    }

    public GetHomeDataResponseBody withSubscription(Optional<Boolean> subscription) {
        Utils.checkNotNull(subscription, "subscription");
        this.subscription = subscription;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetHomeDataResponseBody other = (GetHomeDataResponseBody) o;
        return 
            Objects.deepEquals(this.id, other.id) &&
            Objects.deepEquals(this.name, other.name) &&
            Objects.deepEquals(this.guestUserID, other.guestUserID) &&
            Objects.deepEquals(this.guestUserUUID, other.guestUserUUID) &&
            Objects.deepEquals(this.guestEnabled, other.guestEnabled) &&
            Objects.deepEquals(this.subscription, other.subscription);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            id,
            name,
            guestUserID,
            guestUserUUID,
            guestEnabled,
            subscription);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetHomeDataResponseBody.class,
                "id", id,
                "name", name,
                "guestUserID", guestUserID,
                "guestUserUUID", guestUserUUID,
                "guestEnabled", guestEnabled,
                "subscription", subscription);
    }
    
    public final static class Builder {
 
        private Optional<Double> id = Optional.empty();
 
        private Optional<String> name = Optional.empty();
 
        private Optional<Double> guestUserID = Optional.empty();
 
        private Optional<String> guestUserUUID = Optional.empty();
 
        private Optional<Boolean> guestEnabled = Optional.empty();
 
        private Optional<Boolean> subscription = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

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

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

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

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

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

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

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

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

        public Builder subscription(Optional<Boolean> subscription) {
            Utils.checkNotNull(subscription, "subscription");
            this.subscription = subscription;
            return this;
        }
        
        public GetHomeDataResponseBody build() {
            return new GetHomeDataResponseBody(
                id,
                name,
                guestUserID,
                guestUserUUID,
                guestEnabled,
                subscription);
        }
    }
}

