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

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

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

/** A query of triggers. */
@Fluent
public final class TriggerQueryResponseInner {
    /*
     * List of triggers.
     */
    @JsonProperty(value = "value", required = true)
    private List<TriggerResourceInner> value;

    /*
     * The continuation token for getting the next page of results, if any remaining results exist, null otherwise.
     */
    @JsonProperty(value = "continuationToken")
    private String continuationToken;

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

    /**
     * Get the value property: List of triggers.
     *
     * @return the value value.
     */
    public List<TriggerResourceInner> value() {
        return this.value;
    }

    /**
     * Set the value property: List of triggers.
     *
     * @param value the value value to set.
     * @return the TriggerQueryResponseInner object itself.
     */
    public TriggerQueryResponseInner withValue(List<TriggerResourceInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Get the continuationToken property: The continuation token for getting the next page of results, if any remaining
     * results exist, null otherwise.
     *
     * @return the continuationToken value.
     */
    public String continuationToken() {
        return this.continuationToken;
    }

    /**
     * Set the continuationToken property: The continuation token for getting the next page of results, if any remaining
     * results exist, null otherwise.
     *
     * @param continuationToken the continuationToken value to set.
     * @return the TriggerQueryResponseInner object itself.
     */
    public TriggerQueryResponseInner withContinuationToken(String continuationToken) {
        this.continuationToken = continuationToken;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (value() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property value in model TriggerQueryResponseInner"));
        } else {
            value().forEach(e -> e.validate());
        }
    }

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