All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.silanis.esl.api.model.Price Maven / Gradle / Ivy

There is a newer version: 11.59.0
Show newest version
package com.silanis.esl.api.model;
//
import com.fasterxml.jackson.annotation.*;
import java.util.List;
import java.util.ArrayList;
import com.silanis.esl.api.util.SchemaSanitizer;
@JsonIgnoreProperties(ignoreUnknown=true)
public class Price extends Model
      implements java.io.Serializable
{
    
    // Dirty Flag Constants
    @JsonIgnore
    public static final String FIELD_AMOUNT = "amount";
    @JsonIgnore
    public static final String FIELD_CURRENCY = "currency";
    
    // Empty Constructor
    public Price ( ) {}
    
    // Fields
    protected Integer _amount = 0;
    protected Currency _currency;
    
    // Accessors
        
    
    public Price setAmount( Integer value ){
        SchemaSanitizer.throwOnNull(FIELD_AMOUNT,value);
        // TODO With proper compare
        // if ( this._amount == value ) return this;
        this._amount = value;
        setDirty(FIELD_AMOUNT);
        return this;
    }
    // Used internally by aws. Invokes a the corresponding setter if the value is not null
    @JsonIgnore
    public Price safeSetAmount( Integer value ){
        if ( value != null ) { this.setAmount( value ); }
        return this;
    }
    public Integer getAmount(){
        return _amount;
    }
    
        
    
    public Price setCurrency( Currency value ){
        SchemaSanitizer.throwOnNull(FIELD_CURRENCY,value);
        // TODO With proper compare
        // if ( this._currency == value ) return this;
        this._currency = value;
        setDirty(FIELD_CURRENCY);
        return this;
    }
    // Used internally by aws. Invokes a the corresponding setter if the value is not null
    @JsonIgnore
    public Price safeSetCurrency( Currency value ){
        if ( value != null ) { this.setCurrency( value ); }
        return this;
    }
    public Currency getCurrency(){
        return _currency;
    }
    
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy