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

com.factset.sdk.IRNConfiguration.models.SubjectConfigDto Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
/*
 * IRN API v1
 * Allows users to extract, create, update and configure IRN data.
 *
 * The version of the OpenAPI document: 1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.factset.sdk.IRNConfiguration.models;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.IRNConfiguration.models.ApprovalProcessConfigDto;
import com.factset.sdk.IRNConfiguration.models.CommentaryConfigDto;
import com.factset.sdk.IRNConfiguration.models.HeadlineFormatConfigDto;
import com.factset.sdk.IRNConfiguration.models.RatingConfigDto;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.IRNConfiguration.JSON;


/**
 * SubjectConfigDto
 */
@JsonPropertyOrder({
  SubjectConfigDto.JSON_PROPERTY_ID,
  SubjectConfigDto.JSON_PROPERTY_NAME,
  SubjectConfigDto.JSON_PROPERTY_CODE,
  SubjectConfigDto.JSON_PROPERTY_IS_HIDDEN,
  SubjectConfigDto.JSON_PROPERTY_IDENTIFIER_TYPE,
  SubjectConfigDto.JSON_PROPERTY_IDENTIFIER_TYPES,
  SubjectConfigDto.JSON_PROPERTY_TYPE,
  SubjectConfigDto.JSON_PROPERTY_CUSTOM_FIELD_IDS,
  SubjectConfigDto.JSON_PROPERTY_APPROVAL_PROCESS_CONFIG,
  SubjectConfigDto.JSON_PROPERTY_COMMENTARY_CONFIG,
  SubjectConfigDto.JSON_PROPERTY_NEWS_HEADLINE_FORMAT,
  SubjectConfigDto.JSON_PROPERTY_EMAIL_HEADLINE_FORMAT,
  SubjectConfigDto.JSON_PROPERTY_RATING_CONFIG,
  SubjectConfigDto.JSON_PROPERTY_NOTE_LENGTH_LIMIT
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubjectConfigDto implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_ID = "id";
  private java.util.UUID id;

  public static final String JSON_PROPERTY_NAME = "name";
  private JsonNullable name = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CODE = "code";
  private JsonNullable code = JsonNullable.undefined();

  public static final String JSON_PROPERTY_IS_HIDDEN = "isHidden";
  private Boolean isHidden;

  public static final String JSON_PROPERTY_IDENTIFIER_TYPE = "identifierType";
  private JsonNullable identifierType = JsonNullable.undefined();

  public static final String JSON_PROPERTY_IDENTIFIER_TYPES = "identifierTypes";
  private JsonNullable> identifierTypes = JsonNullable.>undefined();

  public static final String JSON_PROPERTY_TYPE = "type";
  private JsonNullable type = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CUSTOM_FIELD_IDS = "customFieldIds";
  private JsonNullable> customFieldIds = JsonNullable.>undefined();

  public static final String JSON_PROPERTY_APPROVAL_PROCESS_CONFIG = "approvalProcessConfig";
  private ApprovalProcessConfigDto approvalProcessConfig;

  public static final String JSON_PROPERTY_COMMENTARY_CONFIG = "commentaryConfig";
  private CommentaryConfigDto commentaryConfig;

  public static final String JSON_PROPERTY_NEWS_HEADLINE_FORMAT = "newsHeadlineFormat";
  private JsonNullable> newsHeadlineFormat = JsonNullable.>undefined();

  public static final String JSON_PROPERTY_EMAIL_HEADLINE_FORMAT = "emailHeadlineFormat";
  private JsonNullable> emailHeadlineFormat = JsonNullable.>undefined();

  public static final String JSON_PROPERTY_RATING_CONFIG = "ratingConfig";
  private RatingConfigDto ratingConfig;

  public static final String JSON_PROPERTY_NOTE_LENGTH_LIMIT = "noteLengthLimit";
  private JsonNullable noteLengthLimit = JsonNullable.undefined();

  public SubjectConfigDto() { 
  }

  public SubjectConfigDto id(java.util.UUID id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.UUID getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(java.util.UUID id) {
    this.id = id;
  }


  public SubjectConfigDto name(String name) {
    this.name = JsonNullable.of(name);
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public String getName() {
        return name.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getName_JsonNullable() {
    return name;
  }
  
  @JsonProperty(JSON_PROPERTY_NAME)
  public void setName_JsonNullable(JsonNullable name) {
    this.name = name;
  }

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


  public SubjectConfigDto code(String code) {
    this.code = JsonNullable.of(code);
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public String getCode() {
        return code.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_CODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getCode_JsonNullable() {
    return code;
  }
  
  @JsonProperty(JSON_PROPERTY_CODE)
  public void setCode_JsonNullable(JsonNullable code) {
    this.code = code;
  }

  public void setCode(String code) {
    this.code = JsonNullable.of(code);
  }


  public SubjectConfigDto isHidden(Boolean isHidden) {
    this.isHidden = isHidden;
    return this;
  }

   /**
   * Get isHidden
   * @return isHidden
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_IS_HIDDEN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsHidden() {
    return isHidden;
  }


  @JsonProperty(JSON_PROPERTY_IS_HIDDEN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsHidden(Boolean isHidden) {
    this.isHidden = isHidden;
  }


  public SubjectConfigDto identifierType(String identifierType) {
    this.identifierType = JsonNullable.of(identifierType);
    return this;
  }

   /**
   * Get identifierType
   * @return identifierType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public String getIdentifierType() {
        return identifierType.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_IDENTIFIER_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getIdentifierType_JsonNullable() {
    return identifierType;
  }
  
  @JsonProperty(JSON_PROPERTY_IDENTIFIER_TYPE)
  public void setIdentifierType_JsonNullable(JsonNullable identifierType) {
    this.identifierType = identifierType;
  }

  public void setIdentifierType(String identifierType) {
    this.identifierType = JsonNullable.of(identifierType);
  }


  public SubjectConfigDto identifierTypes(java.util.List identifierTypes) {
    this.identifierTypes = JsonNullable.>of(identifierTypes);
    return this;
  }

  public SubjectConfigDto addIdentifierTypesItem(String identifierTypesItem) {
    if (this.identifierTypes == null || !this.identifierTypes.isPresent()) {
      this.identifierTypes = JsonNullable.>of(new java.util.ArrayList<>());
    }
    try {
      this.identifierTypes.get().add(identifierTypesItem);
    } catch (java.util.NoSuchElementException e) {
      // this can never happen, as we make sure above that the value is present
    }
    return this;
  }

   /**
   * Get identifierTypes
   * @return identifierTypes
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public java.util.List getIdentifierTypes() {
        return identifierTypes.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_IDENTIFIER_TYPES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable> getIdentifierTypes_JsonNullable() {
    return identifierTypes;
  }
  
  @JsonProperty(JSON_PROPERTY_IDENTIFIER_TYPES)
  public void setIdentifierTypes_JsonNullable(JsonNullable> identifierTypes) {
    this.identifierTypes = identifierTypes;
  }

  public void setIdentifierTypes(java.util.List identifierTypes) {
    this.identifierTypes = JsonNullable.>of(identifierTypes);
  }


  public SubjectConfigDto type(String type) {
    this.type = JsonNullable.of(type);
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public String getType() {
        return type.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getType_JsonNullable() {
    return type;
  }
  
  @JsonProperty(JSON_PROPERTY_TYPE)
  public void setType_JsonNullable(JsonNullable type) {
    this.type = type;
  }

  public void setType(String type) {
    this.type = JsonNullable.of(type);
  }


  public SubjectConfigDto customFieldIds(java.util.List customFieldIds) {
    this.customFieldIds = JsonNullable.>of(customFieldIds);
    return this;
  }

  public SubjectConfigDto addCustomFieldIdsItem(java.util.UUID customFieldIdsItem) {
    if (this.customFieldIds == null || !this.customFieldIds.isPresent()) {
      this.customFieldIds = JsonNullable.>of(new java.util.ArrayList<>());
    }
    try {
      this.customFieldIds.get().add(customFieldIdsItem);
    } catch (java.util.NoSuchElementException e) {
      // this can never happen, as we make sure above that the value is present
    }
    return this;
  }

   /**
   * Get customFieldIds
   * @return customFieldIds
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public java.util.List getCustomFieldIds() {
        return customFieldIds.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_CUSTOM_FIELD_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable> getCustomFieldIds_JsonNullable() {
    return customFieldIds;
  }
  
  @JsonProperty(JSON_PROPERTY_CUSTOM_FIELD_IDS)
  public void setCustomFieldIds_JsonNullable(JsonNullable> customFieldIds) {
    this.customFieldIds = customFieldIds;
  }

  public void setCustomFieldIds(java.util.List customFieldIds) {
    this.customFieldIds = JsonNullable.>of(customFieldIds);
  }


  public SubjectConfigDto approvalProcessConfig(ApprovalProcessConfigDto approvalProcessConfig) {
    this.approvalProcessConfig = approvalProcessConfig;
    return this;
  }

   /**
   * Get approvalProcessConfig
   * @return approvalProcessConfig
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_APPROVAL_PROCESS_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ApprovalProcessConfigDto getApprovalProcessConfig() {
    return approvalProcessConfig;
  }


  @JsonProperty(JSON_PROPERTY_APPROVAL_PROCESS_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setApprovalProcessConfig(ApprovalProcessConfigDto approvalProcessConfig) {
    this.approvalProcessConfig = approvalProcessConfig;
  }


  public SubjectConfigDto commentaryConfig(CommentaryConfigDto commentaryConfig) {
    this.commentaryConfig = commentaryConfig;
    return this;
  }

   /**
   * Get commentaryConfig
   * @return commentaryConfig
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_COMMENTARY_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CommentaryConfigDto getCommentaryConfig() {
    return commentaryConfig;
  }


  @JsonProperty(JSON_PROPERTY_COMMENTARY_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCommentaryConfig(CommentaryConfigDto commentaryConfig) {
    this.commentaryConfig = commentaryConfig;
  }


  public SubjectConfigDto newsHeadlineFormat(java.util.List newsHeadlineFormat) {
    this.newsHeadlineFormat = JsonNullable.>of(newsHeadlineFormat);
    return this;
  }

  public SubjectConfigDto addNewsHeadlineFormatItem(HeadlineFormatConfigDto newsHeadlineFormatItem) {
    if (this.newsHeadlineFormat == null || !this.newsHeadlineFormat.isPresent()) {
      this.newsHeadlineFormat = JsonNullable.>of(new java.util.ArrayList<>());
    }
    try {
      this.newsHeadlineFormat.get().add(newsHeadlineFormatItem);
    } catch (java.util.NoSuchElementException e) {
      // this can never happen, as we make sure above that the value is present
    }
    return this;
  }

   /**
   * Get newsHeadlineFormat
   * @return newsHeadlineFormat
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public java.util.List getNewsHeadlineFormat() {
        return newsHeadlineFormat.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NEWS_HEADLINE_FORMAT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable> getNewsHeadlineFormat_JsonNullable() {
    return newsHeadlineFormat;
  }
  
  @JsonProperty(JSON_PROPERTY_NEWS_HEADLINE_FORMAT)
  public void setNewsHeadlineFormat_JsonNullable(JsonNullable> newsHeadlineFormat) {
    this.newsHeadlineFormat = newsHeadlineFormat;
  }

  public void setNewsHeadlineFormat(java.util.List newsHeadlineFormat) {
    this.newsHeadlineFormat = JsonNullable.>of(newsHeadlineFormat);
  }


  public SubjectConfigDto emailHeadlineFormat(java.util.List emailHeadlineFormat) {
    this.emailHeadlineFormat = JsonNullable.>of(emailHeadlineFormat);
    return this;
  }

  public SubjectConfigDto addEmailHeadlineFormatItem(HeadlineFormatConfigDto emailHeadlineFormatItem) {
    if (this.emailHeadlineFormat == null || !this.emailHeadlineFormat.isPresent()) {
      this.emailHeadlineFormat = JsonNullable.>of(new java.util.ArrayList<>());
    }
    try {
      this.emailHeadlineFormat.get().add(emailHeadlineFormatItem);
    } catch (java.util.NoSuchElementException e) {
      // this can never happen, as we make sure above that the value is present
    }
    return this;
  }

   /**
   * Get emailHeadlineFormat
   * @return emailHeadlineFormat
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public java.util.List getEmailHeadlineFormat() {
        return emailHeadlineFormat.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_EMAIL_HEADLINE_FORMAT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable> getEmailHeadlineFormat_JsonNullable() {
    return emailHeadlineFormat;
  }
  
  @JsonProperty(JSON_PROPERTY_EMAIL_HEADLINE_FORMAT)
  public void setEmailHeadlineFormat_JsonNullable(JsonNullable> emailHeadlineFormat) {
    this.emailHeadlineFormat = emailHeadlineFormat;
  }

  public void setEmailHeadlineFormat(java.util.List emailHeadlineFormat) {
    this.emailHeadlineFormat = JsonNullable.>of(emailHeadlineFormat);
  }


  public SubjectConfigDto ratingConfig(RatingConfigDto ratingConfig) {
    this.ratingConfig = ratingConfig;
    return this;
  }

   /**
   * Get ratingConfig
   * @return ratingConfig
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_RATING_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public RatingConfigDto getRatingConfig() {
    return ratingConfig;
  }


  @JsonProperty(JSON_PROPERTY_RATING_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRatingConfig(RatingConfigDto ratingConfig) {
    this.ratingConfig = ratingConfig;
  }


  public SubjectConfigDto noteLengthLimit(Integer noteLengthLimit) {
    this.noteLengthLimit = JsonNullable.of(noteLengthLimit);
    return this;
  }

   /**
   * Get noteLengthLimit
   * @return noteLengthLimit
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonIgnore

  public Integer getNoteLengthLimit() {
        return noteLengthLimit.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NOTE_LENGTH_LIMIT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getNoteLengthLimit_JsonNullable() {
    return noteLengthLimit;
  }
  
  @JsonProperty(JSON_PROPERTY_NOTE_LENGTH_LIMIT)
  public void setNoteLengthLimit_JsonNullable(JsonNullable noteLengthLimit) {
    this.noteLengthLimit = noteLengthLimit;
  }

  public void setNoteLengthLimit(Integer noteLengthLimit) {
    this.noteLengthLimit = JsonNullable.of(noteLengthLimit);
  }


  /**
   * Return true if this SubjectConfigDto object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubjectConfigDto subjectConfigDto = (SubjectConfigDto) o;
    return Objects.equals(this.id, subjectConfigDto.id) &&
        equalsNullable(this.name, subjectConfigDto.name) &&
        equalsNullable(this.code, subjectConfigDto.code) &&
        Objects.equals(this.isHidden, subjectConfigDto.isHidden) &&
        equalsNullable(this.identifierType, subjectConfigDto.identifierType) &&
        equalsNullable(this.identifierTypes, subjectConfigDto.identifierTypes) &&
        equalsNullable(this.type, subjectConfigDto.type) &&
        equalsNullable(this.customFieldIds, subjectConfigDto.customFieldIds) &&
        Objects.equals(this.approvalProcessConfig, subjectConfigDto.approvalProcessConfig) &&
        Objects.equals(this.commentaryConfig, subjectConfigDto.commentaryConfig) &&
        equalsNullable(this.newsHeadlineFormat, subjectConfigDto.newsHeadlineFormat) &&
        equalsNullable(this.emailHeadlineFormat, subjectConfigDto.emailHeadlineFormat) &&
        Objects.equals(this.ratingConfig, subjectConfigDto.ratingConfig) &&
        equalsNullable(this.noteLengthLimit, subjectConfigDto.noteLengthLimit);
  }

  private static  boolean equalsNullable(JsonNullable a, JsonNullable b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, hashCodeNullable(name), hashCodeNullable(code), isHidden, hashCodeNullable(identifierType), hashCodeNullable(identifierTypes), hashCodeNullable(type), hashCodeNullable(customFieldIds), approvalProcessConfig, commentaryConfig, hashCodeNullable(newsHeadlineFormat), hashCodeNullable(emailHeadlineFormat), ratingConfig, hashCodeNullable(noteLengthLimit));
  }

  private static  int hashCodeNullable(JsonNullable a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubjectConfigDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    isHidden: ").append(toIndentedString(isHidden)).append("\n");
    sb.append("    identifierType: ").append(toIndentedString(identifierType)).append("\n");
    sb.append("    identifierTypes: ").append(toIndentedString(identifierTypes)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    customFieldIds: ").append(toIndentedString(customFieldIds)).append("\n");
    sb.append("    approvalProcessConfig: ").append(toIndentedString(approvalProcessConfig)).append("\n");
    sb.append("    commentaryConfig: ").append(toIndentedString(commentaryConfig)).append("\n");
    sb.append("    newsHeadlineFormat: ").append(toIndentedString(newsHeadlineFormat)).append("\n");
    sb.append("    emailHeadlineFormat: ").append(toIndentedString(emailHeadlineFormat)).append("\n");
    sb.append("    ratingConfig: ").append(toIndentedString(ratingConfig)).append("\n");
    sb.append("    noteLengthLimit: ").append(toIndentedString(noteLengthLimit)).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 String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy