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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** NSX Public IP Block. */
@Fluent
public final class WorkloadNetworkPublicIpInner extends ProxyResource {
    /*
     * Public IP Block properties
     */
    @JsonProperty(value = "properties")
    private WorkloadNetworkPublicIpProperties innerProperties;

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

    /**
     * Get the innerProperties property: Public IP Block properties.
     *
     * @return the innerProperties value.
     */
    private WorkloadNetworkPublicIpProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: Display name of the Public IP Block.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Display name of the Public IP Block.
     *
     * @param displayName the displayName value to set.
     * @return the WorkloadNetworkPublicIpInner object itself.
     */
    public WorkloadNetworkPublicIpInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPublicIpProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the numberOfPublicIPs property: Number of Public IPs requested.
     *
     * @return the numberOfPublicIPs value.
     */
    public Long numberOfPublicIPs() {
        return this.innerProperties() == null ? null : this.innerProperties().numberOfPublicIPs();
    }

    /**
     * Set the numberOfPublicIPs property: Number of Public IPs requested.
     *
     * @param numberOfPublicIPs the numberOfPublicIPs value to set.
     * @return the WorkloadNetworkPublicIpInner object itself.
     */
    public WorkloadNetworkPublicIpInner withNumberOfPublicIPs(Long numberOfPublicIPs) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPublicIpProperties();
        }
        this.innerProperties().withNumberOfPublicIPs(numberOfPublicIPs);
        return this;
    }

    /**
     * Get the publicIpBlock property: CIDR Block of the Public IP Block.
     *
     * @return the publicIpBlock value.
     */
    public String publicIpBlock() {
        return this.innerProperties() == null ? null : this.innerProperties().publicIpBlock();
    }

    /**
     * Get the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    public WorkloadNetworkPublicIpProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

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