// 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.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The properties that are associated with an Azure Table output. */
@Fluent
public final class AzureTableOutputDataSourceProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureTableOutputDataSourceProperties.class);

    /*
     * The name of the Azure Storage account. Required on PUT (CreateOrReplace)
     * requests.
     */
    @JsonProperty(value = "accountName")
    private String accountName;

    /*
     * The account key for the Azure Storage account. Required on PUT
     * (CreateOrReplace) requests.
     */
    @JsonProperty(value = "accountKey")
    private String accountKey;

    /*
     * The name of the Azure Table. Required on PUT (CreateOrReplace) requests.
     */
    @JsonProperty(value = "table")
    private String table;

    /*
     * This element indicates the name of a column from the SELECT statement in
     * the query that will be used as the partition key for the Azure Table.
     * Required on PUT (CreateOrReplace) requests.
     */
    @JsonProperty(value = "partitionKey")
    private String partitionKey;

    /*
     * This element indicates the name of a column from the SELECT statement in
     * the query that will be used as the row key for the Azure Table. Required
     * on PUT (CreateOrReplace) requests.
     */
    @JsonProperty(value = "rowKey")
    private String rowKey;

    /*
     * If specified, each item in the array is the name of a column to remove
     * (if present) from output event entities.
     */
    @JsonProperty(value = "columnsToRemove")
    private List<String> columnsToRemove;

    /*
     * The number of rows to write to the Azure Table at a time.
     */
    @JsonProperty(value = "batchSize")
    private Integer batchSize;

    /**
     * Get the accountName property: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
     *
     * @return the accountName value.
     */
    public String accountName() {
        return this.accountName;
    }

    /**
     * Set the accountName property: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
     *
     * @param accountName the accountName value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withAccountName(String accountName) {
        this.accountName = accountName;
        return this;
    }

    /**
     * Get the accountKey property: The account key for the Azure Storage account. Required on PUT (CreateOrReplace)
     * requests.
     *
     * @return the accountKey value.
     */
    public String accountKey() {
        return this.accountKey;
    }

    /**
     * Set the accountKey property: The account key for the Azure Storage account. Required on PUT (CreateOrReplace)
     * requests.
     *
     * @param accountKey the accountKey value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withAccountKey(String accountKey) {
        this.accountKey = accountKey;
        return this;
    }

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

    /**
     * Set the table property: The name of the Azure Table. Required on PUT (CreateOrReplace) requests.
     *
     * @param table the table value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withTable(String table) {
        this.table = table;
        return this;
    }

    /**
     * Get the partitionKey property: This element indicates the name of a column from the SELECT statement in the query
     * that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.
     *
     * @return the partitionKey value.
     */
    public String partitionKey() {
        return this.partitionKey;
    }

    /**
     * Set the partitionKey property: This element indicates the name of a column from the SELECT statement in the query
     * that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.
     *
     * @param partitionKey the partitionKey value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withPartitionKey(String partitionKey) {
        this.partitionKey = partitionKey;
        return this;
    }

    /**
     * Get the rowKey property: This element indicates the name of a column from the SELECT statement in the query that
     * will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.
     *
     * @return the rowKey value.
     */
    public String rowKey() {
        return this.rowKey;
    }

    /**
     * Set the rowKey property: This element indicates the name of a column from the SELECT statement in the query that
     * will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.
     *
     * @param rowKey the rowKey value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withRowKey(String rowKey) {
        this.rowKey = rowKey;
        return this;
    }

    /**
     * Get the columnsToRemove property: If specified, each item in the array is the name of a column to remove (if
     * present) from output event entities.
     *
     * @return the columnsToRemove value.
     */
    public List<String> columnsToRemove() {
        return this.columnsToRemove;
    }

    /**
     * Set the columnsToRemove property: If specified, each item in the array is the name of a column to remove (if
     * present) from output event entities.
     *
     * @param columnsToRemove the columnsToRemove value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withColumnsToRemove(List<String> columnsToRemove) {
        this.columnsToRemove = columnsToRemove;
        return this;
    }

    /**
     * Get the batchSize property: The number of rows to write to the Azure Table at a time.
     *
     * @return the batchSize value.
     */
    public Integer batchSize() {
        return this.batchSize;
    }

    /**
     * Set the batchSize property: The number of rows to write to the Azure Table at a time.
     *
     * @param batchSize the batchSize value to set.
     * @return the AzureTableOutputDataSourceProperties object itself.
     */
    public AzureTableOutputDataSourceProperties withBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
        return this;
    }

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