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

package com.azure.resourcemanager.security.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * The target Event Hub to which event data will be exported. To learn more about Microsoft Defender for Cloud
 * continuous export capabilities, visit https://aka.ms/ASCExportLearnMore.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType")
@JsonTypeName("EventHub")
@Fluent
public final class AutomationActionEventHub extends AutomationAction {
    /*
     * The target Event Hub Azure Resource ID.
     */
    @JsonProperty(value = "eventHubResourceId")
    private String eventHubResourceId;

    /*
     * The target Event Hub SAS policy name.
     */
    @JsonProperty(value = "sasPolicyName", access = JsonProperty.Access.WRITE_ONLY)
    private String sasPolicyName;

    /*
     * The target Event Hub connection string (it will not be included in any response).
     */
    @JsonProperty(value = "connectionString")
    private String connectionString;

    /** Creates an instance of AutomationActionEventHub class. */
    public AutomationActionEventHub() {
    }

    /**
     * Get the eventHubResourceId property: The target Event Hub Azure Resource ID.
     *
     * @return the eventHubResourceId value.
     */
    public String eventHubResourceId() {
        return this.eventHubResourceId;
    }

    /**
     * Set the eventHubResourceId property: The target Event Hub Azure Resource ID.
     *
     * @param eventHubResourceId the eventHubResourceId value to set.
     * @return the AutomationActionEventHub object itself.
     */
    public AutomationActionEventHub withEventHubResourceId(String eventHubResourceId) {
        this.eventHubResourceId = eventHubResourceId;
        return this;
    }

    /**
     * Get the sasPolicyName property: The target Event Hub SAS policy name.
     *
     * @return the sasPolicyName value.
     */
    public String sasPolicyName() {
        return this.sasPolicyName;
    }

    /**
     * Get the connectionString property: The target Event Hub connection string (it will not be included in any
     * response).
     *
     * @return the connectionString value.
     */
    public String connectionString() {
        return this.connectionString;
    }

    /**
     * Set the connectionString property: The target Event Hub connection string (it will not be included in any
     * response).
     *
     * @param connectionString the connectionString value to set.
     * @return the AutomationActionEventHub object itself.
     */
    public AutomationActionEventHub withConnectionString(String connectionString) {
        this.connectionString = connectionString;
        return this;
    }

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