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

com.symphony.api.model.Policy Maven / Gradle / Ivy

package com.symphony.api.model;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;

/**
  * Information Barrier Policy record.
 **/
@Schema(description="Information Barrier Policy record.")
public class Policy   {
  
  @Schema(description = "")
  private String id = null;
  public enum PolicyTypeEnum {
    BLOCK("BLOCK"),
    ALLOW("ALLOW");

    private String value;

    PolicyTypeEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static PolicyTypeEnum fromValue(String text) {
      for (PolicyTypeEnum b : PolicyTypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }  
  @Schema(description = "")
  private PolicyTypeEnum policyType = null;
  
  @Schema(description = "")
  private Boolean active = null;
  
  @Schema(description = "")
  private Integer memberCount = null;
  
  @Schema(description = "")
  private List groups = null;
  
  @Schema(description = "")
  private Long createdDate = null;
  
  @Schema(description = "")
  private Long modifiedDate = null;
 /**
   * Get id
   * @return id
  **/
  @JsonProperty("id")
  public String getId() {
    return id;
  }

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

  public Policy id(String id) {
    this.id = id;
    return this;
  }

 /**
   * Get policyType
   * @return policyType
  **/
  @JsonProperty("policyType")
  public String getPolicyType() {
    if (policyType == null) {
      return null;
    }
    return policyType.getValue();
  }

  public void setPolicyType(PolicyTypeEnum policyType) {
    this.policyType = policyType;
  }

  public Policy policyType(PolicyTypeEnum policyType) {
    this.policyType = policyType;
    return this;
  }

 /**
   * Get active
   * @return active
  **/
  @JsonProperty("active")
  public Boolean isActive() {
    return active;
  }

  public void setActive(Boolean active) {
    this.active = active;
  }

  public Policy active(Boolean active) {
    this.active = active;
    return this;
  }

 /**
   * Get memberCount
   * @return memberCount
  **/
  @JsonProperty("memberCount")
  public Integer getMemberCount() {
    return memberCount;
  }

  public void setMemberCount(Integer memberCount) {
    this.memberCount = memberCount;
  }

  public Policy memberCount(Integer memberCount) {
    this.memberCount = memberCount;
    return this;
  }

 /**
   * Get groups
   * @return groups
  **/
  @JsonProperty("groups")
  public List getGroups() {
    return groups;
  }

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

  public Policy groups(List groups) {
    this.groups = groups;
    return this;
  }

  public Policy addGroupsItem(String groupsItem) {
    this.groups.add(groupsItem);
    return this;
  }

 /**
   * Get createdDate
   * @return createdDate
  **/
  @JsonProperty("createdDate")
  public Long getCreatedDate() {
    return createdDate;
  }

  public void setCreatedDate(Long createdDate) {
    this.createdDate = createdDate;
  }

  public Policy createdDate(Long createdDate) {
    this.createdDate = createdDate;
    return this;
  }

 /**
   * Get modifiedDate
   * @return modifiedDate
  **/
  @JsonProperty("modifiedDate")
  public Long getModifiedDate() {
    return modifiedDate;
  }

  public void setModifiedDate(Long modifiedDate) {
    this.modifiedDate = modifiedDate;
  }

  public Policy modifiedDate(Long modifiedDate) {
    this.modifiedDate = modifiedDate;
    return this;
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Policy {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    policyType: ").append(toIndentedString(policyType)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    memberCount: ").append(toIndentedString(memberCount)).append("\n");
    sb.append("    groups: ").append(toIndentedString(groups)).append("\n");
    sb.append("    createdDate: ").append(toIndentedString(createdDate)).append("\n");
    sb.append("    modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private static String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy