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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.logic.models.KeyVaultKeyAttributes;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The key vault key. */
@Fluent
public final class KeyVaultKeyInner {
    /*
     * The key id.
     */
    @JsonProperty(value = "kid")
    private String kid;

    /*
     * The key attributes.
     */
    @JsonProperty(value = "attributes")
    private KeyVaultKeyAttributes attributes;

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

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

    /**
     * Set the kid property: The key id.
     *
     * @param kid the kid value to set.
     * @return the KeyVaultKeyInner object itself.
     */
    public KeyVaultKeyInner withKid(String kid) {
        this.kid = kid;
        return this;
    }

    /**
     * Get the attributes property: The key attributes.
     *
     * @return the attributes value.
     */
    public KeyVaultKeyAttributes attributes() {
        return this.attributes;
    }

    /**
     * Set the attributes property: The key attributes.
     *
     * @param attributes the attributes value to set.
     * @return the KeyVaultKeyInner object itself.
     */
    public KeyVaultKeyInner withAttributes(KeyVaultKeyAttributes attributes) {
        this.attributes = attributes;
        return this;
    }

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