io.thestencil.iam.api.ImmutableUserAction Maven / Gradle / Ivy
package io.thestencil.iam.api;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.Var;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
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.UserAction}.
*
* Use the builder to create immutable instances:
* {@code ImmutableUserAction.builder()}.
*/
@Generated(from = "UserActionsClient.UserAction", generator = "Immutables")
@SuppressWarnings({"all"})
@ParametersAreNonnullByDefault
@javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableUserAction implements UserActionsClient.UserAction {
private final String id;
private final String name;
private final String status;
private final String reviewUri;
private final String messagesUri;
private final String formUri;
private final String formId;
private final LocalDateTime created;
private final LocalDateTime updated;
private final @Nullable String inputContextId;
private final @Nullable String inputParentContextId;
private final @Nullable String taskId;
private final @Nullable String taskStatus;
private final @Nullable ZonedDateTime taskCreated;
private final @Nullable ZonedDateTime taskUpdated;
private final Boolean viewed;
private final ImmutableList messages;
private final ImmutableList attachments;
private final Boolean formInProgress;
private ImmutableUserAction(
String id,
String name,
String status,
String reviewUri,
String messagesUri,
String formUri,
String formId,
LocalDateTime created,
LocalDateTime updated,
@Nullable String inputContextId,
@Nullable String inputParentContextId,
@Nullable String taskId,
@Nullable String taskStatus,
@Nullable ZonedDateTime taskCreated,
@Nullable ZonedDateTime taskUpdated,
Boolean viewed,
ImmutableList messages,
ImmutableList attachments,
Boolean formInProgress) {
this.id = id;
this.name = name;
this.status = status;
this.reviewUri = reviewUri;
this.messagesUri = messagesUri;
this.formUri = formUri;
this.formId = formId;
this.created = created;
this.updated = updated;
this.inputContextId = inputContextId;
this.inputParentContextId = inputParentContextId;
this.taskId = taskId;
this.taskStatus = taskStatus;
this.taskCreated = taskCreated;
this.taskUpdated = taskUpdated;
this.viewed = viewed;
this.messages = messages;
this.attachments = attachments;
this.formInProgress = formInProgress;
}
/**
* @return The value of the {@code id} attribute
*/
@JsonProperty("id")
@Override
public String getId() {
return id;
}
/**
* @return The value of the {@code name} attribute
*/
@JsonProperty("name")
@Override
public String getName() {
return name;
}
/**
* @return The value of the {@code status} attribute
*/
@JsonProperty("status")
@Override
public String getStatus() {
return status;
}
/**
* @return The value of the {@code reviewUri} attribute
*/
@JsonProperty("reviewUri")
@Override
public String getReviewUri() {
return reviewUri;
}
/**
* @return The value of the {@code messagesUri} attribute
*/
@JsonProperty("messagesUri")
@Override
public String getMessagesUri() {
return messagesUri;
}
/**
* @return The value of the {@code formUri} attribute
*/
@JsonProperty("formUri")
@Override
public String getFormUri() {
return formUri;
}
/**
* @return The value of the {@code formId} attribute
*/
@JsonProperty("formId")
@Override
public String getFormId() {
return formId;
}
/**
* @return The value of the {@code created} attribute
*/
@JsonProperty("created")
@Override
public LocalDateTime getCreated() {
return created;
}
/**
* @return The value of the {@code updated} attribute
*/
@JsonProperty("updated")
@Override
public LocalDateTime getUpdated() {
return updated;
}
/**
* @return The value of the {@code inputContextId} attribute
*/
@JsonProperty("inputContextId")
@Override
public @Nullable String getInputContextId() {
return inputContextId;
}
/**
* @return The value of the {@code inputParentContextId} attribute
*/
@JsonProperty("inputParentContextId")
@Override
public @Nullable String getInputParentContextId() {
return inputParentContextId;
}
/**
* @return The value of the {@code taskId} attribute
*/
@JsonProperty("taskId")
@Override
public @Nullable String getTaskId() {
return taskId;
}
/**
* @return The value of the {@code taskStatus} attribute
*/
@JsonProperty("taskStatus")
@Override
public @Nullable String getTaskStatus() {
return taskStatus;
}
/**
* @return The value of the {@code taskCreated} attribute
*/
@JsonProperty("taskCreated")
@Override
public @Nullable ZonedDateTime getTaskCreated() {
return taskCreated;
}
/**
* @return The value of the {@code taskUpdated} attribute
*/
@JsonProperty("taskUpdated")
@Override
public @Nullable ZonedDateTime getTaskUpdated() {
return taskUpdated;
}
/**
* @return The value of the {@code viewed} attribute
*/
@JsonProperty("viewed")
@Override
public Boolean getViewed() {
return viewed;
}
/**
* @return The value of the {@code messages} attribute
*/
@JsonProperty("messages")
@Override
public ImmutableList getMessages() {
return messages;
}
/**
* @return The value of the {@code attachments} attribute
*/
@JsonProperty("attachments")
@Override
public ImmutableList getAttachments() {
return attachments;
}
/**
* @return The value of the {@code formInProgress} attribute
*/
@JsonProperty("formInProgress")
@Override
public Boolean getFormInProgress() {
return formInProgress;
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getId() id} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for id
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withId(String value) {
String newValue = Objects.requireNonNull(value, "id");
if (this.id.equals(newValue)) return this;
return new ImmutableUserAction(
newValue,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getName() name} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for name
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withName(String value) {
String newValue = Objects.requireNonNull(value, "name");
if (this.name.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
newValue,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getStatus() status} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for status
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withStatus(String value) {
String newValue = Objects.requireNonNull(value, "status");
if (this.status.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
newValue,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getReviewUri() reviewUri} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for reviewUri
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withReviewUri(String value) {
String newValue = Objects.requireNonNull(value, "reviewUri");
if (this.reviewUri.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
newValue,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getMessagesUri() messagesUri} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for messagesUri
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withMessagesUri(String value) {
String newValue = Objects.requireNonNull(value, "messagesUri");
if (this.messagesUri.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
newValue,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getFormUri() formUri} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for formUri
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withFormUri(String value) {
String newValue = Objects.requireNonNull(value, "formUri");
if (this.formUri.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
newValue,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getFormId() formId} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for formId
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withFormId(String value) {
String newValue = Objects.requireNonNull(value, "formId");
if (this.formId.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
newValue,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getCreated() created} 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 created
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withCreated(LocalDateTime value) {
if (this.created == value) return this;
LocalDateTime newValue = Objects.requireNonNull(value, "created");
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
newValue,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getUpdated() updated} 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 updated
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withUpdated(LocalDateTime value) {
if (this.updated == value) return this;
LocalDateTime newValue = Objects.requireNonNull(value, "updated");
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
newValue,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getInputContextId() inputContextId} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for inputContextId (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withInputContextId(@Nullable String value) {
if (Objects.equals(this.inputContextId, value)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
value,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getInputParentContextId() inputParentContextId} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for inputParentContextId (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withInputParentContextId(@Nullable String value) {
if (Objects.equals(this.inputParentContextId, value)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
value,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getTaskId() taskId} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for taskId (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withTaskId(@Nullable String value) {
if (Objects.equals(this.taskId, value)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
value,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getTaskStatus() taskStatus} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for taskStatus (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withTaskStatus(@Nullable String value) {
if (Objects.equals(this.taskStatus, value)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
value,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getTaskCreated() taskCreated} 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 taskCreated (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withTaskCreated(@Nullable ZonedDateTime value) {
if (this.taskCreated == value) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
value,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getTaskUpdated() taskUpdated} 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 taskUpdated (can be {@code null})
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withTaskUpdated(@Nullable ZonedDateTime value) {
if (this.taskUpdated == value) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
value,
this.viewed,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getViewed() viewed} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for viewed
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withViewed(Boolean value) {
Boolean newValue = Objects.requireNonNull(value, "viewed");
if (this.viewed.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
newValue,
this.messages,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object with elements that replace the content of {@link UserActionsClient.UserAction#getMessages() messages}.
* @param elements The elements to set
* @return A modified copy of {@code this} object
*/
public final ImmutableUserAction withMessages(UserActionsClient.UserMessage... elements) {
ImmutableList newValue = ImmutableList.copyOf(elements);
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
newValue,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object with elements that replace the content of {@link UserActionsClient.UserAction#getMessages() messages}.
* A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
* @param elements An iterable of messages elements to set
* @return A modified copy of {@code this} object
*/
public final ImmutableUserAction withMessages(Iterable extends UserActionsClient.UserMessage> elements) {
if (this.messages == elements) return this;
ImmutableList newValue = ImmutableList.copyOf(elements);
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
newValue,
this.attachments,
this.formInProgress);
}
/**
* Copy the current immutable object with elements that replace the content of {@link UserActionsClient.UserAction#getAttachments() attachments}.
* @param elements The elements to set
* @return A modified copy of {@code this} object
*/
public final ImmutableUserAction withAttachments(UserActionsClient.Attachment... elements) {
ImmutableList newValue = ImmutableList.copyOf(elements);
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
newValue,
this.formInProgress);
}
/**
* Copy the current immutable object with elements that replace the content of {@link UserActionsClient.UserAction#getAttachments() attachments}.
* A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
* @param elements An iterable of attachments elements to set
* @return A modified copy of {@code this} object
*/
public final ImmutableUserAction withAttachments(Iterable extends UserActionsClient.Attachment> elements) {
if (this.attachments == elements) return this;
ImmutableList newValue = ImmutableList.copyOf(elements);
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
newValue,
this.formInProgress);
}
/**
* Copy the current immutable object by setting a value for the {@link UserActionsClient.UserAction#getFormInProgress() formInProgress} attribute.
* An equals check used to prevent copying of the same value by returning {@code this}.
* @param value A new value for formInProgress
* @return A modified copy of the {@code this} object
*/
public final ImmutableUserAction withFormInProgress(Boolean value) {
Boolean newValue = Objects.requireNonNull(value, "formInProgress");
if (this.formInProgress.equals(newValue)) return this;
return new ImmutableUserAction(
this.id,
this.name,
this.status,
this.reviewUri,
this.messagesUri,
this.formUri,
this.formId,
this.created,
this.updated,
this.inputContextId,
this.inputParentContextId,
this.taskId,
this.taskStatus,
this.taskCreated,
this.taskUpdated,
this.viewed,
this.messages,
this.attachments,
newValue);
}
/**
* This instance is equal to all instances of {@code ImmutableUserAction} 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 ImmutableUserAction
&& equalTo((ImmutableUserAction) another);
}
private boolean equalTo(ImmutableUserAction another) {
return id.equals(another.id)
&& name.equals(another.name)
&& status.equals(another.status)
&& reviewUri.equals(another.reviewUri)
&& messagesUri.equals(another.messagesUri)
&& formUri.equals(another.formUri)
&& formId.equals(another.formId)
&& created.equals(another.created)
&& updated.equals(another.updated)
&& Objects.equals(inputContextId, another.inputContextId)
&& Objects.equals(inputParentContextId, another.inputParentContextId)
&& Objects.equals(taskId, another.taskId)
&& Objects.equals(taskStatus, another.taskStatus)
&& Objects.equals(taskCreated, another.taskCreated)
&& Objects.equals(taskUpdated, another.taskUpdated)
&& viewed.equals(another.viewed)
&& messages.equals(another.messages)
&& attachments.equals(another.attachments)
&& formInProgress.equals(another.formInProgress);
}
/**
* Computes a hash code from attributes: {@code id}, {@code name}, {@code status}, {@code reviewUri}, {@code messagesUri}, {@code formUri}, {@code formId}, {@code created}, {@code updated}, {@code inputContextId}, {@code inputParentContextId}, {@code taskId}, {@code taskStatus}, {@code taskCreated}, {@code taskUpdated}, {@code viewed}, {@code messages}, {@code attachments}, {@code formInProgress}.
* @return hashCode value
*/
@Override
public int hashCode() {
@Var int h = 5381;
h += (h << 5) + id.hashCode();
h += (h << 5) + name.hashCode();
h += (h << 5) + status.hashCode();
h += (h << 5) + reviewUri.hashCode();
h += (h << 5) + messagesUri.hashCode();
h += (h << 5) + formUri.hashCode();
h += (h << 5) + formId.hashCode();
h += (h << 5) + created.hashCode();
h += (h << 5) + updated.hashCode();
h += (h << 5) + Objects.hashCode(inputContextId);
h += (h << 5) + Objects.hashCode(inputParentContextId);
h += (h << 5) + Objects.hashCode(taskId);
h += (h << 5) + Objects.hashCode(taskStatus);
h += (h << 5) + Objects.hashCode(taskCreated);
h += (h << 5) + Objects.hashCode(taskUpdated);
h += (h << 5) + viewed.hashCode();
h += (h << 5) + messages.hashCode();
h += (h << 5) + attachments.hashCode();
h += (h << 5) + formInProgress.hashCode();
return h;
}
/**
* Prints the immutable value {@code UserAction} with attribute values.
* @return A string representation of the value
*/
@Override
public String toString() {
return MoreObjects.toStringHelper("UserAction")
.omitNullValues()
.add("id", id)
.add("name", name)
.add("status", status)
.add("reviewUri", reviewUri)
.add("messagesUri", messagesUri)
.add("formUri", formUri)
.add("formId", formId)
.add("created", created)
.add("updated", updated)
.add("inputContextId", inputContextId)
.add("inputParentContextId", inputParentContextId)
.add("taskId", taskId)
.add("taskStatus", taskStatus)
.add("taskCreated", taskCreated)
.add("taskUpdated", taskUpdated)
.add("viewed", viewed)
.add("messages", messages)
.add("attachments", attachments)
.add("formInProgress", formInProgress)
.toString();
}
/**
* Utility type used to correctly read immutable object from JSON representation.
* @deprecated Do not use this type directly, it exists only for the Jackson-binding infrastructure
*/
@Generated(from = "UserActionsClient.UserAction", generator = "Immutables")
@Deprecated
@SuppressWarnings("Immutable")
@JsonDeserialize
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE)
static final class Json implements UserActionsClient.UserAction {
@Nullable String id;
@Nullable String name;
@Nullable String status;
@Nullable String reviewUri;
@Nullable String messagesUri;
@Nullable String formUri;
@Nullable String formId;
@Nullable LocalDateTime created;
@Nullable LocalDateTime updated;
@Nullable String inputContextId;
@Nullable String inputParentContextId;
@Nullable String taskId;
@Nullable String taskStatus;
@Nullable ZonedDateTime taskCreated;
@Nullable ZonedDateTime taskUpdated;
@Nullable Boolean viewed;
@Nullable List messages = ImmutableList.of();
@Nullable List attachments = ImmutableList.of();
@Nullable Boolean formInProgress;
@JsonProperty("id")
public void setId(String id) {
this.id = id;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("status")
public void setStatus(String status) {
this.status = status;
}
@JsonProperty("reviewUri")
public void setReviewUri(String reviewUri) {
this.reviewUri = reviewUri;
}
@JsonProperty("messagesUri")
public void setMessagesUri(String messagesUri) {
this.messagesUri = messagesUri;
}
@JsonProperty("formUri")
public void setFormUri(String formUri) {
this.formUri = formUri;
}
@JsonProperty("formId")
public void setFormId(String formId) {
this.formId = formId;
}
@JsonProperty("created")
public void setCreated(LocalDateTime created) {
this.created = created;
}
@JsonProperty("updated")
public void setUpdated(LocalDateTime updated) {
this.updated = updated;
}
@JsonProperty("inputContextId")
public void setInputContextId(@Nullable String inputContextId) {
this.inputContextId = inputContextId;
}
@JsonProperty("inputParentContextId")
public void setInputParentContextId(@Nullable String inputParentContextId) {
this.inputParentContextId = inputParentContextId;
}
@JsonProperty("taskId")
public void setTaskId(@Nullable String taskId) {
this.taskId = taskId;
}
@JsonProperty("taskStatus")
public void setTaskStatus(@Nullable String taskStatus) {
this.taskStatus = taskStatus;
}
@JsonProperty("taskCreated")
public void setTaskCreated(@Nullable ZonedDateTime taskCreated) {
this.taskCreated = taskCreated;
}
@JsonProperty("taskUpdated")
public void setTaskUpdated(@Nullable ZonedDateTime taskUpdated) {
this.taskUpdated = taskUpdated;
}
@JsonProperty("viewed")
public void setViewed(Boolean viewed) {
this.viewed = viewed;
}
@JsonProperty("messages")
public void setMessages(List messages) {
this.messages = messages;
}
@JsonProperty("attachments")
public void setAttachments(List attachments) {
this.attachments = attachments;
}
@JsonProperty("formInProgress")
public void setFormInProgress(Boolean formInProgress) {
this.formInProgress = formInProgress;
}
@Override
public String getId() { throw new UnsupportedOperationException(); }
@Override
public String getName() { throw new UnsupportedOperationException(); }
@Override
public String getStatus() { throw new UnsupportedOperationException(); }
@Override
public String getReviewUri() { throw new UnsupportedOperationException(); }
@Override
public String getMessagesUri() { throw new UnsupportedOperationException(); }
@Override
public String getFormUri() { throw new UnsupportedOperationException(); }
@Override
public String getFormId() { throw new UnsupportedOperationException(); }
@Override
public LocalDateTime getCreated() { throw new UnsupportedOperationException(); }
@Override
public LocalDateTime getUpdated() { throw new UnsupportedOperationException(); }
@Override
public String getInputContextId() { throw new UnsupportedOperationException(); }
@Override
public String getInputParentContextId() { throw new UnsupportedOperationException(); }
@Override
public String getTaskId() { throw new UnsupportedOperationException(); }
@Override
public String getTaskStatus() { throw new UnsupportedOperationException(); }
@Override
public ZonedDateTime getTaskCreated() { throw new UnsupportedOperationException(); }
@Override
public ZonedDateTime getTaskUpdated() { throw new UnsupportedOperationException(); }
@Override
public Boolean getViewed() { throw new UnsupportedOperationException(); }
@Override
public List getMessages() { throw new UnsupportedOperationException(); }
@Override
public List getAttachments() { throw new UnsupportedOperationException(); }
@Override
public Boolean getFormInProgress() { throw new UnsupportedOperationException(); }
}
/**
* @param json A JSON-bindable data structure
* @return An immutable value type
* @deprecated Do not use this method directly, it exists only for the Jackson-binding infrastructure
*/
@Deprecated
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
static ImmutableUserAction fromJson(Json json) {
ImmutableUserAction.Builder builder = ImmutableUserAction.builder();
if (json.id != null) {
builder.id(json.id);
}
if (json.name != null) {
builder.name(json.name);
}
if (json.status != null) {
builder.status(json.status);
}
if (json.reviewUri != null) {
builder.reviewUri(json.reviewUri);
}
if (json.messagesUri != null) {
builder.messagesUri(json.messagesUri);
}
if (json.formUri != null) {
builder.formUri(json.formUri);
}
if (json.formId != null) {
builder.formId(json.formId);
}
if (json.created != null) {
builder.created(json.created);
}
if (json.updated != null) {
builder.updated(json.updated);
}
if (json.inputContextId != null) {
builder.inputContextId(json.inputContextId);
}
if (json.inputParentContextId != null) {
builder.inputParentContextId(json.inputParentContextId);
}
if (json.taskId != null) {
builder.taskId(json.taskId);
}
if (json.taskStatus != null) {
builder.taskStatus(json.taskStatus);
}
if (json.taskCreated != null) {
builder.taskCreated(json.taskCreated);
}
if (json.taskUpdated != null) {
builder.taskUpdated(json.taskUpdated);
}
if (json.viewed != null) {
builder.viewed(json.viewed);
}
if (json.messages != null) {
builder.addAllMessages(json.messages);
}
if (json.attachments != null) {
builder.addAllAttachments(json.attachments);
}
if (json.formInProgress != null) {
builder.formInProgress(json.formInProgress);
}
return builder.build();
}
/**
* Creates an immutable copy of a {@link UserActionsClient.UserAction} 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 UserAction instance
*/
public static ImmutableUserAction copyOf(UserActionsClient.UserAction instance) {
if (instance instanceof ImmutableUserAction) {
return (ImmutableUserAction) instance;
}
return ImmutableUserAction.builder()
.from(instance)
.build();
}
/**
* Creates a builder for {@link ImmutableUserAction ImmutableUserAction}.
*
* ImmutableUserAction.builder()
* .id(String) // required {@link UserActionsClient.UserAction#getId() id}
* .name(String) // required {@link UserActionsClient.UserAction#getName() name}
* .status(String) // required {@link UserActionsClient.UserAction#getStatus() status}
* .reviewUri(String) // required {@link UserActionsClient.UserAction#getReviewUri() reviewUri}
* .messagesUri(String) // required {@link UserActionsClient.UserAction#getMessagesUri() messagesUri}
* .formUri(String) // required {@link UserActionsClient.UserAction#getFormUri() formUri}
* .formId(String) // required {@link UserActionsClient.UserAction#getFormId() formId}
* .created(java.time.LocalDateTime) // required {@link UserActionsClient.UserAction#getCreated() created}
* .updated(java.time.LocalDateTime) // required {@link UserActionsClient.UserAction#getUpdated() updated}
* .inputContextId(String | null) // nullable {@link UserActionsClient.UserAction#getInputContextId() inputContextId}
* .inputParentContextId(String | null) // nullable {@link UserActionsClient.UserAction#getInputParentContextId() inputParentContextId}
* .taskId(String | null) // nullable {@link UserActionsClient.UserAction#getTaskId() taskId}
* .taskStatus(String | null) // nullable {@link UserActionsClient.UserAction#getTaskStatus() taskStatus}
* .taskCreated(java.time.ZonedDateTime | null) // nullable {@link UserActionsClient.UserAction#getTaskCreated() taskCreated}
* .taskUpdated(java.time.ZonedDateTime | null) // nullable {@link UserActionsClient.UserAction#getTaskUpdated() taskUpdated}
* .viewed(Boolean) // required {@link UserActionsClient.UserAction#getViewed() viewed}
* .addMessages|addAllMessages(io.thestencil.iam.api.UserActionsClient.UserMessage) // {@link UserActionsClient.UserAction#getMessages() messages} elements
* .addAttachments|addAllAttachments(io.thestencil.iam.api.UserActionsClient.Attachment) // {@link UserActionsClient.UserAction#getAttachments() attachments} elements
* .formInProgress(Boolean) // required {@link UserActionsClient.UserAction#getFormInProgress() formInProgress}
* .build();
*
* @return A new ImmutableUserAction builder
*/
public static ImmutableUserAction.Builder builder() {
return new ImmutableUserAction.Builder();
}
/**
* Builds instances of type {@link ImmutableUserAction ImmutableUserAction}.
* 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.UserAction", generator = "Immutables")
@NotThreadSafe
public static final class Builder {
private static final long INIT_BIT_ID = 0x1L;
private static final long INIT_BIT_NAME = 0x2L;
private static final long INIT_BIT_STATUS = 0x4L;
private static final long INIT_BIT_REVIEW_URI = 0x8L;
private static final long INIT_BIT_MESSAGES_URI = 0x10L;
private static final long INIT_BIT_FORM_URI = 0x20L;
private static final long INIT_BIT_FORM_ID = 0x40L;
private static final long INIT_BIT_CREATED = 0x80L;
private static final long INIT_BIT_UPDATED = 0x100L;
private static final long INIT_BIT_VIEWED = 0x200L;
private static final long INIT_BIT_FORM_IN_PROGRESS = 0x400L;
private long initBits = 0x7ffL;
private @Nullable String id;
private @Nullable String name;
private @Nullable String status;
private @Nullable String reviewUri;
private @Nullable String messagesUri;
private @Nullable String formUri;
private @Nullable String formId;
private @Nullable LocalDateTime created;
private @Nullable LocalDateTime updated;
private @Nullable String inputContextId;
private @Nullable String inputParentContextId;
private @Nullable String taskId;
private @Nullable String taskStatus;
private @Nullable ZonedDateTime taskCreated;
private @Nullable ZonedDateTime taskUpdated;
private @Nullable Boolean viewed;
private ImmutableList.Builder messages = ImmutableList.builder();
private ImmutableList.Builder attachments = ImmutableList.builder();
private @Nullable Boolean formInProgress;
private Builder() {
}
/**
* Fill a builder with attribute values from the provided {@code UserAction} instance.
* Regular attribute values will be replaced with those from the given instance.
* Absent optional values will not replace present values.
* Collection elements and entries will be added, not replaced.
* @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.UserAction instance) {
Objects.requireNonNull(instance, "instance");
id(instance.getId());
name(instance.getName());
status(instance.getStatus());
reviewUri(instance.getReviewUri());
messagesUri(instance.getMessagesUri());
formUri(instance.getFormUri());
formId(instance.getFormId());
created(instance.getCreated());
updated(instance.getUpdated());
@Nullable String inputContextIdValue = instance.getInputContextId();
if (inputContextIdValue != null) {
inputContextId(inputContextIdValue);
}
@Nullable String inputParentContextIdValue = instance.getInputParentContextId();
if (inputParentContextIdValue != null) {
inputParentContextId(inputParentContextIdValue);
}
@Nullable String taskIdValue = instance.getTaskId();
if (taskIdValue != null) {
taskId(taskIdValue);
}
@Nullable String taskStatusValue = instance.getTaskStatus();
if (taskStatusValue != null) {
taskStatus(taskStatusValue);
}
@Nullable ZonedDateTime taskCreatedValue = instance.getTaskCreated();
if (taskCreatedValue != null) {
taskCreated(taskCreatedValue);
}
@Nullable ZonedDateTime taskUpdatedValue = instance.getTaskUpdated();
if (taskUpdatedValue != null) {
taskUpdated(taskUpdatedValue);
}
viewed(instance.getViewed());
addAllMessages(instance.getMessages());
addAllAttachments(instance.getAttachments());
formInProgress(instance.getFormInProgress());
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getId() id} attribute.
* @param id The value for id
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("id")
public final Builder id(String id) {
this.id = Objects.requireNonNull(id, "id");
initBits &= ~INIT_BIT_ID;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getName() name} attribute.
* @param name The value for name
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("name")
public final Builder name(String name) {
this.name = Objects.requireNonNull(name, "name");
initBits &= ~INIT_BIT_NAME;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getStatus() status} attribute.
* @param status The value for status
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("status")
public final Builder status(String status) {
this.status = Objects.requireNonNull(status, "status");
initBits &= ~INIT_BIT_STATUS;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getReviewUri() reviewUri} attribute.
* @param reviewUri The value for reviewUri
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("reviewUri")
public final Builder reviewUri(String reviewUri) {
this.reviewUri = Objects.requireNonNull(reviewUri, "reviewUri");
initBits &= ~INIT_BIT_REVIEW_URI;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getMessagesUri() messagesUri} attribute.
* @param messagesUri The value for messagesUri
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("messagesUri")
public final Builder messagesUri(String messagesUri) {
this.messagesUri = Objects.requireNonNull(messagesUri, "messagesUri");
initBits &= ~INIT_BIT_MESSAGES_URI;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getFormUri() formUri} attribute.
* @param formUri The value for formUri
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("formUri")
public final Builder formUri(String formUri) {
this.formUri = Objects.requireNonNull(formUri, "formUri");
initBits &= ~INIT_BIT_FORM_URI;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getFormId() formId} attribute.
* @param formId The value for formId
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("formId")
public final Builder formId(String formId) {
this.formId = Objects.requireNonNull(formId, "formId");
initBits &= ~INIT_BIT_FORM_ID;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getCreated() created} attribute.
* @param created The value for created
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("created")
public final Builder created(LocalDateTime created) {
this.created = Objects.requireNonNull(created, "created");
initBits &= ~INIT_BIT_CREATED;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getUpdated() updated} attribute.
* @param updated The value for updated
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("updated")
public final Builder updated(LocalDateTime updated) {
this.updated = Objects.requireNonNull(updated, "updated");
initBits &= ~INIT_BIT_UPDATED;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getInputContextId() inputContextId} attribute.
* @param inputContextId The value for inputContextId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("inputContextId")
public final Builder inputContextId(@Nullable String inputContextId) {
this.inputContextId = inputContextId;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getInputParentContextId() inputParentContextId} attribute.
* @param inputParentContextId The value for inputParentContextId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("inputParentContextId")
public final Builder inputParentContextId(@Nullable String inputParentContextId) {
this.inputParentContextId = inputParentContextId;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getTaskId() taskId} attribute.
* @param taskId The value for taskId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("taskId")
public final Builder taskId(@Nullable String taskId) {
this.taskId = taskId;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getTaskStatus() taskStatus} attribute.
* @param taskStatus The value for taskStatus (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("taskStatus")
public final Builder taskStatus(@Nullable String taskStatus) {
this.taskStatus = taskStatus;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getTaskCreated() taskCreated} attribute.
* @param taskCreated The value for taskCreated (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("taskCreated")
public final Builder taskCreated(@Nullable ZonedDateTime taskCreated) {
this.taskCreated = taskCreated;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getTaskUpdated() taskUpdated} attribute.
* @param taskUpdated The value for taskUpdated (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("taskUpdated")
public final Builder taskUpdated(@Nullable ZonedDateTime taskUpdated) {
this.taskUpdated = taskUpdated;
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getViewed() viewed} attribute.
* @param viewed The value for viewed
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("viewed")
public final Builder viewed(Boolean viewed) {
this.viewed = Objects.requireNonNull(viewed, "viewed");
initBits &= ~INIT_BIT_VIEWED;
return this;
}
/**
* Adds one element to {@link UserActionsClient.UserAction#getMessages() messages} list.
* @param element A messages element
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addMessages(UserActionsClient.UserMessage element) {
this.messages.add(element);
return this;
}
/**
* Adds elements to {@link UserActionsClient.UserAction#getMessages() messages} list.
* @param elements An array of messages elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addMessages(UserActionsClient.UserMessage... elements) {
this.messages.add(elements);
return this;
}
/**
* Sets or replaces all elements for {@link UserActionsClient.UserAction#getMessages() messages} list.
* @param elements An iterable of messages elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("messages")
public final Builder messages(Iterable extends UserActionsClient.UserMessage> elements) {
this.messages = ImmutableList.builder();
return addAllMessages(elements);
}
/**
* Adds elements to {@link UserActionsClient.UserAction#getMessages() messages} list.
* @param elements An iterable of messages elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addAllMessages(Iterable extends UserActionsClient.UserMessage> elements) {
this.messages.addAll(elements);
return this;
}
/**
* Adds one element to {@link UserActionsClient.UserAction#getAttachments() attachments} list.
* @param element A attachments element
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addAttachments(UserActionsClient.Attachment element) {
this.attachments.add(element);
return this;
}
/**
* Adds elements to {@link UserActionsClient.UserAction#getAttachments() attachments} list.
* @param elements An array of attachments elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addAttachments(UserActionsClient.Attachment... elements) {
this.attachments.add(elements);
return this;
}
/**
* Sets or replaces all elements for {@link UserActionsClient.UserAction#getAttachments() attachments} list.
* @param elements An iterable of attachments elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("attachments")
public final Builder attachments(Iterable extends UserActionsClient.Attachment> elements) {
this.attachments = ImmutableList.builder();
return addAllAttachments(elements);
}
/**
* Adds elements to {@link UserActionsClient.UserAction#getAttachments() attachments} list.
* @param elements An iterable of attachments elements
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder addAllAttachments(Iterable extends UserActionsClient.Attachment> elements) {
this.attachments.addAll(elements);
return this;
}
/**
* Initializes the value for the {@link UserActionsClient.UserAction#getFormInProgress() formInProgress} attribute.
* @param formInProgress The value for formInProgress
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
@JsonProperty("formInProgress")
public final Builder formInProgress(Boolean formInProgress) {
this.formInProgress = Objects.requireNonNull(formInProgress, "formInProgress");
initBits &= ~INIT_BIT_FORM_IN_PROGRESS;
return this;
}
/**
* Builds a new {@link ImmutableUserAction ImmutableUserAction}.
* @return An immutable instance of UserAction
* @throws java.lang.IllegalStateException if any required attributes are missing
*/
public ImmutableUserAction build() {
if (initBits != 0) {
throw new IllegalStateException(formatRequiredAttributesMessage());
}
return new ImmutableUserAction(
id,
name,
status,
reviewUri,
messagesUri,
formUri,
formId,
created,
updated,
inputContextId,
inputParentContextId,
taskId,
taskStatus,
taskCreated,
taskUpdated,
viewed,
messages.build(),
attachments.build(),
formInProgress);
}
private String formatRequiredAttributesMessage() {
List attributes = new ArrayList<>();
if ((initBits & INIT_BIT_ID) != 0) attributes.add("id");
if ((initBits & INIT_BIT_NAME) != 0) attributes.add("name");
if ((initBits & INIT_BIT_STATUS) != 0) attributes.add("status");
if ((initBits & INIT_BIT_REVIEW_URI) != 0) attributes.add("reviewUri");
if ((initBits & INIT_BIT_MESSAGES_URI) != 0) attributes.add("messagesUri");
if ((initBits & INIT_BIT_FORM_URI) != 0) attributes.add("formUri");
if ((initBits & INIT_BIT_FORM_ID) != 0) attributes.add("formId");
if ((initBits & INIT_BIT_CREATED) != 0) attributes.add("created");
if ((initBits & INIT_BIT_UPDATED) != 0) attributes.add("updated");
if ((initBits & INIT_BIT_VIEWED) != 0) attributes.add("viewed");
if ((initBits & INIT_BIT_FORM_IN_PROGRESS) != 0) attributes.add("formInProgress");
return "Cannot build UserAction, some of required attributes are not set " + attributes;
}
}
}