// 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.ApplicationSourceResourceType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Security Application over a given scope. */
@Fluent
public final class ApplicationInner extends ProxyResource {
    /*
     * Properties of a security application
     */
    @JsonProperty(value = "properties")
    private ApplicationProperties innerProperties;

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

    /**
     * Get the innerProperties property: Properties of a security application.
     *
     * @return the innerProperties value.
     */
    private ApplicationProperties innerProperties() {
        return this.innerProperties;
    }

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

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

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

    /**
     * Set the description property: description of the application.
     *
     * @param description the description value to set.
     * @return the ApplicationInner object itself.
     */
    public ApplicationInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ApplicationProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the sourceResourceType property: The application source, what it affects, e.g. Assessments.
     *
     * @return the sourceResourceType value.
     */
    public ApplicationSourceResourceType sourceResourceType() {
        return this.innerProperties() == null ? null : this.innerProperties().sourceResourceType();
    }

    /**
     * Set the sourceResourceType property: The application source, what it affects, e.g. Assessments.
     *
     * @param sourceResourceType the sourceResourceType value to set.
     * @return the ApplicationInner object itself.
     */
    public ApplicationInner withSourceResourceType(ApplicationSourceResourceType sourceResourceType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ApplicationProperties();
        }
        this.innerProperties().withSourceResourceType(sourceResourceType);
        return this;
    }

    /**
     * Get the conditionSets property: The application conditionSets - see examples.
     *
     * @return the conditionSets value.
     */
    public List<Object> conditionSets() {
        return this.innerProperties() == null ? null : this.innerProperties().conditionSets();
    }

    /**
     * Set the conditionSets property: The application conditionSets - see examples.
     *
     * @param conditionSets the conditionSets value to set.
     * @return the ApplicationInner object itself.
     */
    public ApplicationInner withConditionSets(List<Object> conditionSets) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ApplicationProperties();
        }
        this.innerProperties().withConditionSets(conditionSets);
        return this;
    }

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