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

software.amazon.awssdk.services.ssm.model.CreateOpsItemRequest Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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.ssm.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.utils.CollectionUtils;
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 CreateOpsItemRequest extends SsmRequest implements
        ToCopyableBuilder {
    private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateOpsItemRequest::description)).setter(setter(Builder::description))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();

    private static final SdkField> OPERATIONAL_DATA_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .getter(getter(CreateOpsItemRequest::operationalData))
            .setter(setter(Builder::operationalData))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OperationalData").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(OpsItemDataValue::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField> NOTIFICATIONS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .getter(getter(CreateOpsItemRequest::notifications))
            .setter(setter(Builder::notifications))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Notifications").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(OpsItemNotification::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField PRIORITY_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .getter(getter(CreateOpsItemRequest::priority)).setter(setter(Builder::priority))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Priority").build()).build();

    private static final SdkField> RELATED_OPS_ITEMS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .getter(getter(CreateOpsItemRequest::relatedOpsItems))
            .setter(setter(Builder::relatedOpsItems))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RelatedOpsItems").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(RelatedOpsItem::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField SOURCE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateOpsItemRequest::source)).setter(setter(Builder::source))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Source").build()).build();

    private static final SdkField TITLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateOpsItemRequest::title)).setter(setter(Builder::title))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Title").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .getter(getter(CreateOpsItemRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Tag::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DESCRIPTION_FIELD,
            OPERATIONAL_DATA_FIELD, NOTIFICATIONS_FIELD, PRIORITY_FIELD, RELATED_OPS_ITEMS_FIELD, SOURCE_FIELD, TITLE_FIELD,
            TAGS_FIELD));

    private final String description;

    private final Map operationalData;

    private final List notifications;

    private final Integer priority;

    private final List relatedOpsItems;

    private final String source;

    private final String title;

    private final List tags;

    private CreateOpsItemRequest(BuilderImpl builder) {
        super(builder);
        this.description = builder.description;
        this.operationalData = builder.operationalData;
        this.notifications = builder.notifications;
        this.priority = builder.priority;
        this.relatedOpsItems = builder.relatedOpsItems;
        this.source = builder.source;
        this.title = builder.title;
        this.tags = builder.tags;
    }

    /**
     * 

* Information about the OpsItem. *

* * @return Information about the OpsItem. */ public String description() { return description; } /** *

* Operational data is custom data that provides useful reference details about the OpsItem. For example, you can * specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter * operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size * of 20 KB. *

* *

* Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, /amzn, /ssm. *

*
*

* You can choose to make the data searchable by other users in the account or you can restrict search access. * Searchable data means that all users with access to the OpsItem Overview page (as provided by the * DescribeOpsItems API action) can view and search on the specified data. Operational data that is not * searchable is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API * action). *

*

* Use the /aws/resources key in OperationalData to specify a related resource in the request. Use the * /aws/automations key in OperationalData to associate an Automation runbook with the OpsItem. To view * AWS CLI example commands that use these keys, see Creating OpsItems Manually in the AWS Systems Manager User Guide. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return Operational data is custom data that provides useful reference details about the OpsItem. For example, * you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has * a maximum size of 20 KB.

*

* Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, * /amzn, /ssm. *

*
*

* You can choose to make the data searchable by other users in the account or you can restrict search * access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the * DescribeOpsItems API action) can view and search on the specified data. Operational data that is * not searchable is only viewable by users who have access to the OpsItem (as provided by the * GetOpsItem API action). *

*

* Use the /aws/resources key in OperationalData to specify a related resource in the request. * Use the /aws/automations key in OperationalData to associate an Automation runbook with the * OpsItem. To view AWS CLI example commands that use these keys, see Creating OpsItems Manually in the AWS Systems Manager User Guide. */ public Map operationalData() { return operationalData; } /** *

* The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or * changed. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited * or changed. */ public List notifications() { return notifications; } /** *

* The importance of this OpsItem in relation to other OpsItems in the system. *

* * @return The importance of this OpsItem in relation to other OpsItems in the system. */ public Integer priority() { return priority; } /** *

* One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can * include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return One or more OpsItems that share something in common with the current OpsItems. For example, related * OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the * impacted resource. */ public List relatedOpsItems() { return relatedOpsItems; } /** *

* The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. *

* * @return The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. */ public String source() { return source; } /** *

* A short heading that describes the nature of the OpsItem and the impacted resource. *

* * @return A short heading that describes the nature of the OpsItem and the impacted resource. */ public String title() { return title; } /** *

* Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an inline IAM * policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide. *

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

*
*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an inline * IAM policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide.

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

*/ public List tags() { return tags; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(operationalData()); hashCode = 31 * hashCode + Objects.hashCode(notifications()); hashCode = 31 * hashCode + Objects.hashCode(priority()); hashCode = 31 * hashCode + Objects.hashCode(relatedOpsItems()); hashCode = 31 * hashCode + Objects.hashCode(source()); hashCode = 31 * hashCode + Objects.hashCode(title()); hashCode = 31 * hashCode + Objects.hashCode(tags()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateOpsItemRequest)) { return false; } CreateOpsItemRequest other = (CreateOpsItemRequest) obj; return Objects.equals(description(), other.description()) && Objects.equals(operationalData(), other.operationalData()) && Objects.equals(notifications(), other.notifications()) && Objects.equals(priority(), other.priority()) && Objects.equals(relatedOpsItems(), other.relatedOpsItems()) && Objects.equals(source(), other.source()) && Objects.equals(title(), other.title()) && Objects.equals(tags(), other.tags()); } /** * 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 String toString() { return ToString.builder("CreateOpsItemRequest").add("Description", description()) .add("OperationalData", operationalData()).add("Notifications", notifications()).add("Priority", priority()) .add("RelatedOpsItems", relatedOpsItems()).add("Source", source()).add("Title", title()).add("Tags", tags()) .build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Description": return Optional.ofNullable(clazz.cast(description())); case "OperationalData": return Optional.ofNullable(clazz.cast(operationalData())); case "Notifications": return Optional.ofNullable(clazz.cast(notifications())); case "Priority": return Optional.ofNullable(clazz.cast(priority())); case "RelatedOpsItems": return Optional.ofNullable(clazz.cast(relatedOpsItems())); case "Source": return Optional.ofNullable(clazz.cast(source())); case "Title": return Optional.ofNullable(clazz.cast(title())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateOpsItemRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SsmRequest.Builder, SdkPojo, CopyableBuilder { /** *

* Information about the OpsItem. *

* * @param description * Information about the OpsItem. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* Operational data is custom data that provides useful reference details about the OpsItem. For example, you * can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter * operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum * size of 20 KB. *

* *

* Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, /amzn, * /ssm. *

*
*

* You can choose to make the data searchable by other users in the account or you can restrict search access. * Searchable data means that all users with access to the OpsItem Overview page (as provided by the * DescribeOpsItems API action) can view and search on the specified data. Operational data that is not * searchable is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API * action). *

*

* Use the /aws/resources key in OperationalData to specify a related resource in the request. Use * the /aws/automations key in OperationalData to associate an Automation runbook with the OpsItem. * To view AWS CLI example commands that use these keys, see Creating OpsItems Manually in the AWS Systems Manager User Guide. *

* * @param operationalData * Operational data is custom data that provides useful reference details about the OpsItem. For example, * you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. * You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The * value has a maximum size of 20 KB.

*

* Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, * /amzn, /ssm. *

*
*

* You can choose to make the data searchable by other users in the account or you can restrict search * access. Searchable data means that all users with access to the OpsItem Overview page (as provided by * the DescribeOpsItems API action) can view and search on the specified data. Operational data * that is not searchable is only viewable by users who have access to the OpsItem (as provided by the * GetOpsItem API action). *

*

* Use the /aws/resources key in OperationalData to specify a related resource in the * request. Use the /aws/automations key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, see Creating OpsItems Manually in the AWS Systems Manager User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder operationalData(Map operationalData); /** *

* The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or * changed. *

* * @param notifications * The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is * edited or changed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notifications(Collection notifications); /** *

* The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or * changed. *

* * @param notifications * The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is * edited or changed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notifications(OpsItemNotification... notifications); /** *

* The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or * changed. *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #notifications(List)}. * * @param notifications * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #notifications(List) */ Builder notifications(Consumer... notifications); /** *

* The importance of this OpsItem in relation to other OpsItems in the system. *

* * @param priority * The importance of this OpsItem in relation to other OpsItems in the system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder priority(Integer priority); /** *

* One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems * can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource. *

* * @param relatedOpsItems * One or more OpsItems that share something in common with the current OpsItems. For example, related * OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the * impacted resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder relatedOpsItems(Collection relatedOpsItems); /** *

* One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems * can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource. *

* * @param relatedOpsItems * One or more OpsItems that share something in common with the current OpsItems. For example, related * OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the * impacted resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder relatedOpsItems(RelatedOpsItem... relatedOpsItems); /** *

* One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems * can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource. *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need * to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and * its result is passed to {@link #relatedOpsItems(List)}. * * @param relatedOpsItems * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #relatedOpsItems(List) */ Builder relatedOpsItems(Consumer... relatedOpsItems); /** *

* The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. *

* * @param source * The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. * @return Returns a reference to this object so that method calls can be chained together. */ Builder source(String source); /** *

* A short heading that describes the nature of the OpsItem and the impacted resource. *

* * @param title * A short heading that describes the nature of the OpsItem and the impacted resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder title(String title); /** *

* Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an inline IAM * policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide. *

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

*
* * @param tags * Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an * inline IAM policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide.

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an inline IAM * policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide. *

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

*
* * @param tags * Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an * inline IAM policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide.

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* Optional metadata that you assign to a resource. You can restrict access to OpsItems by using an inline IAM * policy that specifies tags. For more information, see Getting Started with OpsCenter in the AWS Systems Manager User Guide. *

*

* Tags use a key-value pair. For example: *

*

* Key=Department,Value=Finance *

* *

* To add tags to an existing OpsItem, use the AddTagsToResource action. *

*
This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result * is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(List) */ Builder tags(Consumer... tags); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SsmRequest.BuilderImpl implements Builder { private String description; private Map operationalData = DefaultSdkAutoConstructMap.getInstance(); private List notifications = DefaultSdkAutoConstructList.getInstance(); private Integer priority; private List relatedOpsItems = DefaultSdkAutoConstructList.getInstance(); private String source; private String title; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateOpsItemRequest model) { super(model); description(model.description); operationalData(model.operationalData); notifications(model.notifications); priority(model.priority); relatedOpsItems(model.relatedOpsItems); source(model.source); title(model.title); tags(model.tags); } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final Map getOperationalData() { return operationalData != null ? CollectionUtils.mapValues(operationalData, OpsItemDataValue::toBuilder) : null; } @Override public final Builder operationalData(Map operationalData) { this.operationalData = OpsItemOperationalDataCopier.copy(operationalData); return this; } public final void setOperationalData(Map operationalData) { this.operationalData = OpsItemOperationalDataCopier.copyFromBuilder(operationalData); } public final Collection getNotifications() { return notifications != null ? notifications.stream().map(OpsItemNotification::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder notifications(Collection notifications) { this.notifications = OpsItemNotificationsCopier.copy(notifications); return this; } @Override @SafeVarargs public final Builder notifications(OpsItemNotification... notifications) { notifications(Arrays.asList(notifications)); return this; } @Override @SafeVarargs public final Builder notifications(Consumer... notifications) { notifications(Stream.of(notifications).map(c -> OpsItemNotification.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setNotifications(Collection notifications) { this.notifications = OpsItemNotificationsCopier.copyFromBuilder(notifications); } public final Integer getPriority() { return priority; } @Override public final Builder priority(Integer priority) { this.priority = priority; return this; } public final void setPriority(Integer priority) { this.priority = priority; } public final Collection getRelatedOpsItems() { return relatedOpsItems != null ? relatedOpsItems.stream().map(RelatedOpsItem::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder relatedOpsItems(Collection relatedOpsItems) { this.relatedOpsItems = RelatedOpsItemsCopier.copy(relatedOpsItems); return this; } @Override @SafeVarargs public final Builder relatedOpsItems(RelatedOpsItem... relatedOpsItems) { relatedOpsItems(Arrays.asList(relatedOpsItems)); return this; } @Override @SafeVarargs public final Builder relatedOpsItems(Consumer... relatedOpsItems) { relatedOpsItems(Stream.of(relatedOpsItems).map(c -> RelatedOpsItem.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setRelatedOpsItems(Collection relatedOpsItems) { this.relatedOpsItems = RelatedOpsItemsCopier.copyFromBuilder(relatedOpsItems); } public final String getSource() { return source; } @Override public final Builder source(String source) { this.source = source; return this; } public final void setSource(String source) { this.source = source; } public final String getTitle() { return title; } @Override public final Builder title(String title) { this.title = title; return this; } public final void setTitle(String title) { this.title = title; } public final Collection getTags() { return tags != null ? tags.stream().map(Tag::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateOpsItemRequest build() { return new CreateOpsItemRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy