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

com.factset.sdk.IRNConfiguration.models.CreateCustomSymbolCustomFieldDto 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.CustomSymbolCustomFieldFormulaConfigDto;
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;


/**
 * CreateCustomSymbolCustomFieldDto
 */
@JsonPropertyOrder({
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_CODE,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_NAME,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_TYPE,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_IS_HIDDEN,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_IS_MANDATORY,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_IS_SHOWN_IN_INFOBOX,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_FORMULA_CONFIG,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_OPTIONS_CONFIG,
  CreateCustomSymbolCustomFieldDto.JSON_PROPERTY_CUSTOM_SYMBOL_TYPES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CreateCustomSymbolCustomFieldDto implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_CODE = "code";
  private String code;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_TYPE = "type";
  private String type;

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

  public static final String JSON_PROPERTY_IS_MANDATORY = "isMandatory";
  private Boolean isMandatory = false;

  public static final String JSON_PROPERTY_IS_SHOWN_IN_INFOBOX = "isShownInInfobox";
  private Boolean isShownInInfobox = true;

  public static final String JSON_PROPERTY_FORMULA_CONFIG = "formulaConfig";
  private CustomSymbolCustomFieldFormulaConfigDto formulaConfig;

  public static final String JSON_PROPERTY_OPTIONS_CONFIG = "optionsConfig";
  private JsonNullable> optionsConfig = JsonNullable.>undefined();

  public static final String JSON_PROPERTY_CUSTOM_SYMBOL_TYPES = "customSymbolTypes";
  private java.util.List customSymbolTypes = new java.util.ArrayList<>();

  public CreateCustomSymbolCustomFieldDto() { 
  }

  @JsonCreator
  public CreateCustomSymbolCustomFieldDto(
    @JsonProperty(value=JSON_PROPERTY_CODE, required=true) String code, 
    @JsonProperty(value=JSON_PROPERTY_NAME, required=true) String name, 
    @JsonProperty(value=JSON_PROPERTY_TYPE, required=true) String type, 
    @JsonProperty(value=JSON_PROPERTY_IS_HIDDEN, required=true) Boolean isHidden, 
    @JsonProperty(value=JSON_PROPERTY_IS_MANDATORY, required=true) Boolean isMandatory, 
    @JsonProperty(value=JSON_PROPERTY_IS_SHOWN_IN_INFOBOX, required=true) Boolean isShownInInfobox, 
    @JsonProperty(value=JSON_PROPERTY_CUSTOM_SYMBOL_TYPES, required=true) java.util.List customSymbolTypes
  ) {
    this();
    this.code = code;
    this.name = name;
    this.type = type;
    this.isHidden = isHidden;
    this.isMandatory = isMandatory;
    this.isShownInInfobox = isShownInInfobox;
    this.customSymbolTypes = customSymbolTypes;
  }

  public CreateCustomSymbolCustomFieldDto code(String code) {
    this.code = code;
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_CODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getCode() {
    return code;
  }


  @JsonProperty(JSON_PROPERTY_CODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCode(String code) {
    this.code = code;
  }


  public CreateCustomSymbolCustomFieldDto name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setName(String name) {
    this.name = name;
  }


  public CreateCustomSymbolCustomFieldDto type(String type) {
    this.type = type;
    return this;
  }

   /**
   * Type can be one of Text, SingleOption, MultiOptions, Numeric, Date, ExtendedText, ContactLookup
   * @return type
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Type can be one of Text, SingleOption, MultiOptions, Numeric, Date, ExtendedText, ContactLookup")
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getType() {
    return type;
  }


  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setType(String type) {
    this.type = type;
  }


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

   /**
   * Get isHidden
   * @return isHidden
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_IS_HIDDEN)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getIsHidden() {
    return isHidden;
  }


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


  public CreateCustomSymbolCustomFieldDto isMandatory(Boolean isMandatory) {
    this.isMandatory = isMandatory;
    return this;
  }

   /**
   * Get isMandatory
   * @return isMandatory
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_IS_MANDATORY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getIsMandatory() {
    return isMandatory;
  }


  @JsonProperty(JSON_PROPERTY_IS_MANDATORY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsMandatory(Boolean isMandatory) {
    this.isMandatory = isMandatory;
  }


  public CreateCustomSymbolCustomFieldDto isShownInInfobox(Boolean isShownInInfobox) {
    this.isShownInInfobox = isShownInInfobox;
    return this;
  }

   /**
   * Get isShownInInfobox
   * @return isShownInInfobox
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_IS_SHOWN_IN_INFOBOX)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getIsShownInInfobox() {
    return isShownInInfobox;
  }


  @JsonProperty(JSON_PROPERTY_IS_SHOWN_IN_INFOBOX)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsShownInInfobox(Boolean isShownInInfobox) {
    this.isShownInInfobox = isShownInInfobox;
  }


  public CreateCustomSymbolCustomFieldDto formulaConfig(CustomSymbolCustomFieldFormulaConfigDto formulaConfig) {
    this.formulaConfig = formulaConfig;
    return this;
  }

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

  public CustomSymbolCustomFieldFormulaConfigDto getFormulaConfig() {
    return formulaConfig;
  }


  @JsonProperty(JSON_PROPERTY_FORMULA_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFormulaConfig(CustomSymbolCustomFieldFormulaConfigDto formulaConfig) {
    this.formulaConfig = formulaConfig;
  }


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

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

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

  public java.util.List getOptionsConfig() {
        return optionsConfig.orElse(null);
  }

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

  public JsonNullable> getOptionsConfig_JsonNullable() {
    return optionsConfig;
  }
  
  @JsonProperty(JSON_PROPERTY_OPTIONS_CONFIG)
  public void setOptionsConfig_JsonNullable(JsonNullable> optionsConfig) {
    this.optionsConfig = optionsConfig;
  }

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


  public CreateCustomSymbolCustomFieldDto customSymbolTypes(java.util.List customSymbolTypes) {
    this.customSymbolTypes = customSymbolTypes;
    return this;
  }

  public CreateCustomSymbolCustomFieldDto addCustomSymbolTypesItem(java.util.UUID customSymbolTypesItem) {
    this.customSymbolTypes.add(customSymbolTypesItem);
    return this;
  }

   /**
   * Get customSymbolTypes
   * @return customSymbolTypes
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_CUSTOM_SYMBOL_TYPES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public java.util.List getCustomSymbolTypes() {
    return customSymbolTypes;
  }


  @JsonProperty(JSON_PROPERTY_CUSTOM_SYMBOL_TYPES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCustomSymbolTypes(java.util.List customSymbolTypes) {
    this.customSymbolTypes = customSymbolTypes;
  }


  /**
   * Return true if this CreateCustomSymbolCustomFieldDto object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateCustomSymbolCustomFieldDto createCustomSymbolCustomFieldDto = (CreateCustomSymbolCustomFieldDto) o;
    return Objects.equals(this.code, createCustomSymbolCustomFieldDto.code) &&
        Objects.equals(this.name, createCustomSymbolCustomFieldDto.name) &&
        Objects.equals(this.type, createCustomSymbolCustomFieldDto.type) &&
        Objects.equals(this.isHidden, createCustomSymbolCustomFieldDto.isHidden) &&
        Objects.equals(this.isMandatory, createCustomSymbolCustomFieldDto.isMandatory) &&
        Objects.equals(this.isShownInInfobox, createCustomSymbolCustomFieldDto.isShownInInfobox) &&
        Objects.equals(this.formulaConfig, createCustomSymbolCustomFieldDto.formulaConfig) &&
        equalsNullable(this.optionsConfig, createCustomSymbolCustomFieldDto.optionsConfig) &&
        Objects.equals(this.customSymbolTypes, createCustomSymbolCustomFieldDto.customSymbolTypes);
  }

  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(code, name, type, isHidden, isMandatory, isShownInInfobox, formulaConfig, hashCodeNullable(optionsConfig), customSymbolTypes);
  }

  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 CreateCustomSymbolCustomFieldDto {\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    isHidden: ").append(toIndentedString(isHidden)).append("\n");
    sb.append("    isMandatory: ").append(toIndentedString(isMandatory)).append("\n");
    sb.append("    isShownInInfobox: ").append(toIndentedString(isShownInInfobox)).append("\n");
    sb.append("    formulaConfig: ").append(toIndentedString(formulaConfig)).append("\n");
    sb.append("    optionsConfig: ").append(toIndentedString(optionsConfig)).append("\n");
    sb.append("    customSymbolTypes: ").append(toIndentedString(customSymbolTypes)).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