Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.iot.model.DescribeAuditMitigationActionsTaskResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for AWS Iot Service module holds the client classes that are used for communicating
with AWS IoT 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.iot.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
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 DescribeAuditMitigationActionsTaskResponse extends IotResponse implements
ToCopyableBuilder {
private static final SdkField TASK_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("taskStatus").getter(getter(DescribeAuditMitigationActionsTaskResponse::taskStatusAsString))
.setter(setter(Builder::taskStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStatus").build()).build();
private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("startTime").getter(getter(DescribeAuditMitigationActionsTaskResponse::startTime))
.setter(setter(Builder::startTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("startTime").build()).build();
private static final SdkField END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("endTime").getter(getter(DescribeAuditMitigationActionsTaskResponse::endTime))
.setter(setter(Builder::endTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endTime").build()).build();
private static final SdkField> TASK_STATISTICS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("taskStatistics")
.getter(getter(DescribeAuditMitigationActionsTaskResponse::taskStatistics))
.setter(setter(Builder::taskStatistics))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStatistics").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(TaskStatisticsForAuditCheck::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField TARGET_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("target")
.getter(getter(DescribeAuditMitigationActionsTaskResponse::target)).setter(setter(Builder::target))
.constructor(AuditMitigationActionsTaskTarget::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("target").build()).build();
private static final SdkField>> AUDIT_CHECK_TO_ACTIONS_MAPPING_FIELD = SdkField
.>> builder(MarshallingType.MAP)
.memberName("auditCheckToActionsMapping")
.getter(getter(DescribeAuditMitigationActionsTaskResponse::auditCheckToActionsMapping))
.setter(setter(Builder::auditCheckToActionsMapping))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("auditCheckToActionsMapping").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField.> builder(MarshallingType.LIST)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder()
.location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build())
.build()).build()).build()).build();
private static final SdkField> ACTIONS_DEFINITION_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("actionsDefinition")
.getter(getter(DescribeAuditMitigationActionsTaskResponse::actionsDefinition))
.setter(setter(Builder::actionsDefinition))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("actionsDefinition").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(MitigationAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TASK_STATUS_FIELD,
START_TIME_FIELD, END_TIME_FIELD, TASK_STATISTICS_FIELD, TARGET_FIELD, AUDIT_CHECK_TO_ACTIONS_MAPPING_FIELD,
ACTIONS_DEFINITION_FIELD));
private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private final String taskStatus;
private final Instant startTime;
private final Instant endTime;
private final Map taskStatistics;
private final AuditMitigationActionsTaskTarget target;
private final Map> auditCheckToActionsMapping;
private final List actionsDefinition;
private DescribeAuditMitigationActionsTaskResponse(BuilderImpl builder) {
super(builder);
this.taskStatus = builder.taskStatus;
this.startTime = builder.startTime;
this.endTime = builder.endTime;
this.taskStatistics = builder.taskStatistics;
this.target = builder.target;
this.auditCheckToActionsMapping = builder.auditCheckToActionsMapping;
this.actionsDefinition = builder.actionsDefinition;
}
/**
*
* The current status of the task.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #taskStatus} will
* return {@link AuditMitigationActionsTaskStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #taskStatusAsString}.
*
*
* @return The current status of the task.
* @see AuditMitigationActionsTaskStatus
*/
public final AuditMitigationActionsTaskStatus taskStatus() {
return AuditMitigationActionsTaskStatus.fromValue(taskStatus);
}
/**
*
* The current status of the task.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #taskStatus} will
* return {@link AuditMitigationActionsTaskStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #taskStatusAsString}.
*
*
* @return The current status of the task.
* @see AuditMitigationActionsTaskStatus
*/
public final String taskStatusAsString() {
return taskStatus;
}
/**
*
* The date and time when the task was started.
*
*
* @return The date and time when the task was started.
*/
public final Instant startTime() {
return startTime;
}
/**
*
* The date and time when the task was completed or canceled.
*
*
* @return The date and time when the task was completed or canceled.
*/
public final Instant endTime() {
return endTime;
}
/**
* For responses, this returns true if the service returned a value for the TaskStatistics property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasTaskStatistics() {
return taskStatistics != null && !(taskStatistics instanceof SdkAutoConstructMap);
}
/**
*
* Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation
* actions task.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTaskStatistics} method.
*
*
* @return Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit
* mitigation actions task.
*/
public final Map taskStatistics() {
return taskStatistics;
}
/**
*
* Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit task,
* or a set of findings.
*
*
* @return Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by
* audit task, or a set of findings.
*/
public final AuditMitigationActionsTaskTarget target() {
return target;
}
/**
* For responses, this returns true if the service returned a value for the AuditCheckToActionsMapping property.
* This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasAuditCheckToActionsMapping() {
return auditCheckToActionsMapping != null && !(auditCheckToActionsMapping instanceof SdkAutoConstructMap);
}
/**
*
* Specifies the mitigation actions that should be applied to specific audit checks.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasAuditCheckToActionsMapping} method.
*
*
* @return Specifies the mitigation actions that should be applied to specific audit checks.
*/
public final Map> auditCheckToActionsMapping() {
return auditCheckToActionsMapping;
}
/**
* For responses, this returns true if the service returned a value for the ActionsDefinition property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasActionsDefinition() {
return actionsDefinition != null && !(actionsDefinition instanceof SdkAutoConstructList);
}
/**
*
* Specifies the mitigation actions and their parameters that are applied as part of this task.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasActionsDefinition} method.
*
*
* @return Specifies the mitigation actions and their parameters that are applied as part of this task.
*/
public final List actionsDefinition() {
return actionsDefinition;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(taskStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(startTime());
hashCode = 31 * hashCode + Objects.hashCode(endTime());
hashCode = 31 * hashCode + Objects.hashCode(hasTaskStatistics() ? taskStatistics() : null);
hashCode = 31 * hashCode + Objects.hashCode(target());
hashCode = 31 * hashCode + Objects.hashCode(hasAuditCheckToActionsMapping() ? auditCheckToActionsMapping() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasActionsDefinition() ? actionsDefinition() : null);
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 DescribeAuditMitigationActionsTaskResponse)) {
return false;
}
DescribeAuditMitigationActionsTaskResponse other = (DescribeAuditMitigationActionsTaskResponse) obj;
return Objects.equals(taskStatusAsString(), other.taskStatusAsString()) && Objects.equals(startTime(), other.startTime())
&& Objects.equals(endTime(), other.endTime()) && hasTaskStatistics() == other.hasTaskStatistics()
&& Objects.equals(taskStatistics(), other.taskStatistics()) && Objects.equals(target(), other.target())
&& hasAuditCheckToActionsMapping() == other.hasAuditCheckToActionsMapping()
&& Objects.equals(auditCheckToActionsMapping(), other.auditCheckToActionsMapping())
&& hasActionsDefinition() == other.hasActionsDefinition()
&& Objects.equals(actionsDefinition(), other.actionsDefinition());
}
/**
* 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("DescribeAuditMitigationActionsTaskResponse").add("TaskStatus", taskStatusAsString())
.add("StartTime", startTime()).add("EndTime", endTime())
.add("TaskStatistics", hasTaskStatistics() ? taskStatistics() : null).add("Target", target())
.add("AuditCheckToActionsMapping", hasAuditCheckToActionsMapping() ? auditCheckToActionsMapping() : null)
.add("ActionsDefinition", hasActionsDefinition() ? actionsDefinition() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "taskStatus":
return Optional.ofNullable(clazz.cast(taskStatusAsString()));
case "startTime":
return Optional.ofNullable(clazz.cast(startTime()));
case "endTime":
return Optional.ofNullable(clazz.cast(endTime()));
case "taskStatistics":
return Optional.ofNullable(clazz.cast(taskStatistics()));
case "target":
return Optional.ofNullable(clazz.cast(target()));
case "auditCheckToActionsMapping":
return Optional.ofNullable(clazz.cast(auditCheckToActionsMapping()));
case "actionsDefinition":
return Optional.ofNullable(clazz.cast(actionsDefinition()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Map> memberNameToFieldInitializer() {
Map> map = new HashMap<>();
map.put("taskStatus", TASK_STATUS_FIELD);
map.put("startTime", START_TIME_FIELD);
map.put("endTime", END_TIME_FIELD);
map.put("taskStatistics", TASK_STATISTICS_FIELD);
map.put("target", TARGET_FIELD);
map.put("auditCheckToActionsMapping", AUDIT_CHECK_TO_ACTIONS_MAPPING_FIELD);
map.put("actionsDefinition", ACTIONS_DEFINITION_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function getter(Function g) {
return obj -> g.apply((DescribeAuditMitigationActionsTaskResponse) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends IotResponse.Builder, SdkPojo,
CopyableBuilder {
/**
*
* The current status of the task.
*
*
* @param taskStatus
* The current status of the task.
* @see AuditMitigationActionsTaskStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuditMitigationActionsTaskStatus
*/
Builder taskStatus(String taskStatus);
/**
*
* The current status of the task.
*
*
* @param taskStatus
* The current status of the task.
* @see AuditMitigationActionsTaskStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuditMitigationActionsTaskStatus
*/
Builder taskStatus(AuditMitigationActionsTaskStatus taskStatus);
/**
*
* The date and time when the task was started.
*
*
* @param startTime
* The date and time when the task was started.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder startTime(Instant startTime);
/**
*
* The date and time when the task was completed or canceled.
*
*
* @param endTime
* The date and time when the task was completed or canceled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder endTime(Instant endTime);
/**
*
* Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit
* mitigation actions task.
*
*
* @param taskStatistics
* Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit
* mitigation actions task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder taskStatistics(Map taskStatistics);
/**
*
* Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit
* task, or a set of findings.
*
*
* @param target
* Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by
* audit task, or a set of findings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder target(AuditMitigationActionsTaskTarget target);
/**
*
* Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit
* task, or a set of findings.
*
* This is a convenience method that creates an instance of the {@link AuditMitigationActionsTaskTarget.Builder}
* avoiding the need to create one manually via {@link AuditMitigationActionsTaskTarget#builder()}.
*
*
* When the {@link Consumer} completes, {@link AuditMitigationActionsTaskTarget.Builder#build()} is called
* immediately and its result is passed to {@link #target(AuditMitigationActionsTaskTarget)}.
*
* @param target
* a consumer that will call methods on {@link AuditMitigationActionsTaskTarget.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #target(AuditMitigationActionsTaskTarget)
*/
default Builder target(Consumer target) {
return target(AuditMitigationActionsTaskTarget.builder().applyMutation(target).build());
}
/**
*
* Specifies the mitigation actions that should be applied to specific audit checks.
*
*
* @param auditCheckToActionsMapping
* Specifies the mitigation actions that should be applied to specific audit checks.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder auditCheckToActionsMapping(Map> auditCheckToActionsMapping);
/**
*
* Specifies the mitigation actions and their parameters that are applied as part of this task.
*
*
* @param actionsDefinition
* Specifies the mitigation actions and their parameters that are applied as part of this task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder actionsDefinition(Collection actionsDefinition);
/**
*
* Specifies the mitigation actions and their parameters that are applied as part of this task.
*
*
* @param actionsDefinition
* Specifies the mitigation actions and their parameters that are applied as part of this task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder actionsDefinition(MitigationAction... actionsDefinition);
/**
*
* Specifies the mitigation actions and their parameters that are applied as part of this task.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.iot.model.MitigationAction.Builder} avoiding the need to create one
* manually via {@link software.amazon.awssdk.services.iot.model.MitigationAction#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.iot.model.MitigationAction.Builder#build()} is called immediately and
* its result is passed to {@link #actionsDefinition(List)}.
*
* @param actionsDefinition
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.iot.model.MitigationAction.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #actionsDefinition(java.util.Collection)
*/
Builder actionsDefinition(Consumer... actionsDefinition);
}
static final class BuilderImpl extends IotResponse.BuilderImpl implements Builder {
private String taskStatus;
private Instant startTime;
private Instant endTime;
private Map taskStatistics = DefaultSdkAutoConstructMap.getInstance();
private AuditMitigationActionsTaskTarget target;
private Map> auditCheckToActionsMapping = DefaultSdkAutoConstructMap.getInstance();
private List actionsDefinition = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(DescribeAuditMitigationActionsTaskResponse model) {
super(model);
taskStatus(model.taskStatus);
startTime(model.startTime);
endTime(model.endTime);
taskStatistics(model.taskStatistics);
target(model.target);
auditCheckToActionsMapping(model.auditCheckToActionsMapping);
actionsDefinition(model.actionsDefinition);
}
public final String getTaskStatus() {
return taskStatus;
}
public final void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
@Override
public final Builder taskStatus(String taskStatus) {
this.taskStatus = taskStatus;
return this;
}
@Override
public final Builder taskStatus(AuditMitigationActionsTaskStatus taskStatus) {
this.taskStatus(taskStatus == null ? null : taskStatus.toString());
return this;
}
public final Instant getStartTime() {
return startTime;
}
public final void setStartTime(Instant startTime) {
this.startTime = startTime;
}
@Override
public final Builder startTime(Instant startTime) {
this.startTime = startTime;
return this;
}
public final Instant getEndTime() {
return endTime;
}
public final void setEndTime(Instant endTime) {
this.endTime = endTime;
}
@Override
public final Builder endTime(Instant endTime) {
this.endTime = endTime;
return this;
}
public final Map getTaskStatistics() {
Map result = AuditMitigationActionsTaskStatisticsCopier
.copyToBuilder(this.taskStatistics);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setTaskStatistics(Map taskStatistics) {
this.taskStatistics = AuditMitigationActionsTaskStatisticsCopier.copyFromBuilder(taskStatistics);
}
@Override
public final Builder taskStatistics(Map taskStatistics) {
this.taskStatistics = AuditMitigationActionsTaskStatisticsCopier.copy(taskStatistics);
return this;
}
public final AuditMitigationActionsTaskTarget.Builder getTarget() {
return target != null ? target.toBuilder() : null;
}
public final void setTarget(AuditMitigationActionsTaskTarget.BuilderImpl target) {
this.target = target != null ? target.build() : null;
}
@Override
public final Builder target(AuditMitigationActionsTaskTarget target) {
this.target = target;
return this;
}
public final Map> getAuditCheckToActionsMapping() {
if (auditCheckToActionsMapping instanceof SdkAutoConstructMap) {
return null;
}
return auditCheckToActionsMapping;
}
public final void setAuditCheckToActionsMapping(Map> auditCheckToActionsMapping) {
this.auditCheckToActionsMapping = AuditCheckToActionsMappingCopier.copy(auditCheckToActionsMapping);
}
@Override
public final Builder auditCheckToActionsMapping(Map> auditCheckToActionsMapping) {
this.auditCheckToActionsMapping = AuditCheckToActionsMappingCopier.copy(auditCheckToActionsMapping);
return this;
}
public final List getActionsDefinition() {
List result = MitigationActionListCopier.copyToBuilder(this.actionsDefinition);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setActionsDefinition(Collection actionsDefinition) {
this.actionsDefinition = MitigationActionListCopier.copyFromBuilder(actionsDefinition);
}
@Override
public final Builder actionsDefinition(Collection actionsDefinition) {
this.actionsDefinition = MitigationActionListCopier.copy(actionsDefinition);
return this;
}
@Override
@SafeVarargs
public final Builder actionsDefinition(MitigationAction... actionsDefinition) {
actionsDefinition(Arrays.asList(actionsDefinition));
return this;
}
@Override
@SafeVarargs
public final Builder actionsDefinition(Consumer... actionsDefinition) {
actionsDefinition(Stream.of(actionsDefinition).map(c -> MitigationAction.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
@Override
public DescribeAuditMitigationActionsTaskResponse build() {
return new DescribeAuditMitigationActionsTaskResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
@Override
public Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
}
}