com.factset.sdk.OpenRisk.models.FactorGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openrisk Show documentation
Show all versions of openrisk Show documentation
FactSet SDK for Java - openrisk
/*
* 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.factset.sdk.OpenRisk.models.FactorGroupNodes;
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;
/**
* Factor grouping definition to use for calculations and results. This field impacts the calculation only when any 'FactorGroup' level statistics are requested, e.g. 'FactorGroup', 'FactorGroupSecurity'.
*/
@ApiModel(description = "Factor grouping definition to use for calculations and results. This field impacts the calculation only when any 'FactorGroup' level statistics are requested, e.g. 'FactorGroup', 'FactorGroupSecurity'.")
@JsonPropertyOrder({
FactorGroup.JSON_PROPERTY_NAME,
FactorGroup.JSON_PROPERTY_NODES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FactorGroup 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_NODES = "nodes";
private java.util.List nodes = new java.util.ArrayList<>();
public FactorGroup() {
}
@JsonCreator
public FactorGroup(
@JsonProperty(value=JSON_PROPERTY_NODES, required=true) java.util.List nodes
) {
this();
this.nodes = nodes;
}
public FactorGroup name(String name) {
this.name = name;
return this;
}
/**
* Name of this factor group
* @return name
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Name of this factor 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 FactorGroup nodes(java.util.List nodes) {
this.nodes = nodes;
return this;
}
public FactorGroup addNodesItem(FactorGroupNodes nodesItem) {
this.nodes.add(nodesItem);
return this;
}
/**
* Recursively defined elements; base case array (i.e., lowest factor group) contains 'RiskModelFactor' objects only and no 'FactorGroup' objects
* @return nodes
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "Recursively defined elements; base case array (i.e., lowest factor group) contains 'RiskModelFactor' objects only and no 'FactorGroup' objects")
@JsonProperty(JSON_PROPERTY_NODES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public java.util.List getNodes() {
return nodes;
}
@JsonProperty(JSON_PROPERTY_NODES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setNodes(java.util.List nodes) {
this.nodes = nodes;
}
/**
* Return true if this FactorGroup object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FactorGroup factorGroup = (FactorGroup) o;
return Objects.equals(this.name, factorGroup.name) &&
Objects.equals(this.nodes, factorGroup.nodes);
}
@Override
public int hashCode() {
return Objects.hash(name, nodes);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FactorGroup {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" nodes: ").append(toIndentedString(nodes)).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 ");
}
}