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

package com.azure.resourcemanager.streamanalytics.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The common properties that are associated with Event Hub data sources. */
@Fluent
public class EventHubDataSourceProperties extends ServiceBusDataSourceProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubDataSourceProperties.class);

    /*
     * The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
     */
    @JsonProperty(value = "eventHubName")
    private String eventHubName;

    /**
     * Get the eventHubName property: The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
     *
     * @return the eventHubName value.
     */
    public String eventHubName() {
        return this.eventHubName;
    }

    /**
     * Set the eventHubName property: The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
     *
     * @param eventHubName the eventHubName value to set.
     * @return the EventHubDataSourceProperties object itself.
     */
    public EventHubDataSourceProperties withEventHubName(String eventHubName) {
        this.eventHubName = eventHubName;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventHubDataSourceProperties withServiceBusNamespace(String serviceBusNamespace) {
        super.withServiceBusNamespace(serviceBusNamespace);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventHubDataSourceProperties withSharedAccessPolicyName(String sharedAccessPolicyName) {
        super.withSharedAccessPolicyName(sharedAccessPolicyName);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventHubDataSourceProperties withSharedAccessPolicyKey(String sharedAccessPolicyKey) {
        super.withSharedAccessPolicyKey(sharedAccessPolicyKey);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventHubDataSourceProperties withAuthenticationMode(AuthenticationMode authenticationMode) {
        super.withAuthenticationMode(authenticationMode);
        return this;
    }

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