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

package com.azure.analytics.synapse.artifacts.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;

/** A copy activity Azure Search Index sink. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("AzureSearchIndexSink")
@Fluent
public final class AzureSearchIndexSink extends CopySink {
    /*
     * Specify the write behavior when upserting documents into Azure Search Index.
     */
    @JsonProperty(value = "writeBehavior")
    private AzureSearchIndexWriteBehaviorType writeBehavior;

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

    /**
     * Get the writeBehavior property: Specify the write behavior when upserting documents into Azure Search Index.
     *
     * @return the writeBehavior value.
     */
    public AzureSearchIndexWriteBehaviorType getWriteBehavior() {
        return this.writeBehavior;
    }

    /**
     * Set the writeBehavior property: Specify the write behavior when upserting documents into Azure Search Index.
     *
     * @param writeBehavior the writeBehavior value to set.
     * @return the AzureSearchIndexSink object itself.
     */
    public AzureSearchIndexSink setWriteBehavior(AzureSearchIndexWriteBehaviorType writeBehavior) {
        this.writeBehavior = writeBehavior;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSearchIndexSink setWriteBatchSize(Object writeBatchSize) {
        super.setWriteBatchSize(writeBatchSize);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSearchIndexSink setWriteBatchTimeout(Object writeBatchTimeout) {
        super.setWriteBatchTimeout(writeBatchTimeout);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSearchIndexSink setSinkRetryCount(Object sinkRetryCount) {
        super.setSinkRetryCount(sinkRetryCount);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSearchIndexSink setSinkRetryWait(Object sinkRetryWait) {
        super.setSinkRetryWait(sinkRetryWait);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSearchIndexSink setMaxConcurrentConnections(Object maxConcurrentConnections) {
        super.setMaxConcurrentConnections(maxConcurrentConnections);
        return this;
    }
}
