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

package com.azure.resourcemanager.appcontainers.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState;
import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration;
import com.fasterxml.jackson.annotation.JsonProperty;

/** ConnectedEnvironment resource specific properties. */
@Fluent
public final class ConnectedEnvironmentProperties {
    /*
     * Provisioning state of the Kubernetes Environment.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ConnectedEnvironmentProvisioningState provisioningState;

    /*
     * Any errors that occurred during deployment or deployment validation
     */
    @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY)
    private String deploymentErrors;

    /*
     * Default Domain Name for the cluster
     */
    @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY)
    private String defaultDomain;

    /*
     * Static IP of the connectedEnvironment
     */
    @JsonProperty(value = "staticIp")
    private String staticIp;

    /*
     * Application Insights connection string used by Dapr to export Service to Service communication telemetry
     */
    @JsonProperty(value = "daprAIConnectionString")
    private String daprAIConnectionString;

    /*
     * Custom domain configuration for the environment
     */
    @JsonProperty(value = "customDomainConfiguration")
    private CustomDomainConfiguration customDomainConfiguration;

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

    /**
     * Get the provisioningState property: Provisioning state of the Kubernetes Environment.
     *
     * @return the provisioningState value.
     */
    public ConnectedEnvironmentProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation.
     *
     * @return the deploymentErrors value.
     */
    public String deploymentErrors() {
        return this.deploymentErrors;
    }

    /**
     * Get the defaultDomain property: Default Domain Name for the cluster.
     *
     * @return the defaultDomain value.
     */
    public String defaultDomain() {
        return this.defaultDomain;
    }

    /**
     * Get the staticIp property: Static IP of the connectedEnvironment.
     *
     * @return the staticIp value.
     */
    public String staticIp() {
        return this.staticIp;
    }

    /**
     * Set the staticIp property: Static IP of the connectedEnvironment.
     *
     * @param staticIp the staticIp value to set.
     * @return the ConnectedEnvironmentProperties object itself.
     */
    public ConnectedEnvironmentProperties withStaticIp(String staticIp) {
        this.staticIp = staticIp;
        return this;
    }

    /**
     * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to
     * Service communication telemetry.
     *
     * @return the daprAIConnectionString value.
     */
    public String daprAIConnectionString() {
        return this.daprAIConnectionString;
    }

    /**
     * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to
     * Service communication telemetry.
     *
     * @param daprAIConnectionString the daprAIConnectionString value to set.
     * @return the ConnectedEnvironmentProperties object itself.
     */
    public ConnectedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) {
        this.daprAIConnectionString = daprAIConnectionString;
        return this;
    }

    /**
     * Get the customDomainConfiguration property: Custom domain configuration for the environment.
     *
     * @return the customDomainConfiguration value.
     */
    public CustomDomainConfiguration customDomainConfiguration() {
        return this.customDomainConfiguration;
    }

    /**
     * Set the customDomainConfiguration property: Custom domain configuration for the environment.
     *
     * @param customDomainConfiguration the customDomainConfiguration value to set.
     * @return the ConnectedEnvironmentProperties object itself.
     */
    public ConnectedEnvironmentProperties withCustomDomainConfiguration(
        CustomDomainConfiguration customDomainConfiguration) {
        this.customDomainConfiguration = customDomainConfiguration;
        return this;
    }

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