/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.dubbo.rpc.model.person;

import java.io.Serializable;

public class BigPerson implements Serializable {
    private static final long serialVersionUID = 1L;

    String personId;

    String loginName;

    PersonStatus status;

    String email;

    String penName;

    PersonInfo infoProfile;

    public BigPerson() {}

    public BigPerson(String id) {
        this.personId = id;
    }

    public String getPersonId() {
        return personId;
    }

    public void setPersonId(String personId) {
        this.personId = personId;
    }

    public PersonInfo getInfoProfile() {
        return infoProfile;
    }

    public void setInfoProfile(PersonInfo infoProfile) {
        this.infoProfile = infoProfile;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLoginName() {
        return this.loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public PersonStatus getStatus() {
        return this.status;
    }

    public void setStatus(PersonStatus status) {
        this.status = status;
    }

    public String getPenName() {
        return penName;
    }

    public void setPenName(String penName) {
        this.penName = penName;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((email == null) ? 0 : email.hashCode());
        result = prime * result + ((infoProfile == null) ? 0 : infoProfile.hashCode());
        result = prime * result + ((loginName == null) ? 0 : loginName.hashCode());
        result = prime * result + ((penName == null) ? 0 : penName.hashCode());
        result = prime * result + ((personId == null) ? 0 : personId.hashCode());
        result = prime * result + ((status == null) ? 0 : status.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;
        if (getClass() != obj.getClass()) return false;
        BigPerson other = (BigPerson) obj;
        if (email == null) {
            if (other.email != null) return false;
        } else if (!email.equals(other.email)) return false;
        if (infoProfile == null) {
            if (other.infoProfile != null) return false;
        } else if (!infoProfile.equals(other.infoProfile)) return false;
        if (loginName == null) {
            if (other.loginName != null) return false;
        } else if (!loginName.equals(other.loginName)) return false;
        if (penName == null) {
            if (other.penName != null) return false;
        } else if (!penName.equals(other.penName)) return false;
        if (personId == null) {
            if (other.personId != null) return false;
        } else if (!personId.equals(other.personId)) return false;
        if (status != other.status) return false;
        return true;
    }

    @Override
    public String toString() {
        return "BigPerson [personId=" + personId + ", loginName=" + loginName + ", status="
                + status + ", email=" + email + ", penName=" + penName + ", infoProfile="
                + infoProfile + "]";
    }
}
