/* 
 * 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.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.List;
import java.util.Objects;


public class GetAllLibrariesMediaContainer {

    @JsonProperty("size")
    private int size;

    @JsonProperty("allowSync")
    private boolean allowSync;

    @JsonProperty("title1")
    private String title1;

    @JsonProperty("Directory")
    private List<GetAllLibrariesDirectory> directory;

    @JsonCreator
    public GetAllLibrariesMediaContainer(
            @JsonProperty("size") int size,
            @JsonProperty("allowSync") boolean allowSync,
            @JsonProperty("title1") String title1,
            @JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
        Utils.checkNotNull(size, "size");
        Utils.checkNotNull(allowSync, "allowSync");
        Utils.checkNotNull(title1, "title1");
        Utils.checkNotNull(directory, "directory");
        this.size = size;
        this.allowSync = allowSync;
        this.title1 = title1;
        this.directory = directory;
    }

    @JsonIgnore
    public int size() {
        return size;
    }

    @JsonIgnore
    public boolean allowSync() {
        return allowSync;
    }

    @JsonIgnore
    public String title1() {
        return title1;
    }

    @JsonIgnore
    public List<GetAllLibrariesDirectory> directory() {
        return directory;
    }

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

    public GetAllLibrariesMediaContainer withSize(int size) {
        Utils.checkNotNull(size, "size");
        this.size = size;
        return this;
    }

    public GetAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
        Utils.checkNotNull(allowSync, "allowSync");
        this.allowSync = allowSync;
        return this;
    }

    public GetAllLibrariesMediaContainer withTitle1(String title1) {
        Utils.checkNotNull(title1, "title1");
        this.title1 = title1;
        return this;
    }

    public GetAllLibrariesMediaContainer withDirectory(List<GetAllLibrariesDirectory> directory) {
        Utils.checkNotNull(directory, "directory");
        this.directory = directory;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetAllLibrariesMediaContainer other = (GetAllLibrariesMediaContainer) o;
        return 
            Objects.deepEquals(this.size, other.size) &&
            Objects.deepEquals(this.allowSync, other.allowSync) &&
            Objects.deepEquals(this.title1, other.title1) &&
            Objects.deepEquals(this.directory, other.directory);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            size,
            allowSync,
            title1,
            directory);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetAllLibrariesMediaContainer.class,
                "size", size,
                "allowSync", allowSync,
                "title1", title1,
                "directory", directory);
    }
    
    public final static class Builder {
 
        private Integer size;
 
        private Boolean allowSync;
 
        private String title1;
 
        private List<GetAllLibrariesDirectory> directory;  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

        public Builder directory(List<GetAllLibrariesDirectory> directory) {
            Utils.checkNotNull(directory, "directory");
            this.directory = directory;
            return this;
        }
        
        public GetAllLibrariesMediaContainer build() {
            return new GetAllLibrariesMediaContainer(
                size,
                allowSync,
                title1,
                directory);
        }
    }
}

