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

com.factset.sdk.OpenRisk.models.SecurityGroup Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
/*
 * Open:Risk API
 * Service to calculate parametric linear risk statistics and generate risk model asset identifier mappings.
 *
 * The version of the OpenAPI document: 1.26.0
 * Contact: [email protected]
 *
 * 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.OpenRisk.models;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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 java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.OpenRisk.JSON;


/**
 * Security grouping definition to use in calculation and results. Multi-layer security groupings are also suppoted.
 */
@ApiModel(description = "Security grouping definition to use in calculation and results. Multi-layer security groupings are also suppoted.")
@JsonPropertyOrder({
  SecurityGroup.JSON_PROPERTY_NAME,
  SecurityGroup.JSON_PROPERTY_INDICES,
  SecurityGroup.JSON_PROPERTY_GROUPS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class SecurityGroup implements Serializable {
  private static final long serialVersionUID = 1L;

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

  public static final String JSON_PROPERTY_INDICES = "indices";
  private java.util.List indices = null;

  public static final String JSON_PROPERTY_GROUPS = "groups";
  private java.util.List groups = null;

  public SecurityGroup() { 
  }

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

   /**
   * Optional name of the group
   * @return name
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Optional name of the group")
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


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


  public SecurityGroup indices(java.util.List indices) {
    this.indices = indices;
    return this;
  }

  public SecurityGroup addIndicesItem(Integer indicesItem) {
    if (this.indices == null) {
      this.indices = new java.util.ArrayList<>();
    }
    this.indices.add(indicesItem);
    return this;
  }

   /**
   * List of 0-based indices into the containing holding's security IDs array
   * @return indices
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of 0-based indices into the containing holding's security IDs array")
  @JsonProperty(JSON_PROPERTY_INDICES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getIndices() {
    return indices;
  }


  @JsonProperty(JSON_PROPERTY_INDICES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIndices(java.util.List indices) {
    this.indices = indices;
  }


  public SecurityGroup groups(java.util.List groups) {
    this.groups = groups;
    return this;
  }

  public SecurityGroup addGroupsItem(SecurityGroup groupsItem) {
    if (this.groups == null) {
      this.groups = new java.util.ArrayList<>();
    }
    this.groups.add(groupsItem);
    return this;
  }

   /**
   * Recursively defined elements; base case array (i.e., lowest security group) contains objects with 'indices' only and not 'groups'
   * @return groups
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Recursively defined elements; base case array (i.e., lowest security group) contains objects with 'indices' only and not 'groups'")
  @JsonProperty(JSON_PROPERTY_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getGroups() {
    return groups;
  }


  @JsonProperty(JSON_PROPERTY_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setGroups(java.util.List groups) {
    this.groups = groups;
  }


  /**
   * Return true if this SecurityGroup object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SecurityGroup securityGroup = (SecurityGroup) o;
    return Objects.equals(this.name, securityGroup.name) &&
        Objects.equals(this.indices, securityGroup.indices) &&
        Objects.equals(this.groups, securityGroup.groups);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, indices, groups);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SecurityGroup {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    indices: ").append(toIndentedString(indices)).append("\n");
    sb.append("    groups: ").append(toIndentedString(groups)).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