Class LimitConfig

java.lang.Object
dev.vality.damsel.limiter.config.LimitConfig
All Implemented Interfaces:
Serializable, Cloneable, Comparable<LimitConfig>, org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>, org.apache.thrift.TSerializable

@Generated(value="Autogenerated by Thrift Compiler (0.19.0)", date="2024-08-02") public class LimitConfig extends Object implements org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>, Serializable, Cloneable, Comparable<LimitConfig>
See Also:
  • Field Details

    • processor_type

      public String processor_type
    • created_at

      public String created_at
    • started_at

      public String started_at
    • shard_size

      public long shard_size
    • time_range_type

      public TimeRangeType time_range_type
    • context_type

      public LimitContextType context_type
    • type

      public LimitType type
    • scopes

      public Set<LimitScopeType> scopes
    • description

      public String description
    • op_behaviour

      public OperationLimitBehaviour op_behaviour
    • currency_conversion

      public CurrencyConversion currency_conversion
      Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto).
    • metaDataMap

      public static final Map<LimitConfig._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
  • Constructor Details

    • LimitConfig

      public LimitConfig()
    • LimitConfig

      public LimitConfig(String processor_type, String created_at, String started_at, long shard_size, TimeRangeType time_range_type, LimitContextType context_type)
    • LimitConfig

      public LimitConfig(LimitConfig other)
      Performs a deep copy on other.
  • Method Details

    • deepCopy

      public LimitConfig deepCopy()
      Specified by:
      deepCopy in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • getProcessorType

      public String getProcessorType()
    • setProcessorType

      public LimitConfig setProcessorType(String processor_type)
    • unsetProcessorType

      public void unsetProcessorType()
    • isSetProcessorType

      public boolean isSetProcessorType()
      Returns true if field processor_type is set (has been assigned a value) and false otherwise
    • setProcessorTypeIsSet

      public void setProcessorTypeIsSet(boolean value)
    • getCreatedAt

      public String getCreatedAt()
    • setCreatedAt

      public LimitConfig setCreatedAt(String created_at)
    • unsetCreatedAt

      public void unsetCreatedAt()
    • isSetCreatedAt

      public boolean isSetCreatedAt()
      Returns true if field created_at is set (has been assigned a value) and false otherwise
    • setCreatedAtIsSet

      public void setCreatedAtIsSet(boolean value)
    • getStartedAt

      public String getStartedAt()
    • setStartedAt

      public LimitConfig setStartedAt(String started_at)
    • unsetStartedAt

      public void unsetStartedAt()
    • isSetStartedAt

      public boolean isSetStartedAt()
      Returns true if field started_at is set (has been assigned a value) and false otherwise
    • setStartedAtIsSet

      public void setStartedAtIsSet(boolean value)
    • getShardSize

      public long getShardSize()
    • setShardSize

      public LimitConfig setShardSize(long shard_size)
    • unsetShardSize

      public void unsetShardSize()
    • isSetShardSize

      public boolean isSetShardSize()
      Returns true if field shard_size is set (has been assigned a value) and false otherwise
    • setShardSizeIsSet

      public void setShardSizeIsSet(boolean value)
    • getTimeRangeType

      public TimeRangeType getTimeRangeType()
    • setTimeRangeType

      public LimitConfig setTimeRangeType(TimeRangeType time_range_type)
    • unsetTimeRangeType

      public void unsetTimeRangeType()
    • isSetTimeRangeType

      public boolean isSetTimeRangeType()
      Returns true if field time_range_type is set (has been assigned a value) and false otherwise
    • setTimeRangeTypeIsSet

      public void setTimeRangeTypeIsSet(boolean value)
    • getContextType

      public LimitContextType getContextType()
    • setContextType

      public LimitConfig setContextType(LimitContextType context_type)
    • unsetContextType

      public void unsetContextType()
    • isSetContextType

      public boolean isSetContextType()
      Returns true if field context_type is set (has been assigned a value) and false otherwise
    • setContextTypeIsSet

      public void setContextTypeIsSet(boolean value)
    • getType

      public LimitType getType()
    • setType

      public LimitConfig setType(LimitType type)
    • unsetType

      public void unsetType()
    • isSetType

      public boolean isSetType()
      Returns true if field type is set (has been assigned a value) and false otherwise
    • setTypeIsSet

      public void setTypeIsSet(boolean value)
    • getScopesSize

      public int getScopesSize()
    • getScopesIterator

      public Iterator<LimitScopeType> getScopesIterator()
    • addToScopes

      public void addToScopes(LimitScopeType elem)
    • getScopes

      public Set<LimitScopeType> getScopes()
    • setScopes

      public LimitConfig setScopes(Set<LimitScopeType> scopes)
    • unsetScopes

      public void unsetScopes()
    • isSetScopes

      public boolean isSetScopes()
      Returns true if field scopes is set (has been assigned a value) and false otherwise
    • setScopesIsSet

      public void setScopesIsSet(boolean value)
    • getDescription

      public String getDescription()
    • setDescription

      public LimitConfig setDescription(String description)
    • unsetDescription

      public void unsetDescription()
    • isSetDescription

      public boolean isSetDescription()
      Returns true if field description is set (has been assigned a value) and false otherwise
    • setDescriptionIsSet

      public void setDescriptionIsSet(boolean value)
    • getOpBehaviour

      public OperationLimitBehaviour getOpBehaviour()
    • setOpBehaviour

      public LimitConfig setOpBehaviour(OperationLimitBehaviour op_behaviour)
    • unsetOpBehaviour

      public void unsetOpBehaviour()
    • isSetOpBehaviour

      public boolean isSetOpBehaviour()
      Returns true if field op_behaviour is set (has been assigned a value) and false otherwise
    • setOpBehaviourIsSet

      public void setOpBehaviourIsSet(boolean value)
    • getCurrencyConversion

      public CurrencyConversion getCurrencyConversion()
      Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto).
    • setCurrencyConversion

      public LimitConfig setCurrencyConversion(CurrencyConversion currency_conversion)
      Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto).
    • unsetCurrencyConversion

      public void unsetCurrencyConversion()
    • isSetCurrencyConversion

      public boolean isSetCurrencyConversion()
      Returns true if field currency_conversion is set (has been assigned a value) and false otherwise
    • setCurrencyConversionIsSet

      public void setCurrencyConversionIsSet(boolean value)
    • setFieldValue

      public void setFieldValue(LimitConfig._Fields field, Object value)
      Specified by:
      setFieldValue in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • getFieldValue

      public Object getFieldValue(LimitConfig._Fields field)
      Specified by:
      getFieldValue in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • isSet

      public boolean isSet(LimitConfig._Fields field)
      Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
      Specified by:
      isSet in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(LimitConfig that)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(LimitConfig other)
      Specified by:
      compareTo in interface Comparable<LimitConfig>
    • fieldForId

      public LimitConfig._Fields fieldForId(int fieldId)
      Specified by:
      fieldForId in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • getFields

      public LimitConfig._Fields[] getFields()
      Specified by:
      getFields in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • getFieldMetaData

      public Map<LimitConfig._Fields,org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData()
      Specified by:
      getFieldMetaData in interface org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
    • read

      public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
      Specified by:
      read in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • write

      public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
      Specified by:
      write in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validate

      public void validate() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException