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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource;
import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation;
import com.azure.resourcemanager.managednetworkfabric.models.InfrastructureServices;
import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerOperationalState;
import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState;
import com.azure.resourcemanager.managednetworkfabric.models.WorkloadServices;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** NetworkFabricControllerProperties define the resource properties. */
@Fluent
public final class NetworkFabricControllerProperties extends AnnotationResource {
    /*
     * InfrastructureServices IP ranges.
     */
    @JsonProperty(value = "infrastructureServices", access = JsonProperty.Access.WRITE_ONLY)
    private InfrastructureServices infrastructureServices;

    /*
     * WorkloadServices IP ranges.
     */
    @JsonProperty(value = "workloadServices", access = JsonProperty.Access.WRITE_ONLY)
    private WorkloadServices workloadServices;

    /*
     * Managed Resource Group configuration properties.
     */
    @JsonProperty(value = "managedResourceGroupConfiguration")
    private ManagedResourceGroupConfiguration managedResourceGroupConfiguration;

    /*
     * The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service.
     */
    @JsonProperty(value = "networkFabricIds", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> networkFabricIds;

    /*
     * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated
     * for Tenant workloads which are required to access internet or any other MSFT/Public endpoints.
     */
    @JsonProperty(value = "workloadManagementNetwork", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean workloadManagementNetwork;

    /*
     * IPv4 Network Fabric Controller Address Space.
     */
    @JsonProperty(value = "ipv4AddressSpace")
    private String ipv4AddressSpace;

    /*
     * IPv6 Network Fabric Controller Address Space.
     */
    @JsonProperty(value = "ipv6AddressSpace")
    private String ipv6AddressSpace;

    /*
     * The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status.
     */
    @JsonProperty(value = "operationalState", access = JsonProperty.Access.WRITE_ONLY)
    private NetworkFabricControllerOperationalState operationalState;

    /*
     * Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During
     * this process, the states keep changing based on the status of NFC provisioning.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a
     * NFC. This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute)
     */
    @JsonProperty(value = "infrastructureExpressRouteConnections")
    private List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections;

    /*
     * As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This
     * Express route is dedicated for Workload services. (This is a Mandatory attribute).
     */
    @JsonProperty(value = "workloadExpressRouteConnections")
    private List<ExpressRouteConnectionInformation> workloadExpressRouteConnections;

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

    /**
     * Get the infrastructureServices property: InfrastructureServices IP ranges.
     *
     * @return the infrastructureServices value.
     */
    public InfrastructureServices infrastructureServices() {
        return this.infrastructureServices;
    }

    /**
     * Get the workloadServices property: WorkloadServices IP ranges.
     *
     * @return the workloadServices value.
     */
    public WorkloadServices workloadServices() {
        return this.workloadServices;
    }

    /**
     * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration properties.
     *
     * @return the managedResourceGroupConfiguration value.
     */
    public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() {
        return this.managedResourceGroupConfiguration;
    }

    /**
     * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration properties.
     *
     * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set.
     * @return the NetworkFabricControllerProperties object itself.
     */
    public NetworkFabricControllerProperties withManagedResourceGroupConfiguration(
        ManagedResourceGroupConfiguration managedResourceGroupConfiguration) {
        this.managedResourceGroupConfiguration = managedResourceGroupConfiguration;
        return this;
    }

    /**
     * Get the networkFabricIds property: The NF-ID will be an input parameter used by the NF to link and get associated
     * with the parent NFC Service.
     *
     * @return the networkFabricIds value.
     */
    public List<String> networkFabricIds() {
        return this.networkFabricIds;
    }

    /**
     * Get the workloadManagementNetwork property: A workload management network is required for all the tenant
     * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or
     * any other MSFT/Public endpoints.
     *
     * @return the workloadManagementNetwork value.
     */
    public Boolean workloadManagementNetwork() {
        return this.workloadManagementNetwork;
    }

    /**
     * Get the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space.
     *
     * @return the ipv4AddressSpace value.
     */
    public String ipv4AddressSpace() {
        return this.ipv4AddressSpace;
    }

    /**
     * Set the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space.
     *
     * @param ipv4AddressSpace the ipv4AddressSpace value to set.
     * @return the NetworkFabricControllerProperties object itself.
     */
    public NetworkFabricControllerProperties withIpv4AddressSpace(String ipv4AddressSpace) {
        this.ipv4AddressSpace = ipv4AddressSpace;
        return this;
    }

    /**
     * Get the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space.
     *
     * @return the ipv6AddressSpace value.
     */
    public String ipv6AddressSpace() {
        return this.ipv6AddressSpace;
    }

    /**
     * Set the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space.
     *
     * @param ipv6AddressSpace the ipv6AddressSpace value to set.
     * @return the NetworkFabricControllerProperties object itself.
     */
    public NetworkFabricControllerProperties withIpv6AddressSpace(String ipv6AddressSpace) {
        this.ipv6AddressSpace = ipv6AddressSpace;
        return this;
    }

    /**
     * Get the operationalState property: The Operational Status would always be NULL. Look only in to the Provisioning
     * state for the latest status.
     *
     * @return the operationalState value.
     */
    public NetworkFabricControllerOperationalState operationalState() {
        return this.operationalState;
    }

    /**
     * Get the provisioningState property: Provides you the latest status of the NFC service, whether it is Accepted,
     * updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC
     * provisioning.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute
     * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure
     * services. (This is a Mandatory attribute).
     *
     * @return the infrastructureExpressRouteConnections value.
     */
    public List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections() {
        return this.infrastructureExpressRouteConnections;
    }

    /**
     * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute
     * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure
     * services. (This is a Mandatory attribute).
     *
     * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set.
     * @return the NetworkFabricControllerProperties object itself.
     */
    public NetworkFabricControllerProperties withInfrastructureExpressRouteConnections(
        List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections) {
        this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections;
        return this;
    }

    /**
     * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID
     * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is
     * a Mandatory attribute).
     *
     * @return the workloadExpressRouteConnections value.
     */
    public List<ExpressRouteConnectionInformation> workloadExpressRouteConnections() {
        return this.workloadExpressRouteConnections;
    }

    /**
     * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID
     * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is
     * a Mandatory attribute).
     *
     * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set.
     * @return the NetworkFabricControllerProperties object itself.
     */
    public NetworkFabricControllerProperties withWorkloadExpressRouteConnections(
        List<ExpressRouteConnectionInformation> workloadExpressRouteConnections) {
        this.workloadExpressRouteConnections = workloadExpressRouteConnections;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public NetworkFabricControllerProperties withAnnotation(String annotation) {
        super.withAnnotation(annotation);
        return this;
    }

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