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

package com.azure.resourcemanager.logic.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The swagger tree command. */
@Fluent
public final class SwaggerCustomDynamicTreeCommand {
    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "operationId")
    private String operationId;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "itemsPath")
    private String itemsPath;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "itemValuePath")
    private String itemValuePath;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "itemTitlePath")
    private String itemTitlePath;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "itemFullTitlePath")
    private String itemFullTitlePath;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "itemIsParent")
    private String itemIsParent;

    /*
     * The path to an item property which defines the display name of the item.
     */
    @JsonProperty(value = "selectableFilter")
    private String selectableFilter;

    /*
     * Dictionary of <SwaggerCustomDynamicTreeParameter>
     */
    @JsonProperty(value = "parameters")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, SwaggerCustomDynamicTreeParameter> parameters;

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

    /**
     * Get the operationId property: The path to an item property which defines the display name of the item.
     *
     * @return the operationId value.
     */
    public String operationId() {
        return this.operationId;
    }

    /**
     * Set the operationId property: The path to an item property which defines the display name of the item.
     *
     * @param operationId the operationId value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withOperationId(String operationId) {
        this.operationId = operationId;
        return this;
    }

    /**
     * Get the itemsPath property: The path to an item property which defines the display name of the item.
     *
     * @return the itemsPath value.
     */
    public String itemsPath() {
        return this.itemsPath;
    }

    /**
     * Set the itemsPath property: The path to an item property which defines the display name of the item.
     *
     * @param itemsPath the itemsPath value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withItemsPath(String itemsPath) {
        this.itemsPath = itemsPath;
        return this;
    }

    /**
     * Get the itemValuePath property: The path to an item property which defines the display name of the item.
     *
     * @return the itemValuePath value.
     */
    public String itemValuePath() {
        return this.itemValuePath;
    }

    /**
     * Set the itemValuePath property: The path to an item property which defines the display name of the item.
     *
     * @param itemValuePath the itemValuePath value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withItemValuePath(String itemValuePath) {
        this.itemValuePath = itemValuePath;
        return this;
    }

    /**
     * Get the itemTitlePath property: The path to an item property which defines the display name of the item.
     *
     * @return the itemTitlePath value.
     */
    public String itemTitlePath() {
        return this.itemTitlePath;
    }

    /**
     * Set the itemTitlePath property: The path to an item property which defines the display name of the item.
     *
     * @param itemTitlePath the itemTitlePath value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withItemTitlePath(String itemTitlePath) {
        this.itemTitlePath = itemTitlePath;
        return this;
    }

    /**
     * Get the itemFullTitlePath property: The path to an item property which defines the display name of the item.
     *
     * @return the itemFullTitlePath value.
     */
    public String itemFullTitlePath() {
        return this.itemFullTitlePath;
    }

    /**
     * Set the itemFullTitlePath property: The path to an item property which defines the display name of the item.
     *
     * @param itemFullTitlePath the itemFullTitlePath value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withItemFullTitlePath(String itemFullTitlePath) {
        this.itemFullTitlePath = itemFullTitlePath;
        return this;
    }

    /**
     * Get the itemIsParent property: The path to an item property which defines the display name of the item.
     *
     * @return the itemIsParent value.
     */
    public String itemIsParent() {
        return this.itemIsParent;
    }

    /**
     * Set the itemIsParent property: The path to an item property which defines the display name of the item.
     *
     * @param itemIsParent the itemIsParent value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withItemIsParent(String itemIsParent) {
        this.itemIsParent = itemIsParent;
        return this;
    }

    /**
     * Get the selectableFilter property: The path to an item property which defines the display name of the item.
     *
     * @return the selectableFilter value.
     */
    public String selectableFilter() {
        return this.selectableFilter;
    }

    /**
     * Set the selectableFilter property: The path to an item property which defines the display name of the item.
     *
     * @param selectableFilter the selectableFilter value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withSelectableFilter(String selectableFilter) {
        this.selectableFilter = selectableFilter;
        return this;
    }

    /**
     * Get the parameters property: Dictionary of &lt;SwaggerCustomDynamicTreeParameter&gt;.
     *
     * @return the parameters value.
     */
    public Map<String, SwaggerCustomDynamicTreeParameter> parameters() {
        return this.parameters;
    }

    /**
     * Set the parameters property: Dictionary of &lt;SwaggerCustomDynamicTreeParameter&gt;.
     *
     * @param parameters the parameters value to set.
     * @return the SwaggerCustomDynamicTreeCommand object itself.
     */
    public SwaggerCustomDynamicTreeCommand withParameters(Map<String, SwaggerCustomDynamicTreeParameter> parameters) {
        this.parameters = parameters;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (parameters() != null) {
            parameters()
                .values()
                .forEach(
                    e -> {
                        if (e != null) {
                            e.validate();
                        }
                    });
        }
    }
}
