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

package com.azure.resourcemanager.security.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** A vulnerability assessment scan record properties. */
@Fluent
public final class ScanProperties {
    /*
     * The scan trigger type.
     */
    @JsonProperty(value = "triggerType")
    private ScanTriggerType triggerType;

    /*
     * The scan status.
     */
    @JsonProperty(value = "state")
    private ScanState state;

    /*
     * The server name.
     */
    @JsonProperty(value = "server")
    private String server;

    /*
     * The database name.
     */
    @JsonProperty(value = "database")
    private String database;

    /*
     * The SQL version.
     */
    @JsonProperty(value = "sqlVersion")
    private String sqlVersion;

    /*
     * The scan start time (UTC).
     */
    @JsonProperty(value = "startTime")
    private OffsetDateTime startTime;

    /*
     * Scan results are valid until end time (UTC).
     */
    @JsonProperty(value = "endTime")
    private OffsetDateTime endTime;

    /*
     * The number of failed rules with high severity.
     */
    @JsonProperty(value = "highSeverityFailedRulesCount")
    private Integer highSeverityFailedRulesCount;

    /*
     * The number of failed rules with medium severity.
     */
    @JsonProperty(value = "mediumSeverityFailedRulesCount")
    private Integer mediumSeverityFailedRulesCount;

    /*
     * The number of failed rules with low severity.
     */
    @JsonProperty(value = "lowSeverityFailedRulesCount")
    private Integer lowSeverityFailedRulesCount;

    /*
     * The number of total passed rules.
     */
    @JsonProperty(value = "totalPassedRulesCount")
    private Integer totalPassedRulesCount;

    /*
     * The number of total failed rules.
     */
    @JsonProperty(value = "totalFailedRulesCount")
    private Integer totalFailedRulesCount;

    /*
     * The number of total rules assessed.
     */
    @JsonProperty(value = "totalRulesCount")
    private Integer totalRulesCount;

    /*
     * Baseline created for this database, and has one or more rules.
     */
    @JsonProperty(value = "isBaselineApplied")
    private Boolean isBaselineApplied;

    /*
     * Last scan time.
     */
    @JsonProperty(value = "lastScanTime")
    private OffsetDateTime lastScanTime;

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

    /**
     * Get the triggerType property: The scan trigger type.
     *
     * @return the triggerType value.
     */
    public ScanTriggerType triggerType() {
        return this.triggerType;
    }

    /**
     * Set the triggerType property: The scan trigger type.
     *
     * @param triggerType the triggerType value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withTriggerType(ScanTriggerType triggerType) {
        this.triggerType = triggerType;
        return this;
    }

    /**
     * Get the state property: The scan status.
     *
     * @return the state value.
     */
    public ScanState state() {
        return this.state;
    }

    /**
     * Set the state property: The scan status.
     *
     * @param state the state value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withState(ScanState state) {
        this.state = state;
        return this;
    }

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

    /**
     * Set the server property: The server name.
     *
     * @param server the server value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withServer(String server) {
        this.server = server;
        return this;
    }

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

    /**
     * Set the database property: The database name.
     *
     * @param database the database value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withDatabase(String database) {
        this.database = database;
        return this;
    }

    /**
     * Get the sqlVersion property: The SQL version.
     *
     * @return the sqlVersion value.
     */
    public String sqlVersion() {
        return this.sqlVersion;
    }

    /**
     * Set the sqlVersion property: The SQL version.
     *
     * @param sqlVersion the sqlVersion value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withSqlVersion(String sqlVersion) {
        this.sqlVersion = sqlVersion;
        return this;
    }

    /**
     * Get the startTime property: The scan start time (UTC).
     *
     * @return the startTime value.
     */
    public OffsetDateTime startTime() {
        return this.startTime;
    }

    /**
     * Set the startTime property: The scan start time (UTC).
     *
     * @param startTime the startTime value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
        return this;
    }

    /**
     * Get the endTime property: Scan results are valid until end time (UTC).
     *
     * @return the endTime value.
     */
    public OffsetDateTime endTime() {
        return this.endTime;
    }

    /**
     * Set the endTime property: Scan results are valid until end time (UTC).
     *
     * @param endTime the endTime value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withEndTime(OffsetDateTime endTime) {
        this.endTime = endTime;
        return this;
    }

    /**
     * Get the highSeverityFailedRulesCount property: The number of failed rules with high severity.
     *
     * @return the highSeverityFailedRulesCount value.
     */
    public Integer highSeverityFailedRulesCount() {
        return this.highSeverityFailedRulesCount;
    }

    /**
     * Set the highSeverityFailedRulesCount property: The number of failed rules with high severity.
     *
     * @param highSeverityFailedRulesCount the highSeverityFailedRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withHighSeverityFailedRulesCount(Integer highSeverityFailedRulesCount) {
        this.highSeverityFailedRulesCount = highSeverityFailedRulesCount;
        return this;
    }

    /**
     * Get the mediumSeverityFailedRulesCount property: The number of failed rules with medium severity.
     *
     * @return the mediumSeverityFailedRulesCount value.
     */
    public Integer mediumSeverityFailedRulesCount() {
        return this.mediumSeverityFailedRulesCount;
    }

    /**
     * Set the mediumSeverityFailedRulesCount property: The number of failed rules with medium severity.
     *
     * @param mediumSeverityFailedRulesCount the mediumSeverityFailedRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withMediumSeverityFailedRulesCount(Integer mediumSeverityFailedRulesCount) {
        this.mediumSeverityFailedRulesCount = mediumSeverityFailedRulesCount;
        return this;
    }

    /**
     * Get the lowSeverityFailedRulesCount property: The number of failed rules with low severity.
     *
     * @return the lowSeverityFailedRulesCount value.
     */
    public Integer lowSeverityFailedRulesCount() {
        return this.lowSeverityFailedRulesCount;
    }

    /**
     * Set the lowSeverityFailedRulesCount property: The number of failed rules with low severity.
     *
     * @param lowSeverityFailedRulesCount the lowSeverityFailedRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withLowSeverityFailedRulesCount(Integer lowSeverityFailedRulesCount) {
        this.lowSeverityFailedRulesCount = lowSeverityFailedRulesCount;
        return this;
    }

    /**
     * Get the totalPassedRulesCount property: The number of total passed rules.
     *
     * @return the totalPassedRulesCount value.
     */
    public Integer totalPassedRulesCount() {
        return this.totalPassedRulesCount;
    }

    /**
     * Set the totalPassedRulesCount property: The number of total passed rules.
     *
     * @param totalPassedRulesCount the totalPassedRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withTotalPassedRulesCount(Integer totalPassedRulesCount) {
        this.totalPassedRulesCount = totalPassedRulesCount;
        return this;
    }

    /**
     * Get the totalFailedRulesCount property: The number of total failed rules.
     *
     * @return the totalFailedRulesCount value.
     */
    public Integer totalFailedRulesCount() {
        return this.totalFailedRulesCount;
    }

    /**
     * Set the totalFailedRulesCount property: The number of total failed rules.
     *
     * @param totalFailedRulesCount the totalFailedRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withTotalFailedRulesCount(Integer totalFailedRulesCount) {
        this.totalFailedRulesCount = totalFailedRulesCount;
        return this;
    }

    /**
     * Get the totalRulesCount property: The number of total rules assessed.
     *
     * @return the totalRulesCount value.
     */
    public Integer totalRulesCount() {
        return this.totalRulesCount;
    }

    /**
     * Set the totalRulesCount property: The number of total rules assessed.
     *
     * @param totalRulesCount the totalRulesCount value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withTotalRulesCount(Integer totalRulesCount) {
        this.totalRulesCount = totalRulesCount;
        return this;
    }

    /**
     * Get the isBaselineApplied property: Baseline created for this database, and has one or more rules.
     *
     * @return the isBaselineApplied value.
     */
    public Boolean isBaselineApplied() {
        return this.isBaselineApplied;
    }

    /**
     * Set the isBaselineApplied property: Baseline created for this database, and has one or more rules.
     *
     * @param isBaselineApplied the isBaselineApplied value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withIsBaselineApplied(Boolean isBaselineApplied) {
        this.isBaselineApplied = isBaselineApplied;
        return this;
    }

    /**
     * Get the lastScanTime property: Last scan time.
     *
     * @return the lastScanTime value.
     */
    public OffsetDateTime lastScanTime() {
        return this.lastScanTime;
    }

    /**
     * Set the lastScanTime property: Last scan time.
     *
     * @param lastScanTime the lastScanTime value to set.
     * @return the ScanProperties object itself.
     */
    public ScanProperties withLastScanTime(OffsetDateTime lastScanTime) {
        this.lastScanTime = lastScanTime;
        return this;
    }

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