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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.fluent.models.AwsS3DataConnectorProperties;
import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** Represents Amazon Web Services S3 data connector. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("AmazonWebServicesS3")
@Fluent
public final class AwsS3DataConnector extends DataConnectorInner {
    /*
     * Amazon Web Services S3 data connector properties.
     */
    @JsonProperty(value = "properties")
    private AwsS3DataConnectorProperties innerProperties;

    /**
     * Get the innerProperties property: Amazon Web Services S3 data connector properties.
     *
     * @return the innerProperties value.
     */
    private AwsS3DataConnectorProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public AwsS3DataConnector withEtag(String etag) {
        super.withEtag(etag);
        return this;
    }

    /**
     * Get the destinationTable property: The logs destination table name in LogAnalytics.
     *
     * @return the destinationTable value.
     */
    public String destinationTable() {
        return this.innerProperties() == null ? null : this.innerProperties().destinationTable();
    }

    /**
     * Set the destinationTable property: The logs destination table name in LogAnalytics.
     *
     * @param destinationTable the destinationTable value to set.
     * @return the AwsS3DataConnector object itself.
     */
    public AwsS3DataConnector withDestinationTable(String destinationTable) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AwsS3DataConnectorProperties();
        }
        this.innerProperties().withDestinationTable(destinationTable);
        return this;
    }

    /**
     * Get the sqsUrls property: The AWS sqs urls for the connector.
     *
     * @return the sqsUrls value.
     */
    public List<String> sqsUrls() {
        return this.innerProperties() == null ? null : this.innerProperties().sqsUrls();
    }

    /**
     * Set the sqsUrls property: The AWS sqs urls for the connector.
     *
     * @param sqsUrls the sqsUrls value to set.
     * @return the AwsS3DataConnector object itself.
     */
    public AwsS3DataConnector withSqsUrls(List<String> sqsUrls) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AwsS3DataConnectorProperties();
        }
        this.innerProperties().withSqsUrls(sqsUrls);
        return this;
    }

    /**
     * Get the roleArn property: The Aws Role Arn that is used to access the Aws account.
     *
     * @return the roleArn value.
     */
    public String roleArn() {
        return this.innerProperties() == null ? null : this.innerProperties().roleArn();
    }

    /**
     * Set the roleArn property: The Aws Role Arn that is used to access the Aws account.
     *
     * @param roleArn the roleArn value to set.
     * @return the AwsS3DataConnector object itself.
     */
    public AwsS3DataConnector withRoleArn(String roleArn) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AwsS3DataConnectorProperties();
        }
        this.innerProperties().withRoleArn(roleArn);
        return this;
    }

    /**
     * Get the dataTypes property: The available data types for the connector.
     *
     * @return the dataTypes value.
     */
    public AwsS3DataConnectorDataTypes dataTypes() {
        return this.innerProperties() == null ? null : this.innerProperties().dataTypes();
    }

    /**
     * Set the dataTypes property: The available data types for the connector.
     *
     * @param dataTypes the dataTypes value to set.
     * @return the AwsS3DataConnector object itself.
     */
    public AwsS3DataConnector withDataTypes(AwsS3DataConnectorDataTypes dataTypes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AwsS3DataConnectorProperties();
        }
        this.innerProperties().withDataTypes(dataTypes);
        return this;
    }

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