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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.fluidrelay.models.EncryptionProperties;
import com.azure.resourcemanager.fluidrelay.models.FluidRelayEndpoints;
import com.azure.resourcemanager.fluidrelay.models.ProvisioningState;
import com.azure.resourcemanager.fluidrelay.models.StorageSku;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of a Fluid Relay Service resource. */
@Fluent
public final class FluidRelayServerProperties {
    /*
     * The Fluid tenantId for this server
     */
    @JsonProperty(value = "frsTenantId", access = JsonProperty.Access.WRITE_ONLY)
    private String frsTenantId;

    /*
     * The Fluid Relay Service endpoints for this server.
     */
    @JsonProperty(value = "fluidRelayEndpoints", access = JsonProperty.Access.WRITE_ONLY)
    private FluidRelayEndpoints fluidRelayEndpoints;

    /*
     * Provision states for FluidRelay RP
     */
    @JsonProperty(value = "provisioningState")
    private ProvisioningState provisioningState;

    /*
     * All encryption configuration for a resource.
     */
    @JsonProperty(value = "encryption")
    private EncryptionProperties encryption;

    /*
     * StorageSKU
     *
     * Sku of the storage associated with the resource
     */
    @JsonProperty(value = "storagesku")
    private StorageSku storagesku;

    /**
     * Get the frsTenantId property: The Fluid tenantId for this server.
     *
     * @return the frsTenantId value.
     */
    public String frsTenantId() {
        return this.frsTenantId;
    }

    /**
     * Get the fluidRelayEndpoints property: The Fluid Relay Service endpoints for this server.
     *
     * @return the fluidRelayEndpoints value.
     */
    public FluidRelayEndpoints fluidRelayEndpoints() {
        return this.fluidRelayEndpoints;
    }

    /**
     * Get the provisioningState property: Provision states for FluidRelay RP.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Set the provisioningState property: Provision states for FluidRelay RP.
     *
     * @param provisioningState the provisioningState value to set.
     * @return the FluidRelayServerProperties object itself.
     */
    public FluidRelayServerProperties withProvisioningState(ProvisioningState provisioningState) {
        this.provisioningState = provisioningState;
        return this;
    }

    /**
     * Get the encryption property: All encryption configuration for a resource.
     *
     * @return the encryption value.
     */
    public EncryptionProperties encryption() {
        return this.encryption;
    }

    /**
     * Set the encryption property: All encryption configuration for a resource.
     *
     * @param encryption the encryption value to set.
     * @return the FluidRelayServerProperties object itself.
     */
    public FluidRelayServerProperties withEncryption(EncryptionProperties encryption) {
        this.encryption = encryption;
        return this;
    }

    /**
     * Get the storagesku property: StorageSKU
     *
     * <p>Sku of the storage associated with the resource.
     *
     * @return the storagesku value.
     */
    public StorageSku storagesku() {
        return this.storagesku;
    }

    /**
     * Set the storagesku property: StorageSKU
     *
     * <p>Sku of the storage associated with the resource.
     *
     * @param storagesku the storagesku value to set.
     * @return the FluidRelayServerProperties object itself.
     */
    public FluidRelayServerProperties withStoragesku(StorageSku storagesku) {
        this.storagesku = storagesku;
        return this;
    }

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