OrgEnhetSearchFilterDto.java

package no.nav.nom.graphql.model;

import java.util.StringJoiner;

@javax.annotation.processing.Generated(
    value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen",
    date = "2026-03-30T10:02:45+0000"
)
public class OrgEnhetSearchFilterDto implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    @jakarta.validation.constraints.NotNull
    private OrgnivSelectionDto orgnivSelection = OrgnivSelectionDto.ALLE;
    @jakarta.validation.constraints.NotNull
    private GyldigTomSelectionDto gyldigTomSelection = GyldigTomSelectionDto.ALLE;
    @jakarta.validation.constraints.NotNull
    private ResultLimitDto limit = ResultLimitDto.LIMIT_30;

    public OrgEnhetSearchFilterDto() {
    }

    public OrgEnhetSearchFilterDto(OrgnivSelectionDto orgnivSelection, GyldigTomSelectionDto gyldigTomSelection, ResultLimitDto limit) {
        this.orgnivSelection = orgnivSelection;
        this.gyldigTomSelection = gyldigTomSelection;
        this.limit = limit;
    }

    public OrgnivSelectionDto getOrgnivSelection() {
        return orgnivSelection;
    }
    public void setOrgnivSelection(OrgnivSelectionDto orgnivSelection) {
        this.orgnivSelection = orgnivSelection;
    }

    public GyldigTomSelectionDto getGyldigTomSelection() {
        return gyldigTomSelection;
    }
    public void setGyldigTomSelection(GyldigTomSelectionDto gyldigTomSelection) {
        this.gyldigTomSelection = gyldigTomSelection;
    }

    public ResultLimitDto getLimit() {
        return limit;
    }
    public void setLimit(ResultLimitDto limit) {
        this.limit = limit;
    }


    @Override
    public String toString() {
        StringJoiner joiner = new StringJoiner(", ", "{ ", " }");
        if (orgnivSelection != null) {
            joiner.add("orgnivSelection: " + orgnivSelection);
        }
        if (gyldigTomSelection != null) {
            joiner.add("gyldigTomSelection: " + gyldigTomSelection);
        }
        if (limit != null) {
            joiner.add("limit: " + limit);
        }
        return joiner.toString();
    }

    public static OrgEnhetSearchFilterDto.Builder builder() {
        return new OrgEnhetSearchFilterDto.Builder();
    }

    @javax.annotation.processing.Generated(
        value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen",
        date = "2026-03-30T10:02:45+0000"
    )
    public static class Builder {

        private OrgnivSelectionDto orgnivSelection = OrgnivSelectionDto.ALLE;
        private GyldigTomSelectionDto gyldigTomSelection = GyldigTomSelectionDto.ALLE;
        private ResultLimitDto limit = ResultLimitDto.LIMIT_30;

        public Builder() {
        }

        public Builder setOrgnivSelection(OrgnivSelectionDto orgnivSelection) {
            this.orgnivSelection = orgnivSelection;
            return this;
        }

        public Builder setGyldigTomSelection(GyldigTomSelectionDto gyldigTomSelection) {
            this.gyldigTomSelection = gyldigTomSelection;
            return this;
        }

        public Builder setLimit(ResultLimitDto limit) {
            this.limit = limit;
            return this;
        }


        public OrgEnhetSearchFilterDto build() {
            return new OrgEnhetSearchFilterDto(orgnivSelection, gyldigTomSelection, limit);
        }

    }
}