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

package com.azure.resourcemanager.appcomplianceautomation.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Snapshot's properties. */
@Immutable
public final class SnapshotProperties {
    /*
     * Snapshot id in the database.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * Snapshot name.
     */
    @JsonProperty(value = "snapshotName", access = JsonProperty.Access.WRITE_ONLY)
    private String snapshotName;

    /*
     * The timestamp of resource creation (UTC).
     */
    @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime createdAt;

    /*
     * Azure lifecycle management
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * The report essential info.
     */
    @JsonProperty(value = "reportProperties", access = JsonProperty.Access.WRITE_ONLY)
    private ReportProperties reportProperties;

    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "reportSystemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData reportSystemData;

    /*
     * List of compliance results.
     */
    @JsonProperty(value = "complianceResults", access = JsonProperty.Access.WRITE_ONLY)
    private List<ComplianceResult> complianceResults;

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

    /**
     * Get the id property: Snapshot id in the database.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Get the snapshotName property: Snapshot name.
     *
     * @return the snapshotName value.
     */
    public String snapshotName() {
        return this.snapshotName;
    }

    /**
     * Get the createdAt property: The timestamp of resource creation (UTC).
     *
     * @return the createdAt value.
     */
    public OffsetDateTime createdAt() {
        return this.createdAt;
    }

    /**
     * Get the provisioningState property: Azure lifecycle management.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the reportProperties property: The report essential info.
     *
     * @return the reportProperties value.
     */
    public ReportProperties reportProperties() {
        return this.reportProperties;
    }

    /**
     * Get the reportSystemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the reportSystemData value.
     */
    public SystemData reportSystemData() {
        return this.reportSystemData;
    }

    /**
     * Get the complianceResults property: List of compliance results.
     *
     * @return the complianceResults value.
     */
    public List<ComplianceResult> complianceResults() {
        return this.complianceResults;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (reportProperties() != null) {
            reportProperties().validate();
        }
        if (complianceResults() != null) {
            complianceResults().forEach(e -> e.validate());
        }
    }
}
