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

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

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.edgeorder.models.CommonProperties;
import com.azure.resourcemanager.edgeorder.models.Product;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties of product line. */
@Immutable
public final class ProductLineProperties extends CommonProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductLineProperties.class);

    /*
     * List of products in the product line
     */
    @JsonProperty(value = "products", access = JsonProperty.Access.WRITE_ONLY)
    private List<Product> products;

    /**
     * Get the products property: List of products in the product line.
     *
     * @return the products value.
     */
    public List<Product> products() {
        return this.products;
    }

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