software.amazon.awssdk.services.guardduty.model.DataSourceConfigurationsResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guardduty Show documentation
Show all versions of guardduty Show documentation
The AWS Java SDK for Amazon GuardDuty module holds the client classes that are used for communicating
with Amazon GuardDuty Service
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.guardduty.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Contains information on the status of data sources for the detector.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DataSourceConfigurationsResult implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField CLOUD_TRAIL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CloudTrail")
.getter(getter(DataSourceConfigurationsResult::cloudTrail)).setter(setter(Builder::cloudTrail))
.constructor(CloudTrailConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cloudTrail").build()).build();
private static final SdkField DNS_LOGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DNSLogs")
.getter(getter(DataSourceConfigurationsResult::dnsLogs)).setter(setter(Builder::dnsLogs))
.constructor(DNSLogsConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dnsLogs").build()).build();
private static final SdkField FLOW_LOGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("FlowLogs")
.getter(getter(DataSourceConfigurationsResult::flowLogs)).setter(setter(Builder::flowLogs))
.constructor(FlowLogsConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("flowLogs").build()).build();
private static final SdkField S3_LOGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3Logs")
.getter(getter(DataSourceConfigurationsResult::s3Logs)).setter(setter(Builder::s3Logs))
.constructor(S3LogsConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("s3Logs").build()).build();
private static final SdkField KUBERNETES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Kubernetes")
.getter(getter(DataSourceConfigurationsResult::kubernetes)).setter(setter(Builder::kubernetes))
.constructor(KubernetesConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kubernetes").build()).build();
private static final SdkField MALWARE_PROTECTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("MalwareProtection")
.getter(getter(DataSourceConfigurationsResult::malwareProtection)).setter(setter(Builder::malwareProtection))
.constructor(MalwareProtectionConfigurationResult::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("malwareProtection").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CLOUD_TRAIL_FIELD,
DNS_LOGS_FIELD, FLOW_LOGS_FIELD, S3_LOGS_FIELD, KUBERNETES_FIELD, MALWARE_PROTECTION_FIELD));
private static final long serialVersionUID = 1L;
private final CloudTrailConfigurationResult cloudTrail;
private final DNSLogsConfigurationResult dnsLogs;
private final FlowLogsConfigurationResult flowLogs;
private final S3LogsConfigurationResult s3Logs;
private final KubernetesConfigurationResult kubernetes;
private final MalwareProtectionConfigurationResult malwareProtection;
private DataSourceConfigurationsResult(BuilderImpl builder) {
this.cloudTrail = builder.cloudTrail;
this.dnsLogs = builder.dnsLogs;
this.flowLogs = builder.flowLogs;
this.s3Logs = builder.s3Logs;
this.kubernetes = builder.kubernetes;
this.malwareProtection = builder.malwareProtection;
}
/**
*
* An object that contains information on the status of CloudTrail as a data source.
*
*
* @return An object that contains information on the status of CloudTrail as a data source.
*/
public final CloudTrailConfigurationResult cloudTrail() {
return cloudTrail;
}
/**
*
* An object that contains information on the status of DNS logs as a data source.
*
*
* @return An object that contains information on the status of DNS logs as a data source.
*/
public final DNSLogsConfigurationResult dnsLogs() {
return dnsLogs;
}
/**
*
* An object that contains information on the status of VPC flow logs as a data source.
*
*
* @return An object that contains information on the status of VPC flow logs as a data source.
*/
public final FlowLogsConfigurationResult flowLogs() {
return flowLogs;
}
/**
*
* An object that contains information on the status of S3 Data event logs as a data source.
*
*
* @return An object that contains information on the status of S3 Data event logs as a data source.
*/
public final S3LogsConfigurationResult s3Logs() {
return s3Logs;
}
/**
*
* An object that contains information on the status of all Kubernetes data sources.
*
*
* @return An object that contains information on the status of all Kubernetes data sources.
*/
public final KubernetesConfigurationResult kubernetes() {
return kubernetes;
}
/**
*
* Describes the configuration of Malware Protection data sources.
*
*
* @return Describes the configuration of Malware Protection data sources.
*/
public final MalwareProtectionConfigurationResult malwareProtection() {
return malwareProtection;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(cloudTrail());
hashCode = 31 * hashCode + Objects.hashCode(dnsLogs());
hashCode = 31 * hashCode + Objects.hashCode(flowLogs());
hashCode = 31 * hashCode + Objects.hashCode(s3Logs());
hashCode = 31 * hashCode + Objects.hashCode(kubernetes());
hashCode = 31 * hashCode + Objects.hashCode(malwareProtection());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DataSourceConfigurationsResult)) {
return false;
}
DataSourceConfigurationsResult other = (DataSourceConfigurationsResult) obj;
return Objects.equals(cloudTrail(), other.cloudTrail()) && Objects.equals(dnsLogs(), other.dnsLogs())
&& Objects.equals(flowLogs(), other.flowLogs()) && Objects.equals(s3Logs(), other.s3Logs())
&& Objects.equals(kubernetes(), other.kubernetes())
&& Objects.equals(malwareProtection(), other.malwareProtection());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("DataSourceConfigurationsResult").add("CloudTrail", cloudTrail()).add("DNSLogs", dnsLogs())
.add("FlowLogs", flowLogs()).add("S3Logs", s3Logs()).add("Kubernetes", kubernetes())
.add("MalwareProtection", malwareProtection()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "CloudTrail":
return Optional.ofNullable(clazz.cast(cloudTrail()));
case "DNSLogs":
return Optional.ofNullable(clazz.cast(dnsLogs()));
case "FlowLogs":
return Optional.ofNullable(clazz.cast(flowLogs()));
case "S3Logs":
return Optional.ofNullable(clazz.cast(s3Logs()));
case "Kubernetes":
return Optional.ofNullable(clazz.cast(kubernetes()));
case "MalwareProtection":
return Optional.ofNullable(clazz.cast(malwareProtection()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy