// 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.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The available data types for Amazon Web Services S3 data connector. */
@Fluent
public final class AwsS3DataConnectorDataTypes {
    /*
     * Logs data type.
     */
    @JsonProperty(value = "logs", required = true)
    private AwsS3DataConnectorDataTypesLogs logs;

    /**
     * Get the logs property: Logs data type.
     *
     * @return the logs value.
     */
    public AwsS3DataConnectorDataTypesLogs logs() {
        return this.logs;
    }

    /**
     * Set the logs property: Logs data type.
     *
     * @param logs the logs value to set.
     * @return the AwsS3DataConnectorDataTypes object itself.
     */
    public AwsS3DataConnectorDataTypes withLogs(AwsS3DataConnectorDataTypesLogs logs) {
        this.logs = logs;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (logs() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property logs in model AwsS3DataConnectorDataTypes"));
        } else {
            logs().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorDataTypes.class);
}
