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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.UUID;

/** The ManualTriggerRequestBody model. */
@Fluent
public final class ManualTriggerRequestBody {
    /*
     * The tenantId property.
     */
    @JsonProperty(value = "tenantId")
    private UUID tenantId;

    /*
     * The logicAppsResourceId property.
     */
    @JsonProperty(value = "logicAppsResourceId", required = true)
    private String logicAppsResourceId;

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

    /**
     * Set the tenantId property: The tenantId property.
     *
     * @param tenantId the tenantId value to set.
     * @return the ManualTriggerRequestBody object itself.
     */
    public ManualTriggerRequestBody withTenantId(UUID tenantId) {
        this.tenantId = tenantId;
        return this;
    }

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

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (logicAppsResourceId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property logicAppsResourceId in model ManualTriggerRequestBody"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ManualTriggerRequestBody.class);
}
