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

package com.azure.resourcemanager.orbital.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Network configuration of customer virtual network. */
@Fluent
public final class ContactProfilesPropertiesNetworkConfiguration {
    /*
     * ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a
     * class C subnet, and should not have any IP created in it.
     */
    @JsonProperty(value = "subnetId", required = true)
    private String subnetId;

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

    /**
     * Get the subnetId property: ARM resource identifier of the subnet delegated to the
     * Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in
     * it.
     *
     * @return the subnetId value.
     */
    public String subnetId() {
        return this.subnetId;
    }

    /**
     * Set the subnetId property: ARM resource identifier of the subnet delegated to the
     * Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in
     * it.
     *
     * @param subnetId the subnetId value to set.
     * @return the ContactProfilesPropertiesNetworkConfiguration object itself.
     */
    public ContactProfilesPropertiesNetworkConfiguration withSubnetId(String subnetId) {
        this.subnetId = subnetId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (subnetId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property subnetId in model ContactProfilesPropertiesNetworkConfiguration"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ContactProfilesPropertiesNetworkConfiguration.class);
}
