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

package com.azure.resourcemanager.paloaltonetworks.ngfw.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Definition for App Seen. */
@Fluent
public final class AppSeenInfo {
    /*
     * title
     */
    @JsonProperty(value = "title", required = true)
    private String title;

    /*
     * category
     */
    @JsonProperty(value = "category", required = true)
    private String category;

    /*
     * subCategory
     */
    @JsonProperty(value = "subCategory", required = true)
    private String subCategory;

    /*
     * risk
     */
    @JsonProperty(value = "risk", required = true)
    private String risk;

    /*
     * tag
     */
    @JsonProperty(value = "tag", required = true)
    private String tag;

    /*
     * technology
     */
    @JsonProperty(value = "technology", required = true)
    private String technology;

    /*
     * standardPorts
     */
    @JsonProperty(value = "standardPorts", required = true)
    private String standardPorts;

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

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

    /**
     * Set the title property: title.
     *
     * @param title the title value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withTitle(String title) {
        this.title = title;
        return this;
    }

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

    /**
     * Set the category property: category.
     *
     * @param category the category value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withCategory(String category) {
        this.category = category;
        return this;
    }

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

    /**
     * Set the subCategory property: subCategory.
     *
     * @param subCategory the subCategory value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withSubCategory(String subCategory) {
        this.subCategory = subCategory;
        return this;
    }

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

    /**
     * Set the risk property: risk.
     *
     * @param risk the risk value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withRisk(String risk) {
        this.risk = risk;
        return this;
    }

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

    /**
     * Set the tag property: tag.
     *
     * @param tag the tag value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withTag(String tag) {
        this.tag = tag;
        return this;
    }

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

    /**
     * Set the technology property: technology.
     *
     * @param technology the technology value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withTechnology(String technology) {
        this.technology = technology;
        return this;
    }

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

    /**
     * Set the standardPorts property: standardPorts.
     *
     * @param standardPorts the standardPorts value to set.
     * @return the AppSeenInfo object itself.
     */
    public AppSeenInfo withStandardPorts(String standardPorts) {
        this.standardPorts = standardPorts;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (title() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property title in model AppSeenInfo"));
        }
        if (category() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property category in model AppSeenInfo"));
        }
        if (subCategory() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property subCategory in model AppSeenInfo"));
        }
        if (risk() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property risk in model AppSeenInfo"));
        }
        if (tag() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property tag in model AppSeenInfo"));
        }
        if (technology() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property technology in model AppSeenInfo"));
        }
        if (standardPorts() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property standardPorts in model AppSeenInfo"));
        }
    }

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