// 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.resourcemanager.security.models.RecommendationConfigurationProperties;
import com.azure.resourcemanager.security.models.UserDefinedResourcesProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Update Security Solution setting data. */
@Fluent
public final class UpdateIoTSecuritySolutionProperties {
    /*
     * Properties of the IoT Security solution's user defined resources.
     */
    @JsonProperty(value = "userDefinedResources")
    private UserDefinedResourcesProperties userDefinedResources;

    /*
     * List of the configuration status for each recommendation type.
     */
    @JsonProperty(value = "recommendationsConfiguration")
    private List<RecommendationConfigurationProperties> recommendationsConfiguration;

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

    /**
     * Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
     *
     * @return the userDefinedResources value.
     */
    public UserDefinedResourcesProperties userDefinedResources() {
        return this.userDefinedResources;
    }

    /**
     * Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
     *
     * @param userDefinedResources the userDefinedResources value to set.
     * @return the UpdateIoTSecuritySolutionProperties object itself.
     */
    public UpdateIoTSecuritySolutionProperties withUserDefinedResources(
        UserDefinedResourcesProperties userDefinedResources) {
        this.userDefinedResources = userDefinedResources;
        return this;
    }

    /**
     * Get the recommendationsConfiguration property: List of the configuration status for each recommendation type.
     *
     * @return the recommendationsConfiguration value.
     */
    public List<RecommendationConfigurationProperties> recommendationsConfiguration() {
        return this.recommendationsConfiguration;
    }

    /**
     * Set the recommendationsConfiguration property: List of the configuration status for each recommendation type.
     *
     * @param recommendationsConfiguration the recommendationsConfiguration value to set.
     * @return the UpdateIoTSecuritySolutionProperties object itself.
     */
    public UpdateIoTSecuritySolutionProperties withRecommendationsConfiguration(
        List<RecommendationConfigurationProperties> recommendationsConfiguration) {
        this.recommendationsConfiguration = recommendationsConfiguration;
        return this;
    }

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