// 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.DataFeedIngestionStatusHelper;
import com.azure.core.annotation.Immutable;

import java.time.OffsetDateTime;

/** The DataFeedIngestionStatus model. */
@Immutable
public final class DataFeedIngestionStatus {
    /*
     * data slice timestamp.
     */
    private OffsetDateTime timestamp;

    /*
     * latest ingestion task status for this data slice.
     */
    private IngestionStatusType status;

    /*
     * the trimmed message of last ingestion job.
     */
    private String message;

    /**
     * Get the timestamp property: data slice timestamp.
     *
     * @return the timestamp value.
     */
    public OffsetDateTime getTimestamp() {
        return this.timestamp;
    }

    /**
     * Get the status property: latest ingestion task status for this data slice.
     *
     * @return the status value.
     */
    public IngestionStatusType getStatus() {
        return this.status;
    }

    /**
     * Get the message property: the trimmed message of last ingestion job.
     *
     * @return the message value.
     */
    public String getMessage() {
        return this.message;
    }

    static {
        DataFeedIngestionStatusHelper
            .setAccessor(new DataFeedIngestionStatusHelper.DataFeedIngestionStatusAccessor() {
                @Override
                public void setTimestamp(DataFeedIngestionStatus ingestionStatus, OffsetDateTime offsetDateTime) {
                    ingestionStatus.setTimestamp(offsetDateTime);
                }

                @Override
                public void setIngestionStatusType(DataFeedIngestionStatus ingestionStatus, IngestionStatusType statusType) {
                    ingestionStatus.setStatus(statusType);
                }

                @Override
                public void setMessage(DataFeedIngestionStatus ingestionStatus, String message) {
                    ingestionStatus.setMessage(message);
                }
            });
    }

    void setTimestamp(OffsetDateTime timestamp) {
        this.timestamp = timestamp;
    }

    void setStatus(IngestionStatusType ingestionStatusType) {
        this.status = ingestionStatusType;
    }
    void setMessage(String message) {
        this.message = message;
    }
}
