com.upstox.api.InstrumentData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of upstox-java-sdk Show documentation
Show all versions of upstox-java-sdk Show documentation
The official Java client for communicating with the Upstox API
/*
* 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 io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* Response data for option contracts
*/
@Schema(description = "Response data for option contracts")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-06-25T15:59:27.509882+05:30[Asia/Kolkata]")
public class InstrumentData {
@SerializedName("name")
private String name = null;
@SerializedName("segment")
private String segment = null;
@SerializedName("exchange")
private String exchange = null;
@SerializedName("isin")
private String isin = null;
@SerializedName("expiry")
private OffsetDateTime expiry = null;
@SerializedName("country")
private String country = null;
@SerializedName("latency")
private String latency = null;
@SerializedName("description")
private String description = null;
@SerializedName("currency")
private String currency = null;
@SerializedName("weekly")
private Boolean weekly = null;
@SerializedName("instrument_key")
private String instrumentKey = null;
@SerializedName("exchange_token")
private String exchangeToken = null;
@SerializedName("trading_symbol")
private String tradingSymbol = null;
@SerializedName("short_name")
private String shortName = null;
@SerializedName("tick_size")
private Double tickSize = null;
@SerializedName("lot_size")
private Long lotSize = null;
@SerializedName("instrument_type")
private String instrumentType = null;
@SerializedName("freeze_quantity")
private Double freezeQuantity = null;
@SerializedName("underlying_key")
private String underlyingKey = null;
@SerializedName("underlying_type")
private String underlyingType = null;
@SerializedName("underlying_symbol")
private String underlyingSymbol = null;
@SerializedName("last_trading_date")
private OffsetDateTime lastTradingDate = null;
@SerializedName("strike_price")
private Double strikePrice = null;
@SerializedName("price_quote_unit")
private String priceQuoteUnit = null;
@SerializedName("qty_multiplier")
private Long qtyMultiplier = null;
@SerializedName("minimum_lot")
private Long minimumLot = null;
@SerializedName("start_time")
private String startTime = null;
@SerializedName("end_time")
private String endTime = null;
@SerializedName("week_days")
private String weekDays = null;
@SerializedName("general_denominator")
private Double generalDenominator = null;
@SerializedName("general_numerator")
private Double generalNumerator = null;
@SerializedName("price_numerator")
private Double priceNumerator = null;
@SerializedName("price_denominator")
private Double priceDenominator = null;
@SerializedName("mtf_enabled")
private Boolean mtfEnabled = null;
@SerializedName("mtf_bracket")
private Double mtfBracket = null;
@SerializedName("security_type")
private String securityType = null;
public InstrumentData name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public InstrumentData segment(String segment) {
this.segment = segment;
return this;
}
/**
* Get segment
* @return segment
**/
@Schema(description = "")
public String getSegment() {
return segment;
}
public void setSegment(String segment) {
this.segment = segment;
}
public InstrumentData exchange(String exchange) {
this.exchange = exchange;
return this;
}
/**
* Get exchange
* @return exchange
**/
@Schema(description = "")
public String getExchange() {
return exchange;
}
public void setExchange(String exchange) {
this.exchange = exchange;
}
public InstrumentData isin(String isin) {
this.isin = isin;
return this;
}
/**
* Get isin
* @return isin
**/
@Schema(description = "")
public String getIsin() {
return isin;
}
public void setIsin(String isin) {
this.isin = isin;
}
public InstrumentData 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 InstrumentData country(String country) {
this.country = country;
return this;
}
/**
* Get country
* @return country
**/
@Schema(description = "")
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public InstrumentData latency(String latency) {
this.latency = latency;
return this;
}
/**
* Get latency
* @return latency
**/
@Schema(description = "")
public String getLatency() {
return latency;
}
public void setLatency(String latency) {
this.latency = latency;
}
public InstrumentData description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public InstrumentData currency(String currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
**/
@Schema(description = "")
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public InstrumentData weekly(Boolean weekly) {
this.weekly = weekly;
return this;
}
/**
* Get weekly
* @return weekly
**/
@Schema(description = "")
public Boolean isWeekly() {
return weekly;
}
public void setWeekly(Boolean weekly) {
this.weekly = weekly;
}
public InstrumentData instrumentKey(String instrumentKey) {
this.instrumentKey = instrumentKey;
return this;
}
/**
* Get instrumentKey
* @return instrumentKey
**/
@Schema(description = "")
public String getInstrumentKey() {
return instrumentKey;
}
public void setInstrumentKey(String instrumentKey) {
this.instrumentKey = instrumentKey;
}
public InstrumentData exchangeToken(String exchangeToken) {
this.exchangeToken = exchangeToken;
return this;
}
/**
* Get exchangeToken
* @return exchangeToken
**/
@Schema(description = "")
public String getExchangeToken() {
return exchangeToken;
}
public void setExchangeToken(String exchangeToken) {
this.exchangeToken = exchangeToken;
}
public InstrumentData tradingSymbol(String tradingSymbol) {
this.tradingSymbol = tradingSymbol;
return this;
}
/**
* Get tradingSymbol
* @return tradingSymbol
**/
@Schema(description = "")
public String getTradingSymbol() {
return tradingSymbol;
}
public void setTradingSymbol(String tradingSymbol) {
this.tradingSymbol = tradingSymbol;
}
public InstrumentData shortName(String shortName) {
this.shortName = shortName;
return this;
}
/**
* Get shortName
* @return shortName
**/
@Schema(description = "")
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public InstrumentData tickSize(Double tickSize) {
this.tickSize = tickSize;
return this;
}
/**
* Get tickSize
* @return tickSize
**/
@Schema(description = "")
public Double getTickSize() {
return tickSize;
}
public void setTickSize(Double tickSize) {
this.tickSize = tickSize;
}
public InstrumentData lotSize(Long lotSize) {
this.lotSize = lotSize;
return this;
}
/**
* Get lotSize
* @return lotSize
**/
@Schema(description = "")
public Long getLotSize() {
return lotSize;
}
public void setLotSize(Long lotSize) {
this.lotSize = lotSize;
}
public InstrumentData instrumentType(String instrumentType) {
this.instrumentType = instrumentType;
return this;
}
/**
* Get instrumentType
* @return instrumentType
**/
@Schema(description = "")
public String getInstrumentType() {
return instrumentType;
}
public void setInstrumentType(String instrumentType) {
this.instrumentType = instrumentType;
}
public InstrumentData freezeQuantity(Double freezeQuantity) {
this.freezeQuantity = freezeQuantity;
return this;
}
/**
* Get freezeQuantity
* @return freezeQuantity
**/
@Schema(description = "")
public Double getFreezeQuantity() {
return freezeQuantity;
}
public void setFreezeQuantity(Double freezeQuantity) {
this.freezeQuantity = freezeQuantity;
}
public InstrumentData 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 InstrumentData underlyingType(String underlyingType) {
this.underlyingType = underlyingType;
return this;
}
/**
* Get underlyingType
* @return underlyingType
**/
@Schema(description = "")
public String getUnderlyingType() {
return underlyingType;
}
public void setUnderlyingType(String underlyingType) {
this.underlyingType = underlyingType;
}
public InstrumentData underlyingSymbol(String underlyingSymbol) {
this.underlyingSymbol = underlyingSymbol;
return this;
}
/**
* Get underlyingSymbol
* @return underlyingSymbol
**/
@Schema(description = "")
public String getUnderlyingSymbol() {
return underlyingSymbol;
}
public void setUnderlyingSymbol(String underlyingSymbol) {
this.underlyingSymbol = underlyingSymbol;
}
public InstrumentData lastTradingDate(OffsetDateTime lastTradingDate) {
this.lastTradingDate = lastTradingDate;
return this;
}
/**
* Get lastTradingDate
* @return lastTradingDate
**/
@Schema(description = "")
public OffsetDateTime getLastTradingDate() {
return lastTradingDate;
}
public void setLastTradingDate(OffsetDateTime lastTradingDate) {
this.lastTradingDate = lastTradingDate;
}
public InstrumentData 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 InstrumentData priceQuoteUnit(String priceQuoteUnit) {
this.priceQuoteUnit = priceQuoteUnit;
return this;
}
/**
* Get priceQuoteUnit
* @return priceQuoteUnit
**/
@Schema(description = "")
public String getPriceQuoteUnit() {
return priceQuoteUnit;
}
public void setPriceQuoteUnit(String priceQuoteUnit) {
this.priceQuoteUnit = priceQuoteUnit;
}
public InstrumentData qtyMultiplier(Long qtyMultiplier) {
this.qtyMultiplier = qtyMultiplier;
return this;
}
/**
* Get qtyMultiplier
* @return qtyMultiplier
**/
@Schema(description = "")
public Long getQtyMultiplier() {
return qtyMultiplier;
}
public void setQtyMultiplier(Long qtyMultiplier) {
this.qtyMultiplier = qtyMultiplier;
}
public InstrumentData minimumLot(Long minimumLot) {
this.minimumLot = minimumLot;
return this;
}
/**
* Get minimumLot
* @return minimumLot
**/
@Schema(description = "")
public Long getMinimumLot() {
return minimumLot;
}
public void setMinimumLot(Long minimumLot) {
this.minimumLot = minimumLot;
}
public InstrumentData startTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* Get startTime
* @return startTime
**/
@Schema(description = "")
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public InstrumentData endTime(String endTime) {
this.endTime = endTime;
return this;
}
/**
* Get endTime
* @return endTime
**/
@Schema(description = "")
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public InstrumentData weekDays(String weekDays) {
this.weekDays = weekDays;
return this;
}
/**
* Get weekDays
* @return weekDays
**/
@Schema(description = "")
public String getWeekDays() {
return weekDays;
}
public void setWeekDays(String weekDays) {
this.weekDays = weekDays;
}
public InstrumentData generalDenominator(Double generalDenominator) {
this.generalDenominator = generalDenominator;
return this;
}
/**
* Get generalDenominator
* @return generalDenominator
**/
@Schema(description = "")
public Double getGeneralDenominator() {
return generalDenominator;
}
public void setGeneralDenominator(Double generalDenominator) {
this.generalDenominator = generalDenominator;
}
public InstrumentData generalNumerator(Double generalNumerator) {
this.generalNumerator = generalNumerator;
return this;
}
/**
* Get generalNumerator
* @return generalNumerator
**/
@Schema(description = "")
public Double getGeneralNumerator() {
return generalNumerator;
}
public void setGeneralNumerator(Double generalNumerator) {
this.generalNumerator = generalNumerator;
}
public InstrumentData priceNumerator(Double priceNumerator) {
this.priceNumerator = priceNumerator;
return this;
}
/**
* Get priceNumerator
* @return priceNumerator
**/
@Schema(description = "")
public Double getPriceNumerator() {
return priceNumerator;
}
public void setPriceNumerator(Double priceNumerator) {
this.priceNumerator = priceNumerator;
}
public InstrumentData priceDenominator(Double priceDenominator) {
this.priceDenominator = priceDenominator;
return this;
}
/**
* Get priceDenominator
* @return priceDenominator
**/
@Schema(description = "")
public Double getPriceDenominator() {
return priceDenominator;
}
public void setPriceDenominator(Double priceDenominator) {
this.priceDenominator = priceDenominator;
}
public InstrumentData mtfEnabled(Boolean mtfEnabled) {
this.mtfEnabled = mtfEnabled;
return this;
}
/**
* Get mtfEnabled
* @return mtfEnabled
**/
@Schema(description = "")
public Boolean isMtfEnabled() {
return mtfEnabled;
}
public void setMtfEnabled(Boolean mtfEnabled) {
this.mtfEnabled = mtfEnabled;
}
public InstrumentData mtfBracket(Double mtfBracket) {
this.mtfBracket = mtfBracket;
return this;
}
/**
* Get mtfBracket
* @return mtfBracket
**/
@Schema(description = "")
public Double getMtfBracket() {
return mtfBracket;
}
public void setMtfBracket(Double mtfBracket) {
this.mtfBracket = mtfBracket;
}
public InstrumentData securityType(String securityType) {
this.securityType = securityType;
return this;
}
/**
* Get securityType
* @return securityType
**/
@Schema(description = "")
public String getSecurityType() {
return securityType;
}
public void setSecurityType(String securityType) {
this.securityType = securityType;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InstrumentData instrumentData = (InstrumentData) o;
return Objects.equals(this.name, instrumentData.name) &&
Objects.equals(this.segment, instrumentData.segment) &&
Objects.equals(this.exchange, instrumentData.exchange) &&
Objects.equals(this.isin, instrumentData.isin) &&
Objects.equals(this.expiry, instrumentData.expiry) &&
Objects.equals(this.country, instrumentData.country) &&
Objects.equals(this.latency, instrumentData.latency) &&
Objects.equals(this.description, instrumentData.description) &&
Objects.equals(this.currency, instrumentData.currency) &&
Objects.equals(this.weekly, instrumentData.weekly) &&
Objects.equals(this.instrumentKey, instrumentData.instrumentKey) &&
Objects.equals(this.exchangeToken, instrumentData.exchangeToken) &&
Objects.equals(this.tradingSymbol, instrumentData.tradingSymbol) &&
Objects.equals(this.shortName, instrumentData.shortName) &&
Objects.equals(this.tickSize, instrumentData.tickSize) &&
Objects.equals(this.lotSize, instrumentData.lotSize) &&
Objects.equals(this.instrumentType, instrumentData.instrumentType) &&
Objects.equals(this.freezeQuantity, instrumentData.freezeQuantity) &&
Objects.equals(this.underlyingKey, instrumentData.underlyingKey) &&
Objects.equals(this.underlyingType, instrumentData.underlyingType) &&
Objects.equals(this.underlyingSymbol, instrumentData.underlyingSymbol) &&
Objects.equals(this.lastTradingDate, instrumentData.lastTradingDate) &&
Objects.equals(this.strikePrice, instrumentData.strikePrice) &&
Objects.equals(this.priceQuoteUnit, instrumentData.priceQuoteUnit) &&
Objects.equals(this.qtyMultiplier, instrumentData.qtyMultiplier) &&
Objects.equals(this.minimumLot, instrumentData.minimumLot) &&
Objects.equals(this.startTime, instrumentData.startTime) &&
Objects.equals(this.endTime, instrumentData.endTime) &&
Objects.equals(this.weekDays, instrumentData.weekDays) &&
Objects.equals(this.generalDenominator, instrumentData.generalDenominator) &&
Objects.equals(this.generalNumerator, instrumentData.generalNumerator) &&
Objects.equals(this.priceNumerator, instrumentData.priceNumerator) &&
Objects.equals(this.priceDenominator, instrumentData.priceDenominator) &&
Objects.equals(this.mtfEnabled, instrumentData.mtfEnabled) &&
Objects.equals(this.mtfBracket, instrumentData.mtfBracket) &&
Objects.equals(this.securityType, instrumentData.securityType);
}
@Override
public int hashCode() {
return Objects.hash(name, segment, exchange, isin, expiry, country, latency, description, currency, weekly, instrumentKey, exchangeToken, tradingSymbol, shortName, tickSize, lotSize, instrumentType, freezeQuantity, underlyingKey, underlyingType, underlyingSymbol, lastTradingDate, strikePrice, priceQuoteUnit, qtyMultiplier, minimumLot, startTime, endTime, weekDays, generalDenominator, generalNumerator, priceNumerator, priceDenominator, mtfEnabled, mtfBracket, securityType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InstrumentData {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" segment: ").append(toIndentedString(segment)).append("\n");
sb.append(" exchange: ").append(toIndentedString(exchange)).append("\n");
sb.append(" isin: ").append(toIndentedString(isin)).append("\n");
sb.append(" expiry: ").append(toIndentedString(expiry)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" latency: ").append(toIndentedString(latency)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" weekly: ").append(toIndentedString(weekly)).append("\n");
sb.append(" instrumentKey: ").append(toIndentedString(instrumentKey)).append("\n");
sb.append(" exchangeToken: ").append(toIndentedString(exchangeToken)).append("\n");
sb.append(" tradingSymbol: ").append(toIndentedString(tradingSymbol)).append("\n");
sb.append(" shortName: ").append(toIndentedString(shortName)).append("\n");
sb.append(" tickSize: ").append(toIndentedString(tickSize)).append("\n");
sb.append(" lotSize: ").append(toIndentedString(lotSize)).append("\n");
sb.append(" instrumentType: ").append(toIndentedString(instrumentType)).append("\n");
sb.append(" freezeQuantity: ").append(toIndentedString(freezeQuantity)).append("\n");
sb.append(" underlyingKey: ").append(toIndentedString(underlyingKey)).append("\n");
sb.append(" underlyingType: ").append(toIndentedString(underlyingType)).append("\n");
sb.append(" underlyingSymbol: ").append(toIndentedString(underlyingSymbol)).append("\n");
sb.append(" lastTradingDate: ").append(toIndentedString(lastTradingDate)).append("\n");
sb.append(" strikePrice: ").append(toIndentedString(strikePrice)).append("\n");
sb.append(" priceQuoteUnit: ").append(toIndentedString(priceQuoteUnit)).append("\n");
sb.append(" qtyMultiplier: ").append(toIndentedString(qtyMultiplier)).append("\n");
sb.append(" minimumLot: ").append(toIndentedString(minimumLot)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" weekDays: ").append(toIndentedString(weekDays)).append("\n");
sb.append(" generalDenominator: ").append(toIndentedString(generalDenominator)).append("\n");
sb.append(" generalNumerator: ").append(toIndentedString(generalNumerator)).append("\n");
sb.append(" priceNumerator: ").append(toIndentedString(priceNumerator)).append("\n");
sb.append(" priceDenominator: ").append(toIndentedString(priceDenominator)).append("\n");
sb.append(" mtfEnabled: ").append(toIndentedString(mtfEnabled)).append("\n");
sb.append(" mtfBracket: ").append(toIndentedString(mtfBracket)).append("\n");
sb.append(" securityType: ").append(toIndentedString(securityType)).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 ");
}
}