com.factset.sdk.PAEngine.models.PADateParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paengine Show documentation
Show all versions of paengine Show documentation
FactSet SDK for Java - paengine
/*
* PA Engine API
* Allow clients to fetch Analytics through APIs.
*
* The version of the OpenAPI document: 3.16.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.PAEngine.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 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.PAEngine.JSON;
/**
* The date parameters for PA calculation.
*/
@ApiModel(description = "The date parameters for PA calculation.")
@JsonPropertyOrder({
PADateParameters.JSON_PROPERTY_STARTDATE,
PADateParameters.JSON_PROPERTY_ENDDATE,
PADateParameters.JSON_PROPERTY_FREQUENCY
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PADateParameters implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_STARTDATE = "startdate";
private JsonNullable startdate = JsonNullable.undefined();
public static final String JSON_PROPERTY_ENDDATE = "enddate";
private String enddate;
public static final String JSON_PROPERTY_FREQUENCY = "frequency";
private String frequency;
public PADateParameters() {
}
@JsonCreator
public PADateParameters(
@JsonProperty(value=JSON_PROPERTY_ENDDATE, required=true) String enddate,
@JsonProperty(value=JSON_PROPERTY_FREQUENCY, required=true) String frequency
) {
this();
this.enddate = enddate;
this.frequency = frequency;
}
public PADateParameters startdate(String startdate) {
this.startdate = JsonNullable.of(startdate);
return this;
}
/**
* Calculation's start date.
* @return startdate
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Calculation's start date.")
@JsonIgnore
public String getStartdate() {
return startdate.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STARTDATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getStartdate_JsonNullable() {
return startdate;
}
@JsonProperty(JSON_PROPERTY_STARTDATE)
public void setStartdate_JsonNullable(JsonNullable startdate) {
this.startdate = startdate;
}
public void setStartdate(String startdate) {
this.startdate = JsonNullable.of(startdate);
}
public PADateParameters enddate(String enddate) {
this.enddate = enddate;
return this;
}
/**
* Calculation's end date.
* @return enddate
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "Calculation's end date.")
@JsonProperty(JSON_PROPERTY_ENDDATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getEnddate() {
return enddate;
}
@JsonProperty(JSON_PROPERTY_ENDDATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setEnddate(String enddate) {
this.enddate = enddate;
}
public PADateParameters frequency(String frequency) {
this.frequency = frequency;
return this;
}
/**
* Calculation's frequency.
* @return frequency
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "Calculation's frequency.")
@JsonProperty(JSON_PROPERTY_FREQUENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getFrequency() {
return frequency;
}
@JsonProperty(JSON_PROPERTY_FREQUENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setFrequency(String frequency) {
this.frequency = frequency;
}
/**
* Return true if this PADateParameters object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PADateParameters paDateParameters = (PADateParameters) o;
return equalsNullable(this.startdate, paDateParameters.startdate) &&
Objects.equals(this.enddate, paDateParameters.enddate) &&
Objects.equals(this.frequency, paDateParameters.frequency);
}
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(hashCodeNullable(startdate), enddate, frequency);
}
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 PADateParameters {\n");
sb.append(" startdate: ").append(toIndentedString(startdate)).append("\n");
sb.append(" enddate: ").append(toIndentedString(enddate)).append("\n");
sb.append(" frequency: ").append(toIndentedString(frequency)).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 ");
}
}