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

package com.azure.resourcemanager.resourcemover.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Unresolved dependency collection. */
@Fluent
public final class UnresolvedDependencyCollection {
    /*
     * Gets or sets the list of unresolved dependencies.
     */
    @JsonProperty(value = "value")
    private List<UnresolvedDependencyInner> value;

    /*
     * Gets or sets the value of  next link.
     */
    @JsonProperty(value = "nextLink")
    private String nextLink;

    /*
     * Gets or sets the list of summary items and the field on which summary is done.
     */
    @JsonProperty(value = "summaryCollection", access = JsonProperty.Access.WRITE_ONLY)
    private SummaryCollection summaryCollection;

    /*
     * Gets the total count.
     */
    @JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalCount;

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

    /**
     * Get the value property: Gets or sets the list of unresolved dependencies.
     *
     * @return the value value.
     */
    public List<UnresolvedDependencyInner> value() {
        return this.value;
    }

    /**
     * Set the value property: Gets or sets the list of unresolved dependencies.
     *
     * @param value the value value to set.
     * @return the UnresolvedDependencyCollection object itself.
     */
    public UnresolvedDependencyCollection withValue(List<UnresolvedDependencyInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Get the nextLink property: Gets or sets the value of next link.
     *
     * @return the nextLink value.
     */
    public String nextLink() {
        return this.nextLink;
    }

    /**
     * Set the nextLink property: Gets or sets the value of next link.
     *
     * @param nextLink the nextLink value to set.
     * @return the UnresolvedDependencyCollection object itself.
     */
    public UnresolvedDependencyCollection withNextLink(String nextLink) {
        this.nextLink = nextLink;
        return this;
    }

    /**
     * Get the summaryCollection property: Gets or sets the list of summary items and the field on which summary is
     * done.
     *
     * @return the summaryCollection value.
     */
    public SummaryCollection summaryCollection() {
        return this.summaryCollection;
    }

    /**
     * Get the totalCount property: Gets the total count.
     *
     * @return the totalCount value.
     */
    public Long totalCount() {
        return this.totalCount;
    }

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