// 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.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** ExpressRoute Circuit Authorization. */
@Immutable
public final class ExpressRouteAuthorizationInner extends ProxyResource {
    /*
     * The properties of an ExpressRoute Circuit Authorization resource
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private ExpressRouteAuthorizationProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of an ExpressRoute Circuit Authorization resource.
     *
     * @return the innerProperties value.
     */
    private ExpressRouteAuthorizationProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Get the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization.
     *
     * @return the expressRouteAuthorizationId value.
     */
    public String expressRouteAuthorizationId() {
        return this.innerProperties() == null ? null : this.innerProperties().expressRouteAuthorizationId();
    }

    /**
     * Get the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization.
     *
     * @return the expressRouteAuthorizationKey value.
     */
    public String expressRouteAuthorizationKey() {
        return this.innerProperties() == null ? null : this.innerProperties().expressRouteAuthorizationKey();
    }

    /**
     * Get the expressRouteId property: The ID of the ExpressRoute Circuit.
     *
     * @return the expressRouteId value.
     */
    public String expressRouteId() {
        return this.innerProperties() == null ? null : this.innerProperties().expressRouteId();
    }

    /**
     * Set the expressRouteId property: The ID of the ExpressRoute Circuit.
     *
     * @param expressRouteId the expressRouteId value to set.
     * @return the ExpressRouteAuthorizationInner object itself.
     */
    public ExpressRouteAuthorizationInner withExpressRouteId(String expressRouteId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExpressRouteAuthorizationProperties();
        }
        this.innerProperties().withExpressRouteId(expressRouteId);
        return this;
    }

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