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

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

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

/**
 * Provisioning token properties. A provisioning token allows for a single instance of Azure Video analyzer IoT edge
 * module to be initialized and authorized to the cloud account. The provisioning token itself is short lived and it is
 * only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, the IoT edge
 * module will agree on a set of authentication keys which will be auto-rotated as long as the module is able to
 * periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge module in case the
 * module state lost or reset.
 */
@Immutable
public final class EdgeModuleProvisioningTokenInner {
    /*
     * The expiration date of the registration token. The Azure Video Analyzer
     * IoT edge module must be initialized and connected to the Internet prior
     * to the token expiration date.
     */
    @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime expirationDate;

    /*
     * The token blob to be provided to the Azure Video Analyzer IoT edge
     * module through the Azure IoT Edge module twin properties.
     */
    @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY)
    private String token;

    /**
     * Get the expirationDate property: The expiration date of the registration token. The Azure Video Analyzer IoT edge
     * module must be initialized and connected to the Internet prior to the token expiration date.
     *
     * @return the expirationDate value.
     */
    public OffsetDateTime expirationDate() {
        return this.expirationDate;
    }

    /**
     * Get the token property: The token blob to be provided to the Azure Video Analyzer IoT edge module through the
     * Azure IoT Edge module twin properties.
     *
     * @return the token value.
     */
    public String token() {
        return this.token;
    }

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