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

package com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Changelog list. */
@Fluent
public final class ChangelogInner {
    /*
     * list of changes
     */
    @JsonProperty(value = "changes", required = true)
    private List<String> changes;

    /*
     * lastCommitted timestamp
     */
    @JsonProperty(value = "lastCommitted")
    private OffsetDateTime lastCommitted;

    /*
     * lastModified timestamp
     */
    @JsonProperty(value = "lastModified")
    private OffsetDateTime lastModified;

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

    /**
     * Get the changes property: list of changes.
     *
     * @return the changes value.
     */
    public List<String> changes() {
        return this.changes;
    }

    /**
     * Set the changes property: list of changes.
     *
     * @param changes the changes value to set.
     * @return the ChangelogInner object itself.
     */
    public ChangelogInner withChanges(List<String> changes) {
        this.changes = changes;
        return this;
    }

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

    /**
     * Set the lastCommitted property: lastCommitted timestamp.
     *
     * @param lastCommitted the lastCommitted value to set.
     * @return the ChangelogInner object itself.
     */
    public ChangelogInner withLastCommitted(OffsetDateTime lastCommitted) {
        this.lastCommitted = lastCommitted;
        return this;
    }

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

    /**
     * Set the lastModified property: lastModified timestamp.
     *
     * @param lastModified the lastModified value to set.
     * @return the ChangelogInner object itself.
     */
    public ChangelogInner withLastModified(OffsetDateTime lastModified) {
        this.lastModified = lastModified;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (changes() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property changes in model ChangelogInner"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ChangelogInner.class);
}
