// 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.util.logging.ClientLogger;
import com.azure.resourcemanager.security.models.SecurityFamily;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The DiscoveredSecuritySolutionProperties model. */
@Fluent
public final class DiscoveredSecuritySolutionProperties {
    /*
     * The security family of the discovered solution
     */
    @JsonProperty(value = "securityFamily", required = true)
    private SecurityFamily securityFamily;

    /*
     * The security solutions' image offer
     */
    @JsonProperty(value = "offer", required = true)
    private String offer;

    /*
     * The security solutions' image publisher
     */
    @JsonProperty(value = "publisher", required = true)
    private String publisher;

    /*
     * The security solutions' image sku
     */
    @JsonProperty(value = "sku", required = true)
    private String sku;

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

    /**
     * Get the securityFamily property: The security family of the discovered solution.
     *
     * @return the securityFamily value.
     */
    public SecurityFamily securityFamily() {
        return this.securityFamily;
    }

    /**
     * Set the securityFamily property: The security family of the discovered solution.
     *
     * @param securityFamily the securityFamily value to set.
     * @return the DiscoveredSecuritySolutionProperties object itself.
     */
    public DiscoveredSecuritySolutionProperties withSecurityFamily(SecurityFamily securityFamily) {
        this.securityFamily = securityFamily;
        return this;
    }

    /**
     * Get the offer property: The security solutions' image offer.
     *
     * @return the offer value.
     */
    public String offer() {
        return this.offer;
    }

    /**
     * Set the offer property: The security solutions' image offer.
     *
     * @param offer the offer value to set.
     * @return the DiscoveredSecuritySolutionProperties object itself.
     */
    public DiscoveredSecuritySolutionProperties withOffer(String offer) {
        this.offer = offer;
        return this;
    }

    /**
     * Get the publisher property: The security solutions' image publisher.
     *
     * @return the publisher value.
     */
    public String publisher() {
        return this.publisher;
    }

    /**
     * Set the publisher property: The security solutions' image publisher.
     *
     * @param publisher the publisher value to set.
     * @return the DiscoveredSecuritySolutionProperties object itself.
     */
    public DiscoveredSecuritySolutionProperties withPublisher(String publisher) {
        this.publisher = publisher;
        return this;
    }

    /**
     * Get the sku property: The security solutions' image sku.
     *
     * @return the sku value.
     */
    public String sku() {
        return this.sku;
    }

    /**
     * Set the sku property: The security solutions' image sku.
     *
     * @param sku the sku value to set.
     * @return the DiscoveredSecuritySolutionProperties object itself.
     */
    public DiscoveredSecuritySolutionProperties withSku(String sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (securityFamily() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property securityFamily in model DiscoveredSecuritySolutionProperties"));
        }
        if (offer() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property offer in model DiscoveredSecuritySolutionProperties"));
        }
        if (publisher() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property publisher in model DiscoveredSecuritySolutionProperties"));
        }
        if (sku() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property sku in model DiscoveredSecuritySolutionProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(DiscoveredSecuritySolutionProperties.class);
}
