com.upstox.api.OptionStrikeData Maven / Gradle / Ivy
/*
* OpenAPI definition
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.upstox.api;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.upstox.api.PutCallOptionChainData;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* Response data for option chain data
*/
@Schema(description = "Response data for option chain data")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-06-25T15:59:27.509882+05:30[Asia/Kolkata]")
public class OptionStrikeData {
@SerializedName("expiry")
private OffsetDateTime expiry = null;
@SerializedName("pcr")
private Double pcr = null;
@SerializedName("strike_price")
private Double strikePrice = null;
@SerializedName("underlying_key")
private String underlyingKey = null;
@SerializedName("underlying_spot_price")
private Double underlyingSpotPrice = null;
@SerializedName("call_options")
private PutCallOptionChainData callOptions = null;
@SerializedName("put_options")
private PutCallOptionChainData putOptions = null;
public OptionStrikeData expiry(OffsetDateTime expiry) {
this.expiry = expiry;
return this;
}
/**
* Get expiry
* @return expiry
**/
@Schema(description = "")
public OffsetDateTime getExpiry() {
return expiry;
}
public void setExpiry(OffsetDateTime expiry) {
this.expiry = expiry;
}
public OptionStrikeData pcr(Double pcr) {
this.pcr = pcr;
return this;
}
/**
* Get pcr
* @return pcr
**/
@Schema(description = "")
public Double getPcr() {
return pcr;
}
public void setPcr(Double pcr) {
this.pcr = pcr;
}
public OptionStrikeData strikePrice(Double strikePrice) {
this.strikePrice = strikePrice;
return this;
}
/**
* Get strikePrice
* @return strikePrice
**/
@Schema(description = "")
public Double getStrikePrice() {
return strikePrice;
}
public void setStrikePrice(Double strikePrice) {
this.strikePrice = strikePrice;
}
public OptionStrikeData underlyingKey(String underlyingKey) {
this.underlyingKey = underlyingKey;
return this;
}
/**
* Get underlyingKey
* @return underlyingKey
**/
@Schema(description = "")
public String getUnderlyingKey() {
return underlyingKey;
}
public void setUnderlyingKey(String underlyingKey) {
this.underlyingKey = underlyingKey;
}
public OptionStrikeData underlyingSpotPrice(Double underlyingSpotPrice) {
this.underlyingSpotPrice = underlyingSpotPrice;
return this;
}
/**
* Get underlyingSpotPrice
* @return underlyingSpotPrice
**/
@Schema(description = "")
public Double getUnderlyingSpotPrice() {
return underlyingSpotPrice;
}
public void setUnderlyingSpotPrice(Double underlyingSpotPrice) {
this.underlyingSpotPrice = underlyingSpotPrice;
}
public OptionStrikeData callOptions(PutCallOptionChainData callOptions) {
this.callOptions = callOptions;
return this;
}
/**
* Get callOptions
* @return callOptions
**/
@Schema(description = "")
public PutCallOptionChainData getCallOptions() {
return callOptions;
}
public void setCallOptions(PutCallOptionChainData callOptions) {
this.callOptions = callOptions;
}
public OptionStrikeData putOptions(PutCallOptionChainData putOptions) {
this.putOptions = putOptions;
return this;
}
/**
* Get putOptions
* @return putOptions
**/
@Schema(description = "")
public PutCallOptionChainData getPutOptions() {
return putOptions;
}
public void setPutOptions(PutCallOptionChainData putOptions) {
this.putOptions = putOptions;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OptionStrikeData optionStrikeData = (OptionStrikeData) o;
return Objects.equals(this.expiry, optionStrikeData.expiry) &&
Objects.equals(this.pcr, optionStrikeData.pcr) &&
Objects.equals(this.strikePrice, optionStrikeData.strikePrice) &&
Objects.equals(this.underlyingKey, optionStrikeData.underlyingKey) &&
Objects.equals(this.underlyingSpotPrice, optionStrikeData.underlyingSpotPrice) &&
Objects.equals(this.callOptions, optionStrikeData.callOptions) &&
Objects.equals(this.putOptions, optionStrikeData.putOptions);
}
@Override
public int hashCode() {
return Objects.hash(expiry, pcr, strikePrice, underlyingKey, underlyingSpotPrice, callOptions, putOptions);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OptionStrikeData {\n");
sb.append(" expiry: ").append(toIndentedString(expiry)).append("\n");
sb.append(" pcr: ").append(toIndentedString(pcr)).append("\n");
sb.append(" strikePrice: ").append(toIndentedString(strikePrice)).append("\n");
sb.append(" underlyingKey: ").append(toIndentedString(underlyingKey)).append("\n");
sb.append(" underlyingSpotPrice: ").append(toIndentedString(underlyingSpotPrice)).append("\n");
sb.append(" callOptions: ").append(toIndentedString(callOptions)).append("\n");
sb.append(" putOptions: ").append(toIndentedString(putOptions)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}