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

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

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

/** Extension resource. */
@Fluent
public final class ExtensionInner extends ProxyResource {
    /*
     * Extension resource properties.
     */
    @JsonProperty(value = "properties")
    private ExtensionProperties innerProperties;

    /*
     * The ETag value to implement optimistic concurrency.
     */
    @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
    private String etag;

    /**
     * Get the innerProperties property: Extension resource properties.
     *
     * @return the innerProperties value.
     */
    private ExtensionProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the etag property: The ETag value to implement optimistic concurrency.
     *
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

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

    /**
     * Get the extensionCategory property: Extension category. e.g. weather/sensor/satellite.
     *
     * @return the extensionCategory value.
     */
    public String extensionCategory() {
        return this.innerProperties() == null ? null : this.innerProperties().extensionCategory();
    }

    /**
     * Get the installedExtensionVersion property: Installed extension version.
     *
     * @return the installedExtensionVersion value.
     */
    public String installedExtensionVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().installedExtensionVersion();
    }

    /**
     * Get the extensionAuthLink property: Extension auth link.
     *
     * @return the extensionAuthLink value.
     */
    public String extensionAuthLink() {
        return this.innerProperties() == null ? null : this.innerProperties().extensionAuthLink();
    }

    /**
     * Get the extensionApiDocsLink property: Extension api docs link.
     *
     * @return the extensionApiDocsLink value.
     */
    public String extensionApiDocsLink() {
        return this.innerProperties() == null ? null : this.innerProperties().extensionApiDocsLink();
    }

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