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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.apimanagement.models.ResourceLocationDataContract;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Gateway details. */
@Fluent
public final class GatewayContractInner extends ProxyResource {
    /*
     * Gateway details.
     */
    @JsonProperty(value = "properties")
    private GatewayContractProperties innerProperties;

    /**
     * Get the innerProperties property: Gateway details.
     *
     * @return the innerProperties value.
     */
    private GatewayContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the locationData property: Gateway location.
     *
     * @return the locationData value.
     */
    public ResourceLocationDataContract locationData() {
        return this.innerProperties() == null ? null : this.innerProperties().locationData();
    }

    /**
     * Set the locationData property: Gateway location.
     *
     * @param locationData the locationData value to set.
     * @return the GatewayContractInner object itself.
     */
    public GatewayContractInner withLocationData(ResourceLocationDataContract locationData) {
        if (this.innerProperties() == null) {
            this.innerProperties = new GatewayContractProperties();
        }
        this.innerProperties().withLocationData(locationData);
        return this;
    }

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

    /**
     * Set the description property: Gateway description.
     *
     * @param description the description value to set.
     * @return the GatewayContractInner object itself.
     */
    public GatewayContractInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new GatewayContractProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

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