// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.security.models.AssessmentType;
import com.azure.resourcemanager.security.models.Categories;
import com.azure.resourcemanager.security.models.ImplementationEffort;
import com.azure.resourcemanager.security.models.SecurityAssessmentMetadataPartnerData;
import com.azure.resourcemanager.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates;
import com.azure.resourcemanager.security.models.Severity;
import com.azure.resourcemanager.security.models.Tactics;
import com.azure.resourcemanager.security.models.Techniques;
import com.azure.resourcemanager.security.models.Threats;
import com.azure.resourcemanager.security.models.UserImpact;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Security assessment metadata response. */
@Fluent
public final class SecurityAssessmentMetadataResponseInner extends ProxyResource {
    /*
     * Describes properties of an assessment metadata response.
     */
    @JsonProperty(value = "properties")
    private SecurityAssessmentMetadataPropertiesResponse innerProperties;

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

    /**
     * Get the innerProperties property: Describes properties of an assessment metadata response.
     *
     * @return the innerProperties value.
     */
    private SecurityAssessmentMetadataPropertiesResponse innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the publishDates property: The publishDates property.
     *
     * @return the publishDates value.
     */
    public SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates() {
        return this.innerProperties() == null ? null : this.innerProperties().publishDates();
    }

    /**
     * Set the publishDates property: The publishDates property.
     *
     * @param publishDates the publishDates value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withPublishDates(
        SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withPublishDates(publishDates);
        return this;
    }

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

    /**
     * Set the plannedDeprecationDate property: The plannedDeprecationDate property.
     *
     * @param plannedDeprecationDate the plannedDeprecationDate value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withPlannedDeprecationDate(String plannedDeprecationDate) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withPlannedDeprecationDate(plannedDeprecationDate);
        return this;
    }

    /**
     * Get the tactics property: The tactics property.
     *
     * @return the tactics value.
     */
    public List<Tactics> tactics() {
        return this.innerProperties() == null ? null : this.innerProperties().tactics();
    }

    /**
     * Set the tactics property: The tactics property.
     *
     * @param tactics the tactics value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withTactics(List<Tactics> tactics) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withTactics(tactics);
        return this;
    }

    /**
     * Get the techniques property: The techniques property.
     *
     * @return the techniques value.
     */
    public List<Techniques> techniques() {
        return this.innerProperties() == null ? null : this.innerProperties().techniques();
    }

    /**
     * Set the techniques property: The techniques property.
     *
     * @param techniques the techniques value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withTechniques(List<Techniques> techniques) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withTechniques(techniques);
        return this;
    }

    /**
     * Get the displayName property: User friendly display name of the assessment.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: User friendly display name of the assessment.
     *
     * @param displayName the displayName value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the policyDefinitionId property: Azure resource ID of the policy definition that turns this assessment
     * calculation on.
     *
     * @return the policyDefinitionId value.
     */
    public String policyDefinitionId() {
        return this.innerProperties() == null ? null : this.innerProperties().policyDefinitionId();
    }

    /**
     * Get the description property: Human readable description of the assessment.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Human readable description of the assessment.
     *
     * @param description the description value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the remediationDescription property: Human readable description of what you should do to mitigate this
     * security issue.
     *
     * @return the remediationDescription value.
     */
    public String remediationDescription() {
        return this.innerProperties() == null ? null : this.innerProperties().remediationDescription();
    }

    /**
     * Set the remediationDescription property: Human readable description of what you should do to mitigate this
     * security issue.
     *
     * @param remediationDescription the remediationDescription value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withRemediationDescription(String remediationDescription) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withRemediationDescription(remediationDescription);
        return this;
    }

    /**
     * Get the categories property: The categories property.
     *
     * @return the categories value.
     */
    public List<Categories> categories() {
        return this.innerProperties() == null ? null : this.innerProperties().categories();
    }

    /**
     * Set the categories property: The categories property.
     *
     * @param categories the categories value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withCategories(List<Categories> categories) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withCategories(categories);
        return this;
    }

    /**
     * Get the severity property: The severity level of the assessment.
     *
     * @return the severity value.
     */
    public Severity severity() {
        return this.innerProperties() == null ? null : this.innerProperties().severity();
    }

    /**
     * Set the severity property: The severity level of the assessment.
     *
     * @param severity the severity value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withSeverity(Severity severity) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withSeverity(severity);
        return this;
    }

    /**
     * Get the userImpact property: The user impact of the assessment.
     *
     * @return the userImpact value.
     */
    public UserImpact userImpact() {
        return this.innerProperties() == null ? null : this.innerProperties().userImpact();
    }

    /**
     * Set the userImpact property: The user impact of the assessment.
     *
     * @param userImpact the userImpact value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withUserImpact(UserImpact userImpact) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withUserImpact(userImpact);
        return this;
    }

    /**
     * Get the implementationEffort property: The implementation effort required to remediate this assessment.
     *
     * @return the implementationEffort value.
     */
    public ImplementationEffort implementationEffort() {
        return this.innerProperties() == null ? null : this.innerProperties().implementationEffort();
    }

    /**
     * Set the implementationEffort property: The implementation effort required to remediate this assessment.
     *
     * @param implementationEffort the implementationEffort value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withImplementationEffort(ImplementationEffort implementationEffort) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withImplementationEffort(implementationEffort);
        return this;
    }

    /**
     * Get the threats property: The threats property.
     *
     * @return the threats value.
     */
    public List<Threats> threats() {
        return this.innerProperties() == null ? null : this.innerProperties().threats();
    }

    /**
     * Set the threats property: The threats property.
     *
     * @param threats the threats value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withThreats(List<Threats> threats) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withThreats(threats);
        return this;
    }

    /**
     * Get the preview property: True if this assessment is in preview release status.
     *
     * @return the preview value.
     */
    public Boolean preview() {
        return this.innerProperties() == null ? null : this.innerProperties().preview();
    }

    /**
     * Set the preview property: True if this assessment is in preview release status.
     *
     * @param preview the preview value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withPreview(Boolean preview) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withPreview(preview);
        return this;
    }

    /**
     * Get the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if
     * the assessment based on custom Azure Policy definition.
     *
     * @return the assessmentType value.
     */
    public AssessmentType assessmentType() {
        return this.innerProperties() == null ? null : this.innerProperties().assessmentType();
    }

    /**
     * Set the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if
     * the assessment based on custom Azure Policy definition.
     *
     * @param assessmentType the assessmentType value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withAssessmentType(AssessmentType assessmentType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withAssessmentType(assessmentType);
        return this;
    }

    /**
     * Get the partnerData property: Describes the partner that created the assessment.
     *
     * @return the partnerData value.
     */
    public SecurityAssessmentMetadataPartnerData partnerData() {
        return this.innerProperties() == null ? null : this.innerProperties().partnerData();
    }

    /**
     * Set the partnerData property: Describes the partner that created the assessment.
     *
     * @param partnerData the partnerData value to set.
     * @return the SecurityAssessmentMetadataResponseInner object itself.
     */
    public SecurityAssessmentMetadataResponseInner withPartnerData(SecurityAssessmentMetadataPartnerData partnerData) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse();
        }
        this.innerProperties().withPartnerData(partnerData);
        return this;
    }

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