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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.quota.models.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The OperationResponse model. */
@Fluent
public final class OperationResponseInner {
    /*
     * The name property.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The display property.
     */
    @JsonProperty(value = "display")
    private OperationDisplay display;

    /*
     * The origin property.
     */
    @JsonProperty(value = "origin")
    private String origin;

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

    /**
     * Get the name property: The name property.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name property.
     *
     * @param name the name value to set.
     * @return the OperationResponseInner object itself.
     */
    public OperationResponseInner withName(String name) {
        this.name = name;
        return this;
    }

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

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

    /**
     * Get the origin property: The origin property.
     *
     * @return the origin value.
     */
    public String origin() {
        return this.origin;
    }

    /**
     * Set the origin property: The origin property.
     *
     * @param origin the origin value to set.
     * @return the OperationResponseInner object itself.
     */
    public OperationResponseInner withOrigin(String origin) {
        this.origin = origin;
        return this;
    }

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