package com.atlassian.bitbucket.internal.mirroring.upstream;

import com.atlassian.bitbucket.internal.mirroring.MirroringRequestState;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * A criteria for filtering mirroring requests
 */
public class MirroringRequestSearchRequest {
    private final MirroringRequestState state;

    private MirroringRequestSearchRequest(MirroringRequestState state) {
        this.state = state;
    }

    @Nullable
    public MirroringRequestState getState() {
        return state;
    }

    public static class Builder {
        private MirroringRequestState state;

        public Builder state(@Nullable MirroringRequestState state) {
            this.state = state;
            return this;
        }

        @Nonnull
        public MirroringRequestSearchRequest build() {
            return new MirroringRequestSearchRequest(state);
        }
    }
}
