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

package com.azure.resourcemanager.hdinsight.containers.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Trino Cluster profile. */
@Fluent
public final class TrinoProfile {
    /*
     * Trino cluster catalog options.
     */
    @JsonProperty(value = "catalogOptions")
    private CatalogOptions catalogOptions;

    /*
     * Trino Coordinator.
     */
    @JsonProperty(value = "coordinator")
    private TrinoCoordinator coordinator;

    /*
     * Trino user plugins spec
     */
    @JsonProperty(value = "userPluginsSpec")
    private TrinoUserPlugins userPluginsSpec;

    /*
     * User telemetry
     */
    @JsonProperty(value = "userTelemetrySpec")
    private TrinoUserTelemetry userTelemetrySpec;

    /*
     * Trino worker.
     */
    @JsonProperty(value = "worker")
    private TrinoWorker worker;

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

    /**
     * Get the catalogOptions property: Trino cluster catalog options.
     *
     * @return the catalogOptions value.
     */
    public CatalogOptions catalogOptions() {
        return this.catalogOptions;
    }

    /**
     * Set the catalogOptions property: Trino cluster catalog options.
     *
     * @param catalogOptions the catalogOptions value to set.
     * @return the TrinoProfile object itself.
     */
    public TrinoProfile withCatalogOptions(CatalogOptions catalogOptions) {
        this.catalogOptions = catalogOptions;
        return this;
    }

    /**
     * Get the coordinator property: Trino Coordinator.
     *
     * @return the coordinator value.
     */
    public TrinoCoordinator coordinator() {
        return this.coordinator;
    }

    /**
     * Set the coordinator property: Trino Coordinator.
     *
     * @param coordinator the coordinator value to set.
     * @return the TrinoProfile object itself.
     */
    public TrinoProfile withCoordinator(TrinoCoordinator coordinator) {
        this.coordinator = coordinator;
        return this;
    }

    /**
     * Get the userPluginsSpec property: Trino user plugins spec.
     *
     * @return the userPluginsSpec value.
     */
    public TrinoUserPlugins userPluginsSpec() {
        return this.userPluginsSpec;
    }

    /**
     * Set the userPluginsSpec property: Trino user plugins spec.
     *
     * @param userPluginsSpec the userPluginsSpec value to set.
     * @return the TrinoProfile object itself.
     */
    public TrinoProfile withUserPluginsSpec(TrinoUserPlugins userPluginsSpec) {
        this.userPluginsSpec = userPluginsSpec;
        return this;
    }

    /**
     * Get the userTelemetrySpec property: User telemetry.
     *
     * @return the userTelemetrySpec value.
     */
    public TrinoUserTelemetry userTelemetrySpec() {
        return this.userTelemetrySpec;
    }

    /**
     * Set the userTelemetrySpec property: User telemetry.
     *
     * @param userTelemetrySpec the userTelemetrySpec value to set.
     * @return the TrinoProfile object itself.
     */
    public TrinoProfile withUserTelemetrySpec(TrinoUserTelemetry userTelemetrySpec) {
        this.userTelemetrySpec = userTelemetrySpec;
        return this;
    }

    /**
     * Get the worker property: Trino worker.
     *
     * @return the worker value.
     */
    public TrinoWorker worker() {
        return this.worker;
    }

    /**
     * Set the worker property: Trino worker.
     *
     * @param worker the worker value to set.
     * @return the TrinoProfile object itself.
     */
    public TrinoProfile withWorker(TrinoWorker worker) {
        this.worker = worker;
        return this;
    }

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