package io.swagger.model.core;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;

import java.util.Objects;

@Validated
public class CommonCropNewRequest {

    @JsonProperty("commonCropName")
    private String commonCropName = null;

    public CommonCropNewRequest commonCropName(String commonCropName) {
        this.commonCropName = commonCropName;
        return this;
    }

    @ApiModelProperty(example = "Maize", required = true, value = "Common crop name")
    public String getCommonCropName() {
        return commonCropName;
    }

    public void setCommonCropName(String commonCropName) {
        this.commonCropName = commonCropName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        CommonCropNewRequest that = (CommonCropNewRequest) o;
        return Objects.equals(commonCropName, that.commonCropName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(commonCropName);
    }
}
