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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Supported operation of this resource provider. */
@Fluent
public final class ResourceProviderOperationInner {
    /*
     * Operation name, in format of {provider}/{resource}/{operation}
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Display metadata associated with the operation.
     */
    @JsonProperty(value = "display")
    private ResourceProviderOperationDisplay display;

    /*
     * Is a data action.
     */
    @JsonProperty(value = "isDataAction")
    private Boolean isDataAction;

    /*
     * Properties of the operation
     */
    @JsonProperty(value = "properties")
    private OperationProperties properties;

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

    /**
     * Get the name property: Operation name, in format of {provider}/{resource}/{operation}.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Operation name, in format of {provider}/{resource}/{operation}.
     *
     * @param name the name value to set.
     * @return the ResourceProviderOperationInner object itself.
     */
    public ResourceProviderOperationInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the display property: Display metadata associated with the operation.
     *
     * @return the display value.
     */
    public ResourceProviderOperationDisplay display() {
        return this.display;
    }

    /**
     * Set the display property: Display metadata associated with the operation.
     *
     * @param display the display value to set.
     * @return the ResourceProviderOperationInner object itself.
     */
    public ResourceProviderOperationInner withDisplay(ResourceProviderOperationDisplay display) {
        this.display = display;
        return this;
    }

    /**
     * Get the isDataAction property: Is a data action.
     *
     * @return the isDataAction value.
     */
    public Boolean isDataAction() {
        return this.isDataAction;
    }

    /**
     * Set the isDataAction property: Is a data action.
     *
     * @param isDataAction the isDataAction value to set.
     * @return the ResourceProviderOperationInner object itself.
     */
    public ResourceProviderOperationInner withIsDataAction(Boolean isDataAction) {
        this.isDataAction = isDataAction;
        return this;
    }

    /**
     * Get the properties property: Properties of the operation.
     *
     * @return the properties value.
     */
    public OperationProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Properties of the operation.
     *
     * @param properties the properties value to set.
     * @return the ResourceProviderOperationInner object itself.
     */
    public ResourceProviderOperationInner withProperties(OperationProperties properties) {
        this.properties = properties;
        return this;
    }

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