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

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Information that enables communication between the IoT Hub and the IoT device - allowing this edge module to act as a
 * transparent gateway between the two.
 */
@Fluent
public final class IotHubDeviceConnection {
    /*
     * The name of the IoT device configured and managed in IoT Hub.
     * (case-sensitive)
     */
    @JsonProperty(value = "deviceId", required = true)
    private String deviceId;

    /*
     * IoT device connection credentials. Currently IoT device symmetric key
     * credentials are supported.
     */
    @JsonProperty(value = "credentials")
    private CredentialsBase credentials;

    /**
     * Creates an instance of IotHubDeviceConnection class.
     *
     * @param deviceId the deviceId value to set.
     */
    @JsonCreator
    public IotHubDeviceConnection(@JsonProperty(value = "deviceId", required = true) String deviceId) {
        this.deviceId = deviceId;
    }

    /**
     * Get the deviceId property: The name of the IoT device configured and managed in IoT Hub. (case-sensitive).
     *
     * @return the deviceId value.
     */
    public String getDeviceId() {
        return this.deviceId;
    }

    /**
     * Get the credentials property: IoT device connection credentials. Currently IoT device symmetric key credentials
     * are supported.
     *
     * @return the credentials value.
     */
    public CredentialsBase getCredentials() {
        return this.credentials;
    }

    /**
     * Set the credentials property: IoT device connection credentials. Currently IoT device symmetric key credentials
     * are supported.
     *
     * @param credentials the credentials value to set.
     * @return the IotHubDeviceConnection object itself.
     */
    public IotHubDeviceConnection setCredentials(CredentialsBase credentials) {
        this.credentials = credentials;
        return this;
    }
}
