au.org.consumerdatastandards.holder.model.energy.EnergyPlanContractFixedAmount Maven / Gradle / Ivy
The newest version!
package au.org.consumerdatastandards.holder.model.energy;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.util.Objects;
/**
* Required if methodUType is fixedAmount
*/
@ApiModel(description = "Required if methodUType is fixedAmount")
@Entity
public class EnergyPlanContractFixedAmount {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@JsonIgnore
private String id;
private String amount;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public EnergyPlanContractFixedAmount amount(String amount) {
this.amount = amount;
return this;
}
/**
* The amount of the discount
*
* @return amount
*/
@ApiModelProperty(required = true, value = "The amount of the discount")
@NotNull
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnergyPlanContractFixedAmount energyPlanContractFixedAmount = (EnergyPlanContractFixedAmount) o;
return Objects.equals(this.amount, energyPlanContractFixedAmount.amount);
}
@Override
public int hashCode() {
return Objects.hash(amount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnergyPlanContractFixedAmount {\n");
sb.append(" amount: ").append(toIndentedString(amount)).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 ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy