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.securityhub.model.CreateAutomationRuleRequest 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.securityhub.model;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
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.awscore.AwsRequestOverrideConfiguration;
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 CreateAutomationRuleRequest extends SecurityHubRequest implements
ToCopyableBuilder {
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("Tags")
.getter(getter(CreateAutomationRuleRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField RULE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RuleStatus").getter(getter(CreateAutomationRuleRequest::ruleStatusAsString))
.setter(setter(Builder::ruleStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RuleStatus").build()).build();
private static final SdkField RULE_ORDER_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("RuleOrder").getter(getter(CreateAutomationRuleRequest::ruleOrder)).setter(setter(Builder::ruleOrder))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RuleOrder").build()).build();
private static final SdkField RULE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RuleName").getter(getter(CreateAutomationRuleRequest::ruleName)).setter(setter(Builder::ruleName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RuleName").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Description").getter(getter(CreateAutomationRuleRequest::description))
.setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();
private static final SdkField IS_TERMINAL_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("IsTerminal").getter(getter(CreateAutomationRuleRequest::isTerminal)).setter(setter(Builder::isTerminal))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IsTerminal").build()).build();
private static final SdkField CRITERIA_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Criteria")
.getter(getter(CreateAutomationRuleRequest::criteria)).setter(setter(Builder::criteria))
.constructor(AutomationRulesFindingFilters::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Criteria").build()).build();
private static final SdkField> ACTIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Actions")
.getter(getter(CreateAutomationRuleRequest::actions))
.setter(setter(Builder::actions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Actions").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AutomationRulesAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TAGS_FIELD, RULE_STATUS_FIELD,
RULE_ORDER_FIELD, RULE_NAME_FIELD, DESCRIPTION_FIELD, IS_TERMINAL_FIELD, CRITERIA_FIELD, ACTIONS_FIELD));
private final Map tags;
private final String ruleStatus;
private final Integer ruleOrder;
private final String ruleName;
private final String description;
private final Boolean isTerminal;
private final AutomationRulesFindingFilters criteria;
private final List actions;
private CreateAutomationRuleRequest(BuilderImpl builder) {
super(builder);
this.tags = builder.tags;
this.ruleStatus = builder.ruleStatus;
this.ruleOrder = builder.ruleOrder;
this.ruleName = builder.ruleName;
this.description = builder.description;
this.isTerminal = builder.isTerminal;
this.criteria = builder.criteria;
this.actions = builder.actions;
}
/**
* For responses, this returns true if the service returned a value for the Tags 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 hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructMap);
}
/**
*
* User-defined tags associated with an automation rule.
*
*
* 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 #hasTags} method.
*
*
* @return User-defined tags associated with an automation rule.
*/
public final Map tags() {
return tags;
}
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules .
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #ruleStatus} will
* return {@link RuleStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #ruleStatusAsString}.
*
*
* @return Whether the rule is active after it is created. If this parameter is equal to ENABLED,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To
* change the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
* @see RuleStatus
*/
public final RuleStatus ruleStatus() {
return RuleStatus.fromValue(ruleStatus);
}
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules .
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #ruleStatus} will
* return {@link RuleStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #ruleStatusAsString}.
*
*
* @return Whether the rule is active after it is created. If this parameter is equal to ENABLED,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To
* change the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
* @see RuleStatus
*/
public final String ruleStatusAsString() {
return ruleStatus;
}
/**
*
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
* Security Hub applies rules with lower values for this parameter first.
*
*
* @return An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to
* findings. Security Hub applies rules with lower values for this parameter first.
*/
public final Integer ruleOrder() {
return ruleOrder;
}
/**
*
* The name of the rule.
*
*
* @return The name of the rule.
*/
public final String ruleName() {
return ruleName;
}
/**
*
* A description of the rule.
*
*
* @return A description of the rule.
*/
public final String description() {
return description;
}
/**
*
* Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This
* is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule
* is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't
* evaluate other rules for the finding. By default, a rule isn't terminal.
*
*
* @return Specifies whether a rule is the last to be applied with respect to a finding that matches the rule
* criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has
* different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches
* the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
*/
public final Boolean isTerminal() {
return isTerminal;
}
/**
*
* A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter
* findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub
* applies the rule action to the finding.
*
*
* @return A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter
* findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security
* Hub applies the rule action to the finding.
*/
public final AutomationRulesFindingFilters criteria() {
return criteria;
}
/**
* For responses, this returns true if the service returned a value for the Actions 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 hasActions() {
return actions != null && !(actions instanceof SdkAutoConstructList);
}
/**
*
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
*
*
* 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 #hasActions} method.
*
*
* @return One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
*/
public final List actions() {
return actions;
}
@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(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(ruleStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(ruleOrder());
hashCode = 31 * hashCode + Objects.hashCode(ruleName());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(isTerminal());
hashCode = 31 * hashCode + Objects.hashCode(criteria());
hashCode = 31 * hashCode + Objects.hashCode(hasActions() ? actions() : 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 CreateAutomationRuleRequest)) {
return false;
}
CreateAutomationRuleRequest other = (CreateAutomationRuleRequest) obj;
return hasTags() == other.hasTags() && Objects.equals(tags(), other.tags())
&& Objects.equals(ruleStatusAsString(), other.ruleStatusAsString())
&& Objects.equals(ruleOrder(), other.ruleOrder()) && Objects.equals(ruleName(), other.ruleName())
&& Objects.equals(description(), other.description()) && Objects.equals(isTerminal(), other.isTerminal())
&& Objects.equals(criteria(), other.criteria()) && hasActions() == other.hasActions()
&& Objects.equals(actions(), other.actions());
}
/**
* 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("CreateAutomationRuleRequest").add("Tags", hasTags() ? tags() : null)
.add("RuleStatus", ruleStatusAsString()).add("RuleOrder", ruleOrder()).add("RuleName", ruleName())
.add("Description", description()).add("IsTerminal", isTerminal()).add("Criteria", criteria())
.add("Actions", hasActions() ? actions() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "RuleStatus":
return Optional.ofNullable(clazz.cast(ruleStatusAsString()));
case "RuleOrder":
return Optional.ofNullable(clazz.cast(ruleOrder()));
case "RuleName":
return Optional.ofNullable(clazz.cast(ruleName()));
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "IsTerminal":
return Optional.ofNullable(clazz.cast(isTerminal()));
case "Criteria":
return Optional.ofNullable(clazz.cast(criteria()));
case "Actions":
return Optional.ofNullable(clazz.cast(actions()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((CreateAutomationRuleRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SecurityHubRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* User-defined tags associated with an automation rule.
*
*
* @param tags
* User-defined tags associated with an automation rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED, Security
* Hub starts applying the rule to findings and finding updates after the rule is created. To change the value
* of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
*
*
* @param ruleStatus
* Whether the rule is active after it is created. If this parameter is equal to ENABLED,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To
* change the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
* @see RuleStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleStatus
*/
Builder ruleStatus(String ruleStatus);
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED, Security
* Hub starts applying the rule to findings and finding updates after the rule is created. To change the value
* of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
*
*
* @param ruleStatus
* Whether the rule is active after it is created. If this parameter is equal to ENABLED,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To
* change the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules .
* @see RuleStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleStatus
*/
Builder ruleStatus(RuleStatus ruleStatus);
/**
*
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
* Security Hub applies rules with lower values for this parameter first.
*
*
* @param ruleOrder
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to
* findings. Security Hub applies rules with lower values for this parameter first.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder ruleOrder(Integer ruleOrder);
/**
*
* The name of the rule.
*
*
* @param ruleName
* The name of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder ruleName(String ruleName);
/**
*
* A description of the rule.
*
*
* @param description
* A description of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
*
* Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
* This is useful when a finding matches the criteria for multiple rules, and each rule has different actions.
* If a rule is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and
* doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
*
*
* @param isTerminal
* Specifies whether a rule is the last to be applied with respect to a finding that matches the rule
* criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has
* different actions. If a rule is terminal, Security Hub applies the rule action to a finding that
* matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't
* terminal.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder isTerminal(Boolean isTerminal);
/**
*
* A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter
* findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub
* applies the rule action to the finding.
*
*
* @param criteria
* A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to
* filter findings. If a rule is enabled and a finding matches the conditions specified in this
* parameter, Security Hub applies the rule action to the finding.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder criteria(AutomationRulesFindingFilters criteria);
/**
*
* A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter
* findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub
* applies the rule action to the finding.
*
* This is a convenience method that creates an instance of the {@link AutomationRulesFindingFilters.Builder}
* avoiding the need to create one manually via {@link AutomationRulesFindingFilters#builder()}.
*
*
* When the {@link Consumer} completes, {@link AutomationRulesFindingFilters.Builder#build()} is called
* immediately and its result is passed to {@link #criteria(AutomationRulesFindingFilters)}.
*
* @param criteria
* a consumer that will call methods on {@link AutomationRulesFindingFilters.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #criteria(AutomationRulesFindingFilters)
*/
default Builder criteria(Consumer criteria) {
return criteria(AutomationRulesFindingFilters.builder().applyMutation(criteria).build());
}
/**
*
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
*
*
* @param actions
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder actions(Collection actions);
/**
*
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
*
*
* @param actions
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder actions(AutomationRulesAction... actions);
/**
*
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.securityhub.model.AutomationRulesAction.Builder} avoiding the need to
* create one manually via
* {@link software.amazon.awssdk.services.securityhub.model.AutomationRulesAction#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.securityhub.model.AutomationRulesAction.Builder#build()} is called
* immediately and its result is passed to {@link #actions(List)}.
*
* @param actions
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.securityhub.model.AutomationRulesAction.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #actions(java.util.Collection)
*/
Builder actions(Consumer... actions);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends SecurityHubRequest.BuilderImpl implements Builder {
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private String ruleStatus;
private Integer ruleOrder;
private String ruleName;
private String description;
private Boolean isTerminal;
private AutomationRulesFindingFilters criteria;
private List actions = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CreateAutomationRuleRequest model) {
super(model);
tags(model.tags);
ruleStatus(model.ruleStatus);
ruleOrder(model.ruleOrder);
ruleName(model.ruleName);
description(model.description);
isTerminal(model.isTerminal);
criteria(model.criteria);
actions(model.actions);
}
public final Map getTags() {
if (tags instanceof SdkAutoConstructMap) {
return null;
}
return tags;
}
public final void setTags(Map tags) {
this.tags = TagMapCopier.copy(tags);
}
@Override
public final Builder tags(Map tags) {
this.tags = TagMapCopier.copy(tags);
return this;
}
public final String getRuleStatus() {
return ruleStatus;
}
public final void setRuleStatus(String ruleStatus) {
this.ruleStatus = ruleStatus;
}
@Override
public final Builder ruleStatus(String ruleStatus) {
this.ruleStatus = ruleStatus;
return this;
}
@Override
public final Builder ruleStatus(RuleStatus ruleStatus) {
this.ruleStatus(ruleStatus == null ? null : ruleStatus.toString());
return this;
}
public final Integer getRuleOrder() {
return ruleOrder;
}
public final void setRuleOrder(Integer ruleOrder) {
this.ruleOrder = ruleOrder;
}
@Override
public final Builder ruleOrder(Integer ruleOrder) {
this.ruleOrder = ruleOrder;
return this;
}
public final String getRuleName() {
return ruleName;
}
public final void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
@Override
public final Builder ruleName(String ruleName) {
this.ruleName = ruleName;
return this;
}
public final String getDescription() {
return description;
}
public final void setDescription(String description) {
this.description = description;
}
@Override
public final Builder description(String description) {
this.description = description;
return this;
}
public final Boolean getIsTerminal() {
return isTerminal;
}
public final void setIsTerminal(Boolean isTerminal) {
this.isTerminal = isTerminal;
}
@Override
public final Builder isTerminal(Boolean isTerminal) {
this.isTerminal = isTerminal;
return this;
}
public final AutomationRulesFindingFilters.Builder getCriteria() {
return criteria != null ? criteria.toBuilder() : null;
}
public final void setCriteria(AutomationRulesFindingFilters.BuilderImpl criteria) {
this.criteria = criteria != null ? criteria.build() : null;
}
@Override
public final Builder criteria(AutomationRulesFindingFilters criteria) {
this.criteria = criteria;
return this;
}
public final List getActions() {
List result = ActionListCopier.copyToBuilder(this.actions);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setActions(Collection actions) {
this.actions = ActionListCopier.copyFromBuilder(actions);
}
@Override
public final Builder actions(Collection actions) {
this.actions = ActionListCopier.copy(actions);
return this;
}
@Override
@SafeVarargs
public final Builder actions(AutomationRulesAction... actions) {
actions(Arrays.asList(actions));
return this;
}
@Override
@SafeVarargs
public final Builder actions(Consumer... actions) {
actions(Stream.of(actions).map(c -> AutomationRulesAction.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateAutomationRuleRequest build() {
return new CreateAutomationRuleRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}