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

software.amazon.awssdk.services.wisdom.model.UpdateQuickResponseRequest Maven / Gradle / Ivy

Go to download

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

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

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import 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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class UpdateQuickResponseRequest extends WisdomRequest implements
        ToCopyableBuilder {
    private static final SdkField> CHANNELS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("channels")
            .getter(getter(UpdateQuickResponseRequest::channels))
            .setter(setter(Builder::channels))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("channels").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField CONTENT_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("content")
            .getter(getter(UpdateQuickResponseRequest::content)).setter(setter(Builder::content))
            .constructor(QuickResponseDataProvider::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("content").build()).build();

    private static final SdkField CONTENT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("contentType").getter(getter(UpdateQuickResponseRequest::contentType))
            .setter(setter(Builder::contentType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("contentType").build()).build();

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

    private static final SdkField GROUPING_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("groupingConfiguration")
            .getter(getter(UpdateQuickResponseRequest::groupingConfiguration)).setter(setter(Builder::groupingConfiguration))
            .constructor(GroupingConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("groupingConfiguration").build())
            .build();

    private static final SdkField IS_ACTIVE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("isActive").getter(getter(UpdateQuickResponseRequest::isActive)).setter(setter(Builder::isActive))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("isActive").build()).build();

    private static final SdkField KNOWLEDGE_BASE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("knowledgeBaseId").getter(getter(UpdateQuickResponseRequest::knowledgeBaseId))
            .setter(setter(Builder::knowledgeBaseId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("knowledgeBaseId").build()).build();

    private static final SdkField LANGUAGE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("language").getter(getter(UpdateQuickResponseRequest::language)).setter(setter(Builder::language))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("language").build()).build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
            .getter(getter(UpdateQuickResponseRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();

    private static final SdkField QUICK_RESPONSE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("quickResponseId").getter(getter(UpdateQuickResponseRequest::quickResponseId))
            .setter(setter(Builder::quickResponseId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("quickResponseId").build()).build();

    private static final SdkField REMOVE_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("removeDescription").getter(getter(UpdateQuickResponseRequest::removeDescription))
            .setter(setter(Builder::removeDescription))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("removeDescription").build()).build();

    private static final SdkField REMOVE_GROUPING_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.BOOLEAN)
            .memberName("removeGroupingConfiguration")
            .getter(getter(UpdateQuickResponseRequest::removeGroupingConfiguration))
            .setter(setter(Builder::removeGroupingConfiguration))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("removeGroupingConfiguration")
                    .build()).build();

    private static final SdkField REMOVE_SHORTCUT_KEY_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("removeShortcutKey").getter(getter(UpdateQuickResponseRequest::removeShortcutKey))
            .setter(setter(Builder::removeShortcutKey))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("removeShortcutKey").build()).build();

    private static final SdkField SHORTCUT_KEY_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("shortcutKey").getter(getter(UpdateQuickResponseRequest::shortcutKey))
            .setter(setter(Builder::shortcutKey))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("shortcutKey").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANNELS_FIELD, CONTENT_FIELD,
            CONTENT_TYPE_FIELD, DESCRIPTION_FIELD, GROUPING_CONFIGURATION_FIELD, IS_ACTIVE_FIELD, KNOWLEDGE_BASE_ID_FIELD,
            LANGUAGE_FIELD, NAME_FIELD, QUICK_RESPONSE_ID_FIELD, REMOVE_DESCRIPTION_FIELD, REMOVE_GROUPING_CONFIGURATION_FIELD,
            REMOVE_SHORTCUT_KEY_FIELD, SHORTCUT_KEY_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();

    private final List channels;

    private final QuickResponseDataProvider content;

    private final String contentType;

    private final String description;

    private final GroupingConfiguration groupingConfiguration;

    private final Boolean isActive;

    private final String knowledgeBaseId;

    private final String language;

    private final String name;

    private final String quickResponseId;

    private final Boolean removeDescription;

    private final Boolean removeGroupingConfiguration;

    private final Boolean removeShortcutKey;

    private final String shortcutKey;

    private UpdateQuickResponseRequest(BuilderImpl builder) {
        super(builder);
        this.channels = builder.channels;
        this.content = builder.content;
        this.contentType = builder.contentType;
        this.description = builder.description;
        this.groupingConfiguration = builder.groupingConfiguration;
        this.isActive = builder.isActive;
        this.knowledgeBaseId = builder.knowledgeBaseId;
        this.language = builder.language;
        this.name = builder.name;
        this.quickResponseId = builder.quickResponseId;
        this.removeDescription = builder.removeDescription;
        this.removeGroupingConfiguration = builder.removeGroupingConfiguration;
        this.removeShortcutKey = builder.removeShortcutKey;
        this.shortcutKey = builder.shortcutKey;
    }

    /**
     * For responses, this returns true if the service returned a value for the Channels 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 hasChannels() {
        return channels != null && !(channels instanceof SdkAutoConstructList);
    }

    /**
     * 

* The Amazon Connect contact channels this quick response applies to. The supported contact channel types include * Chat. *

*

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

* * @return The Amazon Connect contact channels this quick response applies to. The supported contact channel types * include Chat. */ public final List channels() { return channels; } /** *

* The updated content of the quick response. *

* * @return The updated content of the quick response. */ public final QuickResponseDataProvider content() { return content; } /** *

* The media type of the quick response content. *

*
    *
  • *

    * Use application/x.quickresponse;format=plain for quick response written in plain text. *

    *
  • *
  • *

    * Use application/x.quickresponse;format=markdown for quick response written in richtext. *

    *
  • *
* * @return The media type of the quick response content.

*
    *
  • *

    * Use application/x.quickresponse;format=plain for quick response written in plain text. *

    *
  • *
  • *

    * Use application/x.quickresponse;format=markdown for quick response written in richtext. *

    *
  • */ public final String contentType() { return contentType; } /** *

    * The updated description of the quick response. *

    * * @return The updated description of the quick response. */ public final String description() { return description; } /** *

    * The updated grouping configuration of the quick response. *

    * * @return The updated grouping configuration of the quick response. */ public final GroupingConfiguration groupingConfiguration() { return groupingConfiguration; } /** *

    * Whether the quick response is active. *

    * * @return Whether the quick response is active. */ public final Boolean isActive() { return isActive; } /** *

    * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing * Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN. *

    * * @return The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're * storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN. */ public final String knowledgeBaseId() { return knowledgeBaseId; } /** *

    * The language code value for the language in which the quick response is written. The supported language codes * include de_DE, en_US, es_ES, fr_FR, id_ID, * it_IT, ja_JP, ko_KR, pt_BR, zh_CN, * zh_TW *

    * * @return The language code value for the language in which the quick response is written. The supported language * codes include de_DE, en_US, es_ES, fr_FR, * id_ID, it_IT, ja_JP, ko_KR, pt_BR, * zh_CN, zh_TW */ public final String language() { return language; } /** *

    * The name of the quick response. *

    * * @return The name of the quick response. */ public final String name() { return name; } /** *

    * The identifier of the quick response. *

    * * @return The identifier of the quick response. */ public final String quickResponseId() { return quickResponseId; } /** *

    * Whether to remove the description from the quick response. *

    * * @return Whether to remove the description from the quick response. */ public final Boolean removeDescription() { return removeDescription; } /** *

    * Whether to remove the grouping configuration of the quick response. *

    * * @return Whether to remove the grouping configuration of the quick response. */ public final Boolean removeGroupingConfiguration() { return removeGroupingConfiguration; } /** *

    * Whether to remove the shortcut key of the quick response. *

    * * @return Whether to remove the shortcut key of the quick response. */ public final Boolean removeShortcutKey() { return removeShortcutKey; } /** *

    * The shortcut key of the quick response. The value should be unique across the knowledge base. *

    * * @return The shortcut key of the quick response. The value should be unique across the knowledge base. */ public final String shortcutKey() { return shortcutKey; } @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(hasChannels() ? channels() : null); hashCode = 31 * hashCode + Objects.hashCode(content()); hashCode = 31 * hashCode + Objects.hashCode(contentType()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(groupingConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(isActive()); hashCode = 31 * hashCode + Objects.hashCode(knowledgeBaseId()); hashCode = 31 * hashCode + Objects.hashCode(language()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(quickResponseId()); hashCode = 31 * hashCode + Objects.hashCode(removeDescription()); hashCode = 31 * hashCode + Objects.hashCode(removeGroupingConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(removeShortcutKey()); hashCode = 31 * hashCode + Objects.hashCode(shortcutKey()); 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 UpdateQuickResponseRequest)) { return false; } UpdateQuickResponseRequest other = (UpdateQuickResponseRequest) obj; return hasChannels() == other.hasChannels() && Objects.equals(channels(), other.channels()) && Objects.equals(content(), other.content()) && Objects.equals(contentType(), other.contentType()) && Objects.equals(description(), other.description()) && Objects.equals(groupingConfiguration(), other.groupingConfiguration()) && Objects.equals(isActive(), other.isActive()) && Objects.equals(knowledgeBaseId(), other.knowledgeBaseId()) && Objects.equals(language(), other.language()) && Objects.equals(name(), other.name()) && Objects.equals(quickResponseId(), other.quickResponseId()) && Objects.equals(removeDescription(), other.removeDescription()) && Objects.equals(removeGroupingConfiguration(), other.removeGroupingConfiguration()) && Objects.equals(removeShortcutKey(), other.removeShortcutKey()) && Objects.equals(shortcutKey(), other.shortcutKey()); } /** * 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("UpdateQuickResponseRequest") .add("Channels", channels() == null ? null : "*** Sensitive Data Redacted ***").add("Content", content()) .add("ContentType", contentType()).add("Description", description()) .add("GroupingConfiguration", groupingConfiguration()).add("IsActive", isActive()) .add("KnowledgeBaseId", knowledgeBaseId()).add("Language", language()).add("Name", name()) .add("QuickResponseId", quickResponseId()).add("RemoveDescription", removeDescription()) .add("RemoveGroupingConfiguration", removeGroupingConfiguration()).add("RemoveShortcutKey", removeShortcutKey()) .add("ShortcutKey", shortcutKey()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "channels": return Optional.ofNullable(clazz.cast(channels())); case "content": return Optional.ofNullable(clazz.cast(content())); case "contentType": return Optional.ofNullable(clazz.cast(contentType())); case "description": return Optional.ofNullable(clazz.cast(description())); case "groupingConfiguration": return Optional.ofNullable(clazz.cast(groupingConfiguration())); case "isActive": return Optional.ofNullable(clazz.cast(isActive())); case "knowledgeBaseId": return Optional.ofNullable(clazz.cast(knowledgeBaseId())); case "language": return Optional.ofNullable(clazz.cast(language())); case "name": return Optional.ofNullable(clazz.cast(name())); case "quickResponseId": return Optional.ofNullable(clazz.cast(quickResponseId())); case "removeDescription": return Optional.ofNullable(clazz.cast(removeDescription())); case "removeGroupingConfiguration": return Optional.ofNullable(clazz.cast(removeGroupingConfiguration())); case "removeShortcutKey": return Optional.ofNullable(clazz.cast(removeShortcutKey())); case "shortcutKey": return Optional.ofNullable(clazz.cast(shortcutKey())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("channels", CHANNELS_FIELD); map.put("content", CONTENT_FIELD); map.put("contentType", CONTENT_TYPE_FIELD); map.put("description", DESCRIPTION_FIELD); map.put("groupingConfiguration", GROUPING_CONFIGURATION_FIELD); map.put("isActive", IS_ACTIVE_FIELD); map.put("knowledgeBaseId", KNOWLEDGE_BASE_ID_FIELD); map.put("language", LANGUAGE_FIELD); map.put("name", NAME_FIELD); map.put("quickResponseId", QUICK_RESPONSE_ID_FIELD); map.put("removeDescription", REMOVE_DESCRIPTION_FIELD); map.put("removeGroupingConfiguration", REMOVE_GROUPING_CONFIGURATION_FIELD); map.put("removeShortcutKey", REMOVE_SHORTCUT_KEY_FIELD); map.put("shortcutKey", SHORTCUT_KEY_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((UpdateQuickResponseRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends WisdomRequest.Builder, SdkPojo, CopyableBuilder { /** *

    * The Amazon Connect contact channels this quick response applies to. The supported contact channel types * include Chat. *

    * * @param channels * The Amazon Connect contact channels this quick response applies to. The supported contact channel * types include Chat. * @return Returns a reference to this object so that method calls can be chained together. */ Builder channels(Collection channels); /** *

    * The Amazon Connect contact channels this quick response applies to. The supported contact channel types * include Chat. *

    * * @param channels * The Amazon Connect contact channels this quick response applies to. The supported contact channel * types include Chat. * @return Returns a reference to this object so that method calls can be chained together. */ Builder channels(String... channels); /** *

    * The updated content of the quick response. *

    * * @param content * The updated content of the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder content(QuickResponseDataProvider content); /** *

    * The updated content of the quick response. *

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

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

    * The media type of the quick response content. *

    *
      *
    • *

      * Use application/x.quickresponse;format=plain for quick response written in plain text. *

      *
    • *
    • *

      * Use application/x.quickresponse;format=markdown for quick response written in richtext. *

      *
    • *
    * * @param contentType * The media type of the quick response content.

    *
      *
    • *

      * Use application/x.quickresponse;format=plain for quick response written in plain text. *

      *
    • *
    • *

      * Use application/x.quickresponse;format=markdown for quick response written in richtext. *

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

      * The updated description of the quick response. *

      * * @param description * The updated description of the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

      * The updated grouping configuration of the quick response. *

      * * @param groupingConfiguration * The updated grouping configuration of the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder groupingConfiguration(GroupingConfiguration groupingConfiguration); /** *

      * The updated grouping configuration of the quick response. *

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

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

      * Whether the quick response is active. *

      * * @param isActive * Whether the quick response is active. * @return Returns a reference to this object so that method calls can be chained together. */ Builder isActive(Boolean isActive); /** *

      * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're * storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN. *

      * * @param knowledgeBaseId * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if * you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the * ARN. * @return Returns a reference to this object so that method calls can be chained together. */ Builder knowledgeBaseId(String knowledgeBaseId); /** *

      * The language code value for the language in which the quick response is written. The supported language codes * include de_DE, en_US, es_ES, fr_FR, id_ID, * it_IT, ja_JP, ko_KR, pt_BR, zh_CN, * zh_TW *

      * * @param language * The language code value for the language in which the quick response is written. The supported * language codes include de_DE, en_US, es_ES, fr_FR, * id_ID, it_IT, ja_JP, ko_KR, pt_BR, * zh_CN, zh_TW * @return Returns a reference to this object so that method calls can be chained together. */ Builder language(String language); /** *

      * The name of the quick response. *

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

      * The identifier of the quick response. *

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

      * Whether to remove the description from the quick response. *

      * * @param removeDescription * Whether to remove the description from the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder removeDescription(Boolean removeDescription); /** *

      * Whether to remove the grouping configuration of the quick response. *

      * * @param removeGroupingConfiguration * Whether to remove the grouping configuration of the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder removeGroupingConfiguration(Boolean removeGroupingConfiguration); /** *

      * Whether to remove the shortcut key of the quick response. *

      * * @param removeShortcutKey * Whether to remove the shortcut key of the quick response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder removeShortcutKey(Boolean removeShortcutKey); /** *

      * The shortcut key of the quick response. The value should be unique across the knowledge base. *

      * * @param shortcutKey * The shortcut key of the quick response. The value should be unique across the knowledge base. * @return Returns a reference to this object so that method calls can be chained together. */ Builder shortcutKey(String shortcutKey); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends WisdomRequest.BuilderImpl implements Builder { private List channels = DefaultSdkAutoConstructList.getInstance(); private QuickResponseDataProvider content; private String contentType; private String description; private GroupingConfiguration groupingConfiguration; private Boolean isActive; private String knowledgeBaseId; private String language; private String name; private String quickResponseId; private Boolean removeDescription; private Boolean removeGroupingConfiguration; private Boolean removeShortcutKey; private String shortcutKey; private BuilderImpl() { } private BuilderImpl(UpdateQuickResponseRequest model) { super(model); channels(model.channels); content(model.content); contentType(model.contentType); description(model.description); groupingConfiguration(model.groupingConfiguration); isActive(model.isActive); knowledgeBaseId(model.knowledgeBaseId); language(model.language); name(model.name); quickResponseId(model.quickResponseId); removeDescription(model.removeDescription); removeGroupingConfiguration(model.removeGroupingConfiguration); removeShortcutKey(model.removeShortcutKey); shortcutKey(model.shortcutKey); } public final Collection getChannels() { if (channels instanceof SdkAutoConstructList) { return null; } return channels; } public final void setChannels(Collection channels) { this.channels = ChannelsCopier.copy(channels); } @Override public final Builder channels(Collection channels) { this.channels = ChannelsCopier.copy(channels); return this; } @Override @SafeVarargs public final Builder channels(String... channels) { channels(Arrays.asList(channels)); return this; } public final QuickResponseDataProvider.Builder getContent() { return content != null ? content.toBuilder() : null; } public final void setContent(QuickResponseDataProvider.BuilderImpl content) { this.content = content != null ? content.build() : null; } @Override public final Builder content(QuickResponseDataProvider content) { this.content = content; return this; } public final String getContentType() { return contentType; } public final void setContentType(String contentType) { this.contentType = contentType; } @Override public final Builder contentType(String contentType) { this.contentType = contentType; 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 GroupingConfiguration.Builder getGroupingConfiguration() { return groupingConfiguration != null ? groupingConfiguration.toBuilder() : null; } public final void setGroupingConfiguration(GroupingConfiguration.BuilderImpl groupingConfiguration) { this.groupingConfiguration = groupingConfiguration != null ? groupingConfiguration.build() : null; } @Override public final Builder groupingConfiguration(GroupingConfiguration groupingConfiguration) { this.groupingConfiguration = groupingConfiguration; return this; } public final Boolean getIsActive() { return isActive; } public final void setIsActive(Boolean isActive) { this.isActive = isActive; } @Override public final Builder isActive(Boolean isActive) { this.isActive = isActive; return this; } public final String getKnowledgeBaseId() { return knowledgeBaseId; } public final void setKnowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; } @Override public final Builder knowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; return this; } public final String getLanguage() { return language; } public final void setLanguage(String language) { this.language = language; } @Override public final Builder language(String language) { this.language = language; 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 String getQuickResponseId() { return quickResponseId; } public final void setQuickResponseId(String quickResponseId) { this.quickResponseId = quickResponseId; } @Override public final Builder quickResponseId(String quickResponseId) { this.quickResponseId = quickResponseId; return this; } public final Boolean getRemoveDescription() { return removeDescription; } public final void setRemoveDescription(Boolean removeDescription) { this.removeDescription = removeDescription; } @Override public final Builder removeDescription(Boolean removeDescription) { this.removeDescription = removeDescription; return this; } public final Boolean getRemoveGroupingConfiguration() { return removeGroupingConfiguration; } public final void setRemoveGroupingConfiguration(Boolean removeGroupingConfiguration) { this.removeGroupingConfiguration = removeGroupingConfiguration; } @Override public final Builder removeGroupingConfiguration(Boolean removeGroupingConfiguration) { this.removeGroupingConfiguration = removeGroupingConfiguration; return this; } public final Boolean getRemoveShortcutKey() { return removeShortcutKey; } public final void setRemoveShortcutKey(Boolean removeShortcutKey) { this.removeShortcutKey = removeShortcutKey; } @Override public final Builder removeShortcutKey(Boolean removeShortcutKey) { this.removeShortcutKey = removeShortcutKey; return this; } public final String getShortcutKey() { return shortcutKey; } public final void setShortcutKey(String shortcutKey) { this.shortcutKey = shortcutKey; } @Override public final Builder shortcutKey(String shortcutKey) { this.shortcutKey = shortcutKey; 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 UpdateQuickResponseRequest build() { return new UpdateQuickResponseRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy