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

package com.azure.resourcemanager.automanage.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.automanage.models.ReportResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Definition of the report. */
@Fluent
public final class ReportInner extends ProxyResource {
    /*
     * The properties for the report.
     */
    @JsonProperty(value = "properties")
    private AssignmentReportProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /**
     * Get the innerProperties property: The properties for the report.
     *
     * @return the innerProperties value.
     */
    private AssignmentReportProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the startTime property: Start time of the configuration profile assignment processing.
     *
     * @return the startTime value.
     */
    public String startTime() {
        return this.innerProperties() == null ? null : this.innerProperties().startTime();
    }

    /**
     * Set the startTime property: Start time of the configuration profile assignment processing.
     *
     * @param startTime the startTime value to set.
     * @return the ReportInner object itself.
     */
    public ReportInner withStartTime(String startTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AssignmentReportProperties();
        }
        this.innerProperties().withStartTime(startTime);
        return this;
    }

    /**
     * Get the endTime property: End time of the configuration profile assignment processing.
     *
     * @return the endTime value.
     */
    public String endTime() {
        return this.innerProperties() == null ? null : this.innerProperties().endTime();
    }

    /**
     * Set the endTime property: End time of the configuration profile assignment processing.
     *
     * @param endTime the endTime value to set.
     * @return the ReportInner object itself.
     */
    public ReportInner withEndTime(String endTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AssignmentReportProperties();
        }
        this.innerProperties().withEndTime(endTime);
        return this;
    }

    /**
     * Get the lastModifiedTime property: Last modified time of the configuration profile assignment processing.
     *
     * @return the lastModifiedTime value.
     */
    public String lastModifiedTime() {
        return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime();
    }

    /**
     * Get the duration property: Duration of the configuration profile assignment processing.
     *
     * @return the duration value.
     */
    public String duration() {
        return this.innerProperties() == null ? null : this.innerProperties().duration();
    }

    /**
     * Get the type property: Type of the configuration profile assignment processing (Initial/Consistency).
     *
     * @return the type value.
     */
    public String typePropertiesType() {
        return this.innerProperties() == null ? null : this.innerProperties().type();
    }

    /**
     * Get the status property: The status of the configuration profile assignment.
     *
     * @return the status value.
     */
    public String status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the configurationProfile property: The configurationProfile linked to the assignment.
     *
     * @return the configurationProfile value.
     */
    public String configurationProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().configurationProfile();
    }

    /**
     * Get the resources property: List of resources processed by the configuration profile assignment.
     *
     * @return the resources value.
     */
    public List<ReportResource> resources() {
        return this.innerProperties() == null ? null : this.innerProperties().resources();
    }

    /**
     * Get the error property: Error message, if any, returned by the configuration profile assignment processing.
     *
     * @return the error value.
     */
    public ManagementError error() {
        return this.innerProperties() == null ? null : this.innerProperties().error();
    }

    /**
     * Get the reportFormatVersion property: Version of the report format.
     *
     * @return the reportFormatVersion value.
     */
    public String reportFormatVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().reportFormatVersion();
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}
