// 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.AvailabilityInformation;
import com.azure.resourcemanager.edgeorder.models.CostInformation;
import com.azure.resourcemanager.edgeorder.models.Description;
import com.azure.resourcemanager.edgeorder.models.FilterableProperty;
import com.azure.resourcemanager.edgeorder.models.HierarchyInformation;
import com.azure.resourcemanager.edgeorder.models.ImageInformation;
import com.azure.resourcemanager.edgeorder.models.ProductLine;
import com.azure.resourcemanager.edgeorder.models.ResourceProviderDetails;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Product families metadata details. */
@Immutable
public final class ProductFamiliesMetadataDetailsInner {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductFamiliesMetadataDetailsInner.class);

    /*
     * Product family properties
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private ProductFamilyProperties innerProperties;

    /**
     * Get the innerProperties property: Product family properties.
     *
     * @return the innerProperties value.
     */
    private ProductFamilyProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the productLines property: List of product lines supported in the product family.
     *
     * @return the productLines value.
     */
    public List<ProductLine> productLines() {
        return this.innerProperties() == null ? null : this.innerProperties().productLines();
    }

    /**
     * Get the resourceProviderDetails property: Contains details related to resource provider.
     *
     * @return the resourceProviderDetails value.
     */
    public List<ResourceProviderDetails> resourceProviderDetails() {
        return this.innerProperties() == null ? null : this.innerProperties().resourceProviderDetails();
    }

    /**
     * Set the resourceProviderDetails property: Contains details related to resource provider.
     *
     * @param resourceProviderDetails the resourceProviderDetails value to set.
     * @return the ProductFamiliesMetadataDetailsInner object itself.
     */
    public ProductFamiliesMetadataDetailsInner withResourceProviderDetails(
        List<ResourceProviderDetails> resourceProviderDetails) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ProductFamilyProperties();
        }
        this.innerProperties().withResourceProviderDetails(resourceProviderDetails);
        return this;
    }

    /**
     * Get the filterableProperties property: list of filters supported for a product.
     *
     * @return the filterableProperties value.
     */
    public List<FilterableProperty> filterableProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().filterableProperties();
    }

    /**
     * Get the displayName property: Display Name for the product system.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Get the description property: Description related to the product system.
     *
     * @return the description value.
     */
    public Description description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Get the imageInformation property: Image information for the product system.
     *
     * @return the imageInformation value.
     */
    public List<ImageInformation> imageInformation() {
        return this.innerProperties() == null ? null : this.innerProperties().imageInformation();
    }

    /**
     * Get the costInformation property: Cost information for the product system.
     *
     * @return the costInformation value.
     */
    public CostInformation costInformation() {
        return this.innerProperties() == null ? null : this.innerProperties().costInformation();
    }

    /**
     * Get the availabilityInformation property: Availability information of the product system.
     *
     * @return the availabilityInformation value.
     */
    public AvailabilityInformation availabilityInformation() {
        return this.innerProperties() == null ? null : this.innerProperties().availabilityInformation();
    }

    /**
     * Get the hierarchyInformation property: Hierarchy information of a product.
     *
     * @return the hierarchyInformation value.
     */
    public HierarchyInformation hierarchyInformation() {
        return this.innerProperties() == null ? null : this.innerProperties().hierarchyInformation();
    }

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