// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.appflow.outputs;

import com.pulumi.aws.appflow.outputs.FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataErrorHandlingConfig;
import com.pulumi.aws.appflow.outputs.FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataSuccessResponseHandlingConfig;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData {
    /**
     * @return Settings that determine how Amazon AppFlow handles an error when placing data in the destination. See Error Handling Config for more details.
     * 
     */
    private @Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataErrorHandlingConfig errorHandlingConfig;
    /**
     * @return Name of the field that Amazon AppFlow uses as an ID when performing a write operation such as update, delete, or upsert.
     * 
     */
    private @Nullable List<String> idFieldNames;
    /**
     * @return Object path specified in the SAPOData flow destination.
     * 
     */
    private String objectPath;
    /**
     * @return Determines how Amazon AppFlow handles the success response that it gets from the connector after placing data. See Success Response Handling Config for more details.
     * 
     */
    private @Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataSuccessResponseHandlingConfig successResponseHandlingConfig;
    /**
     * @return Type of write operation to be performed in the custom connector when it&#39;s used as destination. Valid values are `INSERT`, `UPSERT`, `UPDATE`, and `DELETE`.
     * 
     */
    private @Nullable String writeOperationType;

    private FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData() {}
    /**
     * @return Settings that determine how Amazon AppFlow handles an error when placing data in the destination. See Error Handling Config for more details.
     * 
     */
    public Optional<FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataErrorHandlingConfig> errorHandlingConfig() {
        return Optional.ofNullable(this.errorHandlingConfig);
    }
    /**
     * @return Name of the field that Amazon AppFlow uses as an ID when performing a write operation such as update, delete, or upsert.
     * 
     */
    public List<String> idFieldNames() {
        return this.idFieldNames == null ? List.of() : this.idFieldNames;
    }
    /**
     * @return Object path specified in the SAPOData flow destination.
     * 
     */
    public String objectPath() {
        return this.objectPath;
    }
    /**
     * @return Determines how Amazon AppFlow handles the success response that it gets from the connector after placing data. See Success Response Handling Config for more details.
     * 
     */
    public Optional<FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataSuccessResponseHandlingConfig> successResponseHandlingConfig() {
        return Optional.ofNullable(this.successResponseHandlingConfig);
    }
    /**
     * @return Type of write operation to be performed in the custom connector when it&#39;s used as destination. Valid values are `INSERT`, `UPSERT`, `UPDATE`, and `DELETE`.
     * 
     */
    public Optional<String> writeOperationType() {
        return Optional.ofNullable(this.writeOperationType);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataErrorHandlingConfig errorHandlingConfig;
        private @Nullable List<String> idFieldNames;
        private String objectPath;
        private @Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataSuccessResponseHandlingConfig successResponseHandlingConfig;
        private @Nullable String writeOperationType;
        public Builder() {}
        public Builder(FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.errorHandlingConfig = defaults.errorHandlingConfig;
    	      this.idFieldNames = defaults.idFieldNames;
    	      this.objectPath = defaults.objectPath;
    	      this.successResponseHandlingConfig = defaults.successResponseHandlingConfig;
    	      this.writeOperationType = defaults.writeOperationType;
        }

        @CustomType.Setter
        public Builder errorHandlingConfig(@Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataErrorHandlingConfig errorHandlingConfig) {
            this.errorHandlingConfig = errorHandlingConfig;
            return this;
        }
        @CustomType.Setter
        public Builder idFieldNames(@Nullable List<String> idFieldNames) {
            this.idFieldNames = idFieldNames;
            return this;
        }
        public Builder idFieldNames(String... idFieldNames) {
            return idFieldNames(List.of(idFieldNames));
        }
        @CustomType.Setter
        public Builder objectPath(String objectPath) {
            this.objectPath = Objects.requireNonNull(objectPath);
            return this;
        }
        @CustomType.Setter
        public Builder successResponseHandlingConfig(@Nullable FlowDestinationFlowConfigDestinationConnectorPropertiesSapoDataSuccessResponseHandlingConfig successResponseHandlingConfig) {
            this.successResponseHandlingConfig = successResponseHandlingConfig;
            return this;
        }
        @CustomType.Setter
        public Builder writeOperationType(@Nullable String writeOperationType) {
            this.writeOperationType = writeOperationType;
            return this;
        }
        public FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData build() {
            final var o = new FlowDestinationFlowConfigDestinationConnectorPropertiesSapoData();
            o.errorHandlingConfig = errorHandlingConfig;
            o.idFieldNames = idFieldNames;
            o.objectPath = objectPath;
            o.successResponseHandlingConfig = successResponseHandlingConfig;
            o.writeOperationType = writeOperationType;
            return o;
        }
    }
}
