// 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;

/** Panorama Config. */
@Fluent
public final class PanoramaConfig {
    /*
     * Base64 encoded string representing Panorama parameters to be used by Firewall to connect to Panorama. This
     * string is generated via azure plugin in Panorama
     */
    @JsonProperty(value = "configString", required = true)
    private String configString;

    /*
     * VM auth key for panorama connectivity
     */
    @JsonProperty(value = "vmAuthKey", access = JsonProperty.Access.WRITE_ONLY)
    private String vmAuthKey;

    /*
     * Primary Panorama Server IP address value in dotted format for IPv4
     */
    @JsonProperty(value = "panoramaServer", access = JsonProperty.Access.WRITE_ONLY)
    private String panoramaServer;

    /*
     * Secondary Panorama Server IP address value in dotted format for IPv4
     */
    @JsonProperty(value = "panoramaServer2", access = JsonProperty.Access.WRITE_ONLY)
    private String panoramaServer2;

    /*
     * Panorama Device Group to join
     */
    @JsonProperty(value = "dgName", access = JsonProperty.Access.WRITE_ONLY)
    private String dgName;

    /*
     * Panorama Template Stack to join - (Once configured we can not edit the value)
     */
    @JsonProperty(value = "tplName", access = JsonProperty.Access.WRITE_ONLY)
    private String tplName;

    /*
     * Panorama Collector Group to join - (Once configured we can not edit the value)
     */
    @JsonProperty(value = "cgName", access = JsonProperty.Access.WRITE_ONLY)
    private String cgName;

    /*
     * Resource name(may be unique) for PN admin
     */
    @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY)
    private String hostname;

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

    /**
     * Get the configString property: Base64 encoded string representing Panorama parameters to be used by Firewall to
     * connect to Panorama. This string is generated via azure plugin in Panorama.
     *
     * @return the configString value.
     */
    public String configString() {
        return this.configString;
    }

    /**
     * Set the configString property: Base64 encoded string representing Panorama parameters to be used by Firewall to
     * connect to Panorama. This string is generated via azure plugin in Panorama.
     *
     * @param configString the configString value to set.
     * @return the PanoramaConfig object itself.
     */
    public PanoramaConfig withConfigString(String configString) {
        this.configString = configString;
        return this;
    }

    /**
     * Get the vmAuthKey property: VM auth key for panorama connectivity.
     *
     * @return the vmAuthKey value.
     */
    public String vmAuthKey() {
        return this.vmAuthKey;
    }

    /**
     * Get the panoramaServer property: Primary Panorama Server IP address value in dotted format for IPv4.
     *
     * @return the panoramaServer value.
     */
    public String panoramaServer() {
        return this.panoramaServer;
    }

    /**
     * Get the panoramaServer2 property: Secondary Panorama Server IP address value in dotted format for IPv4.
     *
     * @return the panoramaServer2 value.
     */
    public String panoramaServer2() {
        return this.panoramaServer2;
    }

    /**
     * Get the dgName property: Panorama Device Group to join.
     *
     * @return the dgName value.
     */
    public String dgName() {
        return this.dgName;
    }

    /**
     * Get the tplName property: Panorama Template Stack to join - (Once configured we can not edit the value).
     *
     * @return the tplName value.
     */
    public String tplName() {
        return this.tplName;
    }

    /**
     * Get the cgName property: Panorama Collector Group to join - (Once configured we can not edit the value).
     *
     * @return the cgName value.
     */
    public String cgName() {
        return this.cgName;
    }

    /**
     * Get the hostname property: Resource name(may be unique) for PN admin.
     *
     * @return the hostname value.
     */
    public String hostname() {
        return this.hostname;
    }

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

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