// 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;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Base class for topology source nodes. */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.PROPERTY,
        property = "@type",
        defaultImpl = SourceNodeBase.class)
@JsonTypeName("SourceNodeBase")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.RtspSource", value = RtspSource.class),
    @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.IotHubMessageSource", value = IotHubMessageSource.class)
})
@Fluent
public class SourceNodeBase {
    /*
     * Node name. Must be unique within the topology.
     */
    @JsonProperty(value = "name", required = true)
    private String name;

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

    /**
     * Get the name property: Node name. Must be unique within the topology.
     *
     * @return the name value.
     */
    public String getName() {
        return this.name;
    }
}
