/**
 * 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.management.model;

import java.util.List;
import java.util.Objects;

/**
 * @author Florent CHAMFROY (florent.chamfroy at graviteesource.com)
 * @author GraviteeSource Team
 */
public class Organization {

    private String id;
    private List<String> hrids;
    private String name;
    private String description;
    private List<String> domainRestrictions;
    private String flowMode;

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public String getDescription() {
        return description;
    }

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

    public List<String> getDomainRestrictions() {
        return domainRestrictions;
    }

    public void setDomainRestrictions(List<String> domainRestrictions) {
        this.domainRestrictions = domainRestrictions;
    }

    public List<String> getHrids() {
        return hrids;
    }

    public void setHrids(List<String> hrids) {
        this.hrids = hrids;
    }

    public String getFlowMode() {
        return flowMode;
    }

    public void setFlowMode(String flowMode) {
        this.flowMode = flowMode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Organization that = (Organization) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(hrids, that.hrids) &&
                Objects.equals(name, that.name) &&
                Objects.equals(description, that.description) &&
                Objects.equals(domainRestrictions, that.domainRestrictions) &&
                Objects.equals(flowMode, that.flowMode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, hrids, name, description, domainRestrictions, flowMode);
    }

    @Override
    public String toString() {
        return "Organization{" +
                "id='" + id + '\'' +
                ", hrids=" + hrids +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", domainRestrictions=" + domainRestrictions +
                '}';
    }
}

@@ -880,24 +880,54 @@
  String id;%0A
+    private String cockpitId;%0A
     private 
@@ -2018,32 +2018,192 @@
 lowMode;%0A    %7D%0A%0A
+    public String getCockpitId() %7B%0A        return cockpitId;%0A    %7D%0A%0A    public void setCockpitId(String cockpitId) %7B%0A        this.cockpitId = cockpitId;%0A    %7D%0A%0A
     @Override%0A  
@@ -2429,24 +2429,85 @@
 that.id) &&%0A
+                Objects.equals(cockpitId, that.cockpitId) &&%0A
             
@@ -2879,16 +2879,27 @@
 hash(id,
+ cockpitId,
  hrids, 
@@ -3045,20 +3045,16 @@
         
-    
 %22id='%22 +
@@ -3055,16 +3055,65 @@
 d='%22 + i
+d + '%5C'' +%0A            %22, cockpitId='%22 + cockpitI
 d + '%5C''
@@ -3127,20 +3127,16 @@
         
-  
-  
 %22, hrids
@@ -3144,28 +3144,24 @@
 %22 + hrids +%0A
-    
             
@@ -3195,28 +3195,24 @@
             
-  
-  
 %22, descripti
@@ -3232,36 +3232,32 @@
 iption + '%5C'' +%0A
-    
             %22, d
@@ -3295,32 +3295,75 @@
 trictions +%0A    
+ 
+       %22, flowMode='%22 + flowMode + '%5C'' +%0A
             '%7D';

add `cockpitId` to Organization