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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.providerhub.models.OperationActionType;
import com.azure.resourcemanager.providerhub.models.OperationOrigins;
import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The OperationsContent model. */
@Fluent
public final class OperationsContentInner extends ProxyResource {
    /*
     * Operations content.
     */
    @JsonProperty(value = "properties")
    private OperationsDefinitionInner innerProperties;

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

    /**
     * Get the innerProperties property: Operations content.
     *
     * @return the innerProperties value.
     */
    private OperationsDefinitionInner innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the name property: Name of the operation.
     *
     * @return the name value.
     */
    public String namePropertiesName() {
        return this.innerProperties() == null ? null : this.innerProperties().name();
    }

    /**
     * Set the name property: Name of the operation.
     *
     * @param name the name value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withNamePropertiesName(String name) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withName(name);
        return this;
    }

    /**
     * Get the isDataAction property: Indicates whether the operation applies to data-plane.
     *
     * @return the isDataAction value.
     */
    public Boolean isDataAction() {
        return this.innerProperties() == null ? null : this.innerProperties().isDataAction();
    }

    /**
     * Set the isDataAction property: Indicates whether the operation applies to data-plane.
     *
     * @param isDataAction the isDataAction value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withIsDataAction(Boolean isDataAction) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withIsDataAction(isDataAction);
        return this;
    }

    /**
     * Get the origin property: The origin property.
     *
     * @return the origin value.
     */
    public OperationOrigins origin() {
        return this.innerProperties() == null ? null : this.innerProperties().origin();
    }

    /**
     * Set the origin property: The origin property.
     *
     * @param origin the origin value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withOrigin(OperationOrigins origin) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withOrigin(origin);
        return this;
    }

    /**
     * Get the display property: Display information of the operation.
     *
     * @return the display value.
     */
    public OperationsDefinitionDisplay display() {
        return this.innerProperties() == null ? null : this.innerProperties().display();
    }

    /**
     * Set the display property: Display information of the operation.
     *
     * @param display the display value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withDisplay(OperationsDefinitionDisplay display) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withDisplay(display);
        return this;
    }

    /**
     * Get the actionType property: The actionType property.
     *
     * @return the actionType value.
     */
    public OperationActionType actionType() {
        return this.innerProperties() == null ? null : this.innerProperties().actionType();
    }

    /**
     * Set the actionType property: The actionType property.
     *
     * @param actionType the actionType value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withActionType(OperationActionType actionType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withActionType(actionType);
        return this;
    }

    /**
     * Get the properties property: Anything.
     *
     * @return the properties value.
     */
    public Object properties() {
        return this.innerProperties() == null ? null : this.innerProperties().properties();
    }

    /**
     * Set the properties property: Anything.
     *
     * @param properties the properties value to set.
     * @return the OperationsContentInner object itself.
     */
    public OperationsContentInner withProperties(Object properties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OperationsDefinitionInner();
        }
        this.innerProperties().withProperties(properties);
        return this;
    }

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