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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.loadtesting.models.EncryptionProperties;
import com.azure.resourcemanager.loadtesting.models.ResourceState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** LoadTest resource properties. */
@Fluent
public final class LoadTestProperties {
    /*
     * Description of the resource.
     */
    @JsonProperty(value = "description")
    private String description;

    /*
     * Resource provisioning state.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ResourceState provisioningState;

    /*
     * Resource data plane URI.
     */
    @JsonProperty(value = "dataPlaneURI", access = JsonProperty.Access.WRITE_ONLY)
    private String dataPlaneUri;

    /*
     * CMK Encryption property.
     */
    @JsonProperty(value = "encryption")
    private EncryptionProperties encryption;

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

    /**
     * Get the description property: Description of the resource.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: Description of the resource.
     *
     * @param description the description value to set.
     * @return the LoadTestProperties object itself.
     */
    public LoadTestProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the provisioningState property: Resource provisioning state.
     *
     * @return the provisioningState value.
     */
    public ResourceState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the dataPlaneUri property: Resource data plane URI.
     *
     * @return the dataPlaneUri value.
     */
    public String dataPlaneUri() {
        return this.dataPlaneUri;
    }

    /**
     * Get the encryption property: CMK Encryption property.
     *
     * @return the encryption value.
     */
    public EncryptionProperties encryption() {
        return this.encryption;
    }

    /**
     * Set the encryption property: CMK Encryption property.
     *
     * @param encryption the encryption value to set.
     * @return the LoadTestProperties object itself.
     */
    public LoadTestProperties withEncryption(EncryptionProperties encryption) {
        this.encryption = encryption;
        return this;
    }

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