// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.metricsadvisor.administration.models;

import com.azure.ai.metricsadvisor.implementation.util.DataFeedIngestionProgressHelper;
import com.azure.core.annotation.Immutable;

import java.time.OffsetDateTime;

/** The DataFeedIngestionProgress model. */
@Immutable
public final class DataFeedIngestionProgress {
    /*
     * the timestamp of latest success ingestion job.
     * null indicates not available
     */
    private OffsetDateTime latestSuccessTimestamp;

    /*
     * the timestamp of latest ingestion job with status update.
     * null indicates not available
     */
    private OffsetDateTime latestActiveTimestamp;

    /** Creates an instance of DataFeedIngestionProgress class. */
    public DataFeedIngestionProgress() {}

    /**
     * Get the latestSuccessTimestamp property: the timestamp of latest success ingestion job. null indicates not
     * available.
     *
     * @return the latestSuccessTimestamp value.
     */
    public OffsetDateTime getLatestSuccessTimestamp() {
        return this.latestSuccessTimestamp;
    }

    /**
     * Get the latestActiveTimestamp property: the timestamp of latest ingestion job with status update. null indicates
     * not available.
     *
     * @return the latestActiveTimestamp value.
     */
    public OffsetDateTime getLatestActiveTimestamp() {
        return this.latestActiveTimestamp;
    }

    static {
        DataFeedIngestionProgressHelper
            .setAccessor(new DataFeedIngestionProgressHelper.DataFeedIngestionProgressAccessor() {
                @Override
                public void setLatestActiveTimestamp(DataFeedIngestionProgress ingestionStatus, OffsetDateTime offsetDateTime) {
                    ingestionStatus.setLatestActiveTimestamp(offsetDateTime);
                }

                @Override
                public void setLatestSuccessTimestamp(DataFeedIngestionProgress ingestionStatus, OffsetDateTime offsetDateTime) {
                    ingestionStatus.setLatestSuccessTimestamp(offsetDateTime);
                }
            });
    }
    void setLatestActiveTimestamp(OffsetDateTime timestamp) {
        this.latestActiveTimestamp = timestamp;
    }
    void setLatestSuccessTimestamp(OffsetDateTime timestamp) {
        this.latestSuccessTimestamp = timestamp;
    }

}
