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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsmOperationDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;

/** REST API operation. */
@Fluent
public final class DedicatedHsmOperationInner {
    /*
     * The name of the Dedicated HSM Resource Provider Operation.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Gets or sets a value indicating whether it is a data plane action
     */
    @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
    private String isDataAction;

    /*
     * The display string.
     */
    @JsonProperty(value = "display")
    private DedicatedHsmOperationDisplay display;

    /**
     * Get the name property: The name of the Dedicated HSM Resource Provider Operation.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name of the Dedicated HSM Resource Provider Operation.
     *
     * @param name the name value to set.
     * @return the DedicatedHsmOperationInner object itself.
     */
    public DedicatedHsmOperationInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the isDataAction property: Gets or sets a value indicating whether it is a data plane action.
     *
     * @return the isDataAction value.
     */
    public String isDataAction() {
        return this.isDataAction;
    }

    /**
     * Get the display property: The display string.
     *
     * @return the display value.
     */
    public DedicatedHsmOperationDisplay display() {
        return this.display;
    }

    /**
     * Set the display property: The display string.
     *
     * @param display the display value to set.
     * @return the DedicatedHsmOperationInner object itself.
     */
    public DedicatedHsmOperationInner withDisplay(DedicatedHsmOperationDisplay display) {
        this.display = display;
        return this;
    }

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