package oasis.model.directory;

import javax.annotation.Nonnull;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.wordnik.swagger.annotations.ApiModelProperty;

import oasis.model.annotations.Id;

@JsonRootName("organization")
public class Organization {

  @Id
  @ApiModelProperty(required = true)
  private String id;

  @JsonProperty
  @ApiModelProperty(required = true)
  private String name;

  @JsonProperty
  @ApiModelProperty(required = true)
  private Type type;

  public Organization() {
  }

  /**
   * Copy constructor.
   * <p>
   * Does not copy {@link #id} field.
   */
  public Organization(@Nonnull Organization other) {
    this.name = other.getName();
    this.type = other.getType();
  }

  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 Type getType() {
    return type;
  }

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

  public enum Type {
    PUBLIC_BODY,
    COMPANY
  }
}

@@ -21,24 +21,46 @@
 directory;%0A%0A
+import java.net.URI;%0A%0A
 import javax
@@ -80,16 +80,16 @@
 onnull;%0A
-
 %0Aimport 
@@ -557,16 +557,44 @@
 pe type;
+%0A  private URI territory_id;
 %0A%0A  publ
@@ -819,16 +819,65 @@
 Type();%0A
+    this.territory_id = other.getTerritory_id();%0A
   %7D%0A%0A  p
@@ -1168,24 +1168,24 @@
 ype type) %7B%0A
-
     this.typ
@@ -1191,32 +1191,188 @@
 pe = type;%0A  %7D%0A%0A
+  public URI getTerritory_id() %7B%0A    return territory_id;%0A  %7D%0A%0A  public void setTerritory_id(URI territory_id) %7B%0A    this.territory_id = territory_id;%0A  %7D%0A%0A
   public enum Ty

Add territory_id property to organizations