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

thomsonreuters.dss.api.extractions.reporttemplates.complex.EstimatesActualCondition Maven / Gradle / Ivy

package thomsonreuters.dss.api.extractions.reporttemplates.complex;

import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.davidmoten.odata.client.CollectionPage;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.ODataType;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.UnmappedFields;

import java.util.Collections;
import java.util.List;
import java.util.Optional;

import thomsonreuters.dss.api.extractions.reporttemplates.enums.EstimateType;
import thomsonreuters.dss.api.extractions.reporttemplates.enums.HistoricalFiscalYearType;
import thomsonreuters.dss.api.extractions.reporttemplates.enums.HistoricalQuarterType;
import thomsonreuters.dss.api.extractions.reporttemplates.enums.HistoricalSemiAnnualType;
import thomsonreuters.dss.api.extractions.reporttemplates.enums.ReportCompanyType;
import thomsonreuters.dss.api.extractions.reporttemplates.enums.ReportDateRangeType;
import thomsonreuters.dss.api.extractions.reporttemplates.schema.SchemaInfo;


@JsonInclude(Include.NON_NULL)
@JsonPropertyOrder({
    "@odata.type", 
    "ReportDateRangeType", 
    "DaysAgo", 
    "FiscalYearFrom", 
    "QuarterFrom", 
    "SemiAnnualFrom", 
    "FiscalYearTo", 
    "QuarterTo", 
    "SemiAnnualTo", 
    "ReportCompanyType", 
    "ExcludeRestatedActuals", 
    "EstimateTypes"})
public class EstimatesActualCondition implements ODataType {

    protected ContextPath contextPath;

    @JacksonInject
    @JsonIgnore
    protected UnmappedFields unmappedFields;

    @JsonProperty("@odata.type")
    protected String odataType;

    @JsonProperty("ReportDateRangeType")
    protected ReportDateRangeType reportDateRangeType;

    @JsonProperty("DaysAgo")
    protected Integer daysAgo;

    @JsonProperty("FiscalYearFrom")
    protected HistoricalFiscalYearType fiscalYearFrom;

    @JsonProperty("QuarterFrom")
    protected HistoricalQuarterType quarterFrom;

    @JsonProperty("SemiAnnualFrom")
    protected HistoricalSemiAnnualType semiAnnualFrom;

    @JsonProperty("FiscalYearTo")
    protected HistoricalFiscalYearType fiscalYearTo;

    @JsonProperty("QuarterTo")
    protected HistoricalQuarterType quarterTo;

    @JsonProperty("SemiAnnualTo")
    protected HistoricalSemiAnnualType semiAnnualTo;

    @JsonProperty("ReportCompanyType")
    protected ReportCompanyType reportCompanyType;

    @JsonProperty("ExcludeRestatedActuals")
    protected Boolean excludeRestatedActuals;

    @JsonProperty("EstimateTypes")
    protected List estimateTypes;

    @JsonProperty("EstimateTypes@nextLink")
    protected String estimateTypesNextLink;

    protected EstimatesActualCondition() {
    }

    @Override
    public String odataTypeName() {
        return "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition";
    }

    @Property(name="ReportDateRangeType")
    @JsonIgnore
    public Optional getReportDateRangeType() {
        return Optional.ofNullable(reportDateRangeType);
    }

    public EstimatesActualCondition withReportDateRangeType(ReportDateRangeType reportDateRangeType) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.reportDateRangeType = reportDateRangeType;
        return _x;
    }

    @Property(name="DaysAgo")
    @JsonIgnore
    public Optional getDaysAgo() {
        return Optional.ofNullable(daysAgo);
    }

    public EstimatesActualCondition withDaysAgo(Integer daysAgo) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.daysAgo = daysAgo;
        return _x;
    }

    @Property(name="FiscalYearFrom")
    @JsonIgnore
    public Optional getFiscalYearFrom() {
        return Optional.ofNullable(fiscalYearFrom);
    }

    public EstimatesActualCondition withFiscalYearFrom(HistoricalFiscalYearType fiscalYearFrom) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.fiscalYearFrom = fiscalYearFrom;
        return _x;
    }

    @Property(name="QuarterFrom")
    @JsonIgnore
    public Optional getQuarterFrom() {
        return Optional.ofNullable(quarterFrom);
    }

    public EstimatesActualCondition withQuarterFrom(HistoricalQuarterType quarterFrom) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.quarterFrom = quarterFrom;
        return _x;
    }

    @Property(name="SemiAnnualFrom")
    @JsonIgnore
    public Optional getSemiAnnualFrom() {
        return Optional.ofNullable(semiAnnualFrom);
    }

    public EstimatesActualCondition withSemiAnnualFrom(HistoricalSemiAnnualType semiAnnualFrom) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.semiAnnualFrom = semiAnnualFrom;
        return _x;
    }

    @Property(name="FiscalYearTo")
    @JsonIgnore
    public Optional getFiscalYearTo() {
        return Optional.ofNullable(fiscalYearTo);
    }

    public EstimatesActualCondition withFiscalYearTo(HistoricalFiscalYearType fiscalYearTo) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.fiscalYearTo = fiscalYearTo;
        return _x;
    }

    @Property(name="QuarterTo")
    @JsonIgnore
    public Optional getQuarterTo() {
        return Optional.ofNullable(quarterTo);
    }

    public EstimatesActualCondition withQuarterTo(HistoricalQuarterType quarterTo) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.quarterTo = quarterTo;
        return _x;
    }

    @Property(name="SemiAnnualTo")
    @JsonIgnore
    public Optional getSemiAnnualTo() {
        return Optional.ofNullable(semiAnnualTo);
    }

    public EstimatesActualCondition withSemiAnnualTo(HistoricalSemiAnnualType semiAnnualTo) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.semiAnnualTo = semiAnnualTo;
        return _x;
    }

    @Property(name="ReportCompanyType")
    @JsonIgnore
    public Optional getReportCompanyType() {
        return Optional.ofNullable(reportCompanyType);
    }

    public EstimatesActualCondition withReportCompanyType(ReportCompanyType reportCompanyType) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.reportCompanyType = reportCompanyType;
        return _x;
    }

    @Property(name="ExcludeRestatedActuals")
    @JsonIgnore
    public Optional getExcludeRestatedActuals() {
        return Optional.ofNullable(excludeRestatedActuals);
    }

    public EstimatesActualCondition withExcludeRestatedActuals(Boolean excludeRestatedActuals) {
        EstimatesActualCondition _x = _copy();
        _x.odataType = Util.nvl(odataType, "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition");
        _x.excludeRestatedActuals = excludeRestatedActuals;
        return _x;
    }

    @Property(name="EstimateTypes")
    @JsonIgnore
    public CollectionPage getEstimateTypes() {
        return new CollectionPage(contextPath, EstimateType.class, estimateTypes, Optional.ofNullable(estimateTypesNextLink), SchemaInfo.INSTANCE, Collections.emptyList());
    }

    @JsonAnySetter
    private void setUnmappedField(String name, Object value) {
        if (unmappedFields == null) {
            unmappedFields = new UnmappedFields();
        }
        unmappedFields.put(name, value);
    }

    @Override
    @JsonIgnore
    public UnmappedFields getUnmappedFields() {
        return unmappedFields == null ? new UnmappedFields() : unmappedFields;
    }

    @Override
    public void postInject(boolean addKeysToContextPath) {
        // do nothing;
    }

    /**
     * Returns a builder which is used to create a new
     * instance of this class (given that this class is immutable).
     *
     * @return a new Builder for this class
     */
    // Suffix used on builder factory method to differentiate the method
    // from static builder methods on superclasses
    public static Builder builder() {
        return new Builder();
    }

    public static final class Builder {
        private ReportDateRangeType reportDateRangeType;
        private Integer daysAgo;
        private HistoricalFiscalYearType fiscalYearFrom;
        private HistoricalQuarterType quarterFrom;
        private HistoricalSemiAnnualType semiAnnualFrom;
        private HistoricalFiscalYearType fiscalYearTo;
        private HistoricalQuarterType quarterTo;
        private HistoricalSemiAnnualType semiAnnualTo;
        private ReportCompanyType reportCompanyType;
        private Boolean excludeRestatedActuals;
        private List estimateTypes;
        private String estimateTypesNextLink;
        private ChangedFields changedFields = new ChangedFields();

        Builder() {
            // prevent instantiation
        }

        public Builder reportDateRangeType(ReportDateRangeType reportDateRangeType) {
            this.reportDateRangeType = reportDateRangeType;
            this.changedFields = changedFields.add("ReportDateRangeType");
            return this;
        }

        public Builder daysAgo(Integer daysAgo) {
            this.daysAgo = daysAgo;
            this.changedFields = changedFields.add("DaysAgo");
            return this;
        }

        public Builder fiscalYearFrom(HistoricalFiscalYearType fiscalYearFrom) {
            this.fiscalYearFrom = fiscalYearFrom;
            this.changedFields = changedFields.add("FiscalYearFrom");
            return this;
        }

        public Builder quarterFrom(HistoricalQuarterType quarterFrom) {
            this.quarterFrom = quarterFrom;
            this.changedFields = changedFields.add("QuarterFrom");
            return this;
        }

        public Builder semiAnnualFrom(HistoricalSemiAnnualType semiAnnualFrom) {
            this.semiAnnualFrom = semiAnnualFrom;
            this.changedFields = changedFields.add("SemiAnnualFrom");
            return this;
        }

        public Builder fiscalYearTo(HistoricalFiscalYearType fiscalYearTo) {
            this.fiscalYearTo = fiscalYearTo;
            this.changedFields = changedFields.add("FiscalYearTo");
            return this;
        }

        public Builder quarterTo(HistoricalQuarterType quarterTo) {
            this.quarterTo = quarterTo;
            this.changedFields = changedFields.add("QuarterTo");
            return this;
        }

        public Builder semiAnnualTo(HistoricalSemiAnnualType semiAnnualTo) {
            this.semiAnnualTo = semiAnnualTo;
            this.changedFields = changedFields.add("SemiAnnualTo");
            return this;
        }

        public Builder reportCompanyType(ReportCompanyType reportCompanyType) {
            this.reportCompanyType = reportCompanyType;
            this.changedFields = changedFields.add("ReportCompanyType");
            return this;
        }

        public Builder excludeRestatedActuals(Boolean excludeRestatedActuals) {
            this.excludeRestatedActuals = excludeRestatedActuals;
            this.changedFields = changedFields.add("ExcludeRestatedActuals");
            return this;
        }

        public Builder estimateTypes(List estimateTypes) {
            this.estimateTypes = estimateTypes;
            this.changedFields = changedFields.add("EstimateTypes");
            return this;
        }

        public Builder estimateTypesNextLink(String estimateTypesNextLink) {
            this.estimateTypesNextLink = estimateTypesNextLink;
            this.changedFields = changedFields.add("EstimateTypes");
            return this;
        }

        public EstimatesActualCondition build() {
            EstimatesActualCondition _x = new EstimatesActualCondition();
            _x.contextPath = null;
            _x.unmappedFields = new UnmappedFields();
            _x.odataType = "ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EstimatesActualCondition";
            _x.reportDateRangeType = reportDateRangeType;
            _x.daysAgo = daysAgo;
            _x.fiscalYearFrom = fiscalYearFrom;
            _x.quarterFrom = quarterFrom;
            _x.semiAnnualFrom = semiAnnualFrom;
            _x.fiscalYearTo = fiscalYearTo;
            _x.quarterTo = quarterTo;
            _x.semiAnnualTo = semiAnnualTo;
            _x.reportCompanyType = reportCompanyType;
            _x.excludeRestatedActuals = excludeRestatedActuals;
            _x.estimateTypes = estimateTypes;
            _x.estimateTypesNextLink = estimateTypesNextLink;
            return _x;
        }
    }

    private EstimatesActualCondition _copy() {
        EstimatesActualCondition _x = new EstimatesActualCondition();
        _x.contextPath = contextPath;
        _x.unmappedFields = unmappedFields;
        _x.odataType = odataType;
        _x.reportDateRangeType = reportDateRangeType;
        _x.daysAgo = daysAgo;
        _x.fiscalYearFrom = fiscalYearFrom;
        _x.quarterFrom = quarterFrom;
        _x.semiAnnualFrom = semiAnnualFrom;
        _x.fiscalYearTo = fiscalYearTo;
        _x.quarterTo = quarterTo;
        _x.semiAnnualTo = semiAnnualTo;
        _x.reportCompanyType = reportCompanyType;
        _x.excludeRestatedActuals = excludeRestatedActuals;
        _x.estimateTypes = estimateTypes;
        return _x;
    }

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder();
        b.append("EstimatesActualCondition[");
        b.append("ReportDateRangeType=");
        b.append(this.reportDateRangeType);
        b.append(", ");
        b.append("DaysAgo=");
        b.append(this.daysAgo);
        b.append(", ");
        b.append("FiscalYearFrom=");
        b.append(this.fiscalYearFrom);
        b.append(", ");
        b.append("QuarterFrom=");
        b.append(this.quarterFrom);
        b.append(", ");
        b.append("SemiAnnualFrom=");
        b.append(this.semiAnnualFrom);
        b.append(", ");
        b.append("FiscalYearTo=");
        b.append(this.fiscalYearTo);
        b.append(", ");
        b.append("QuarterTo=");
        b.append(this.quarterTo);
        b.append(", ");
        b.append("SemiAnnualTo=");
        b.append(this.semiAnnualTo);
        b.append(", ");
        b.append("ReportCompanyType=");
        b.append(this.reportCompanyType);
        b.append(", ");
        b.append("ExcludeRestatedActuals=");
        b.append(this.excludeRestatedActuals);
        b.append(", ");
        b.append("EstimateTypes=");
        b.append(this.estimateTypes);
        b.append("]");
        b.append(",unmappedFields=");
        b.append(unmappedFields);
        b.append(",odataType=");
        b.append(odataType);
        return b.toString();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy