// 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.core.management.Resource;
import com.azure.core.management.SystemData;
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;
import java.util.Map;

/** The NetworkFabricController resource definition. */
@Fluent
public final class NetworkFabricControllerInner extends Resource {
    /*
     * Resource properties.
     */
    @JsonProperty(value = "properties")
    private NetworkFabricControllerProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Resource properties.
     *
     * @return the innerProperties value.
     */
    private NetworkFabricControllerProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /** {@inheritDoc} */
    @Override
    public NetworkFabricControllerInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public NetworkFabricControllerInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

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

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

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

    /**
     * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration properties.
     *
     * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set.
     * @return the NetworkFabricControllerInner object itself.
     */
    public NetworkFabricControllerInner withManagedResourceGroupConfiguration(
        ManagedResourceGroupConfiguration managedResourceGroupConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerProperties();
        }
        this.innerProperties().withManagedResourceGroupConfiguration(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.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().workloadManagementNetwork();
    }

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

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

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

    /**
     * Set the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space.
     *
     * @param ipv6AddressSpace the ipv6AddressSpace value to set.
     * @return the NetworkFabricControllerInner object itself.
     */
    public NetworkFabricControllerInner withIpv6AddressSpace(String ipv6AddressSpace) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerProperties();
        }
        this.innerProperties().withIpv6AddressSpace(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.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().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 NetworkFabricControllerInner object itself.
     */
    public NetworkFabricControllerInner withInfrastructureExpressRouteConnections(
        List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerProperties();
        }
        this.innerProperties().withInfrastructureExpressRouteConnections(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.innerProperties() == null ? null : this.innerProperties().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 NetworkFabricControllerInner object itself.
     */
    public NetworkFabricControllerInner withWorkloadExpressRouteConnections(
        List<ExpressRouteConnectionInformation> workloadExpressRouteConnections) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerProperties();
        }
        this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections);
        return this;
    }

    /**
     * Get the annotation property: Switch configuration description.
     *
     * @return the annotation value.
     */
    public String annotation() {
        return this.innerProperties() == null ? null : this.innerProperties().annotation();
    }

    /**
     * Set the annotation property: Switch configuration description.
     *
     * @param annotation the annotation value to set.
     * @return the NetworkFabricControllerInner object itself.
     */
    public NetworkFabricControllerInner withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerProperties();
        }
        this.innerProperties().withAnnotation(annotation);
        return this;
    }

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