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

software.amazon.awssdk.services.iot.model.DetectMitigationActionsTaskSummary 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

There is a newer version: 2.30.1
Show newest version
/*
 * 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.io.Serializable;
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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The summary of the mitigation action tasks. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DetectMitigationActionsTaskSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TASK_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("taskId") .getter(getter(DetectMitigationActionsTaskSummary::taskId)).setter(setter(Builder::taskId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskId").build()).build(); private static final SdkField TASK_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("taskStatus").getter(getter(DetectMitigationActionsTaskSummary::taskStatusAsString)) .setter(setter(Builder::taskStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStatus").build()).build(); private static final SdkField TASK_START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("taskStartTime").getter(getter(DetectMitigationActionsTaskSummary::taskStartTime)) .setter(setter(Builder::taskStartTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStartTime").build()).build(); private static final SdkField TASK_END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("taskEndTime").getter(getter(DetectMitigationActionsTaskSummary::taskEndTime)) .setter(setter(Builder::taskEndTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskEndTime").build()).build(); private static final SdkField TARGET_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("target") .getter(getter(DetectMitigationActionsTaskSummary::target)).setter(setter(Builder::target)) .constructor(DetectMitigationActionsTaskTarget::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("target").build()).build(); private static final SdkField VIOLATION_EVENT_OCCURRENCE_RANGE_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("violationEventOccurrenceRange") .getter(getter(DetectMitigationActionsTaskSummary::violationEventOccurrenceRange)) .setter(setter(Builder::violationEventOccurrenceRange)) .constructor(ViolationEventOccurrenceRange::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("violationEventOccurrenceRange") .build()).build(); private static final SdkField ONLY_ACTIVE_VIOLATIONS_INCLUDED_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("onlyActiveViolationsIncluded") .getter(getter(DetectMitigationActionsTaskSummary::onlyActiveViolationsIncluded)) .setter(setter(Builder::onlyActiveViolationsIncluded)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("onlyActiveViolationsIncluded") .build()).build(); private static final SdkField SUPPRESSED_ALERTS_INCLUDED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("suppressedAlertsIncluded").getter(getter(DetectMitigationActionsTaskSummary::suppressedAlertsIncluded)) .setter(setter(Builder::suppressedAlertsIncluded)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("suppressedAlertsIncluded").build()) .build(); private static final SdkField> ACTIONS_DEFINITION_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("actionsDefinition") .getter(getter(DetectMitigationActionsTaskSummary::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 SdkField TASK_STATISTICS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("taskStatistics") .getter(getter(DetectMitigationActionsTaskSummary::taskStatistics)).setter(setter(Builder::taskStatistics)) .constructor(DetectMitigationActionsTaskStatistics::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStatistics").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TASK_ID_FIELD, TASK_STATUS_FIELD, TASK_START_TIME_FIELD, TASK_END_TIME_FIELD, TARGET_FIELD, VIOLATION_EVENT_OCCURRENCE_RANGE_FIELD, ONLY_ACTIVE_VIOLATIONS_INCLUDED_FIELD, SUPPRESSED_ALERTS_INCLUDED_FIELD, ACTIONS_DEFINITION_FIELD, TASK_STATISTICS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String taskId; private final String taskStatus; private final Instant taskStartTime; private final Instant taskEndTime; private final DetectMitigationActionsTaskTarget target; private final ViolationEventOccurrenceRange violationEventOccurrenceRange; private final Boolean onlyActiveViolationsIncluded; private final Boolean suppressedAlertsIncluded; private final List actionsDefinition; private final DetectMitigationActionsTaskStatistics taskStatistics; private DetectMitigationActionsTaskSummary(BuilderImpl builder) { this.taskId = builder.taskId; this.taskStatus = builder.taskStatus; this.taskStartTime = builder.taskStartTime; this.taskEndTime = builder.taskEndTime; this.target = builder.target; this.violationEventOccurrenceRange = builder.violationEventOccurrenceRange; this.onlyActiveViolationsIncluded = builder.onlyActiveViolationsIncluded; this.suppressedAlertsIncluded = builder.suppressedAlertsIncluded; this.actionsDefinition = builder.actionsDefinition; this.taskStatistics = builder.taskStatistics; } /** *

* The unique identifier of the task. *

* * @return The unique identifier of the task. */ public final String taskId() { return taskId; } /** *

* The 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 DetectMitigationActionsTaskStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #taskStatusAsString}. *

* * @return The status of the task. * @see DetectMitigationActionsTaskStatus */ public final DetectMitigationActionsTaskStatus taskStatus() { return DetectMitigationActionsTaskStatus.fromValue(taskStatus); } /** *

* The 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 DetectMitigationActionsTaskStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #taskStatusAsString}. *

* * @return The status of the task. * @see DetectMitigationActionsTaskStatus */ public final String taskStatusAsString() { return taskStatus; } /** *

* The date the task started. *

* * @return The date the task started. */ public final Instant taskStartTime() { return taskStartTime; } /** *

* The date the task ended. *

* * @return The date the task ended. */ public final Instant taskEndTime() { return taskEndTime; } /** *

* Specifies the ML Detect findings to which the mitigation actions are applied. *

* * @return Specifies the ML Detect findings to which the mitigation actions are applied. */ public final DetectMitigationActionsTaskTarget target() { return target; } /** *

* Specifies the time period of which violation events occurred between. *

* * @return Specifies the time period of which violation events occurred between. */ public final ViolationEventOccurrenceRange violationEventOccurrenceRange() { return violationEventOccurrenceRange; } /** *

* Includes only active violations. *

* * @return Includes only active violations. */ public final Boolean onlyActiveViolationsIncluded() { return onlyActiveViolationsIncluded; } /** *

* Includes suppressed alerts. *

* * @return Includes suppressed alerts. */ public final Boolean suppressedAlertsIncluded() { return suppressedAlertsIncluded; } /** * 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); } /** *

* The definition of the actions. *

*

* 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 The definition of the actions. */ public final List actionsDefinition() { return actionsDefinition; } /** *

* The statistics of a mitigation action task. *

* * @return The statistics of a mitigation action task. */ public final DetectMitigationActionsTaskStatistics taskStatistics() { return taskStatistics; } @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 + Objects.hashCode(taskId()); hashCode = 31 * hashCode + Objects.hashCode(taskStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(taskStartTime()); hashCode = 31 * hashCode + Objects.hashCode(taskEndTime()); hashCode = 31 * hashCode + Objects.hashCode(target()); hashCode = 31 * hashCode + Objects.hashCode(violationEventOccurrenceRange()); hashCode = 31 * hashCode + Objects.hashCode(onlyActiveViolationsIncluded()); hashCode = 31 * hashCode + Objects.hashCode(suppressedAlertsIncluded()); hashCode = 31 * hashCode + Objects.hashCode(hasActionsDefinition() ? actionsDefinition() : null); hashCode = 31 * hashCode + Objects.hashCode(taskStatistics()); 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 DetectMitigationActionsTaskSummary)) { return false; } DetectMitigationActionsTaskSummary other = (DetectMitigationActionsTaskSummary) obj; return Objects.equals(taskId(), other.taskId()) && Objects.equals(taskStatusAsString(), other.taskStatusAsString()) && Objects.equals(taskStartTime(), other.taskStartTime()) && Objects.equals(taskEndTime(), other.taskEndTime()) && Objects.equals(target(), other.target()) && Objects.equals(violationEventOccurrenceRange(), other.violationEventOccurrenceRange()) && Objects.equals(onlyActiveViolationsIncluded(), other.onlyActiveViolationsIncluded()) && Objects.equals(suppressedAlertsIncluded(), other.suppressedAlertsIncluded()) && hasActionsDefinition() == other.hasActionsDefinition() && Objects.equals(actionsDefinition(), other.actionsDefinition()) && Objects.equals(taskStatistics(), other.taskStatistics()); } /** * 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("DetectMitigationActionsTaskSummary").add("TaskId", taskId()) .add("TaskStatus", taskStatusAsString()).add("TaskStartTime", taskStartTime()).add("TaskEndTime", taskEndTime()) .add("Target", target()).add("ViolationEventOccurrenceRange", violationEventOccurrenceRange()) .add("OnlyActiveViolationsIncluded", onlyActiveViolationsIncluded()) .add("SuppressedAlertsIncluded", suppressedAlertsIncluded()) .add("ActionsDefinition", hasActionsDefinition() ? actionsDefinition() : null) .add("TaskStatistics", taskStatistics()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "taskId": return Optional.ofNullable(clazz.cast(taskId())); case "taskStatus": return Optional.ofNullable(clazz.cast(taskStatusAsString())); case "taskStartTime": return Optional.ofNullable(clazz.cast(taskStartTime())); case "taskEndTime": return Optional.ofNullable(clazz.cast(taskEndTime())); case "target": return Optional.ofNullable(clazz.cast(target())); case "violationEventOccurrenceRange": return Optional.ofNullable(clazz.cast(violationEventOccurrenceRange())); case "onlyActiveViolationsIncluded": return Optional.ofNullable(clazz.cast(onlyActiveViolationsIncluded())); case "suppressedAlertsIncluded": return Optional.ofNullable(clazz.cast(suppressedAlertsIncluded())); case "actionsDefinition": return Optional.ofNullable(clazz.cast(actionsDefinition())); case "taskStatistics": return Optional.ofNullable(clazz.cast(taskStatistics())); 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("taskId", TASK_ID_FIELD); map.put("taskStatus", TASK_STATUS_FIELD); map.put("taskStartTime", TASK_START_TIME_FIELD); map.put("taskEndTime", TASK_END_TIME_FIELD); map.put("target", TARGET_FIELD); map.put("violationEventOccurrenceRange", VIOLATION_EVENT_OCCURRENCE_RANGE_FIELD); map.put("onlyActiveViolationsIncluded", ONLY_ACTIVE_VIOLATIONS_INCLUDED_FIELD); map.put("suppressedAlertsIncluded", SUPPRESSED_ALERTS_INCLUDED_FIELD); map.put("actionsDefinition", ACTIONS_DEFINITION_FIELD); map.put("taskStatistics", TASK_STATISTICS_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((DetectMitigationActionsTaskSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The unique identifier of the task. *

* * @param taskId * The unique identifier of the task. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskId(String taskId); /** *

* The status of the task. *

* * @param taskStatus * The status of the task. * @see DetectMitigationActionsTaskStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DetectMitigationActionsTaskStatus */ Builder taskStatus(String taskStatus); /** *

* The status of the task. *

* * @param taskStatus * The status of the task. * @see DetectMitigationActionsTaskStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DetectMitigationActionsTaskStatus */ Builder taskStatus(DetectMitigationActionsTaskStatus taskStatus); /** *

* The date the task started. *

* * @param taskStartTime * The date the task started. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskStartTime(Instant taskStartTime); /** *

* The date the task ended. *

* * @param taskEndTime * The date the task ended. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskEndTime(Instant taskEndTime); /** *

* Specifies the ML Detect findings to which the mitigation actions are applied. *

* * @param target * Specifies the ML Detect findings to which the mitigation actions are applied. * @return Returns a reference to this object so that method calls can be chained together. */ Builder target(DetectMitigationActionsTaskTarget target); /** *

* Specifies the ML Detect findings to which the mitigation actions are applied. *

* This is a convenience method that creates an instance of the * {@link DetectMitigationActionsTaskTarget.Builder} avoiding the need to create one manually via * {@link DetectMitigationActionsTaskTarget#builder()}. * *

* When the {@link Consumer} completes, {@link DetectMitigationActionsTaskTarget.Builder#build()} is called * immediately and its result is passed to {@link #target(DetectMitigationActionsTaskTarget)}. * * @param target * a consumer that will call methods on {@link DetectMitigationActionsTaskTarget.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #target(DetectMitigationActionsTaskTarget) */ default Builder target(Consumer target) { return target(DetectMitigationActionsTaskTarget.builder().applyMutation(target).build()); } /** *

* Specifies the time period of which violation events occurred between. *

* * @param violationEventOccurrenceRange * Specifies the time period of which violation events occurred between. * @return Returns a reference to this object so that method calls can be chained together. */ Builder violationEventOccurrenceRange(ViolationEventOccurrenceRange violationEventOccurrenceRange); /** *

* Specifies the time period of which violation events occurred between. *

* This is a convenience method that creates an instance of the {@link ViolationEventOccurrenceRange.Builder} * avoiding the need to create one manually via {@link ViolationEventOccurrenceRange#builder()}. * *

* When the {@link Consumer} completes, {@link ViolationEventOccurrenceRange.Builder#build()} is called * immediately and its result is passed to {@link #violationEventOccurrenceRange(ViolationEventOccurrenceRange)}. * * @param violationEventOccurrenceRange * a consumer that will call methods on {@link ViolationEventOccurrenceRange.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #violationEventOccurrenceRange(ViolationEventOccurrenceRange) */ default Builder violationEventOccurrenceRange( Consumer violationEventOccurrenceRange) { return violationEventOccurrenceRange(ViolationEventOccurrenceRange.builder() .applyMutation(violationEventOccurrenceRange).build()); } /** *

* Includes only active violations. *

* * @param onlyActiveViolationsIncluded * Includes only active violations. * @return Returns a reference to this object so that method calls can be chained together. */ Builder onlyActiveViolationsIncluded(Boolean onlyActiveViolationsIncluded); /** *

* Includes suppressed alerts. *

* * @param suppressedAlertsIncluded * Includes suppressed alerts. * @return Returns a reference to this object so that method calls can be chained together. */ Builder suppressedAlertsIncluded(Boolean suppressedAlertsIncluded); /** *

* The definition of the actions. *

* * @param actionsDefinition * The definition of the actions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actionsDefinition(Collection actionsDefinition); /** *

* The definition of the actions. *

* * @param actionsDefinition * The definition of the actions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actionsDefinition(MitigationAction... actionsDefinition); /** *

* The definition of the actions. *

* 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); /** *

* The statistics of a mitigation action task. *

* * @param taskStatistics * The statistics of a mitigation action task. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskStatistics(DetectMitigationActionsTaskStatistics taskStatistics); /** *

* The statistics of a mitigation action task. *

* This is a convenience method that creates an instance of the * {@link DetectMitigationActionsTaskStatistics.Builder} avoiding the need to create one manually via * {@link DetectMitigationActionsTaskStatistics#builder()}. * *

* When the {@link Consumer} completes, {@link DetectMitigationActionsTaskStatistics.Builder#build()} is called * immediately and its result is passed to {@link #taskStatistics(DetectMitigationActionsTaskStatistics)}. * * @param taskStatistics * a consumer that will call methods on {@link DetectMitigationActionsTaskStatistics.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #taskStatistics(DetectMitigationActionsTaskStatistics) */ default Builder taskStatistics(Consumer taskStatistics) { return taskStatistics(DetectMitigationActionsTaskStatistics.builder().applyMutation(taskStatistics).build()); } } static final class BuilderImpl implements Builder { private String taskId; private String taskStatus; private Instant taskStartTime; private Instant taskEndTime; private DetectMitigationActionsTaskTarget target; private ViolationEventOccurrenceRange violationEventOccurrenceRange; private Boolean onlyActiveViolationsIncluded; private Boolean suppressedAlertsIncluded; private List actionsDefinition = DefaultSdkAutoConstructList.getInstance(); private DetectMitigationActionsTaskStatistics taskStatistics; private BuilderImpl() { } private BuilderImpl(DetectMitigationActionsTaskSummary model) { taskId(model.taskId); taskStatus(model.taskStatus); taskStartTime(model.taskStartTime); taskEndTime(model.taskEndTime); target(model.target); violationEventOccurrenceRange(model.violationEventOccurrenceRange); onlyActiveViolationsIncluded(model.onlyActiveViolationsIncluded); suppressedAlertsIncluded(model.suppressedAlertsIncluded); actionsDefinition(model.actionsDefinition); taskStatistics(model.taskStatistics); } public final String getTaskId() { return taskId; } public final void setTaskId(String taskId) { this.taskId = taskId; } @Override public final Builder taskId(String taskId) { this.taskId = taskId; return this; } 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(DetectMitigationActionsTaskStatus taskStatus) { this.taskStatus(taskStatus == null ? null : taskStatus.toString()); return this; } public final Instant getTaskStartTime() { return taskStartTime; } public final void setTaskStartTime(Instant taskStartTime) { this.taskStartTime = taskStartTime; } @Override public final Builder taskStartTime(Instant taskStartTime) { this.taskStartTime = taskStartTime; return this; } public final Instant getTaskEndTime() { return taskEndTime; } public final void setTaskEndTime(Instant taskEndTime) { this.taskEndTime = taskEndTime; } @Override public final Builder taskEndTime(Instant taskEndTime) { this.taskEndTime = taskEndTime; return this; } public final DetectMitigationActionsTaskTarget.Builder getTarget() { return target != null ? target.toBuilder() : null; } public final void setTarget(DetectMitigationActionsTaskTarget.BuilderImpl target) { this.target = target != null ? target.build() : null; } @Override public final Builder target(DetectMitigationActionsTaskTarget target) { this.target = target; return this; } public final ViolationEventOccurrenceRange.Builder getViolationEventOccurrenceRange() { return violationEventOccurrenceRange != null ? violationEventOccurrenceRange.toBuilder() : null; } public final void setViolationEventOccurrenceRange(ViolationEventOccurrenceRange.BuilderImpl violationEventOccurrenceRange) { this.violationEventOccurrenceRange = violationEventOccurrenceRange != null ? violationEventOccurrenceRange.build() : null; } @Override public final Builder violationEventOccurrenceRange(ViolationEventOccurrenceRange violationEventOccurrenceRange) { this.violationEventOccurrenceRange = violationEventOccurrenceRange; return this; } public final Boolean getOnlyActiveViolationsIncluded() { return onlyActiveViolationsIncluded; } public final void setOnlyActiveViolationsIncluded(Boolean onlyActiveViolationsIncluded) { this.onlyActiveViolationsIncluded = onlyActiveViolationsIncluded; } @Override public final Builder onlyActiveViolationsIncluded(Boolean onlyActiveViolationsIncluded) { this.onlyActiveViolationsIncluded = onlyActiveViolationsIncluded; return this; } public final Boolean getSuppressedAlertsIncluded() { return suppressedAlertsIncluded; } public final void setSuppressedAlertsIncluded(Boolean suppressedAlertsIncluded) { this.suppressedAlertsIncluded = suppressedAlertsIncluded; } @Override public final Builder suppressedAlertsIncluded(Boolean suppressedAlertsIncluded) { this.suppressedAlertsIncluded = suppressedAlertsIncluded; 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; } public final DetectMitigationActionsTaskStatistics.Builder getTaskStatistics() { return taskStatistics != null ? taskStatistics.toBuilder() : null; } public final void setTaskStatistics(DetectMitigationActionsTaskStatistics.BuilderImpl taskStatistics) { this.taskStatistics = taskStatistics != null ? taskStatistics.build() : null; } @Override public final Builder taskStatistics(DetectMitigationActionsTaskStatistics taskStatistics) { this.taskStatistics = taskStatistics; return this; } @Override public DetectMitigationActionsTaskSummary build() { return new DetectMitigationActionsTaskSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy