// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.streamanalytics.models.AuthenticationMode;
import com.azure.resourcemanager.streamanalytics.models.EventHubDataSourceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties that are associated with a Event Hub input containing stream data. */
@Fluent
public final class EventHubStreamInputDataSourceProperties extends EventHubDataSourceProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubStreamInputDataSourceProperties.class);

    /*
     * The name of an Event Hub Consumer Group that should be used to read
     * events from the Event Hub. Specifying distinct consumer group names for
     * multiple inputs allows each of those inputs to receive the same events
     * from the Event Hub. If not specified, the input uses the Event Hub’s
     * default consumer group.
     */
    @JsonProperty(value = "consumerGroupName")
    private String consumerGroupName;

    /**
     * Get the consumerGroupName property: The name of an Event Hub Consumer Group that should be used to read events
     * from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to
     * receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer
     * group.
     *
     * @return the consumerGroupName value.
     */
    public String consumerGroupName() {
        return this.consumerGroupName;
    }

    /**
     * Set the consumerGroupName property: The name of an Event Hub Consumer Group that should be used to read events
     * from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to
     * receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer
     * group.
     *
     * @param consumerGroupName the consumerGroupName value to set.
     * @return the EventHubStreamInputDataSourceProperties object itself.
     */
    public EventHubStreamInputDataSourceProperties withConsumerGroupName(String consumerGroupName) {
        this.consumerGroupName = consumerGroupName;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public EventHubStreamInputDataSourceProperties withEventHubName(String eventHubName) {
        super.withEventHubName(eventHubName);
        return this;
    }

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

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

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

    /** {@inheritDoc} */
    @Override
    public EventHubStreamInputDataSourceProperties 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();
    }
}
