// 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.models;

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

/** Issue contract Update Properties. */
@Fluent
public final class KeyVaultLastAccessStatusContractProperties {
    /*
     * Last status code for sync and refresh of secret from key vault.
     */
    @JsonProperty(value = "code")
    private String code;

    /*
     * Details of the error else empty.
     */
    @JsonProperty(value = "message")
    private String message;

    /*
     * Last time secret was accessed. The date conforms to the following
     * format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
     *
     */
    @JsonProperty(value = "timeStampUtc")
    private OffsetDateTime timestampUtc;

    /**
     * Get the code property: Last status code for sync and refresh of secret from key vault.
     *
     * @return the code value.
     */
    public String code() {
        return this.code;
    }

    /**
     * Set the code property: Last status code for sync and refresh of secret from key vault.
     *
     * @param code the code value to set.
     * @return the KeyVaultLastAccessStatusContractProperties object itself.
     */
    public KeyVaultLastAccessStatusContractProperties withCode(String code) {
        this.code = code;
        return this;
    }

    /**
     * Get the message property: Details of the error else empty.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: Details of the error else empty.
     *
     * @param message the message value to set.
     * @return the KeyVaultLastAccessStatusContractProperties object itself.
     */
    public KeyVaultLastAccessStatusContractProperties withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Get the timestampUtc property: Last time secret was accessed. The date conforms to the following format:
     * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
     *
     * @return the timestampUtc value.
     */
    public OffsetDateTime timestampUtc() {
        return this.timestampUtc;
    }

    /**
     * Set the timestampUtc property: Last time secret was accessed. The date conforms to the following format:
     * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
     *
     * @param timestampUtc the timestampUtc value to set.
     * @return the KeyVaultLastAccessStatusContractProperties object itself.
     */
    public KeyVaultLastAccessStatusContractProperties withTimestampUtc(OffsetDateTime timestampUtc) {
        this.timestampUtc = timestampUtc;
        return this;
    }

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