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

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

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** An API key used for authenticating with a configuration store endpoint. */
@Immutable
public final class ApiKeyInner {
    /*
     * The key ID.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * A name for the key describing its usage.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The value of the key that is used for authentication purposes.
     */
    @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
    private String value;

    /*
     * A connection string that can be used by supporting clients for authentication.
     */
    @JsonProperty(value = "connectionString", access = JsonProperty.Access.WRITE_ONLY)
    private String connectionString;

    /*
     * The last time any of the key's properties were modified.
     */
    @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastModified;

    /*
     * Whether this key can only be used for read operations.
     */
    @JsonProperty(value = "readOnly", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean readOnly;

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

    /**
     * Get the id property: The key ID.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Get the name property: A name for the key describing its usage.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the value property: The value of the key that is used for authentication purposes.
     *
     * @return the value value.
     */
    public String value() {
        return this.value;
    }

    /**
     * Get the connectionString property: A connection string that can be used by supporting clients for authentication.
     *
     * @return the connectionString value.
     */
    public String connectionString() {
        return this.connectionString;
    }

    /**
     * Get the lastModified property: The last time any of the key's properties were modified.
     *
     * @return the lastModified value.
     */
    public OffsetDateTime lastModified() {
        return this.lastModified;
    }

    /**
     * Get the readOnly property: Whether this key can only be used for read operations.
     *
     * @return the readOnly value.
     */
    public Boolean readOnly() {
        return this.readOnly;
    }

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