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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.extendedlocation.models.CustomLocationPropertiesAuthentication;
import com.azure.resourcemanager.extendedlocation.models.HostType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties for a custom location. */
@Fluent
public final class CustomLocationProperties {
    /*
     * This is optional input that contains the authentication that should be
     * used to generate the namespace.
     */
    @JsonProperty(value = "authentication")
    private CustomLocationPropertiesAuthentication authentication;

    /*
     * Contains the reference to the add-on that contains charts to deploy CRDs
     * and operators.
     */
    @JsonProperty(value = "clusterExtensionIds")
    private List<String> clusterExtensionIds;

    /*
     * Display name for the Custom Locations location.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * Connected Cluster or AKS Cluster. The Custom Locations RP will perform a
     * checkAccess API for listAdminCredentials permissions.
     */
    @JsonProperty(value = "hostResourceId")
    private String hostResourceId;

    /*
     * Type of host the Custom Locations is referencing (Kubernetes, etc...).
     */
    @JsonProperty(value = "hostType")
    private HostType hostType;

    /*
     * Kubernetes namespace that will be created on the specified cluster.
     */
    @JsonProperty(value = "namespace")
    private String namespace;

    /*
     * Provisioning State for the Custom Location.
     */
    @JsonProperty(value = "provisioningState")
    private String provisioningState;

    /**
     * Get the authentication property: This is optional input that contains the authentication that should be used to
     * generate the namespace.
     *
     * @return the authentication value.
     */
    public CustomLocationPropertiesAuthentication authentication() {
        return this.authentication;
    }

    /**
     * Set the authentication property: This is optional input that contains the authentication that should be used to
     * generate the namespace.
     *
     * @param authentication the authentication value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withAuthentication(CustomLocationPropertiesAuthentication authentication) {
        this.authentication = authentication;
        return this;
    }

    /**
     * Get the clusterExtensionIds property: Contains the reference to the add-on that contains charts to deploy CRDs
     * and operators.
     *
     * @return the clusterExtensionIds value.
     */
    public List<String> clusterExtensionIds() {
        return this.clusterExtensionIds;
    }

    /**
     * Set the clusterExtensionIds property: Contains the reference to the add-on that contains charts to deploy CRDs
     * and operators.
     *
     * @param clusterExtensionIds the clusterExtensionIds value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withClusterExtensionIds(List<String> clusterExtensionIds) {
        this.clusterExtensionIds = clusterExtensionIds;
        return this;
    }

    /**
     * Get the displayName property: Display name for the Custom Locations location.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: Display name for the Custom Locations location.
     *
     * @param displayName the displayName value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the hostResourceId property: Connected Cluster or AKS Cluster. The Custom Locations RP will perform a
     * checkAccess API for listAdminCredentials permissions.
     *
     * @return the hostResourceId value.
     */
    public String hostResourceId() {
        return this.hostResourceId;
    }

    /**
     * Set the hostResourceId property: Connected Cluster or AKS Cluster. The Custom Locations RP will perform a
     * checkAccess API for listAdminCredentials permissions.
     *
     * @param hostResourceId the hostResourceId value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withHostResourceId(String hostResourceId) {
        this.hostResourceId = hostResourceId;
        return this;
    }

    /**
     * Get the hostType property: Type of host the Custom Locations is referencing (Kubernetes, etc...).
     *
     * @return the hostType value.
     */
    public HostType hostType() {
        return this.hostType;
    }

    /**
     * Set the hostType property: Type of host the Custom Locations is referencing (Kubernetes, etc...).
     *
     * @param hostType the hostType value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withHostType(HostType hostType) {
        this.hostType = hostType;
        return this;
    }

    /**
     * Get the namespace property: Kubernetes namespace that will be created on the specified cluster.
     *
     * @return the namespace value.
     */
    public String namespace() {
        return this.namespace;
    }

    /**
     * Set the namespace property: Kubernetes namespace that will be created on the specified cluster.
     *
     * @param namespace the namespace value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withNamespace(String namespace) {
        this.namespace = namespace;
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning State for the Custom Location.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Set the provisioningState property: Provisioning State for the Custom Location.
     *
     * @param provisioningState the provisioningState value to set.
     * @return the CustomLocationProperties object itself.
     */
    public CustomLocationProperties withProvisioningState(String provisioningState) {
        this.provisioningState = provisioningState;
        return this;
    }

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