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

io.thestencil.iam.api.ImmutableUserActionsClientConfig Maven / Gradle / Ivy

There is a newer version: 1.148.40
Show newest version
package io.thestencil.iam.api;

import com.google.common.base.MoreObjects;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.Var;
import io.vertx.mutiny.ext.web.client.WebClient;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import org.immutables.value.Generated;

/**
 * Immutable implementation of {@link UserActionsClient.UserActionsClientConfig}.
 * 

* Use the builder to create immutable instances: * {@code ImmutableUserActionsClientConfig.builder()}. */ @Generated(from = "UserActionsClient.UserActionsClientConfig", generator = "Immutables") @SuppressWarnings({"all"}) @ParametersAreNonnullByDefault @javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUserActionsClientConfig implements UserActionsClient.UserActionsClientConfig { private final WebClient webClient; private final String defaultLanguage; private final String servicePath; private final String fillPath; private final String reviewPath; private final String messagesPath; private final String attachmentsPath; private final String authorizationsPath; private final RemoteIntegration attachments; private final RemoteIntegration replyTo; private final RemoteIntegration processes; private final RemoteIntegration fill; private final RemoteIntegration review; private ImmutableUserActionsClientConfig( WebClient webClient, String defaultLanguage, String servicePath, String fillPath, String reviewPath, String messagesPath, String attachmentsPath, String authorizationsPath, RemoteIntegration attachments, RemoteIntegration replyTo, RemoteIntegration processes, RemoteIntegration fill, RemoteIntegration review) { this.webClient = webClient; this.defaultLanguage = defaultLanguage; this.servicePath = servicePath; this.fillPath = fillPath; this.reviewPath = reviewPath; this.messagesPath = messagesPath; this.attachmentsPath = attachmentsPath; this.authorizationsPath = authorizationsPath; this.attachments = attachments; this.replyTo = replyTo; this.processes = processes; this.fill = fill; this.review = review; } /** * @return The value of the {@code webClient} attribute */ @Override public WebClient getWebClient() { return webClient; } /** * @return The value of the {@code defaultLanguage} attribute */ @Override public String getDefaultLanguage() { return defaultLanguage; } /** * @return The value of the {@code servicePath} attribute */ @Override public String getServicePath() { return servicePath; } /** * @return The value of the {@code fillPath} attribute */ @Override public String getFillPath() { return fillPath; } /** * @return The value of the {@code reviewPath} attribute */ @Override public String getReviewPath() { return reviewPath; } /** * @return The value of the {@code messagesPath} attribute */ @Override public String getMessagesPath() { return messagesPath; } /** * @return The value of the {@code attachmentsPath} attribute */ @Override public String getAttachmentsPath() { return attachmentsPath; } /** * @return The value of the {@code authorizationsPath} attribute */ @Override public String getAuthorizationsPath() { return authorizationsPath; } /** * @return The value of the {@code attachments} attribute */ @Override public RemoteIntegration getAttachments() { return attachments; } /** * @return The value of the {@code replyTo} attribute */ @Override public RemoteIntegration getReplyTo() { return replyTo; } /** * @return The value of the {@code processes} attribute */ @Override public RemoteIntegration getProcesses() { return processes; } /** * @return The value of the {@code fill} attribute */ @Override public RemoteIntegration getFill() { return fill; } /** * @return The value of the {@code review} attribute */ @Override public RemoteIntegration getReview() { return review; } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getWebClient() webClient} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for webClient * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withWebClient(WebClient value) { if (this.webClient == value) return this; WebClient newValue = Objects.requireNonNull(value, "webClient"); return new ImmutableUserActionsClientConfig( newValue, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getDefaultLanguage() defaultLanguage} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for defaultLanguage * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withDefaultLanguage(String value) { String newValue = Objects.requireNonNull(value, "defaultLanguage"); if (this.defaultLanguage.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, newValue, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getServicePath() servicePath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for servicePath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withServicePath(String value) { String newValue = Objects.requireNonNull(value, "servicePath"); if (this.servicePath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, newValue, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getFillPath() fillPath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for fillPath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withFillPath(String value) { String newValue = Objects.requireNonNull(value, "fillPath"); if (this.fillPath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, newValue, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getReviewPath() reviewPath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for reviewPath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withReviewPath(String value) { String newValue = Objects.requireNonNull(value, "reviewPath"); if (this.reviewPath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, newValue, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getMessagesPath() messagesPath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for messagesPath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withMessagesPath(String value) { String newValue = Objects.requireNonNull(value, "messagesPath"); if (this.messagesPath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, newValue, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getAttachmentsPath() attachmentsPath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for attachmentsPath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withAttachmentsPath(String value) { String newValue = Objects.requireNonNull(value, "attachmentsPath"); if (this.attachmentsPath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, newValue, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getAuthorizationsPath() authorizationsPath} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for authorizationsPath * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withAuthorizationsPath(String value) { String newValue = Objects.requireNonNull(value, "authorizationsPath"); if (this.authorizationsPath.equals(newValue)) return this; return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, newValue, this.attachments, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getAttachments() attachments} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for attachments * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withAttachments(RemoteIntegration value) { if (this.attachments == value) return this; RemoteIntegration newValue = Objects.requireNonNull(value, "attachments"); return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, newValue, this.replyTo, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getReplyTo() replyTo} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for replyTo * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withReplyTo(RemoteIntegration value) { if (this.replyTo == value) return this; RemoteIntegration newValue = Objects.requireNonNull(value, "replyTo"); return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, newValue, this.processes, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getProcesses() processes} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for processes * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withProcesses(RemoteIntegration value) { if (this.processes == value) return this; RemoteIntegration newValue = Objects.requireNonNull(value, "processes"); return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, newValue, this.fill, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getFill() fill} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for fill * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withFill(RemoteIntegration value) { if (this.fill == value) return this; RemoteIntegration newValue = Objects.requireNonNull(value, "fill"); return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, newValue, this.review); } /** * Copy the current immutable object by setting a value for the {@link UserActionsClient.UserActionsClientConfig#getReview() review} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for review * @return A modified copy of the {@code this} object */ public final ImmutableUserActionsClientConfig withReview(RemoteIntegration value) { if (this.review == value) return this; RemoteIntegration newValue = Objects.requireNonNull(value, "review"); return new ImmutableUserActionsClientConfig( this.webClient, this.defaultLanguage, this.servicePath, this.fillPath, this.reviewPath, this.messagesPath, this.attachmentsPath, this.authorizationsPath, this.attachments, this.replyTo, this.processes, this.fill, newValue); } /** * This instance is equal to all instances of {@code ImmutableUserActionsClientConfig} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableUserActionsClientConfig && equalTo((ImmutableUserActionsClientConfig) another); } private boolean equalTo(ImmutableUserActionsClientConfig another) { return webClient.equals(another.webClient) && defaultLanguage.equals(another.defaultLanguage) && servicePath.equals(another.servicePath) && fillPath.equals(another.fillPath) && reviewPath.equals(another.reviewPath) && messagesPath.equals(another.messagesPath) && attachmentsPath.equals(another.attachmentsPath) && authorizationsPath.equals(another.authorizationsPath) && attachments.equals(another.attachments) && replyTo.equals(another.replyTo) && processes.equals(another.processes) && fill.equals(another.fill) && review.equals(another.review); } /** * Computes a hash code from attributes: {@code webClient}, {@code defaultLanguage}, {@code servicePath}, {@code fillPath}, {@code reviewPath}, {@code messagesPath}, {@code attachmentsPath}, {@code authorizationsPath}, {@code attachments}, {@code replyTo}, {@code processes}, {@code fill}, {@code review}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + webClient.hashCode(); h += (h << 5) + defaultLanguage.hashCode(); h += (h << 5) + servicePath.hashCode(); h += (h << 5) + fillPath.hashCode(); h += (h << 5) + reviewPath.hashCode(); h += (h << 5) + messagesPath.hashCode(); h += (h << 5) + attachmentsPath.hashCode(); h += (h << 5) + authorizationsPath.hashCode(); h += (h << 5) + attachments.hashCode(); h += (h << 5) + replyTo.hashCode(); h += (h << 5) + processes.hashCode(); h += (h << 5) + fill.hashCode(); h += (h << 5) + review.hashCode(); return h; } /** * Prints the immutable value {@code UserActionsClientConfig} with attribute values. * @return A string representation of the value */ @Override public String toString() { return MoreObjects.toStringHelper("UserActionsClientConfig") .omitNullValues() .add("webClient", webClient) .add("defaultLanguage", defaultLanguage) .add("servicePath", servicePath) .add("fillPath", fillPath) .add("reviewPath", reviewPath) .add("messagesPath", messagesPath) .add("attachmentsPath", attachmentsPath) .add("authorizationsPath", authorizationsPath) .add("attachments", attachments) .add("replyTo", replyTo) .add("processes", processes) .add("fill", fill) .add("review", review) .toString(); } /** * Creates an immutable copy of a {@link UserActionsClient.UserActionsClientConfig} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable UserActionsClientConfig instance */ public static ImmutableUserActionsClientConfig copyOf(UserActionsClient.UserActionsClientConfig instance) { if (instance instanceof ImmutableUserActionsClientConfig) { return (ImmutableUserActionsClientConfig) instance; } return ImmutableUserActionsClientConfig.builder() .from(instance) .build(); } /** * Creates a builder for {@link ImmutableUserActionsClientConfig ImmutableUserActionsClientConfig}. *

   * ImmutableUserActionsClientConfig.builder()
   *    .webClient(io.vertx.mutiny.ext.web.client.WebClient) // required {@link UserActionsClient.UserActionsClientConfig#getWebClient() webClient}
   *    .defaultLanguage(String) // required {@link UserActionsClient.UserActionsClientConfig#getDefaultLanguage() defaultLanguage}
   *    .servicePath(String) // required {@link UserActionsClient.UserActionsClientConfig#getServicePath() servicePath}
   *    .fillPath(String) // required {@link UserActionsClient.UserActionsClientConfig#getFillPath() fillPath}
   *    .reviewPath(String) // required {@link UserActionsClient.UserActionsClientConfig#getReviewPath() reviewPath}
   *    .messagesPath(String) // required {@link UserActionsClient.UserActionsClientConfig#getMessagesPath() messagesPath}
   *    .attachmentsPath(String) // required {@link UserActionsClient.UserActionsClientConfig#getAttachmentsPath() attachmentsPath}
   *    .authorizationsPath(String) // required {@link UserActionsClient.UserActionsClientConfig#getAuthorizationsPath() authorizationsPath}
   *    .attachments(io.thestencil.iam.api.RemoteIntegration) // required {@link UserActionsClient.UserActionsClientConfig#getAttachments() attachments}
   *    .replyTo(io.thestencil.iam.api.RemoteIntegration) // required {@link UserActionsClient.UserActionsClientConfig#getReplyTo() replyTo}
   *    .processes(io.thestencil.iam.api.RemoteIntegration) // required {@link UserActionsClient.UserActionsClientConfig#getProcesses() processes}
   *    .fill(io.thestencil.iam.api.RemoteIntegration) // required {@link UserActionsClient.UserActionsClientConfig#getFill() fill}
   *    .review(io.thestencil.iam.api.RemoteIntegration) // required {@link UserActionsClient.UserActionsClientConfig#getReview() review}
   *    .build();
   * 
* @return A new ImmutableUserActionsClientConfig builder */ public static ImmutableUserActionsClientConfig.Builder builder() { return new ImmutableUserActionsClientConfig.Builder(); } /** * Builds instances of type {@link ImmutableUserActionsClientConfig ImmutableUserActionsClientConfig}. * Initialize attributes and then invoke the {@link #build()} method to create an * immutable instance. *

{@code Builder} is not thread-safe and generally should not be stored in a field or collection, * but instead used immediately to create instances. */ @Generated(from = "UserActionsClient.UserActionsClientConfig", generator = "Immutables") @NotThreadSafe public static final class Builder { private static final long INIT_BIT_WEB_CLIENT = 0x1L; private static final long INIT_BIT_DEFAULT_LANGUAGE = 0x2L; private static final long INIT_BIT_SERVICE_PATH = 0x4L; private static final long INIT_BIT_FILL_PATH = 0x8L; private static final long INIT_BIT_REVIEW_PATH = 0x10L; private static final long INIT_BIT_MESSAGES_PATH = 0x20L; private static final long INIT_BIT_ATTACHMENTS_PATH = 0x40L; private static final long INIT_BIT_AUTHORIZATIONS_PATH = 0x80L; private static final long INIT_BIT_ATTACHMENTS = 0x100L; private static final long INIT_BIT_REPLY_TO = 0x200L; private static final long INIT_BIT_PROCESSES = 0x400L; private static final long INIT_BIT_FILL = 0x800L; private static final long INIT_BIT_REVIEW = 0x1000L; private long initBits = 0x1fffL; private @Nullable WebClient webClient; private @Nullable String defaultLanguage; private @Nullable String servicePath; private @Nullable String fillPath; private @Nullable String reviewPath; private @Nullable String messagesPath; private @Nullable String attachmentsPath; private @Nullable String authorizationsPath; private @Nullable RemoteIntegration attachments; private @Nullable RemoteIntegration replyTo; private @Nullable RemoteIntegration processes; private @Nullable RemoteIntegration fill; private @Nullable RemoteIntegration review; private Builder() { } /** * Fill a builder with attribute values from the provided {@code UserActionsClientConfig} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(UserActionsClient.UserActionsClientConfig instance) { Objects.requireNonNull(instance, "instance"); webClient(instance.getWebClient()); defaultLanguage(instance.getDefaultLanguage()); servicePath(instance.getServicePath()); fillPath(instance.getFillPath()); reviewPath(instance.getReviewPath()); messagesPath(instance.getMessagesPath()); attachmentsPath(instance.getAttachmentsPath()); authorizationsPath(instance.getAuthorizationsPath()); attachments(instance.getAttachments()); replyTo(instance.getReplyTo()); processes(instance.getProcesses()); fill(instance.getFill()); review(instance.getReview()); return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getWebClient() webClient} attribute. * @param webClient The value for webClient * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder webClient(WebClient webClient) { this.webClient = Objects.requireNonNull(webClient, "webClient"); initBits &= ~INIT_BIT_WEB_CLIENT; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getDefaultLanguage() defaultLanguage} attribute. * @param defaultLanguage The value for defaultLanguage * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder defaultLanguage(String defaultLanguage) { this.defaultLanguage = Objects.requireNonNull(defaultLanguage, "defaultLanguage"); initBits &= ~INIT_BIT_DEFAULT_LANGUAGE; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getServicePath() servicePath} attribute. * @param servicePath The value for servicePath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder servicePath(String servicePath) { this.servicePath = Objects.requireNonNull(servicePath, "servicePath"); initBits &= ~INIT_BIT_SERVICE_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getFillPath() fillPath} attribute. * @param fillPath The value for fillPath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder fillPath(String fillPath) { this.fillPath = Objects.requireNonNull(fillPath, "fillPath"); initBits &= ~INIT_BIT_FILL_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getReviewPath() reviewPath} attribute. * @param reviewPath The value for reviewPath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder reviewPath(String reviewPath) { this.reviewPath = Objects.requireNonNull(reviewPath, "reviewPath"); initBits &= ~INIT_BIT_REVIEW_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getMessagesPath() messagesPath} attribute. * @param messagesPath The value for messagesPath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder messagesPath(String messagesPath) { this.messagesPath = Objects.requireNonNull(messagesPath, "messagesPath"); initBits &= ~INIT_BIT_MESSAGES_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getAttachmentsPath() attachmentsPath} attribute. * @param attachmentsPath The value for attachmentsPath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder attachmentsPath(String attachmentsPath) { this.attachmentsPath = Objects.requireNonNull(attachmentsPath, "attachmentsPath"); initBits &= ~INIT_BIT_ATTACHMENTS_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getAuthorizationsPath() authorizationsPath} attribute. * @param authorizationsPath The value for authorizationsPath * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder authorizationsPath(String authorizationsPath) { this.authorizationsPath = Objects.requireNonNull(authorizationsPath, "authorizationsPath"); initBits &= ~INIT_BIT_AUTHORIZATIONS_PATH; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getAttachments() attachments} attribute. * @param attachments The value for attachments * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder attachments(RemoteIntegration attachments) { this.attachments = Objects.requireNonNull(attachments, "attachments"); initBits &= ~INIT_BIT_ATTACHMENTS; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getReplyTo() replyTo} attribute. * @param replyTo The value for replyTo * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder replyTo(RemoteIntegration replyTo) { this.replyTo = Objects.requireNonNull(replyTo, "replyTo"); initBits &= ~INIT_BIT_REPLY_TO; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getProcesses() processes} attribute. * @param processes The value for processes * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder processes(RemoteIntegration processes) { this.processes = Objects.requireNonNull(processes, "processes"); initBits &= ~INIT_BIT_PROCESSES; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getFill() fill} attribute. * @param fill The value for fill * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder fill(RemoteIntegration fill) { this.fill = Objects.requireNonNull(fill, "fill"); initBits &= ~INIT_BIT_FILL; return this; } /** * Initializes the value for the {@link UserActionsClient.UserActionsClientConfig#getReview() review} attribute. * @param review The value for review * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder review(RemoteIntegration review) { this.review = Objects.requireNonNull(review, "review"); initBits &= ~INIT_BIT_REVIEW; return this; } /** * Builds a new {@link ImmutableUserActionsClientConfig ImmutableUserActionsClientConfig}. * @return An immutable instance of UserActionsClientConfig * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableUserActionsClientConfig build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableUserActionsClientConfig( webClient, defaultLanguage, servicePath, fillPath, reviewPath, messagesPath, attachmentsPath, authorizationsPath, attachments, replyTo, processes, fill, review); } private String formatRequiredAttributesMessage() { List attributes = new ArrayList<>(); if ((initBits & INIT_BIT_WEB_CLIENT) != 0) attributes.add("webClient"); if ((initBits & INIT_BIT_DEFAULT_LANGUAGE) != 0) attributes.add("defaultLanguage"); if ((initBits & INIT_BIT_SERVICE_PATH) != 0) attributes.add("servicePath"); if ((initBits & INIT_BIT_FILL_PATH) != 0) attributes.add("fillPath"); if ((initBits & INIT_BIT_REVIEW_PATH) != 0) attributes.add("reviewPath"); if ((initBits & INIT_BIT_MESSAGES_PATH) != 0) attributes.add("messagesPath"); if ((initBits & INIT_BIT_ATTACHMENTS_PATH) != 0) attributes.add("attachmentsPath"); if ((initBits & INIT_BIT_AUTHORIZATIONS_PATH) != 0) attributes.add("authorizationsPath"); if ((initBits & INIT_BIT_ATTACHMENTS) != 0) attributes.add("attachments"); if ((initBits & INIT_BIT_REPLY_TO) != 0) attributes.add("replyTo"); if ((initBits & INIT_BIT_PROCESSES) != 0) attributes.add("processes"); if ((initBits & INIT_BIT_FILL) != 0) attributes.add("fill"); if ((initBits & INIT_BIT_REVIEW) != 0) attributes.add("review"); return "Cannot build UserActionsClientConfig, some of required attributes are not set " + attributes; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy