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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.mobilenetwork.models.Platform;
import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Packet core control plane version properties. */
@Fluent
public final class PacketCoreControlPlaneVersionPropertiesFormat {
    /*
     * The provisioning state of the packet core control plane version resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * Platform specific packet core control plane version properties.
     */
    @JsonProperty(value = "platforms")
    private List<Platform> platforms;

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

    /**
     * Get the provisioningState property: The provisioning state of the packet core control plane version resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the platforms property: Platform specific packet core control plane version properties.
     *
     * @return the platforms value.
     */
    public List<Platform> platforms() {
        return this.platforms;
    }

    /**
     * Set the platforms property: Platform specific packet core control plane version properties.
     *
     * @param platforms the platforms value to set.
     * @return the PacketCoreControlPlaneVersionPropertiesFormat object itself.
     */
    public PacketCoreControlPlaneVersionPropertiesFormat withPlatforms(List<Platform> platforms) {
        this.platforms = platforms;
        return this;
    }

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