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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.timeseriesinsights.models.EventHubEventSourceResource;
import com.azure.resourcemanager.timeseriesinsights.models.IoTHubEventSourceResource;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.Map;

/**
 * An environment receives data from one or more event sources. Each event source has associated connection info that
 * allows the Time Series Insights ingress pipeline to connect to and pull data from the event source.
 */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "kind",
    defaultImpl = EventSourceResourceInner.class)
@JsonTypeName("EventSourceResource")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "Microsoft.EventHub", value = EventHubEventSourceResource.class),
    @JsonSubTypes.Type(name = "Microsoft.IoTHub", value = IoTHubEventSourceResource.class)
})
@Fluent
public class EventSourceResourceInner extends Resource {
    /** Creates an instance of EventSourceResourceInner class. */
    public EventSourceResourceInner() {
    }

    /** {@inheritDoc} */
    @Override
    public EventSourceResourceInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventSourceResourceInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

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