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

package com.azure.resourcemanager.devtestlabs.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Subnet information. */
@Fluent
public final class Subnet {
    /*
     * The resource ID of the subnet.
     */
    @JsonProperty(value = "resourceId")
    private String resourceId;

    /*
     * The name of the subnet as seen in the lab.
     */
    @JsonProperty(value = "labSubnetName")
    private String labSubnetName;

    /*
     * The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
     */
    @JsonProperty(value = "allowPublicIp")
    private UsagePermissionType allowPublicIp;

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

    /**
     * Get the resourceId property: The resource ID of the subnet.
     *
     * @return the resourceId value.
     */
    public String resourceId() {
        return this.resourceId;
    }

    /**
     * Set the resourceId property: The resource ID of the subnet.
     *
     * @param resourceId the resourceId value to set.
     * @return the Subnet object itself.
     */
    public Subnet withResourceId(String resourceId) {
        this.resourceId = resourceId;
        return this;
    }

    /**
     * Get the labSubnetName property: The name of the subnet as seen in the lab.
     *
     * @return the labSubnetName value.
     */
    public String labSubnetName() {
        return this.labSubnetName;
    }

    /**
     * Set the labSubnetName property: The name of the subnet as seen in the lab.
     *
     * @param labSubnetName the labSubnetName value to set.
     * @return the Subnet object itself.
     */
    public Subnet withLabSubnetName(String labSubnetName) {
        this.labSubnetName = labSubnetName;
        return this;
    }

    /**
     * Get the allowPublicIp property: The permission policy of the subnet for allowing public IP addresses (i.e. Allow,
     * Deny)).
     *
     * @return the allowPublicIp value.
     */
    public UsagePermissionType allowPublicIp() {
        return this.allowPublicIp;
    }

    /**
     * Set the allowPublicIp property: The permission policy of the subnet for allowing public IP addresses (i.e. Allow,
     * Deny)).
     *
     * @param allowPublicIp the allowPublicIp value to set.
     * @return the Subnet object itself.
     */
    public Subnet withAllowPublicIp(UsagePermissionType allowPublicIp) {
        this.allowPublicIp = allowPublicIp;
        return this;
    }

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