All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.macie2.model.GetAutomatedDiscoveryConfigurationResponse Maven / Gradle / Ivy

/*
 * 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.macie2.model;

import java.time.Instant;
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.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.core.traits.TimestampFormatTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class GetAutomatedDiscoveryConfigurationResponse extends Macie2Response implements
        ToCopyableBuilder {
    private static final SdkField CLASSIFICATION_SCOPE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("classificationScopeId")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::classificationScopeId))
            .setter(setter(Builder::classificationScopeId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("classificationScopeId").build())
            .build();

    private static final SdkField DISABLED_AT_FIELD = SdkField
            . builder(MarshallingType.INSTANT)
            .memberName("disabledAt")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::disabledAt))
            .setter(setter(Builder::disabledAt))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("disabledAt").build(),
                    TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build();

    private static final SdkField FIRST_ENABLED_AT_FIELD = SdkField
            . builder(MarshallingType.INSTANT)
            .memberName("firstEnabledAt")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::firstEnabledAt))
            .setter(setter(Builder::firstEnabledAt))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("firstEnabledAt").build(),
                    TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build();

    private static final SdkField LAST_UPDATED_AT_FIELD = SdkField
            . builder(MarshallingType.INSTANT)
            .memberName("lastUpdatedAt")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::lastUpdatedAt))
            .setter(setter(Builder::lastUpdatedAt))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedAt").build(),
                    TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build();

    private static final SdkField SENSITIVITY_INSPECTION_TEMPLATE_ID_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("sensitivityInspectionTemplateId")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::sensitivityInspectionTemplateId))
            .setter(setter(Builder::sensitivityInspectionTemplateId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sensitivityInspectionTemplateId")
                    .build()).build();

    private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
            .getter(getter(GetAutomatedDiscoveryConfigurationResponse::statusAsString)).setter(setter(Builder::status))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CLASSIFICATION_SCOPE_ID_FIELD,
            DISABLED_AT_FIELD, FIRST_ENABLED_AT_FIELD, LAST_UPDATED_AT_FIELD, SENSITIVITY_INSPECTION_TEMPLATE_ID_FIELD,
            STATUS_FIELD));

    private final String classificationScopeId;

    private final Instant disabledAt;

    private final Instant firstEnabledAt;

    private final Instant lastUpdatedAt;

    private final String sensitivityInspectionTemplateId;

    private final String status;

    private GetAutomatedDiscoveryConfigurationResponse(BuilderImpl builder) {
        super(builder);
        this.classificationScopeId = builder.classificationScopeId;
        this.disabledAt = builder.disabledAt;
        this.firstEnabledAt = builder.firstEnabledAt;
        this.lastUpdatedAt = builder.lastUpdatedAt;
        this.sensitivityInspectionTemplateId = builder.sensitivityInspectionTemplateId;
        this.status = builder.status;
    }

    /**
     * 

* The unique identifier for the classification scope that's used when performing automated sensitive data discovery * for the account. The classification scope specifies S3 buckets to exclude from automated sensitive data * discovery. *

* * @return The unique identifier for the classification scope that's used when performing automated sensitive data * discovery for the account. The classification scope specifies S3 buckets to exclude from automated * sensitive data discovery. */ public final String classificationScopeId() { return classificationScopeId; } /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most recently * disabled for the account. This value is null if automated sensitive data discovery wasn't enabled and * subsequently disabled for the account. *

* * @return The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most * recently disabled for the account. This value is null if automated sensitive data discovery wasn't * enabled and subsequently disabled for the account. */ public final Instant disabledAt() { return disabledAt; } /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was initially * enabled for the account. This value is null if automated sensitive data discovery has never been enabled for the * account. *

* * @return The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was * initially enabled for the account. This value is null if automated sensitive data discovery has never * been enabled for the account. */ public final Instant firstEnabledAt() { return firstEnabledAt; } /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most recently * enabled or disabled for the account. *

* * @return The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most * recently enabled or disabled for the account. */ public final Instant lastUpdatedAt() { return lastUpdatedAt; } /** *

* The unique identifier for the sensitivity inspection template that's used when performing automated sensitive * data discovery for the account. The template specifies which allow lists, custom data identifiers, and managed * data identifiers to use when analyzing data. *

* * @return The unique identifier for the sensitivity inspection template that's used when performing automated * sensitive data discovery for the account. The template specifies which allow lists, custom data * identifiers, and managed data identifiers to use when analyzing data. */ public final String sensitivityInspectionTemplateId() { return sensitivityInspectionTemplateId; } /** *

* The current status of the automated sensitive data discovery configuration for the account. Possible values are: * ENABLED, use the specified settings to perform automated sensitive data discovery activities for the account; * and, DISABLED, don't perform automated sensitive data discovery activities for the account. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link AutomatedDiscoveryStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

* * @return The current status of the automated sensitive data discovery configuration for the account. Possible * values are: ENABLED, use the specified settings to perform automated sensitive data discovery activities * for the account; and, DISABLED, don't perform automated sensitive data discovery activities for the * account. * @see AutomatedDiscoveryStatus */ public final AutomatedDiscoveryStatus status() { return AutomatedDiscoveryStatus.fromValue(status); } /** *

* The current status of the automated sensitive data discovery configuration for the account. Possible values are: * ENABLED, use the specified settings to perform automated sensitive data discovery activities for the account; * and, DISABLED, don't perform automated sensitive data discovery activities for the account. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link AutomatedDiscoveryStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

* * @return The current status of the automated sensitive data discovery configuration for the account. Possible * values are: ENABLED, use the specified settings to perform automated sensitive data discovery activities * for the account; and, DISABLED, don't perform automated sensitive data discovery activities for the * account. * @see AutomatedDiscoveryStatus */ public final String statusAsString() { return status; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(classificationScopeId()); hashCode = 31 * hashCode + Objects.hashCode(disabledAt()); hashCode = 31 * hashCode + Objects.hashCode(firstEnabledAt()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedAt()); hashCode = 31 * hashCode + Objects.hashCode(sensitivityInspectionTemplateId()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetAutomatedDiscoveryConfigurationResponse)) { return false; } GetAutomatedDiscoveryConfigurationResponse other = (GetAutomatedDiscoveryConfigurationResponse) obj; return Objects.equals(classificationScopeId(), other.classificationScopeId()) && Objects.equals(disabledAt(), other.disabledAt()) && Objects.equals(firstEnabledAt(), other.firstEnabledAt()) && Objects.equals(lastUpdatedAt(), other.lastUpdatedAt()) && Objects.equals(sensitivityInspectionTemplateId(), other.sensitivityInspectionTemplateId()) && Objects.equals(statusAsString(), other.statusAsString()); } /** * 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("GetAutomatedDiscoveryConfigurationResponse") .add("ClassificationScopeId", classificationScopeId()).add("DisabledAt", disabledAt()) .add("FirstEnabledAt", firstEnabledAt()).add("LastUpdatedAt", lastUpdatedAt()) .add("SensitivityInspectionTemplateId", sensitivityInspectionTemplateId()).add("Status", statusAsString()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "classificationScopeId": return Optional.ofNullable(clazz.cast(classificationScopeId())); case "disabledAt": return Optional.ofNullable(clazz.cast(disabledAt())); case "firstEnabledAt": return Optional.ofNullable(clazz.cast(firstEnabledAt())); case "lastUpdatedAt": return Optional.ofNullable(clazz.cast(lastUpdatedAt())); case "sensitivityInspectionTemplateId": return Optional.ofNullable(clazz.cast(sensitivityInspectionTemplateId())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetAutomatedDiscoveryConfigurationResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends Macie2Response.Builder, SdkPojo, CopyableBuilder { /** *

* The unique identifier for the classification scope that's used when performing automated sensitive data * discovery for the account. The classification scope specifies S3 buckets to exclude from automated sensitive * data discovery. *

* * @param classificationScopeId * The unique identifier for the classification scope that's used when performing automated sensitive * data discovery for the account. The classification scope specifies S3 buckets to exclude from * automated sensitive data discovery. * @return Returns a reference to this object so that method calls can be chained together. */ Builder classificationScopeId(String classificationScopeId); /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most * recently disabled for the account. This value is null if automated sensitive data discovery wasn't enabled * and subsequently disabled for the account. *

* * @param disabledAt * The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was * most recently disabled for the account. This value is null if automated sensitive data discovery * wasn't enabled and subsequently disabled for the account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder disabledAt(Instant disabledAt); /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was initially * enabled for the account. This value is null if automated sensitive data discovery has never been enabled for * the account. *

* * @param firstEnabledAt * The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was * initially enabled for the account. This value is null if automated sensitive data discovery has never * been enabled for the account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder firstEnabledAt(Instant firstEnabledAt); /** *

* The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was most * recently enabled or disabled for the account. *

* * @param lastUpdatedAt * The date and time, in UTC and extended ISO 8601 format, when automated sensitive data discovery was * most recently enabled or disabled for the account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdatedAt(Instant lastUpdatedAt); /** *

* The unique identifier for the sensitivity inspection template that's used when performing automated sensitive * data discovery for the account. The template specifies which allow lists, custom data identifiers, and * managed data identifiers to use when analyzing data. *

* * @param sensitivityInspectionTemplateId * The unique identifier for the sensitivity inspection template that's used when performing automated * sensitive data discovery for the account. The template specifies which allow lists, custom data * identifiers, and managed data identifiers to use when analyzing data. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sensitivityInspectionTemplateId(String sensitivityInspectionTemplateId); /** *

* The current status of the automated sensitive data discovery configuration for the account. Possible values * are: ENABLED, use the specified settings to perform automated sensitive data discovery activities for the * account; and, DISABLED, don't perform automated sensitive data discovery activities for the account. *

* * @param status * The current status of the automated sensitive data discovery configuration for the account. Possible * values are: ENABLED, use the specified settings to perform automated sensitive data discovery * activities for the account; and, DISABLED, don't perform automated sensitive data discovery activities * for the account. * @see AutomatedDiscoveryStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AutomatedDiscoveryStatus */ Builder status(String status); /** *

* The current status of the automated sensitive data discovery configuration for the account. Possible values * are: ENABLED, use the specified settings to perform automated sensitive data discovery activities for the * account; and, DISABLED, don't perform automated sensitive data discovery activities for the account. *

* * @param status * The current status of the automated sensitive data discovery configuration for the account. Possible * values are: ENABLED, use the specified settings to perform automated sensitive data discovery * activities for the account; and, DISABLED, don't perform automated sensitive data discovery activities * for the account. * @see AutomatedDiscoveryStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AutomatedDiscoveryStatus */ Builder status(AutomatedDiscoveryStatus status); } static final class BuilderImpl extends Macie2Response.BuilderImpl implements Builder { private String classificationScopeId; private Instant disabledAt; private Instant firstEnabledAt; private Instant lastUpdatedAt; private String sensitivityInspectionTemplateId; private String status; private BuilderImpl() { } private BuilderImpl(GetAutomatedDiscoveryConfigurationResponse model) { super(model); classificationScopeId(model.classificationScopeId); disabledAt(model.disabledAt); firstEnabledAt(model.firstEnabledAt); lastUpdatedAt(model.lastUpdatedAt); sensitivityInspectionTemplateId(model.sensitivityInspectionTemplateId); status(model.status); } public final String getClassificationScopeId() { return classificationScopeId; } public final void setClassificationScopeId(String classificationScopeId) { this.classificationScopeId = classificationScopeId; } @Override public final Builder classificationScopeId(String classificationScopeId) { this.classificationScopeId = classificationScopeId; return this; } public final Instant getDisabledAt() { return disabledAt; } public final void setDisabledAt(Instant disabledAt) { this.disabledAt = disabledAt; } @Override public final Builder disabledAt(Instant disabledAt) { this.disabledAt = disabledAt; return this; } public final Instant getFirstEnabledAt() { return firstEnabledAt; } public final void setFirstEnabledAt(Instant firstEnabledAt) { this.firstEnabledAt = firstEnabledAt; } @Override public final Builder firstEnabledAt(Instant firstEnabledAt) { this.firstEnabledAt = firstEnabledAt; return this; } public final Instant getLastUpdatedAt() { return lastUpdatedAt; } public final void setLastUpdatedAt(Instant lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } @Override public final Builder lastUpdatedAt(Instant lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; return this; } public final String getSensitivityInspectionTemplateId() { return sensitivityInspectionTemplateId; } public final void setSensitivityInspectionTemplateId(String sensitivityInspectionTemplateId) { this.sensitivityInspectionTemplateId = sensitivityInspectionTemplateId; } @Override public final Builder sensitivityInspectionTemplateId(String sensitivityInspectionTemplateId) { this.sensitivityInspectionTemplateId = sensitivityInspectionTemplateId; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(AutomatedDiscoveryStatus status) { this.status(status == null ? null : status.toString()); return this; } @Override public GetAutomatedDiscoveryConfigurationResponse build() { return new GetAutomatedDiscoveryConfigurationResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy