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

software.amazon.awssdk.services.connect.model.StartTaskContactRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Connect module holds the client classes that are used for communicating with Connect.

There is a newer version: 2.29.39
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.connect.model;

import java.time.Instant;
import java.util.Arrays;
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 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.DefaultValueTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
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 StartTaskContactRequest extends ConnectRequest implements
        ToCopyableBuilder {
    private static final SdkField INSTANCE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("InstanceId").getter(getter(StartTaskContactRequest::instanceId)).setter(setter(Builder::instanceId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceId").build()).build();

    private static final SdkField PREVIOUS_CONTACT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("PreviousContactId").getter(getter(StartTaskContactRequest::previousContactId))
            .setter(setter(Builder::previousContactId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreviousContactId").build()).build();

    private static final SdkField CONTACT_FLOW_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ContactFlowId").getter(getter(StartTaskContactRequest::contactFlowId))
            .setter(setter(Builder::contactFlowId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ContactFlowId").build()).build();

    private static final SdkField> ATTRIBUTES_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Attributes")
            .getter(getter(StartTaskContactRequest::attributes))
            .setter(setter(Builder::attributes))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Attributes").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 NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
            .getter(getter(StartTaskContactRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();

    private static final SdkField> REFERENCES_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("References")
            .getter(getter(StartTaskContactRequest::references))
            .setter(setter(Builder::references))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("References").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Reference::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Description").getter(getter(StartTaskContactRequest::description)).setter(setter(Builder::description))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();

    private static final SdkField CLIENT_TOKEN_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("ClientToken")
            .getter(getter(StartTaskContactRequest::clientToken))
            .setter(setter(Builder::clientToken))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClientToken").build(),
                    DefaultValueTrait.idempotencyToken()).build();

    private static final SdkField SCHEDULED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("ScheduledTime").getter(getter(StartTaskContactRequest::scheduledTime))
            .setter(setter(Builder::scheduledTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ScheduledTime").build()).build();

    private static final SdkField TASK_TEMPLATE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("TaskTemplateId").getter(getter(StartTaskContactRequest::taskTemplateId))
            .setter(setter(Builder::taskTemplateId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TaskTemplateId").build()).build();

    private static final SdkField QUICK_CONNECT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("QuickConnectId").getter(getter(StartTaskContactRequest::quickConnectId))
            .setter(setter(Builder::quickConnectId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("QuickConnectId").build()).build();

    private static final SdkField RELATED_CONTACT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("RelatedContactId").getter(getter(StartTaskContactRequest::relatedContactId))
            .setter(setter(Builder::relatedContactId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RelatedContactId").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INSTANCE_ID_FIELD,
            PREVIOUS_CONTACT_ID_FIELD, CONTACT_FLOW_ID_FIELD, ATTRIBUTES_FIELD, NAME_FIELD, REFERENCES_FIELD, DESCRIPTION_FIELD,
            CLIENT_TOKEN_FIELD, SCHEDULED_TIME_FIELD, TASK_TEMPLATE_ID_FIELD, QUICK_CONNECT_ID_FIELD, RELATED_CONTACT_ID_FIELD));

    private final String instanceId;

    private final String previousContactId;

    private final String contactFlowId;

    private final Map attributes;

    private final String name;

    private final Map references;

    private final String description;

    private final String clientToken;

    private final Instant scheduledTime;

    private final String taskTemplateId;

    private final String quickConnectId;

    private final String relatedContactId;

    private StartTaskContactRequest(BuilderImpl builder) {
        super(builder);
        this.instanceId = builder.instanceId;
        this.previousContactId = builder.previousContactId;
        this.contactFlowId = builder.contactFlowId;
        this.attributes = builder.attributes;
        this.name = builder.name;
        this.references = builder.references;
        this.description = builder.description;
        this.clientToken = builder.clientToken;
        this.scheduledTime = builder.scheduledTime;
        this.taskTemplateId = builder.taskTemplateId;
        this.quickConnectId = builder.quickConnectId;
        this.relatedContactId = builder.relatedContactId;
    }

    /**
     * 

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

* * @return The identifier of the Amazon Connect instance. You can find the instance * ID in the Amazon Resource Name (ARN) of the instance. */ public final String instanceId() { return instanceId; } /** *

* The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to task * contacts linked using the same PreviousContactID will affect every contact in the chain. There can * be a maximum of 12 linked task contacts in a chain. *

* * @return The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to * task contacts linked using the same PreviousContactID will affect every contact in the * chain. There can be a maximum of 12 linked task contacts in a chain. */ public final String previousContactId() { return previousContactId; } /** *

* The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin * website, on the navigation menu go to Routing, Contact Flows. Choose the flow. On the flow page, * under the name of the flow, choose Show additional flow information. The ContactFlowId is the last part of * the ARN, shown here in bold: *

*

* arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx *

* * @return The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin * website, on the navigation menu go to Routing, Contact Flows. Choose the flow. On the flow * page, under the name of the flow, choose Show additional flow information. The ContactFlowId is * the last part of the ARN, shown here in bold:

*

* arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx */ public final String contactFlowId() { return contactFlowId; } /** * For responses, this returns true if the service returned a value for the Attributes 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 hasAttributes() { return attributes != null && !(attributes instanceof SdkAutoConstructMap); } /** *

* A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be * accessed in flows just like any other contact attributes. *

*

* There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only * alphanumeric, dash, and underscore characters. *

*

* 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 #hasAttributes} method. *

* * @return A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, * and can be accessed in flows just like any other contact attributes.

*

* There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include * only alphanumeric, dash, and underscore characters. */ public final Map attributes() { return attributes; } /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

* * @return The name of a task that is shown to an agent in the Contact Control Panel (CCP). */ public final String name() { return name; } /** * For responses, this returns true if the service returned a value for the References 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 hasReferences() { return references != null && !(references instanceof SdkAutoConstructMap); } /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following * reference types at the time of creation: URL | NUMBER | STRING | * DATE | EMAIL. ATTACHMENT is not a supported reference type during task * creation. *

*

* 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 #hasReferences} method. *

* * @return A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the * following reference types at the time of creation: URL | NUMBER | * STRING | DATE | EMAIL. ATTACHMENT is not a supported * reference type during task creation. */ public final Map references() { return references; } /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

* * @return A description of the task that is shown to an agent in the Contact Control Panel (CCP). */ public final String description() { return description; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, * the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with * idempotent APIs. *

* * @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not * provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see * Making * retries safe with idempotent APIs. */ public final String clientToken() { return clientToken; } /** *

* The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

* * @return The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled * time cannot be in the past. It must be within up to 6 days in future. */ public final Instant scheduledTime() { return scheduledTime; } /** *

* A unique identifier for the task template. For more information about task templates, see Create task templates in the * Amazon Connect Administrator Guide. *

* * @return A unique identifier for the task template. For more information about task templates, see Create task * templates in the Amazon Connect Administrator Guide. */ public final String taskTemplateId() { return taskTemplateId; } /** *

* The identifier for the quick connect. Tasks that are created by using QuickConnectId will use the * flow that is defined on agent or queue quick connect. For more information about quick connects, see Create quick connects. *

* * @return The identifier for the quick connect. Tasks that are created by using QuickConnectId will * use the flow that is defined on agent or queue quick connect. For more information about quick connects, * see Create quick * connects. */ public final String quickConnectId() { return quickConnectId; } /** *

* The contactId that is related to this contact. * Linking tasks together by using RelatedContactID copies over contact attributes from the related * task contact to the new task contact. All updates to user-defined attributes in the new task contact are limited * to the individual contact ID, unlike what happens when tasks are linked by using PreviousContactID. * There are no limits to the number of contacts that can be linked by using RelatedContactId. *

* * @return The contactId that is related to this * contact. Linking tasks together by using RelatedContactID copies over contact attributes * from the related task contact to the new task contact. All updates to user-defined attributes in the new * task contact are limited to the individual contact ID, unlike what happens when tasks are linked by using * PreviousContactID. There are no limits to the number of contacts that can be linked by using * RelatedContactId. */ public final String relatedContactId() { return relatedContactId; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(instanceId()); hashCode = 31 * hashCode + Objects.hashCode(previousContactId()); hashCode = 31 * hashCode + Objects.hashCode(contactFlowId()); hashCode = 31 * hashCode + Objects.hashCode(hasAttributes() ? attributes() : null); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(hasReferences() ? references() : null); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(clientToken()); hashCode = 31 * hashCode + Objects.hashCode(scheduledTime()); hashCode = 31 * hashCode + Objects.hashCode(taskTemplateId()); hashCode = 31 * hashCode + Objects.hashCode(quickConnectId()); hashCode = 31 * hashCode + Objects.hashCode(relatedContactId()); 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 StartTaskContactRequest)) { return false; } StartTaskContactRequest other = (StartTaskContactRequest) obj; return Objects.equals(instanceId(), other.instanceId()) && Objects.equals(previousContactId(), other.previousContactId()) && Objects.equals(contactFlowId(), other.contactFlowId()) && hasAttributes() == other.hasAttributes() && Objects.equals(attributes(), other.attributes()) && Objects.equals(name(), other.name()) && hasReferences() == other.hasReferences() && Objects.equals(references(), other.references()) && Objects.equals(description(), other.description()) && Objects.equals(clientToken(), other.clientToken()) && Objects.equals(scheduledTime(), other.scheduledTime()) && Objects.equals(taskTemplateId(), other.taskTemplateId()) && Objects.equals(quickConnectId(), other.quickConnectId()) && Objects.equals(relatedContactId(), other.relatedContactId()); } /** * 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("StartTaskContactRequest").add("InstanceId", instanceId()) .add("PreviousContactId", previousContactId()).add("ContactFlowId", contactFlowId()) .add("Attributes", hasAttributes() ? attributes() : null).add("Name", name()) .add("References", hasReferences() ? references() : null).add("Description", description()) .add("ClientToken", clientToken()).add("ScheduledTime", scheduledTime()).add("TaskTemplateId", taskTemplateId()) .add("QuickConnectId", quickConnectId()).add("RelatedContactId", relatedContactId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "InstanceId": return Optional.ofNullable(clazz.cast(instanceId())); case "PreviousContactId": return Optional.ofNullable(clazz.cast(previousContactId())); case "ContactFlowId": return Optional.ofNullable(clazz.cast(contactFlowId())); case "Attributes": return Optional.ofNullable(clazz.cast(attributes())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "References": return Optional.ofNullable(clazz.cast(references())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "ClientToken": return Optional.ofNullable(clazz.cast(clientToken())); case "ScheduledTime": return Optional.ofNullable(clazz.cast(scheduledTime())); case "TaskTemplateId": return Optional.ofNullable(clazz.cast(taskTemplateId())); case "QuickConnectId": return Optional.ofNullable(clazz.cast(quickConnectId())); case "RelatedContactId": return Optional.ofNullable(clazz.cast(relatedContactId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((StartTaskContactRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends ConnectRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The identifier of the Amazon Connect instance. You can find the instance ID * in the Amazon Resource Name (ARN) of the instance. *

* * @param instanceId * The identifier of the Amazon Connect instance. You can find the instance * ID in the Amazon Resource Name (ARN) of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceId(String instanceId); /** *

* The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to task * contacts linked using the same PreviousContactID will affect every contact in the chain. There * can be a maximum of 12 linked task contacts in a chain. *

* * @param previousContactId * The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to * task contacts linked using the same PreviousContactID will affect every contact in the * chain. There can be a maximum of 12 linked task contacts in a chain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder previousContactId(String previousContactId); /** *

* The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin * website, on the navigation menu go to Routing, Contact Flows. Choose the flow. On the flow * page, under the name of the flow, choose Show additional flow information. The ContactFlowId is the * last part of the ARN, shown here in bold: *

*

* arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx *

* * @param contactFlowId * The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect * admin website, on the navigation menu go to Routing, Contact Flows. Choose the flow. On * the flow page, under the name of the flow, choose Show additional flow information. The * ContactFlowId is the last part of the ARN, shown here in bold:

*

* arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx * @return Returns a reference to this object so that method calls can be chained together. */ Builder contactFlowId(String contactFlowId); /** *

* A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and * can be accessed in flows just like any other contact attributes. *

*

* There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only * alphanumeric, dash, and underscore characters. *

* * @param attributes * A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, * and can be accessed in flows just like any other contact attributes.

*

* There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can * include only alphanumeric, dash, and underscore characters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attributes(Map attributes); /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param name * The name of a task that is shown to an agent in the Contact Control Panel (CCP). * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following * reference types at the time of creation: URL | NUMBER | STRING | * DATE | EMAIL. ATTACHMENT is not a supported reference type during task * creation. *

* * @param references * A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the * following reference types at the time of creation: URL | NUMBER | * STRING | DATE | EMAIL. ATTACHMENT is not a * supported reference type during task creation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder references(Map references); /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param description * A description of the task that is shown to an agent in the Contact Control Panel (CCP). * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not * provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe * with idempotent APIs. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not * provided, the Amazon Web Services SDK populates this field. For more information about idempotency, * see Making * retries safe with idempotent APIs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clientToken(String clientToken); /** *

* The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

* * @param scheduledTime * The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled * time cannot be in the past. It must be within up to 6 days in future. * @return Returns a reference to this object so that method calls can be chained together. */ Builder scheduledTime(Instant scheduledTime); /** *

* A unique identifier for the task template. For more information about task templates, see Create task templates in * the Amazon Connect Administrator Guide. *

* * @param taskTemplateId * A unique identifier for the task template. For more information about task templates, see Create task * templates in the Amazon Connect Administrator Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskTemplateId(String taskTemplateId); /** *

* The identifier for the quick connect. Tasks that are created by using QuickConnectId will use * the flow that is defined on agent or queue quick connect. For more information about quick connects, see Create quick connects. *

* * @param quickConnectId * The identifier for the quick connect. Tasks that are created by using QuickConnectId will * use the flow that is defined on agent or queue quick connect. For more information about quick * connects, see Create quick * connects. * @return Returns a reference to this object so that method calls can be chained together. */ Builder quickConnectId(String quickConnectId); /** *

* The contactId that is related to this * contact. Linking tasks together by using RelatedContactID copies over contact attributes from * the related task contact to the new task contact. All updates to user-defined attributes in the new task * contact are limited to the individual contact ID, unlike what happens when tasks are linked by using * PreviousContactID. There are no limits to the number of contacts that can be linked by using * RelatedContactId. *

* * @param relatedContactId * The contactId that is related to * this contact. Linking tasks together by using RelatedContactID copies over contact * attributes from the related task contact to the new task contact. All updates to user-defined * attributes in the new task contact are limited to the individual contact ID, unlike what happens when * tasks are linked by using PreviousContactID. There are no limits to the number of * contacts that can be linked by using RelatedContactId. * @return Returns a reference to this object so that method calls can be chained together. */ Builder relatedContactId(String relatedContactId); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends ConnectRequest.BuilderImpl implements Builder { private String instanceId; private String previousContactId; private String contactFlowId; private Map attributes = DefaultSdkAutoConstructMap.getInstance(); private String name; private Map references = DefaultSdkAutoConstructMap.getInstance(); private String description; private String clientToken; private Instant scheduledTime; private String taskTemplateId; private String quickConnectId; private String relatedContactId; private BuilderImpl() { } private BuilderImpl(StartTaskContactRequest model) { super(model); instanceId(model.instanceId); previousContactId(model.previousContactId); contactFlowId(model.contactFlowId); attributes(model.attributes); name(model.name); references(model.references); description(model.description); clientToken(model.clientToken); scheduledTime(model.scheduledTime); taskTemplateId(model.taskTemplateId); quickConnectId(model.quickConnectId); relatedContactId(model.relatedContactId); } public final String getInstanceId() { return instanceId; } public final void setInstanceId(String instanceId) { this.instanceId = instanceId; } @Override public final Builder instanceId(String instanceId) { this.instanceId = instanceId; return this; } public final String getPreviousContactId() { return previousContactId; } public final void setPreviousContactId(String previousContactId) { this.previousContactId = previousContactId; } @Override public final Builder previousContactId(String previousContactId) { this.previousContactId = previousContactId; return this; } public final String getContactFlowId() { return contactFlowId; } public final void setContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; } @Override public final Builder contactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; return this; } public final Map getAttributes() { if (attributes instanceof SdkAutoConstructMap) { return null; } return attributes; } public final void setAttributes(Map attributes) { this.attributes = AttributesCopier.copy(attributes); } @Override public final Builder attributes(Map attributes) { this.attributes = AttributesCopier.copy(attributes); return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final Map getReferences() { Map result = ContactReferencesCopier.copyToBuilder(this.references); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setReferences(Map references) { this.references = ContactReferencesCopier.copyFromBuilder(references); } @Override public final Builder references(Map references) { this.references = ContactReferencesCopier.copy(references); 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 String getClientToken() { return clientToken; } public final void setClientToken(String clientToken) { this.clientToken = clientToken; } @Override public final Builder clientToken(String clientToken) { this.clientToken = clientToken; return this; } public final Instant getScheduledTime() { return scheduledTime; } public final void setScheduledTime(Instant scheduledTime) { this.scheduledTime = scheduledTime; } @Override public final Builder scheduledTime(Instant scheduledTime) { this.scheduledTime = scheduledTime; return this; } public final String getTaskTemplateId() { return taskTemplateId; } public final void setTaskTemplateId(String taskTemplateId) { this.taskTemplateId = taskTemplateId; } @Override public final Builder taskTemplateId(String taskTemplateId) { this.taskTemplateId = taskTemplateId; return this; } public final String getQuickConnectId() { return quickConnectId; } public final void setQuickConnectId(String quickConnectId) { this.quickConnectId = quickConnectId; } @Override public final Builder quickConnectId(String quickConnectId) { this.quickConnectId = quickConnectId; return this; } public final String getRelatedContactId() { return relatedContactId; } public final void setRelatedContactId(String relatedContactId) { this.relatedContactId = relatedContactId; } @Override public final Builder relatedContactId(String relatedContactId) { this.relatedContactId = relatedContactId; 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 StartTaskContactRequest build() { return new StartTaskContactRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy