All Downloads are FREE. Search and download functionalities are using the official Maven repository.

es.nitaur.bitbucket.rest.client.model.Restricted Maven / Gradle / Ivy

package es.nitaur.bitbucket.rest.client.model;

import java.io.Serializable;

public class Restricted implements Serializable {

    private long id;

    private RestrictionType type;

    private String value;

    private Branch branch;

    private String users;

    private String groups;

    public Restricted() {
    }

    public Restricted(long id, RestrictionType type, String value, Branch branch) {
        this.id = id;
        this.type = type;
        this.value = value;
        this.branch = branch;
    }

    public Restricted(RestrictionType type, String value, String users, String groups) {
        this.type = type;
        this.value = value;
        this.users = users;
        this.groups = groups;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public RestrictionType getType() {
        return type;
    }

    public void setType(RestrictionType type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Branch getBranch() {
        return branch;
    }

    public void setBranch(Branch branch) {
        this.branch = branch;
    }

    public String getUsers() {
        return users;
    }

    public void setUsers(String users) {
        this.users = users;
    }

    public String getGroups() {
        return groups;
    }

    public void setGroups(String groups) {
        this.groups = groups;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Restricted that = (Restricted) o;

        if (id != that.id) return false;
        if (type != that.type) return false;
        return value != null ? value.equals(that.value) : that.value == null;

    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Restricted{" +
                "id=" + id +
                ", type=" + type +
                ", value='" + value + '\'' +
                ", branch=" + branch +
                ", users='" + users + '\'' +
                ", groups='" + groups + '\'' +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy