/**
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed 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 io.gravitee.repository.model.management;

import java.util.Date;

/**
 * @author David BRASSELY (brasseld at gmail.com)
 */
public class Team {

    /**
     * The shorthand name of the team.
     */
    private String name;

    /**
     * The description of the team.
     */
    private String description;

    /**
     * The team can only be visible for members.
     */
    private boolean privateTeam;

    /**
     * The publicly visible email address.
     */
    private String email;

    /**
     * The team creation date
     */
    private Date createdAt;
    
    /**
     * The team last updated date
     */
    private Date updatedAt;
    
    
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

	public String getEmail() {
		return email;
	}

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

    public boolean isPrivateTeam() {
        return privateTeam;
    }

    public void setPrivateTeam(boolean privateTeam) {
        this.privateTeam = privateTeam;
    }

    public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}
    
}

@@ -696,16 +696,42 @@
 il.Date;
+%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -2174,15 +2174,673 @@
 dAt;%0A%09%7D%0A
+%0A
     
+public boolean equals(Object o) %7B%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (!(o instanceof Team)) %7B%0A            return false;%0A        %7D%0A        Team team = (Team) o;%0A        return Objects.equals(name, team.name);%0A    %7D%0A%0A    public int hashCode() %7B%0A        return Objects.hash(name);%0A    %7D%0A%0A    public String toString() %7B%0A        return %22Team%7B%22 +%0A            %22name='%22 + name + '%5C'' +%0A            %22, description='%22 + description + '%5C'' +%0A            %22, privateTeam=%22 + privateTeam +%0A            %22, email='%22 + email + '%5C'' +%0A            %22, createdAt=%22 + createdAt +%0A            %22, updatedAt=%22 + updatedAt +%0A            '%7D';%0A    %7D
 %0A%7D%0A

add tests and handle potential NPE