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

com.hubspot.slack.client.models.files.SlackPngFile Maven / Gradle / Ivy

package com.hubspot.slack.client.models.files;

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.hubspot.immutables.validation.InvalidImmutableStateException;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
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 SlackPngFileIF}.
 * 

* Use the builder to create immutable instances: * {@code SlackPngFile.builder()}. */ @Generated(from = "SlackPngFileIF", generator = "Immutables") @SuppressWarnings({"all"}) @SuppressFBWarnings @ParametersAreNonnullByDefault @javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class SlackPngFile implements SlackPngFileIF { private final String id; private final long createdEpochSeconds; private final long timestampEpochSeconds; private final String name; private final String title; private final String mimetype; private final String prettyType; private final String userId; private final boolean editable; private final long size; private final String mode; private final boolean external; private final boolean isPublic; private final boolean publicUrlShared; private final boolean displayAsBot; private final String username; private final String urlPrivate; private final @Nullable String urlPrivateDownload; private final String permalink; private final @Nullable String permalinkPublic; private final int commentsCount; private final @Nullable Boolean starred; private final List channelIds; private final List groupIds; private final List imIds; private final @Nullable String thumb64Url; private final @Nullable String thumb80Url; private final @Nullable String thumb160Url; private final @Nullable String thumb360Url; private final @Nullable Integer thumb360Width; private final @Nullable Integer thumb360Height; private final @Nullable String thumb480Url; private final @Nullable Integer thumb480Width; private final @Nullable Integer thumb480Height; private final @Nullable Integer imageExifRotation; private final @Nullable Integer originalWidth; private final @Nullable Integer originalHeight; private final boolean hasRichPreview; private final SlackFileType filetype; private SlackPngFile(SlackPngFile.Builder builder) { this.id = builder.id; this.createdEpochSeconds = builder.createdEpochSeconds; this.timestampEpochSeconds = builder.timestampEpochSeconds; this.name = builder.name; this.title = builder.title; this.mimetype = builder.mimetype; this.prettyType = builder.prettyType; this.userId = builder.userId; this.editable = builder.editable; this.size = builder.size; this.mode = builder.mode; this.external = builder.external; this.isPublic = builder.isPublic; this.publicUrlShared = builder.publicUrlShared; this.displayAsBot = builder.displayAsBot; this.username = builder.username; this.urlPrivate = builder.urlPrivate; this.urlPrivateDownload = builder.urlPrivateDownload; this.permalink = builder.permalink; this.permalinkPublic = builder.permalinkPublic; this.starred = builder.starred; this.channelIds = createUnmodifiableList(true, builder.channelIds); this.groupIds = createUnmodifiableList(true, builder.groupIds); this.imIds = createUnmodifiableList(true, builder.imIds); this.thumb64Url = builder.thumb64Url; this.thumb80Url = builder.thumb80Url; this.thumb160Url = builder.thumb160Url; this.thumb360Url = builder.thumb360Url; this.thumb360Width = builder.thumb360Width; this.thumb360Height = builder.thumb360Height; this.thumb480Url = builder.thumb480Url; this.thumb480Width = builder.thumb480Width; this.thumb480Height = builder.thumb480Height; this.imageExifRotation = builder.imageExifRotation; this.originalWidth = builder.originalWidth; this.originalHeight = builder.originalHeight; this.hasRichPreview = builder.hasRichPreview; if (builder.commentsCountIsSet()) { initShim.setCommentsCount(builder.commentsCount); } if (builder.filetype != null) { initShim.setFiletype(builder.filetype); } this.commentsCount = initShim.getCommentsCount(); this.filetype = initShim.getFiletype(); this.initShim = null; } private SlackPngFile( String id, long createdEpochSeconds, long timestampEpochSeconds, String name, String title, String mimetype, String prettyType, String userId, boolean editable, long size, String mode, boolean external, boolean isPublic, boolean publicUrlShared, boolean displayAsBot, String username, String urlPrivate, @Nullable String urlPrivateDownload, String permalink, @Nullable String permalinkPublic, int commentsCount, @Nullable Boolean starred, List channelIds, List groupIds, List imIds, @Nullable String thumb64Url, @Nullable String thumb80Url, @Nullable String thumb160Url, @Nullable String thumb360Url, @Nullable Integer thumb360Width, @Nullable Integer thumb360Height, @Nullable String thumb480Url, @Nullable Integer thumb480Width, @Nullable Integer thumb480Height, @Nullable Integer imageExifRotation, @Nullable Integer originalWidth, @Nullable Integer originalHeight, boolean hasRichPreview, SlackFileType filetype) { this.id = id; this.createdEpochSeconds = createdEpochSeconds; this.timestampEpochSeconds = timestampEpochSeconds; this.name = name; this.title = title; this.mimetype = mimetype; this.prettyType = prettyType; this.userId = userId; this.editable = editable; this.size = size; this.mode = mode; this.external = external; this.isPublic = isPublic; this.publicUrlShared = publicUrlShared; this.displayAsBot = displayAsBot; this.username = username; this.urlPrivate = urlPrivate; this.urlPrivateDownload = urlPrivateDownload; this.permalink = permalink; this.permalinkPublic = permalinkPublic; this.commentsCount = commentsCount; this.starred = starred; this.channelIds = channelIds; this.groupIds = groupIds; this.imIds = imIds; this.thumb64Url = thumb64Url; this.thumb80Url = thumb80Url; this.thumb160Url = thumb160Url; this.thumb360Url = thumb360Url; this.thumb360Width = thumb360Width; this.thumb360Height = thumb360Height; this.thumb480Url = thumb480Url; this.thumb480Width = thumb480Width; this.thumb480Height = thumb480Height; this.imageExifRotation = imageExifRotation; this.originalWidth = originalWidth; this.originalHeight = originalHeight; this.hasRichPreview = hasRichPreview; this.filetype = filetype; this.initShim = null; } private static final byte STAGE_INITIALIZING = -1; private static final byte STAGE_UNINITIALIZED = 0; private static final byte STAGE_INITIALIZED = 1; private transient volatile InitShim initShim = new InitShim(); @Generated(from = "SlackPngFileIF", generator = "Immutables") private final class InitShim { private byte commentsCountBuildStage = STAGE_UNINITIALIZED; private int commentsCount; int getCommentsCount() { if (commentsCountBuildStage == STAGE_INITIALIZING) throw new InvalidImmutableStateException(formatInitCycleMessage()); if (commentsCountBuildStage == STAGE_UNINITIALIZED) { commentsCountBuildStage = STAGE_INITIALIZING; this.commentsCount = getCommentsCountInitialize(); commentsCountBuildStage = STAGE_INITIALIZED; } return this.commentsCount; } void setCommentsCount(int commentsCount) { this.commentsCount = commentsCount; commentsCountBuildStage = STAGE_INITIALIZED; } private byte filetypeBuildStage = STAGE_UNINITIALIZED; private SlackFileType filetype; SlackFileType getFiletype() { if (filetypeBuildStage == STAGE_INITIALIZING) throw new InvalidImmutableStateException(formatInitCycleMessage()); if (filetypeBuildStage == STAGE_UNINITIALIZED) { filetypeBuildStage = STAGE_INITIALIZING; this.filetype = Objects.requireNonNull(getFiletypeInitialize(), "filetype"); filetypeBuildStage = STAGE_INITIALIZED; } return this.filetype; } void setFiletype(SlackFileType filetype) { this.filetype = filetype; filetypeBuildStage = STAGE_INITIALIZED; } private String formatInitCycleMessage() { List attributes = new ArrayList<>(); if (commentsCountBuildStage == STAGE_INITIALIZING) attributes.add("commentsCount"); if (filetypeBuildStage == STAGE_INITIALIZING) attributes.add("filetype"); return "Cannot build SlackPngFile, attribute initializers form cycle " + attributes; } } private int getCommentsCountInitialize() { return SlackPngFileIF.super.getCommentsCount(); } private SlackFileType getFiletypeInitialize() { return SlackPngFileIF.super.getFiletype(); } /** * @return The value of the {@code id} attribute */ @JsonProperty @Override public String getId() { return id; } /** * @return The value of the {@code createdEpochSeconds} attribute */ @JsonProperty("created") @Override public long getCreatedEpochSeconds() { return createdEpochSeconds; } /** * @return The value of the {@code timestampEpochSeconds} attribute */ @JsonProperty("timestamp") @Override public long getTimestampEpochSeconds() { return timestampEpochSeconds; } /** * @return The value of the {@code name} attribute */ @JsonProperty @Override public String getName() { return name; } /** * @return The value of the {@code title} attribute */ @JsonProperty @Override public String getTitle() { return title; } /** * @return The value of the {@code mimetype} attribute */ @JsonProperty @Override public String getMimetype() { return mimetype; } /** * @return The value of the {@code prettyType} attribute */ @JsonProperty @Override public String getPrettyType() { return prettyType; } /** * @return The value of the {@code userId} attribute */ @JsonProperty("user") @Override public String getUserId() { return userId; } /** * @return The value of the {@code editable} attribute */ @JsonProperty @Override public boolean isEditable() { return editable; } /** * @return The value of the {@code size} attribute */ @JsonProperty @Override public long getSize() { return size; } /** * @return The value of the {@code mode} attribute */ @JsonProperty @Override public String getMode() { return mode; } /** * @return The value of the {@code external} attribute */ @JsonProperty("is_external") @Override public boolean isExternal() { return external; } /** * @return The value of the {@code isPublic} attribute */ @JsonProperty("is_public") @Override public boolean isPublic() { return isPublic; } /** * @return The value of the {@code publicUrlShared} attribute */ @JsonProperty @Override public boolean isPublicUrlShared() { return publicUrlShared; } /** * @return The value of the {@code displayAsBot} attribute */ @JsonProperty @Override public boolean getDisplayAsBot() { return displayAsBot; } /** * @return The value of the {@code username} attribute */ @JsonProperty @Override public String getUsername() { return username; } /** * @return The value of the {@code urlPrivate} attribute */ @JsonProperty @Override public String getUrlPrivate() { return urlPrivate; } /** * @return The value of the {@code urlPrivateDownload} attribute */ @JsonProperty @Override public Optional getUrlPrivateDownload() { return Optional.ofNullable(urlPrivateDownload); } /** * @return The value of the {@code permalink} attribute */ @JsonProperty @Override public String getPermalink() { return permalink; } /** * @return The value of the {@code permalinkPublic} attribute */ @JsonProperty @Override public Optional getPermalinkPublic() { return Optional.ofNullable(permalinkPublic); } /** * @return The value of the {@code commentsCount} attribute */ @JsonProperty @Override public int getCommentsCount() { InitShim shim = this.initShim; return shim != null ? shim.getCommentsCount() : this.commentsCount; } /** * @return The value of the {@code starred} attribute */ @JsonProperty("is_starred") @Override public Optional isStarred() { return Optional.ofNullable(starred); } /** * @return The value of the {@code channelIds} attribute */ @JsonProperty("channels") @Override public List getChannelIds() { return channelIds; } /** * @return The value of the {@code groupIds} attribute */ @JsonProperty("groups") @Override public List getGroupIds() { return groupIds; } /** * @return The value of the {@code imIds} attribute */ @JsonProperty("ims") @Override public List getImIds() { return imIds; } /** * @return The value of the {@code thumb64Url} attribute */ @JsonProperty("thumb_64") @Override public Optional getThumb64Url() { return Optional.ofNullable(thumb64Url); } /** * @return The value of the {@code thumb80Url} attribute */ @JsonProperty("thumb_80") @Override public Optional getThumb80Url() { return Optional.ofNullable(thumb80Url); } /** * @return The value of the {@code thumb160Url} attribute */ @JsonProperty("thumb_160") @Override public Optional getThumb160Url() { return Optional.ofNullable(thumb160Url); } /** * @return The value of the {@code thumb360Url} attribute */ @JsonProperty("thumb_360") @Override public Optional getThumb360Url() { return Optional.ofNullable(thumb360Url); } /** * @return The value of the {@code thumb360Width} attribute */ @JsonProperty("thumb_360_w") @Override public Optional getThumb360Width() { return Optional.ofNullable(thumb360Width); } /** * @return The value of the {@code thumb360Height} attribute */ @JsonProperty("thumb_360_h") @Override public Optional getThumb360Height() { return Optional.ofNullable(thumb360Height); } /** * @return The value of the {@code thumb480Url} attribute */ @JsonProperty("thumb_480") @Override public Optional getThumb480Url() { return Optional.ofNullable(thumb480Url); } /** * @return The value of the {@code thumb480Width} attribute */ @JsonProperty("thumb_480_w") @Override public Optional getThumb480Width() { return Optional.ofNullable(thumb480Width); } /** * @return The value of the {@code thumb480Height} attribute */ @JsonProperty("thumb_480_h") @Override public Optional getThumb480Height() { return Optional.ofNullable(thumb480Height); } /** * @return The value of the {@code imageExifRotation} attribute */ @JsonProperty @Override public Optional getImageExifRotation() { return Optional.ofNullable(imageExifRotation); } /** * @return The value of the {@code originalWidth} attribute */ @JsonProperty("original_w") @Override public Optional getOriginalWidth() { return Optional.ofNullable(originalWidth); } /** * @return The value of the {@code originalHeight} attribute */ @JsonProperty("original_h") @Override public Optional getOriginalHeight() { return Optional.ofNullable(originalHeight); } /** * @return The value of the {@code hasRichPreview} attribute */ @JsonProperty("has_rich_preview") @Override public boolean hasRichPreview() { return hasRichPreview; } /** * @return The value of the {@code filetype} attribute */ @JsonProperty @Override public SlackFileType getFiletype() { InitShim shim = this.initShim; return shim != null ? shim.getFiletype() : this.filetype; } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#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 SlackPngFile withId(String value) { String newValue = Objects.requireNonNull(value, "id"); if (this.id.equals(newValue)) return this; return new SlackPngFile( newValue, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getCreatedEpochSeconds() createdEpochSeconds} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for createdEpochSeconds * @return A modified copy of the {@code this} object */ public final SlackPngFile withCreatedEpochSeconds(long value) { if (this.createdEpochSeconds == value) return this; return new SlackPngFile( this.id, value, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getTimestampEpochSeconds() timestampEpochSeconds} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for timestampEpochSeconds * @return A modified copy of the {@code this} object */ public final SlackPngFile withTimestampEpochSeconds(long value) { if (this.timestampEpochSeconds == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, value, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#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 SlackPngFile withName(String value) { String newValue = Objects.requireNonNull(value, "name"); if (this.name.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, newValue, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getTitle() title} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for title * @return A modified copy of the {@code this} object */ public final SlackPngFile withTitle(String value) { String newValue = Objects.requireNonNull(value, "title"); if (this.title.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, newValue, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getMimetype() mimetype} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for mimetype * @return A modified copy of the {@code this} object */ public final SlackPngFile withMimetype(String value) { String newValue = Objects.requireNonNull(value, "mimetype"); if (this.mimetype.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, newValue, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getPrettyType() prettyType} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for prettyType * @return A modified copy of the {@code this} object */ public final SlackPngFile withPrettyType(String value) { String newValue = Objects.requireNonNull(value, "prettyType"); if (this.prettyType.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, newValue, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getUserId() userId} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for userId * @return A modified copy of the {@code this} object */ public final SlackPngFile withUserId(String value) { String newValue = Objects.requireNonNull(value, "userId"); if (this.userId.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, newValue, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#isEditable() editable} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for editable * @return A modified copy of the {@code this} object */ public final SlackPngFile withEditable(boolean value) { if (this.editable == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, value, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getSize() size} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for size * @return A modified copy of the {@code this} object */ public final SlackPngFile withSize(long value) { if (this.size == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, value, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getMode() mode} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for mode * @return A modified copy of the {@code this} object */ public final SlackPngFile withMode(String value) { String newValue = Objects.requireNonNull(value, "mode"); if (this.mode.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, newValue, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#isExternal() external} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for external * @return A modified copy of the {@code this} object */ public final SlackPngFile withExternal(boolean value) { if (this.external == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, value, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#isPublic() public} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for isPublic * @return A modified copy of the {@code this} object */ public final SlackPngFile withPublic(boolean value) { if (this.isPublic == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, value, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#isPublicUrlShared() publicUrlShared} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for publicUrlShared * @return A modified copy of the {@code this} object */ public final SlackPngFile withPublicUrlShared(boolean value) { if (this.publicUrlShared == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, value, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getDisplayAsBot() displayAsBot} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for displayAsBot * @return A modified copy of the {@code this} object */ public final SlackPngFile withDisplayAsBot(boolean value) { if (this.displayAsBot == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, value, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getUsername() username} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for username * @return A modified copy of the {@code this} object */ public final SlackPngFile withUsername(String value) { String newValue = Objects.requireNonNull(value, "username"); if (this.username.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, newValue, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getUrlPrivate() urlPrivate} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for urlPrivate * @return A modified copy of the {@code this} object */ public final SlackPngFile withUrlPrivate(String value) { String newValue = Objects.requireNonNull(value, "urlPrivate"); if (this.urlPrivate.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, newValue, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getUrlPrivateDownload() urlPrivateDownload} attribute. * @param value The value for urlPrivateDownload, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withUrlPrivateDownload(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.urlPrivateDownload, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, newValue, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getUrlPrivateDownload() urlPrivateDownload} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for urlPrivateDownload * @return A modified copy of {@code this} object */ public final SlackPngFile withUrlPrivateDownload(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.urlPrivateDownload, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, value, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getPermalink() permalink} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for permalink * @return A modified copy of the {@code this} object */ public final SlackPngFile withPermalink(String value) { String newValue = Objects.requireNonNull(value, "permalink"); if (this.permalink.equals(newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, newValue, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getPermalinkPublic() permalinkPublic} attribute. * @param value The value for permalinkPublic, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withPermalinkPublic(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.permalinkPublic, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, newValue, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getPermalinkPublic() permalinkPublic} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for permalinkPublic * @return A modified copy of {@code this} object */ public final SlackPngFile withPermalinkPublic(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.permalinkPublic, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, value, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getCommentsCount() commentsCount} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for commentsCount * @return A modified copy of the {@code this} object */ public final SlackPngFile withCommentsCount(int value) { if (this.commentsCount == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, value, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#isStarred() starred} attribute. * @param value The value for starred, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withStarred(@Nullable Boolean value) { @Nullable Boolean newValue = value; if (Objects.equals(this.starred, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, newValue, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#isStarred() starred} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for starred * @return A modified copy of {@code this} object */ public final SlackPngFile withStarred(Optional optional) { @Nullable Boolean value = optional.orElse(null); if (Objects.equals(this.starred, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, value, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getChannelIds() channelIds}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withChannelIds(String... elements) { List newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, newValue, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getChannelIds() channelIds}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of channelIds elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withChannelIds(Iterable elements) { if (this.channelIds == elements) return this; List newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, newValue, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getGroupIds() groupIds}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withGroupIds(String... elements) { List newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, newValue, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getGroupIds() groupIds}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of groupIds elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withGroupIds(Iterable elements) { if (this.groupIds == elements) return this; List newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, newValue, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getImIds() imIds}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withImIds(String... elements) { List newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, newValue, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object with elements that replace the content of {@link SlackPngFileIF#getImIds() imIds}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of imIds elements to set * @return A modified copy of {@code this} object */ public final SlackPngFile withImIds(Iterable elements) { if (this.imIds == elements) return this; List newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, newValue, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb64Url() thumb64Url} attribute. * @param value The value for thumb64Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb64Url(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.thumb64Url, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, newValue, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb64Url() thumb64Url} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb64Url * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb64Url(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.thumb64Url, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, value, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb80Url() thumb80Url} attribute. * @param value The value for thumb80Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb80Url(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.thumb80Url, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, newValue, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb80Url() thumb80Url} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb80Url * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb80Url(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.thumb80Url, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, value, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb160Url() thumb160Url} attribute. * @param value The value for thumb160Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb160Url(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.thumb160Url, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, newValue, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb160Url() thumb160Url} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb160Url * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb160Url(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.thumb160Url, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, value, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb360Url() thumb360Url} attribute. * @param value The value for thumb360Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Url(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.thumb360Url, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, newValue, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb360Url() thumb360Url} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb360Url * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Url(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.thumb360Url, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, value, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb360Width() thumb360Width} attribute. * @param value The value for thumb360Width, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Width(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.thumb360Width, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, newValue, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb360Width() thumb360Width} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb360Width * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Width(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.thumb360Width, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, value, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb360Height() thumb360Height} attribute. * @param value The value for thumb360Height, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Height(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.thumb360Height, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, newValue, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb360Height() thumb360Height} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb360Height * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb360Height(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.thumb360Height, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, value, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb480Url() thumb480Url} attribute. * @param value The value for thumb480Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Url(@Nullable String value) { @Nullable String newValue = value; if (Objects.equals(this.thumb480Url, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, newValue, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb480Url() thumb480Url} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb480Url * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Url(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.thumb480Url, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, value, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb480Width() thumb480Width} attribute. * @param value The value for thumb480Width, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Width(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.thumb480Width, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, newValue, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb480Width() thumb480Width} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb480Width * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Width(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.thumb480Width, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, value, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getThumb480Height() thumb480Height} attribute. * @param value The value for thumb480Height, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Height(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.thumb480Height, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, newValue, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getThumb480Height() thumb480Height} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for thumb480Height * @return A modified copy of {@code this} object */ public final SlackPngFile withThumb480Height(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.thumb480Height, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, value, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getImageExifRotation() imageExifRotation} attribute. * @param value The value for imageExifRotation, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withImageExifRotation(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.imageExifRotation, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, newValue, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getImageExifRotation() imageExifRotation} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for imageExifRotation * @return A modified copy of {@code this} object */ public final SlackPngFile withImageExifRotation(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.imageExifRotation, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, value, this.originalWidth, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getOriginalWidth() originalWidth} attribute. * @param value The value for originalWidth, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withOriginalWidth(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.originalWidth, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, newValue, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getOriginalWidth() originalWidth} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for originalWidth * @return A modified copy of {@code this} object */ public final SlackPngFile withOriginalWidth(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.originalWidth, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, value, this.originalHeight, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a present value for the optional {@link SlackPngFileIF#getOriginalHeight() originalHeight} attribute. * @param value The value for originalHeight, {@code null} is accepted as {@code java.util.Optional.empty()} * @return A modified copy of {@code this} object */ public final SlackPngFile withOriginalHeight(@Nullable Integer value) { @Nullable Integer newValue = value; if (Objects.equals(this.originalHeight, newValue)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, newValue, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting an optional value for the {@link SlackPngFileIF#getOriginalHeight() originalHeight} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for originalHeight * @return A modified copy of {@code this} object */ public final SlackPngFile withOriginalHeight(Optional optional) { @Nullable Integer value = optional.orElse(null); if (Objects.equals(this.originalHeight, value)) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, value, this.hasRichPreview, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#hasRichPreview() hasRichPreview} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for hasRichPreview * @return A modified copy of the {@code this} object */ public final SlackPngFile withHasRichPreview(boolean value) { if (this.hasRichPreview == value) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, value, this.filetype); } /** * Copy the current immutable object by setting a value for the {@link SlackPngFileIF#getFiletype() filetype} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for filetype * @return A modified copy of the {@code this} object */ public final SlackPngFile withFiletype(SlackFileType value) { SlackFileType newValue = Objects.requireNonNull(value, "filetype"); if (this.filetype == newValue) return this; return new SlackPngFile( this.id, this.createdEpochSeconds, this.timestampEpochSeconds, this.name, this.title, this.mimetype, this.prettyType, this.userId, this.editable, this.size, this.mode, this.external, this.isPublic, this.publicUrlShared, this.displayAsBot, this.username, this.urlPrivate, this.urlPrivateDownload, this.permalink, this.permalinkPublic, this.commentsCount, this.starred, this.channelIds, this.groupIds, this.imIds, this.thumb64Url, this.thumb80Url, this.thumb160Url, this.thumb360Url, this.thumb360Width, this.thumb360Height, this.thumb480Url, this.thumb480Width, this.thumb480Height, this.imageExifRotation, this.originalWidth, this.originalHeight, this.hasRichPreview, newValue); } /** * This instance is equal to all instances of {@code SlackPngFile} 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 SlackPngFile && equalTo(0, (SlackPngFile) another); } private boolean equalTo(int synthetic, SlackPngFile another) { return id.equals(another.id) && createdEpochSeconds == another.createdEpochSeconds && timestampEpochSeconds == another.timestampEpochSeconds && name.equals(another.name) && title.equals(another.title) && mimetype.equals(another.mimetype) && prettyType.equals(another.prettyType) && userId.equals(another.userId) && editable == another.editable && size == another.size && mode.equals(another.mode) && external == another.external && isPublic == another.isPublic && publicUrlShared == another.publicUrlShared && displayAsBot == another.displayAsBot && username.equals(another.username) && urlPrivate.equals(another.urlPrivate) && Objects.equals(urlPrivateDownload, another.urlPrivateDownload) && permalink.equals(another.permalink) && Objects.equals(permalinkPublic, another.permalinkPublic) && commentsCount == another.commentsCount && Objects.equals(starred, another.starred) && channelIds.equals(another.channelIds) && groupIds.equals(another.groupIds) && imIds.equals(another.imIds) && Objects.equals(thumb64Url, another.thumb64Url) && Objects.equals(thumb80Url, another.thumb80Url) && Objects.equals(thumb160Url, another.thumb160Url) && Objects.equals(thumb360Url, another.thumb360Url) && Objects.equals(thumb360Width, another.thumb360Width) && Objects.equals(thumb360Height, another.thumb360Height) && Objects.equals(thumb480Url, another.thumb480Url) && Objects.equals(thumb480Width, another.thumb480Width) && Objects.equals(thumb480Height, another.thumb480Height) && Objects.equals(imageExifRotation, another.imageExifRotation) && Objects.equals(originalWidth, another.originalWidth) && Objects.equals(originalHeight, another.originalHeight) && hasRichPreview == another.hasRichPreview && filetype.equals(another.filetype); } /** * Computes a hash code from attributes: {@code id}, {@code createdEpochSeconds}, {@code timestampEpochSeconds}, {@code name}, {@code title}, {@code mimetype}, {@code prettyType}, {@code userId}, {@code editable}, {@code size}, {@code mode}, {@code external}, {@code isPublic}, {@code publicUrlShared}, {@code displayAsBot}, {@code username}, {@code urlPrivate}, {@code urlPrivateDownload}, {@code permalink}, {@code permalinkPublic}, {@code commentsCount}, {@code starred}, {@code channelIds}, {@code groupIds}, {@code imIds}, {@code thumb64Url}, {@code thumb80Url}, {@code thumb160Url}, {@code thumb360Url}, {@code thumb360Width}, {@code thumb360Height}, {@code thumb480Url}, {@code thumb480Width}, {@code thumb480Height}, {@code imageExifRotation}, {@code originalWidth}, {@code originalHeight}, {@code hasRichPreview}, {@code filetype}. * @return hashCode value */ @Override public int hashCode() { int h = 5381; h += (h << 5) + id.hashCode(); h += (h << 5) + Long.hashCode(createdEpochSeconds); h += (h << 5) + Long.hashCode(timestampEpochSeconds); h += (h << 5) + name.hashCode(); h += (h << 5) + title.hashCode(); h += (h << 5) + mimetype.hashCode(); h += (h << 5) + prettyType.hashCode(); h += (h << 5) + userId.hashCode(); h += (h << 5) + Boolean.hashCode(editable); h += (h << 5) + Long.hashCode(size); h += (h << 5) + mode.hashCode(); h += (h << 5) + Boolean.hashCode(external); h += (h << 5) + Boolean.hashCode(isPublic); h += (h << 5) + Boolean.hashCode(publicUrlShared); h += (h << 5) + Boolean.hashCode(displayAsBot); h += (h << 5) + username.hashCode(); h += (h << 5) + urlPrivate.hashCode(); h += (h << 5) + Objects.hashCode(urlPrivateDownload); h += (h << 5) + permalink.hashCode(); h += (h << 5) + Objects.hashCode(permalinkPublic); h += (h << 5) + commentsCount; h += (h << 5) + Objects.hashCode(starred); h += (h << 5) + channelIds.hashCode(); h += (h << 5) + groupIds.hashCode(); h += (h << 5) + imIds.hashCode(); h += (h << 5) + Objects.hashCode(thumb64Url); h += (h << 5) + Objects.hashCode(thumb80Url); h += (h << 5) + Objects.hashCode(thumb160Url); h += (h << 5) + Objects.hashCode(thumb360Url); h += (h << 5) + Objects.hashCode(thumb360Width); h += (h << 5) + Objects.hashCode(thumb360Height); h += (h << 5) + Objects.hashCode(thumb480Url); h += (h << 5) + Objects.hashCode(thumb480Width); h += (h << 5) + Objects.hashCode(thumb480Height); h += (h << 5) + Objects.hashCode(imageExifRotation); h += (h << 5) + Objects.hashCode(originalWidth); h += (h << 5) + Objects.hashCode(originalHeight); h += (h << 5) + Boolean.hashCode(hasRichPreview); h += (h << 5) + filetype.hashCode(); return h; } /** * Prints the immutable value {@code SlackPngFile} with attribute values. * @return A string representation of the value */ @Override public String toString() { StringBuilder builder = new StringBuilder("SlackPngFile{"); builder.append("id=").append(id); builder.append(", "); builder.append("createdEpochSeconds=").append(createdEpochSeconds); builder.append(", "); builder.append("timestampEpochSeconds=").append(timestampEpochSeconds); builder.append(", "); builder.append("name=").append(name); builder.append(", "); builder.append("title=").append(title); builder.append(", "); builder.append("mimetype=").append(mimetype); builder.append(", "); builder.append("prettyType=").append(prettyType); builder.append(", "); builder.append("userId=").append(userId); builder.append(", "); builder.append("editable=").append(editable); builder.append(", "); builder.append("size=").append(size); builder.append(", "); builder.append("mode=").append(mode); builder.append(", "); builder.append("external=").append(external); builder.append(", "); builder.append("public=").append(isPublic); builder.append(", "); builder.append("publicUrlShared=").append(publicUrlShared); builder.append(", "); builder.append("displayAsBot=").append(displayAsBot); builder.append(", "); builder.append("username=").append(username); builder.append(", "); builder.append("urlPrivate=").append(urlPrivate); if (urlPrivateDownload != null) { builder.append(", "); builder.append("urlPrivateDownload=").append(urlPrivateDownload); } builder.append(", "); builder.append("permalink=").append(permalink); if (permalinkPublic != null) { builder.append(", "); builder.append("permalinkPublic=").append(permalinkPublic); } builder.append(", "); builder.append("commentsCount=").append(commentsCount); if (starred != null) { builder.append(", "); builder.append("starred=").append(starred); } builder.append(", "); builder.append("channelIds=").append(channelIds); builder.append(", "); builder.append("groupIds=").append(groupIds); builder.append(", "); builder.append("imIds=").append(imIds); if (thumb64Url != null) { builder.append(", "); builder.append("thumb64Url=").append(thumb64Url); } if (thumb80Url != null) { builder.append(", "); builder.append("thumb80Url=").append(thumb80Url); } if (thumb160Url != null) { builder.append(", "); builder.append("thumb160Url=").append(thumb160Url); } if (thumb360Url != null) { builder.append(", "); builder.append("thumb360Url=").append(thumb360Url); } if (thumb360Width != null) { builder.append(", "); builder.append("thumb360Width=").append(thumb360Width); } if (thumb360Height != null) { builder.append(", "); builder.append("thumb360Height=").append(thumb360Height); } if (thumb480Url != null) { builder.append(", "); builder.append("thumb480Url=").append(thumb480Url); } if (thumb480Width != null) { builder.append(", "); builder.append("thumb480Width=").append(thumb480Width); } if (thumb480Height != null) { builder.append(", "); builder.append("thumb480Height=").append(thumb480Height); } if (imageExifRotation != null) { builder.append(", "); builder.append("imageExifRotation=").append(imageExifRotation); } if (originalWidth != null) { builder.append(", "); builder.append("originalWidth=").append(originalWidth); } if (originalHeight != null) { builder.append(", "); builder.append("originalHeight=").append(originalHeight); } builder.append(", "); builder.append("hasRichPreview=").append(hasRichPreview); builder.append(", "); builder.append("filetype=").append(filetype); return builder.append("}").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 = "SlackPngFileIF", generator = "Immutables") @Deprecated @JsonDeserialize @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE) static final class Json implements SlackPngFileIF { @Nullable String id; long createdEpochSeconds; boolean createdEpochSecondsIsSet; long timestampEpochSeconds; boolean timestampEpochSecondsIsSet; @Nullable String name; @Nullable String title; @Nullable String mimetype; @Nullable String prettyType; @Nullable String userId; boolean editable; boolean editableIsSet; long size; boolean sizeIsSet; @Nullable String mode; boolean external; boolean externalIsSet; boolean isPublic; boolean isPublicIsSet; boolean publicUrlShared; boolean publicUrlSharedIsSet; boolean displayAsBot; boolean displayAsBotIsSet; @Nullable String username; @Nullable String urlPrivate; @Nullable Optional urlPrivateDownload = Optional.empty(); @Nullable String permalink; @Nullable Optional permalinkPublic = Optional.empty(); int commentsCount; boolean commentsCountIsSet; @Nullable Optional starred = Optional.empty(); @Nullable List channelIds = Collections.emptyList(); @Nullable List groupIds = Collections.emptyList(); @Nullable List imIds = Collections.emptyList(); @Nullable Optional thumb64Url = Optional.empty(); @Nullable Optional thumb80Url = Optional.empty(); @Nullable Optional thumb160Url = Optional.empty(); @Nullable Optional thumb360Url = Optional.empty(); @Nullable Optional thumb360Width = Optional.empty(); @Nullable Optional thumb360Height = Optional.empty(); @Nullable Optional thumb480Url = Optional.empty(); @Nullable Optional thumb480Width = Optional.empty(); @Nullable Optional thumb480Height = Optional.empty(); @Nullable Optional imageExifRotation = Optional.empty(); @Nullable Optional originalWidth = Optional.empty(); @Nullable Optional originalHeight = Optional.empty(); boolean hasRichPreview; boolean hasRichPreviewIsSet; @Nullable SlackFileType filetype; @JsonProperty public void setId(String id) { this.id = id; } @JsonProperty("created") public void setCreatedEpochSeconds(long createdEpochSeconds) { this.createdEpochSeconds = createdEpochSeconds; this.createdEpochSecondsIsSet = true; } @JsonProperty("timestamp") public void setTimestampEpochSeconds(long timestampEpochSeconds) { this.timestampEpochSeconds = timestampEpochSeconds; this.timestampEpochSecondsIsSet = true; } @JsonProperty public void setName(String name) { this.name = name; } @JsonProperty public void setTitle(String title) { this.title = title; } @JsonProperty public void setMimetype(String mimetype) { this.mimetype = mimetype; } @JsonProperty public void setPrettyType(String prettyType) { this.prettyType = prettyType; } @JsonProperty("user") public void setUserId(String userId) { this.userId = userId; } @JsonProperty public void setEditable(boolean editable) { this.editable = editable; this.editableIsSet = true; } @JsonProperty public void setSize(long size) { this.size = size; this.sizeIsSet = true; } @JsonProperty public void setMode(String mode) { this.mode = mode; } @JsonProperty("is_external") public void setExternal(boolean external) { this.external = external; this.externalIsSet = true; } @JsonProperty("is_public") public void setPublic(boolean isPublic) { this.isPublic = isPublic; this.isPublicIsSet = true; } @JsonProperty public void setPublicUrlShared(boolean publicUrlShared) { this.publicUrlShared = publicUrlShared; this.publicUrlSharedIsSet = true; } @JsonProperty public void setDisplayAsBot(boolean displayAsBot) { this.displayAsBot = displayAsBot; this.displayAsBotIsSet = true; } @JsonProperty public void setUsername(String username) { this.username = username; } @JsonProperty public void setUrlPrivate(String urlPrivate) { this.urlPrivate = urlPrivate; } @JsonProperty public void setUrlPrivateDownload(Optional urlPrivateDownload) { this.urlPrivateDownload = urlPrivateDownload; } @JsonProperty public void setPermalink(String permalink) { this.permalink = permalink; } @JsonProperty public void setPermalinkPublic(Optional permalinkPublic) { this.permalinkPublic = permalinkPublic; } @JsonProperty public void setCommentsCount(int commentsCount) { this.commentsCount = commentsCount; this.commentsCountIsSet = true; } @JsonProperty("is_starred") public void setStarred(Optional starred) { this.starred = starred; } @JsonProperty("channels") public void setChannelIds(List channelIds) { this.channelIds = channelIds; } @JsonProperty("groups") public void setGroupIds(List groupIds) { this.groupIds = groupIds; } @JsonProperty("ims") public void setImIds(List imIds) { this.imIds = imIds; } @JsonProperty("thumb_64") public void setThumb64Url(Optional thumb64Url) { this.thumb64Url = thumb64Url; } @JsonProperty("thumb_80") public void setThumb80Url(Optional thumb80Url) { this.thumb80Url = thumb80Url; } @JsonProperty("thumb_160") public void setThumb160Url(Optional thumb160Url) { this.thumb160Url = thumb160Url; } @JsonProperty("thumb_360") public void setThumb360Url(Optional thumb360Url) { this.thumb360Url = thumb360Url; } @JsonProperty("thumb_360_w") public void setThumb360Width(Optional thumb360Width) { this.thumb360Width = thumb360Width; } @JsonProperty("thumb_360_h") public void setThumb360Height(Optional thumb360Height) { this.thumb360Height = thumb360Height; } @JsonProperty("thumb_480") public void setThumb480Url(Optional thumb480Url) { this.thumb480Url = thumb480Url; } @JsonProperty("thumb_480_w") public void setThumb480Width(Optional thumb480Width) { this.thumb480Width = thumb480Width; } @JsonProperty("thumb_480_h") public void setThumb480Height(Optional thumb480Height) { this.thumb480Height = thumb480Height; } @JsonProperty public void setImageExifRotation(Optional imageExifRotation) { this.imageExifRotation = imageExifRotation; } @JsonProperty("original_w") public void setOriginalWidth(Optional originalWidth) { this.originalWidth = originalWidth; } @JsonProperty("original_h") public void setOriginalHeight(Optional originalHeight) { this.originalHeight = originalHeight; } @JsonProperty("has_rich_preview") public void setHasRichPreview(boolean hasRichPreview) { this.hasRichPreview = hasRichPreview; this.hasRichPreviewIsSet = true; } @JsonProperty public void setFiletype(SlackFileType filetype) { this.filetype = filetype; } @Override public String getId() { throw new UnsupportedOperationException(); } @Override public long getCreatedEpochSeconds() { throw new UnsupportedOperationException(); } @Override public long getTimestampEpochSeconds() { throw new UnsupportedOperationException(); } @Override public String getName() { throw new UnsupportedOperationException(); } @Override public String getTitle() { throw new UnsupportedOperationException(); } @Override public String getMimetype() { throw new UnsupportedOperationException(); } @Override public String getPrettyType() { throw new UnsupportedOperationException(); } @Override public String getUserId() { throw new UnsupportedOperationException(); } @Override public boolean isEditable() { throw new UnsupportedOperationException(); } @Override public long getSize() { throw new UnsupportedOperationException(); } @Override public String getMode() { throw new UnsupportedOperationException(); } @Override public boolean isExternal() { throw new UnsupportedOperationException(); } @Override public boolean isPublic() { throw new UnsupportedOperationException(); } @Override public boolean isPublicUrlShared() { throw new UnsupportedOperationException(); } @Override public boolean getDisplayAsBot() { throw new UnsupportedOperationException(); } @Override public String getUsername() { throw new UnsupportedOperationException(); } @Override public String getUrlPrivate() { throw new UnsupportedOperationException(); } @Override public Optional getUrlPrivateDownload() { throw new UnsupportedOperationException(); } @Override public String getPermalink() { throw new UnsupportedOperationException(); } @Override public Optional getPermalinkPublic() { throw new UnsupportedOperationException(); } @Override public int getCommentsCount() { throw new UnsupportedOperationException(); } @Override public Optional isStarred() { throw new UnsupportedOperationException(); } @Override public List getChannelIds() { throw new UnsupportedOperationException(); } @Override public List getGroupIds() { throw new UnsupportedOperationException(); } @Override public List getImIds() { throw new UnsupportedOperationException(); } @Override public Optional getThumb64Url() { throw new UnsupportedOperationException(); } @Override public Optional getThumb80Url() { throw new UnsupportedOperationException(); } @Override public Optional getThumb160Url() { throw new UnsupportedOperationException(); } @Override public Optional getThumb360Url() { throw new UnsupportedOperationException(); } @Override public Optional getThumb360Width() { throw new UnsupportedOperationException(); } @Override public Optional getThumb360Height() { throw new UnsupportedOperationException(); } @Override public Optional getThumb480Url() { throw new UnsupportedOperationException(); } @Override public Optional getThumb480Width() { throw new UnsupportedOperationException(); } @Override public Optional getThumb480Height() { throw new UnsupportedOperationException(); } @Override public Optional getImageExifRotation() { throw new UnsupportedOperationException(); } @Override public Optional getOriginalWidth() { throw new UnsupportedOperationException(); } @Override public Optional getOriginalHeight() { throw new UnsupportedOperationException(); } @Override public boolean hasRichPreview() { throw new UnsupportedOperationException(); } @Override public SlackFileType getFiletype() { 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 SlackPngFile fromJson(Json json) { SlackPngFile.Builder builder = SlackPngFile.builder(); if (json.id != null) { builder.setId(json.id); } if (json.createdEpochSecondsIsSet) { builder.setCreatedEpochSeconds(json.createdEpochSeconds); } if (json.timestampEpochSecondsIsSet) { builder.setTimestampEpochSeconds(json.timestampEpochSeconds); } if (json.name != null) { builder.setName(json.name); } if (json.title != null) { builder.setTitle(json.title); } if (json.mimetype != null) { builder.setMimetype(json.mimetype); } if (json.prettyType != null) { builder.setPrettyType(json.prettyType); } if (json.userId != null) { builder.setUserId(json.userId); } if (json.editableIsSet) { builder.setEditable(json.editable); } if (json.sizeIsSet) { builder.setSize(json.size); } if (json.mode != null) { builder.setMode(json.mode); } if (json.externalIsSet) { builder.setExternal(json.external); } if (json.isPublicIsSet) { builder.setPublic(json.isPublic); } if (json.publicUrlSharedIsSet) { builder.setPublicUrlShared(json.publicUrlShared); } if (json.displayAsBotIsSet) { builder.setDisplayAsBot(json.displayAsBot); } if (json.username != null) { builder.setUsername(json.username); } if (json.urlPrivate != null) { builder.setUrlPrivate(json.urlPrivate); } if (json.urlPrivateDownload != null) { builder.setUrlPrivateDownload(json.urlPrivateDownload); } if (json.permalink != null) { builder.setPermalink(json.permalink); } if (json.permalinkPublic != null) { builder.setPermalinkPublic(json.permalinkPublic); } if (json.commentsCountIsSet) { builder.setCommentsCount(json.commentsCount); } if (json.starred != null) { builder.setStarred(json.starred); } if (json.channelIds != null) { builder.addAllChannelIds(json.channelIds); } if (json.groupIds != null) { builder.addAllGroupIds(json.groupIds); } if (json.imIds != null) { builder.addAllImIds(json.imIds); } if (json.thumb64Url != null) { builder.setThumb64Url(json.thumb64Url); } if (json.thumb80Url != null) { builder.setThumb80Url(json.thumb80Url); } if (json.thumb160Url != null) { builder.setThumb160Url(json.thumb160Url); } if (json.thumb360Url != null) { builder.setThumb360Url(json.thumb360Url); } if (json.thumb360Width != null) { builder.setThumb360Width(json.thumb360Width); } if (json.thumb360Height != null) { builder.setThumb360Height(json.thumb360Height); } if (json.thumb480Url != null) { builder.setThumb480Url(json.thumb480Url); } if (json.thumb480Width != null) { builder.setThumb480Width(json.thumb480Width); } if (json.thumb480Height != null) { builder.setThumb480Height(json.thumb480Height); } if (json.imageExifRotation != null) { builder.setImageExifRotation(json.imageExifRotation); } if (json.originalWidth != null) { builder.setOriginalWidth(json.originalWidth); } if (json.originalHeight != null) { builder.setOriginalHeight(json.originalHeight); } if (json.hasRichPreviewIsSet) { builder.setHasRichPreview(json.hasRichPreview); } if (json.filetype != null) { builder.setFiletype(json.filetype); } return builder.build(); } /** * Creates an immutable copy of a {@link SlackPngFileIF} 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 SlackPngFile instance */ public static SlackPngFile copyOf(SlackPngFileIF instance) { if (instance instanceof SlackPngFile) { return (SlackPngFile) instance; } return SlackPngFile.builder() .from(instance) .build(); } /** * Creates a builder for {@link SlackPngFile SlackPngFile}. *

   * SlackPngFile.builder()
   *    .setId(String) // required {@link SlackPngFileIF#getId() id}
   *    .setCreatedEpochSeconds(long) // required {@link SlackPngFileIF#getCreatedEpochSeconds() createdEpochSeconds}
   *    .setTimestampEpochSeconds(long) // required {@link SlackPngFileIF#getTimestampEpochSeconds() timestampEpochSeconds}
   *    .setName(String) // required {@link SlackPngFileIF#getName() name}
   *    .setTitle(String) // required {@link SlackPngFileIF#getTitle() title}
   *    .setMimetype(String) // required {@link SlackPngFileIF#getMimetype() mimetype}
   *    .setPrettyType(String) // required {@link SlackPngFileIF#getPrettyType() prettyType}
   *    .setUserId(String) // required {@link SlackPngFileIF#getUserId() userId}
   *    .setEditable(boolean) // required {@link SlackPngFileIF#isEditable() editable}
   *    .setSize(long) // required {@link SlackPngFileIF#getSize() size}
   *    .setMode(String) // required {@link SlackPngFileIF#getMode() mode}
   *    .setExternal(boolean) // required {@link SlackPngFileIF#isExternal() external}
   *    .setPublic(boolean) // required {@link SlackPngFileIF#isPublic() public}
   *    .setPublicUrlShared(boolean) // required {@link SlackPngFileIF#isPublicUrlShared() publicUrlShared}
   *    .setDisplayAsBot(boolean) // required {@link SlackPngFileIF#getDisplayAsBot() displayAsBot}
   *    .setUsername(String) // required {@link SlackPngFileIF#getUsername() username}
   *    .setUrlPrivate(String) // required {@link SlackPngFileIF#getUrlPrivate() urlPrivate}
   *    .setUrlPrivateDownload(String) // optional {@link SlackPngFileIF#getUrlPrivateDownload() urlPrivateDownload}
   *    .setPermalink(String) // required {@link SlackPngFileIF#getPermalink() permalink}
   *    .setPermalinkPublic(String) // optional {@link SlackPngFileIF#getPermalinkPublic() permalinkPublic}
   *    .setCommentsCount(int) // optional {@link SlackPngFileIF#getCommentsCount() commentsCount}
   *    .setStarred(Boolean) // optional {@link SlackPngFileIF#isStarred() starred}
   *    .addChannelIds|addAllChannelIds(String) // {@link SlackPngFileIF#getChannelIds() channelIds} elements
   *    .addGroupIds|addAllGroupIds(String) // {@link SlackPngFileIF#getGroupIds() groupIds} elements
   *    .addImIds|addAllImIds(String) // {@link SlackPngFileIF#getImIds() imIds} elements
   *    .setThumb64Url(String) // optional {@link SlackPngFileIF#getThumb64Url() thumb64Url}
   *    .setThumb80Url(String) // optional {@link SlackPngFileIF#getThumb80Url() thumb80Url}
   *    .setThumb160Url(String) // optional {@link SlackPngFileIF#getThumb160Url() thumb160Url}
   *    .setThumb360Url(String) // optional {@link SlackPngFileIF#getThumb360Url() thumb360Url}
   *    .setThumb360Width(Integer) // optional {@link SlackPngFileIF#getThumb360Width() thumb360Width}
   *    .setThumb360Height(Integer) // optional {@link SlackPngFileIF#getThumb360Height() thumb360Height}
   *    .setThumb480Url(String) // optional {@link SlackPngFileIF#getThumb480Url() thumb480Url}
   *    .setThumb480Width(Integer) // optional {@link SlackPngFileIF#getThumb480Width() thumb480Width}
   *    .setThumb480Height(Integer) // optional {@link SlackPngFileIF#getThumb480Height() thumb480Height}
   *    .setImageExifRotation(Integer) // optional {@link SlackPngFileIF#getImageExifRotation() imageExifRotation}
   *    .setOriginalWidth(Integer) // optional {@link SlackPngFileIF#getOriginalWidth() originalWidth}
   *    .setOriginalHeight(Integer) // optional {@link SlackPngFileIF#getOriginalHeight() originalHeight}
   *    .setHasRichPreview(boolean) // required {@link SlackPngFileIF#hasRichPreview() hasRichPreview}
   *    .setFiletype(com.hubspot.slack.client.models.files.SlackFileType) // optional {@link SlackPngFileIF#getFiletype() filetype}
   *    .build();
   * 
* @return A new SlackPngFile builder */ public static SlackPngFile.Builder builder() { return new SlackPngFile.Builder(); } /** * Builds instances of type {@link SlackPngFile SlackPngFile}. * 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 = "SlackPngFileIF", generator = "Immutables") @NotThreadSafe public static final class Builder { private static final long INIT_BIT_ID = 0x1L; private static final long INIT_BIT_CREATED_EPOCH_SECONDS = 0x2L; private static final long INIT_BIT_TIMESTAMP_EPOCH_SECONDS = 0x4L; private static final long INIT_BIT_NAME = 0x8L; private static final long INIT_BIT_TITLE = 0x10L; private static final long INIT_BIT_MIMETYPE = 0x20L; private static final long INIT_BIT_PRETTY_TYPE = 0x40L; private static final long INIT_BIT_USER_ID = 0x80L; private static final long INIT_BIT_EDITABLE = 0x100L; private static final long INIT_BIT_SIZE = 0x200L; private static final long INIT_BIT_MODE = 0x400L; private static final long INIT_BIT_EXTERNAL = 0x800L; private static final long INIT_BIT_IS_PUBLIC = 0x1000L; private static final long INIT_BIT_PUBLIC_URL_SHARED = 0x2000L; private static final long INIT_BIT_DISPLAY_AS_BOT = 0x4000L; private static final long INIT_BIT_USERNAME = 0x8000L; private static final long INIT_BIT_URL_PRIVATE = 0x10000L; private static final long INIT_BIT_PERMALINK = 0x20000L; private static final long INIT_BIT_HAS_RICH_PREVIEW = 0x40000L; private static final long OPT_BIT_COMMENTS_COUNT = 0x1L; private long initBits = 0x7ffffL; private long optBits; private @Nullable String id; private long createdEpochSeconds; private long timestampEpochSeconds; private @Nullable String name; private @Nullable String title; private @Nullable String mimetype; private @Nullable String prettyType; private @Nullable String userId; private boolean editable; private long size; private @Nullable String mode; private boolean external; private boolean isPublic; private boolean publicUrlShared; private boolean displayAsBot; private @Nullable String username; private @Nullable String urlPrivate; private @Nullable String urlPrivateDownload; private @Nullable String permalink; private @Nullable String permalinkPublic; private int commentsCount; private @Nullable Boolean starred; private List channelIds = new ArrayList(); private List groupIds = new ArrayList(); private List imIds = new ArrayList(); private @Nullable String thumb64Url; private @Nullable String thumb80Url; private @Nullable String thumb160Url; private @Nullable String thumb360Url; private @Nullable Integer thumb360Width; private @Nullable Integer thumb360Height; private @Nullable String thumb480Url; private @Nullable Integer thumb480Width; private @Nullable Integer thumb480Height; private @Nullable Integer imageExifRotation; private @Nullable Integer originalWidth; private @Nullable Integer originalHeight; private boolean hasRichPreview; private @Nullable SlackFileType filetype; private Builder() { } /** * Fill a builder with attribute values from the provided {@code com.hubspot.slack.client.models.files.SlackPngFileIF} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SlackPngFileIF instance) { Objects.requireNonNull(instance, "instance"); from((short) 0, (Object) instance); return this; } /** * Fill a builder with attribute values from the provided {@code com.hubspot.slack.client.models.files.SlackFile} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SlackFile instance) { Objects.requireNonNull(instance, "instance"); from((short) 0, (Object) instance); return this; } /** * Fill a builder with attribute values from the provided {@code com.hubspot.slack.client.models.files.SlackImageFile} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SlackImageFile instance) { Objects.requireNonNull(instance, "instance"); from((short) 0, (Object) instance); return this; } private void from(short _unused, Object object) { long bits = 0; if (object instanceof SlackPngFileIF) { SlackPngFileIF instance = (SlackPngFileIF) object; if ((bits & 0x1L) == 0) { this.setFiletype(instance.getFiletype()); bits |= 0x1L; } if ((bits & 0x2L) == 0) { Optional thumb480HeightOptional = instance.getThumb480Height(); if (thumb480HeightOptional.isPresent()) { setThumb480Height(thumb480HeightOptional); } bits |= 0x2L; } if ((bits & 0x4L) == 0) { this.setTitle(instance.getTitle()); bits |= 0x4L; } if ((bits & 0x8L) == 0) { this.setDisplayAsBot(instance.getDisplayAsBot()); bits |= 0x8L; } if ((bits & 0x10L) == 0) { Optional thumb360HeightOptional = instance.getThumb360Height(); if (thumb360HeightOptional.isPresent()) { setThumb360Height(thumb360HeightOptional); } bits |= 0x10L; } if ((bits & 0x20L) == 0) { this.setHasRichPreview(instance.hasRichPreview()); bits |= 0x20L; } if ((bits & 0x40L) == 0) { addAllImIds(instance.getImIds()); bits |= 0x40L; } if ((bits & 0x80L) == 0) { Optional urlPrivateDownloadOptional = instance.getUrlPrivateDownload(); if (urlPrivateDownloadOptional.isPresent()) { setUrlPrivateDownload(urlPrivateDownloadOptional); } bits |= 0x80L; } if ((bits & 0x100L) == 0) { Optional thumb360UrlOptional = instance.getThumb360Url(); if (thumb360UrlOptional.isPresent()) { setThumb360Url(thumb360UrlOptional); } bits |= 0x100L; } if ((bits & 0x200L) == 0) { this.setMode(instance.getMode()); bits |= 0x200L; } if ((bits & 0x400L) == 0) { Optional thumb480UrlOptional = instance.getThumb480Url(); if (thumb480UrlOptional.isPresent()) { setThumb480Url(thumb480UrlOptional); } bits |= 0x400L; } if ((bits & 0x800L) == 0) { Optional starredOptional = instance.isStarred(); if (starredOptional.isPresent()) { setStarred(starredOptional); } bits |= 0x800L; } if ((bits & 0x1000L) == 0) { Optional thumb480WidthOptional = instance.getThumb480Width(); if (thumb480WidthOptional.isPresent()) { setThumb480Width(thumb480WidthOptional); } bits |= 0x1000L; } if ((bits & 0x2000L) == 0) { this.setUrlPrivate(instance.getUrlPrivate()); bits |= 0x2000L; } if ((bits & 0x4000L) == 0) { this.setPrettyType(instance.getPrettyType()); bits |= 0x4000L; } if ((bits & 0x8000L) == 0) { addAllGroupIds(instance.getGroupIds()); bits |= 0x8000L; } if ((bits & 0x10000L) == 0) { this.setPublicUrlShared(instance.isPublicUrlShared()); bits |= 0x10000L; } if ((bits & 0x20000L) == 0) { this.setTimestampEpochSeconds(instance.getTimestampEpochSeconds()); bits |= 0x20000L; } if ((bits & 0x40000L) == 0) { this.setPublic(instance.isPublic()); bits |= 0x40000L; } if ((bits & 0x80000L) == 0) { this.setId(instance.getId()); bits |= 0x80000L; } if ((bits & 0x100000L) == 0) { addAllChannelIds(instance.getChannelIds()); bits |= 0x100000L; } if ((bits & 0x200000L) == 0) { this.setCreatedEpochSeconds(instance.getCreatedEpochSeconds()); bits |= 0x200000L; } if ((bits & 0x400000L) == 0) { Optional originalHeightOptional = instance.getOriginalHeight(); if (originalHeightOptional.isPresent()) { setOriginalHeight(originalHeightOptional); } bits |= 0x400000L; } if ((bits & 0x800000L) == 0) { this.setEditable(instance.isEditable()); bits |= 0x800000L; } if ((bits & 0x1000000L) == 0) { Optional thumb64UrlOptional = instance.getThumb64Url(); if (thumb64UrlOptional.isPresent()) { setThumb64Url(thumb64UrlOptional); } bits |= 0x1000000L; } if ((bits & 0x2000000L) == 0) { this.setUserId(instance.getUserId()); bits |= 0x2000000L; } if ((bits & 0x4000000L) == 0) { Optional thumb80UrlOptional = instance.getThumb80Url(); if (thumb80UrlOptional.isPresent()) { setThumb80Url(thumb80UrlOptional); } bits |= 0x4000000L; } if ((bits & 0x8000000L) == 0) { Optional imageExifRotationOptional = instance.getImageExifRotation(); if (imageExifRotationOptional.isPresent()) { setImageExifRotation(imageExifRotationOptional); } bits |= 0x8000000L; } if ((bits & 0x10000000L) == 0) { Optional originalWidthOptional = instance.getOriginalWidth(); if (originalWidthOptional.isPresent()) { setOriginalWidth(originalWidthOptional); } bits |= 0x10000000L; } if ((bits & 0x20000000L) == 0) { this.setExternal(instance.isExternal()); bits |= 0x20000000L; } if ((bits & 0x40000000L) == 0) { this.setSize(instance.getSize()); bits |= 0x40000000L; } if ((bits & 0x80000000L) == 0) { Optional thumb160UrlOptional = instance.getThumb160Url(); if (thumb160UrlOptional.isPresent()) { setThumb160Url(thumb160UrlOptional); } bits |= 0x80000000L; } if ((bits & 0x100000000L) == 0) { this.setCommentsCount(instance.getCommentsCount()); bits |= 0x100000000L; } if ((bits & 0x200000000L) == 0) { this.setName(instance.getName()); bits |= 0x200000000L; } if ((bits & 0x400000000L) == 0) { Optional thumb360WidthOptional = instance.getThumb360Width(); if (thumb360WidthOptional.isPresent()) { setThumb360Width(thumb360WidthOptional); } bits |= 0x400000000L; } if ((bits & 0x800000000L) == 0) { this.setMimetype(instance.getMimetype()); bits |= 0x800000000L; } if ((bits & 0x1000000000L) == 0) { Optional permalinkPublicOptional = instance.getPermalinkPublic(); if (permalinkPublicOptional.isPresent()) { setPermalinkPublic(permalinkPublicOptional); } bits |= 0x1000000000L; } if ((bits & 0x2000000000L) == 0) { this.setPermalink(instance.getPermalink()); bits |= 0x2000000000L; } if ((bits & 0x4000000000L) == 0) { this.setUsername(instance.getUsername()); bits |= 0x4000000000L; } } if (object instanceof SlackFile) { SlackFile instance = (SlackFile) object; if ((bits & 0x1L) == 0) { this.setFiletype(instance.getFiletype()); bits |= 0x1L; } if ((bits & 0x4L) == 0) { this.setTitle(instance.getTitle()); bits |= 0x4L; } if ((bits & 0x8L) == 0) { this.setDisplayAsBot(instance.getDisplayAsBot()); bits |= 0x8L; } if ((bits & 0x40L) == 0) { addAllImIds(instance.getImIds()); bits |= 0x40L; } if ((bits & 0x80L) == 0) { Optional urlPrivateDownloadOptional = instance.getUrlPrivateDownload(); if (urlPrivateDownloadOptional.isPresent()) { setUrlPrivateDownload(urlPrivateDownloadOptional); } bits |= 0x80L; } if ((bits & 0x200L) == 0) { this.setMode(instance.getMode()); bits |= 0x200L; } if ((bits & 0x800L) == 0) { Optional starredOptional = instance.isStarred(); if (starredOptional.isPresent()) { setStarred(starredOptional); } bits |= 0x800L; } if ((bits & 0x2000L) == 0) { this.setUrlPrivate(instance.getUrlPrivate()); bits |= 0x2000L; } if ((bits & 0x4000L) == 0) { this.setPrettyType(instance.getPrettyType()); bits |= 0x4000L; } if ((bits & 0x8000L) == 0) { addAllGroupIds(instance.getGroupIds()); bits |= 0x8000L; } if ((bits & 0x10000L) == 0) { this.setPublicUrlShared(instance.isPublicUrlShared()); bits |= 0x10000L; } if ((bits & 0x20000L) == 0) { this.setTimestampEpochSeconds(instance.getTimestampEpochSeconds()); bits |= 0x20000L; } if ((bits & 0x40000L) == 0) { this.setPublic(instance.isPublic()); bits |= 0x40000L; } if ((bits & 0x80000L) == 0) { this.setId(instance.getId()); bits |= 0x80000L; } if ((bits & 0x100000L) == 0) { addAllChannelIds(instance.getChannelIds()); bits |= 0x100000L; } if ((bits & 0x200000L) == 0) { this.setCreatedEpochSeconds(instance.getCreatedEpochSeconds()); bits |= 0x200000L; } if ((bits & 0x800000L) == 0) { this.setEditable(instance.isEditable()); bits |= 0x800000L; } if ((bits & 0x2000000L) == 0) { this.setUserId(instance.getUserId()); bits |= 0x2000000L; } if ((bits & 0x20000000L) == 0) { this.setExternal(instance.isExternal()); bits |= 0x20000000L; } if ((bits & 0x40000000L) == 0) { this.setSize(instance.getSize()); bits |= 0x40000000L; } if ((bits & 0x100000000L) == 0) { this.setCommentsCount(instance.getCommentsCount()); bits |= 0x100000000L; } if ((bits & 0x200000000L) == 0) { this.setName(instance.getName()); bits |= 0x200000000L; } if ((bits & 0x800000000L) == 0) { this.setMimetype(instance.getMimetype()); bits |= 0x800000000L; } if ((bits & 0x1000000000L) == 0) { Optional permalinkPublicOptional = instance.getPermalinkPublic(); if (permalinkPublicOptional.isPresent()) { setPermalinkPublic(permalinkPublicOptional); } bits |= 0x1000000000L; } if ((bits & 0x2000000000L) == 0) { this.setPermalink(instance.getPermalink()); bits |= 0x2000000000L; } if ((bits & 0x4000000000L) == 0) { this.setUsername(instance.getUsername()); bits |= 0x4000000000L; } } if (object instanceof SlackImageFile) { SlackImageFile instance = (SlackImageFile) object; if ((bits & 0x1L) == 0) { this.setFiletype(instance.getFiletype()); bits |= 0x1L; } if ((bits & 0x2L) == 0) { Optional thumb480HeightOptional = instance.getThumb480Height(); if (thumb480HeightOptional.isPresent()) { setThumb480Height(thumb480HeightOptional); } bits |= 0x2L; } if ((bits & 0x4L) == 0) { this.setTitle(instance.getTitle()); bits |= 0x4L; } if ((bits & 0x8L) == 0) { this.setDisplayAsBot(instance.getDisplayAsBot()); bits |= 0x8L; } if ((bits & 0x10L) == 0) { Optional thumb360HeightOptional = instance.getThumb360Height(); if (thumb360HeightOptional.isPresent()) { setThumb360Height(thumb360HeightOptional); } bits |= 0x10L; } if ((bits & 0x20L) == 0) { this.setHasRichPreview(instance.hasRichPreview()); bits |= 0x20L; } if ((bits & 0x40L) == 0) { addAllImIds(instance.getImIds()); bits |= 0x40L; } if ((bits & 0x80L) == 0) { Optional urlPrivateDownloadOptional = instance.getUrlPrivateDownload(); if (urlPrivateDownloadOptional.isPresent()) { setUrlPrivateDownload(urlPrivateDownloadOptional); } bits |= 0x80L; } if ((bits & 0x100L) == 0) { Optional thumb360UrlOptional = instance.getThumb360Url(); if (thumb360UrlOptional.isPresent()) { setThumb360Url(thumb360UrlOptional); } bits |= 0x100L; } if ((bits & 0x200L) == 0) { this.setMode(instance.getMode()); bits |= 0x200L; } if ((bits & 0x400L) == 0) { Optional thumb480UrlOptional = instance.getThumb480Url(); if (thumb480UrlOptional.isPresent()) { setThumb480Url(thumb480UrlOptional); } bits |= 0x400L; } if ((bits & 0x800L) == 0) { Optional starredOptional = instance.isStarred(); if (starredOptional.isPresent()) { setStarred(starredOptional); } bits |= 0x800L; } if ((bits & 0x1000L) == 0) { Optional thumb480WidthOptional = instance.getThumb480Width(); if (thumb480WidthOptional.isPresent()) { setThumb480Width(thumb480WidthOptional); } bits |= 0x1000L; } if ((bits & 0x2000L) == 0) { this.setUrlPrivate(instance.getUrlPrivate()); bits |= 0x2000L; } if ((bits & 0x4000L) == 0) { this.setPrettyType(instance.getPrettyType()); bits |= 0x4000L; } if ((bits & 0x8000L) == 0) { addAllGroupIds(instance.getGroupIds()); bits |= 0x8000L; } if ((bits & 0x10000L) == 0) { this.setPublicUrlShared(instance.isPublicUrlShared()); bits |= 0x10000L; } if ((bits & 0x20000L) == 0) { this.setTimestampEpochSeconds(instance.getTimestampEpochSeconds()); bits |= 0x20000L; } if ((bits & 0x40000L) == 0) { this.setPublic(instance.isPublic()); bits |= 0x40000L; } if ((bits & 0x80000L) == 0) { this.setId(instance.getId()); bits |= 0x80000L; } if ((bits & 0x100000L) == 0) { addAllChannelIds(instance.getChannelIds()); bits |= 0x100000L; } if ((bits & 0x200000L) == 0) { this.setCreatedEpochSeconds(instance.getCreatedEpochSeconds()); bits |= 0x200000L; } if ((bits & 0x400000L) == 0) { Optional originalHeightOptional = instance.getOriginalHeight(); if (originalHeightOptional.isPresent()) { setOriginalHeight(originalHeightOptional); } bits |= 0x400000L; } if ((bits & 0x800000L) == 0) { this.setEditable(instance.isEditable()); bits |= 0x800000L; } if ((bits & 0x1000000L) == 0) { Optional thumb64UrlOptional = instance.getThumb64Url(); if (thumb64UrlOptional.isPresent()) { setThumb64Url(thumb64UrlOptional); } bits |= 0x1000000L; } if ((bits & 0x2000000L) == 0) { this.setUserId(instance.getUserId()); bits |= 0x2000000L; } if ((bits & 0x4000000L) == 0) { Optional thumb80UrlOptional = instance.getThumb80Url(); if (thumb80UrlOptional.isPresent()) { setThumb80Url(thumb80UrlOptional); } bits |= 0x4000000L; } if ((bits & 0x8000000L) == 0) { Optional imageExifRotationOptional = instance.getImageExifRotation(); if (imageExifRotationOptional.isPresent()) { setImageExifRotation(imageExifRotationOptional); } bits |= 0x8000000L; } if ((bits & 0x10000000L) == 0) { Optional originalWidthOptional = instance.getOriginalWidth(); if (originalWidthOptional.isPresent()) { setOriginalWidth(originalWidthOptional); } bits |= 0x10000000L; } if ((bits & 0x20000000L) == 0) { this.setExternal(instance.isExternal()); bits |= 0x20000000L; } if ((bits & 0x40000000L) == 0) { this.setSize(instance.getSize()); bits |= 0x40000000L; } if ((bits & 0x80000000L) == 0) { Optional thumb160UrlOptional = instance.getThumb160Url(); if (thumb160UrlOptional.isPresent()) { setThumb160Url(thumb160UrlOptional); } bits |= 0x80000000L; } if ((bits & 0x100000000L) == 0) { this.setCommentsCount(instance.getCommentsCount()); bits |= 0x100000000L; } if ((bits & 0x200000000L) == 0) { this.setName(instance.getName()); bits |= 0x200000000L; } if ((bits & 0x400000000L) == 0) { Optional thumb360WidthOptional = instance.getThumb360Width(); if (thumb360WidthOptional.isPresent()) { setThumb360Width(thumb360WidthOptional); } bits |= 0x400000000L; } if ((bits & 0x800000000L) == 0) { this.setMimetype(instance.getMimetype()); bits |= 0x800000000L; } if ((bits & 0x1000000000L) == 0) { Optional permalinkPublicOptional = instance.getPermalinkPublic(); if (permalinkPublicOptional.isPresent()) { setPermalinkPublic(permalinkPublicOptional); } bits |= 0x1000000000L; } if ((bits & 0x2000000000L) == 0) { this.setPermalink(instance.getPermalink()); bits |= 0x2000000000L; } if ((bits & 0x4000000000L) == 0) { this.setUsername(instance.getUsername()); bits |= 0x4000000000L; } } } /** * Initializes the value for the {@link SlackPngFileIF#getId() id} attribute. * @param id The value for id * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setId(String id) { this.id = Objects.requireNonNull(id, "id"); initBits &= ~INIT_BIT_ID; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getCreatedEpochSeconds() createdEpochSeconds} attribute. * @param createdEpochSeconds The value for createdEpochSeconds * @return {@code this} builder for use in a chained invocation */ @JsonProperty("created") public final Builder setCreatedEpochSeconds(long createdEpochSeconds) { this.createdEpochSeconds = createdEpochSeconds; initBits &= ~INIT_BIT_CREATED_EPOCH_SECONDS; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getTimestampEpochSeconds() timestampEpochSeconds} attribute. * @param timestampEpochSeconds The value for timestampEpochSeconds * @return {@code this} builder for use in a chained invocation */ @JsonProperty("timestamp") public final Builder setTimestampEpochSeconds(long timestampEpochSeconds) { this.timestampEpochSeconds = timestampEpochSeconds; initBits &= ~INIT_BIT_TIMESTAMP_EPOCH_SECONDS; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getName() name} attribute. * @param name The value for name * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setName(String name) { this.name = Objects.requireNonNull(name, "name"); initBits &= ~INIT_BIT_NAME; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getTitle() title} attribute. * @param title The value for title * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setTitle(String title) { this.title = Objects.requireNonNull(title, "title"); initBits &= ~INIT_BIT_TITLE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getMimetype() mimetype} attribute. * @param mimetype The value for mimetype * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setMimetype(String mimetype) { this.mimetype = Objects.requireNonNull(mimetype, "mimetype"); initBits &= ~INIT_BIT_MIMETYPE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getPrettyType() prettyType} attribute. * @param prettyType The value for prettyType * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setPrettyType(String prettyType) { this.prettyType = Objects.requireNonNull(prettyType, "prettyType"); initBits &= ~INIT_BIT_PRETTY_TYPE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getUserId() userId} attribute. * @param userId The value for userId * @return {@code this} builder for use in a chained invocation */ @JsonProperty("user") public final Builder setUserId(String userId) { this.userId = Objects.requireNonNull(userId, "userId"); initBits &= ~INIT_BIT_USER_ID; return this; } /** * Initializes the value for the {@link SlackPngFileIF#isEditable() editable} attribute. * @param editable The value for editable * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setEditable(boolean editable) { this.editable = editable; initBits &= ~INIT_BIT_EDITABLE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getSize() size} attribute. * @param size The value for size * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setSize(long size) { this.size = size; initBits &= ~INIT_BIT_SIZE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getMode() mode} attribute. * @param mode The value for mode * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setMode(String mode) { this.mode = Objects.requireNonNull(mode, "mode"); initBits &= ~INIT_BIT_MODE; return this; } /** * Initializes the value for the {@link SlackPngFileIF#isExternal() external} attribute. * @param external The value for external * @return {@code this} builder for use in a chained invocation */ @JsonProperty("is_external") public final Builder setExternal(boolean external) { this.external = external; initBits &= ~INIT_BIT_EXTERNAL; return this; } /** * Initializes the value for the {@link SlackPngFileIF#isPublic() public} attribute. * @param isPublic The value for isPublic * @return {@code this} builder for use in a chained invocation */ @JsonProperty("is_public") public final Builder setPublic(boolean isPublic) { this.isPublic = isPublic; initBits &= ~INIT_BIT_IS_PUBLIC; return this; } /** * Initializes the value for the {@link SlackPngFileIF#isPublicUrlShared() publicUrlShared} attribute. * @param publicUrlShared The value for publicUrlShared * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setPublicUrlShared(boolean publicUrlShared) { this.publicUrlShared = publicUrlShared; initBits &= ~INIT_BIT_PUBLIC_URL_SHARED; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getDisplayAsBot() displayAsBot} attribute. * @param displayAsBot The value for displayAsBot * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setDisplayAsBot(boolean displayAsBot) { this.displayAsBot = displayAsBot; initBits &= ~INIT_BIT_DISPLAY_AS_BOT; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getUsername() username} attribute. * @param username The value for username * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setUsername(String username) { this.username = Objects.requireNonNull(username, "username"); initBits &= ~INIT_BIT_USERNAME; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getUrlPrivate() urlPrivate} attribute. * @param urlPrivate The value for urlPrivate * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setUrlPrivate(String urlPrivate) { this.urlPrivate = Objects.requireNonNull(urlPrivate, "urlPrivate"); initBits &= ~INIT_BIT_URL_PRIVATE; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getUrlPrivateDownload() urlPrivateDownload} to urlPrivateDownload. * @param urlPrivateDownload The value for urlPrivateDownload, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setUrlPrivateDownload(@Nullable String urlPrivateDownload) { this.urlPrivateDownload = urlPrivateDownload; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getUrlPrivateDownload() urlPrivateDownload} to urlPrivateDownload. * @param urlPrivateDownload The value for urlPrivateDownload * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setUrlPrivateDownload(Optional urlPrivateDownload) { this.urlPrivateDownload = urlPrivateDownload.orElse(null); return this; } /** * Initializes the value for the {@link SlackPngFileIF#getPermalink() permalink} attribute. * @param permalink The value for permalink * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setPermalink(String permalink) { this.permalink = Objects.requireNonNull(permalink, "permalink"); initBits &= ~INIT_BIT_PERMALINK; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getPermalinkPublic() permalinkPublic} to permalinkPublic. * @param permalinkPublic The value for permalinkPublic, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setPermalinkPublic(@Nullable String permalinkPublic) { this.permalinkPublic = permalinkPublic; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getPermalinkPublic() permalinkPublic} to permalinkPublic. * @param permalinkPublic The value for permalinkPublic * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setPermalinkPublic(Optional permalinkPublic) { this.permalinkPublic = permalinkPublic.orElse(null); return this; } /** * Initializes the value for the {@link SlackPngFileIF#getCommentsCount() commentsCount} attribute. *

If not set, this attribute will have a default value as returned by the initializer of {@link SlackPngFileIF#getCommentsCount() commentsCount}. * @param commentsCount The value for commentsCount * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setCommentsCount(int commentsCount) { this.commentsCount = commentsCount; optBits |= OPT_BIT_COMMENTS_COUNT; return this; } /** * Initializes the optional value {@link SlackPngFileIF#isStarred() starred} to starred. * @param starred The value for starred, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setStarred(@Nullable Boolean starred) { this.starred = starred; return this; } /** * Initializes the optional value {@link SlackPngFileIF#isStarred() starred} to starred. * @param starred The value for starred * @return {@code this} builder for use in a chained invocation */ @JsonProperty("is_starred") public final Builder setStarred(Optional starred) { this.starred = starred.orElse(null); return this; } /** * Adds one element to {@link SlackPngFileIF#getChannelIds() channelIds} list. * @param element A channelIds element * @return {@code this} builder for use in a chained invocation */ public final Builder addChannelIds(String element) { this.channelIds.add(Objects.requireNonNull(element, "channelIds element")); return this; } /** * Adds elements to {@link SlackPngFileIF#getChannelIds() channelIds} list. * @param elements An array of channelIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addChannelIds(String... elements) { for (String element : elements) { this.channelIds.add(Objects.requireNonNull(element, "channelIds element")); } return this; } /** * Sets or replaces all elements for {@link SlackPngFileIF#getChannelIds() channelIds} list. * @param elements An iterable of channelIds elements * @return {@code this} builder for use in a chained invocation */ @JsonProperty("channels") public final Builder setChannelIds(Iterable elements) { this.channelIds.clear(); return addAllChannelIds(elements); } /** * Adds elements to {@link SlackPngFileIF#getChannelIds() channelIds} list. * @param elements An iterable of channelIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addAllChannelIds(Iterable elements) { for (String element : elements) { this.channelIds.add(Objects.requireNonNull(element, "channelIds element")); } return this; } /** * Adds one element to {@link SlackPngFileIF#getGroupIds() groupIds} list. * @param element A groupIds element * @return {@code this} builder for use in a chained invocation */ public final Builder addGroupIds(String element) { this.groupIds.add(Objects.requireNonNull(element, "groupIds element")); return this; } /** * Adds elements to {@link SlackPngFileIF#getGroupIds() groupIds} list. * @param elements An array of groupIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addGroupIds(String... elements) { for (String element : elements) { this.groupIds.add(Objects.requireNonNull(element, "groupIds element")); } return this; } /** * Sets or replaces all elements for {@link SlackPngFileIF#getGroupIds() groupIds} list. * @param elements An iterable of groupIds elements * @return {@code this} builder for use in a chained invocation */ @JsonProperty("groups") public final Builder setGroupIds(Iterable elements) { this.groupIds.clear(); return addAllGroupIds(elements); } /** * Adds elements to {@link SlackPngFileIF#getGroupIds() groupIds} list. * @param elements An iterable of groupIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addAllGroupIds(Iterable elements) { for (String element : elements) { this.groupIds.add(Objects.requireNonNull(element, "groupIds element")); } return this; } /** * Adds one element to {@link SlackPngFileIF#getImIds() imIds} list. * @param element A imIds element * @return {@code this} builder for use in a chained invocation */ public final Builder addImIds(String element) { this.imIds.add(Objects.requireNonNull(element, "imIds element")); return this; } /** * Adds elements to {@link SlackPngFileIF#getImIds() imIds} list. * @param elements An array of imIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addImIds(String... elements) { for (String element : elements) { this.imIds.add(Objects.requireNonNull(element, "imIds element")); } return this; } /** * Sets or replaces all elements for {@link SlackPngFileIF#getImIds() imIds} list. * @param elements An iterable of imIds elements * @return {@code this} builder for use in a chained invocation */ @JsonProperty("ims") public final Builder setImIds(Iterable elements) { this.imIds.clear(); return addAllImIds(elements); } /** * Adds elements to {@link SlackPngFileIF#getImIds() imIds} list. * @param elements An iterable of imIds elements * @return {@code this} builder for use in a chained invocation */ public final Builder addAllImIds(Iterable elements) { for (String element : elements) { this.imIds.add(Objects.requireNonNull(element, "imIds element")); } return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb64Url() thumb64Url} to thumb64Url. * @param thumb64Url The value for thumb64Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb64Url(@Nullable String thumb64Url) { this.thumb64Url = thumb64Url; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb64Url() thumb64Url} to thumb64Url. * @param thumb64Url The value for thumb64Url * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_64") public final Builder setThumb64Url(Optional thumb64Url) { this.thumb64Url = thumb64Url.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb80Url() thumb80Url} to thumb80Url. * @param thumb80Url The value for thumb80Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb80Url(@Nullable String thumb80Url) { this.thumb80Url = thumb80Url; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb80Url() thumb80Url} to thumb80Url. * @param thumb80Url The value for thumb80Url * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_80") public final Builder setThumb80Url(Optional thumb80Url) { this.thumb80Url = thumb80Url.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb160Url() thumb160Url} to thumb160Url. * @param thumb160Url The value for thumb160Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb160Url(@Nullable String thumb160Url) { this.thumb160Url = thumb160Url; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb160Url() thumb160Url} to thumb160Url. * @param thumb160Url The value for thumb160Url * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_160") public final Builder setThumb160Url(Optional thumb160Url) { this.thumb160Url = thumb160Url.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Url() thumb360Url} to thumb360Url. * @param thumb360Url The value for thumb360Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb360Url(@Nullable String thumb360Url) { this.thumb360Url = thumb360Url; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Url() thumb360Url} to thumb360Url. * @param thumb360Url The value for thumb360Url * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_360") public final Builder setThumb360Url(Optional thumb360Url) { this.thumb360Url = thumb360Url.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Width() thumb360Width} to thumb360Width. * @param thumb360Width The value for thumb360Width, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb360Width(@Nullable Integer thumb360Width) { this.thumb360Width = thumb360Width; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Width() thumb360Width} to thumb360Width. * @param thumb360Width The value for thumb360Width * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_360_w") public final Builder setThumb360Width(Optional thumb360Width) { this.thumb360Width = thumb360Width.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Height() thumb360Height} to thumb360Height. * @param thumb360Height The value for thumb360Height, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb360Height(@Nullable Integer thumb360Height) { this.thumb360Height = thumb360Height; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb360Height() thumb360Height} to thumb360Height. * @param thumb360Height The value for thumb360Height * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_360_h") public final Builder setThumb360Height(Optional thumb360Height) { this.thumb360Height = thumb360Height.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Url() thumb480Url} to thumb480Url. * @param thumb480Url The value for thumb480Url, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb480Url(@Nullable String thumb480Url) { this.thumb480Url = thumb480Url; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Url() thumb480Url} to thumb480Url. * @param thumb480Url The value for thumb480Url * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_480") public final Builder setThumb480Url(Optional thumb480Url) { this.thumb480Url = thumb480Url.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Width() thumb480Width} to thumb480Width. * @param thumb480Width The value for thumb480Width, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb480Width(@Nullable Integer thumb480Width) { this.thumb480Width = thumb480Width; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Width() thumb480Width} to thumb480Width. * @param thumb480Width The value for thumb480Width * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_480_w") public final Builder setThumb480Width(Optional thumb480Width) { this.thumb480Width = thumb480Width.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Height() thumb480Height} to thumb480Height. * @param thumb480Height The value for thumb480Height, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setThumb480Height(@Nullable Integer thumb480Height) { this.thumb480Height = thumb480Height; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getThumb480Height() thumb480Height} to thumb480Height. * @param thumb480Height The value for thumb480Height * @return {@code this} builder for use in a chained invocation */ @JsonProperty("thumb_480_h") public final Builder setThumb480Height(Optional thumb480Height) { this.thumb480Height = thumb480Height.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getImageExifRotation() imageExifRotation} to imageExifRotation. * @param imageExifRotation The value for imageExifRotation, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setImageExifRotation(@Nullable Integer imageExifRotation) { this.imageExifRotation = imageExifRotation; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getImageExifRotation() imageExifRotation} to imageExifRotation. * @param imageExifRotation The value for imageExifRotation * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setImageExifRotation(Optional imageExifRotation) { this.imageExifRotation = imageExifRotation.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getOriginalWidth() originalWidth} to originalWidth. * @param originalWidth The value for originalWidth, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setOriginalWidth(@Nullable Integer originalWidth) { this.originalWidth = originalWidth; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getOriginalWidth() originalWidth} to originalWidth. * @param originalWidth The value for originalWidth * @return {@code this} builder for use in a chained invocation */ @JsonProperty("original_w") public final Builder setOriginalWidth(Optional originalWidth) { this.originalWidth = originalWidth.orElse(null); return this; } /** * Initializes the optional value {@link SlackPngFileIF#getOriginalHeight() originalHeight} to originalHeight. * @param originalHeight The value for originalHeight, {@code null} is accepted as {@code java.util.Optional.empty()} * @return {@code this} builder for chained invocation */ public final Builder setOriginalHeight(@Nullable Integer originalHeight) { this.originalHeight = originalHeight; return this; } /** * Initializes the optional value {@link SlackPngFileIF#getOriginalHeight() originalHeight} to originalHeight. * @param originalHeight The value for originalHeight * @return {@code this} builder for use in a chained invocation */ @JsonProperty("original_h") public final Builder setOriginalHeight(Optional originalHeight) { this.originalHeight = originalHeight.orElse(null); return this; } /** * Initializes the value for the {@link SlackPngFileIF#hasRichPreview() hasRichPreview} attribute. * @param hasRichPreview The value for hasRichPreview * @return {@code this} builder for use in a chained invocation */ @JsonProperty("has_rich_preview") public final Builder setHasRichPreview(boolean hasRichPreview) { this.hasRichPreview = hasRichPreview; initBits &= ~INIT_BIT_HAS_RICH_PREVIEW; return this; } /** * Initializes the value for the {@link SlackPngFileIF#getFiletype() filetype} attribute. *

If not set, this attribute will have a default value as returned by the initializer of {@link SlackPngFileIF#getFiletype() filetype}. * @param filetype The value for filetype * @return {@code this} builder for use in a chained invocation */ @JsonProperty public final Builder setFiletype(SlackFileType filetype) { this.filetype = Objects.requireNonNull(filetype, "filetype"); return this; } /** * Builds a new {@link SlackPngFile SlackPngFile}. * @return An immutable instance of SlackPngFile * @throws com.hubspot.immutables.validation.InvalidImmutableStateException if any required attributes are missing */ public SlackPngFile build() { checkRequiredAttributes(); return new SlackPngFile(this); } private boolean commentsCountIsSet() { return (optBits & OPT_BIT_COMMENTS_COUNT) != 0; } private boolean idIsSet() { return (initBits & INIT_BIT_ID) == 0; } private boolean createdEpochSecondsIsSet() { return (initBits & INIT_BIT_CREATED_EPOCH_SECONDS) == 0; } private boolean timestampEpochSecondsIsSet() { return (initBits & INIT_BIT_TIMESTAMP_EPOCH_SECONDS) == 0; } private boolean nameIsSet() { return (initBits & INIT_BIT_NAME) == 0; } private boolean titleIsSet() { return (initBits & INIT_BIT_TITLE) == 0; } private boolean mimetypeIsSet() { return (initBits & INIT_BIT_MIMETYPE) == 0; } private boolean prettyTypeIsSet() { return (initBits & INIT_BIT_PRETTY_TYPE) == 0; } private boolean userIdIsSet() { return (initBits & INIT_BIT_USER_ID) == 0; } private boolean editableIsSet() { return (initBits & INIT_BIT_EDITABLE) == 0; } private boolean sizeIsSet() { return (initBits & INIT_BIT_SIZE) == 0; } private boolean modeIsSet() { return (initBits & INIT_BIT_MODE) == 0; } private boolean externalIsSet() { return (initBits & INIT_BIT_EXTERNAL) == 0; } private boolean publicIsSet() { return (initBits & INIT_BIT_IS_PUBLIC) == 0; } private boolean publicUrlSharedIsSet() { return (initBits & INIT_BIT_PUBLIC_URL_SHARED) == 0; } private boolean displayAsBotIsSet() { return (initBits & INIT_BIT_DISPLAY_AS_BOT) == 0; } private boolean usernameIsSet() { return (initBits & INIT_BIT_USERNAME) == 0; } private boolean urlPrivateIsSet() { return (initBits & INIT_BIT_URL_PRIVATE) == 0; } private boolean permalinkIsSet() { return (initBits & INIT_BIT_PERMALINK) == 0; } private boolean hasRichPreviewIsSet() { return (initBits & INIT_BIT_HAS_RICH_PREVIEW) == 0; } private void checkRequiredAttributes() { if (initBits != 0) { throw new InvalidImmutableStateException(formatRequiredAttributesMessage()); } } private String formatRequiredAttributesMessage() { List attributes = new ArrayList<>(); if (!idIsSet()) attributes.add("id"); if (!createdEpochSecondsIsSet()) attributes.add("createdEpochSeconds"); if (!timestampEpochSecondsIsSet()) attributes.add("timestampEpochSeconds"); if (!nameIsSet()) attributes.add("name"); if (!titleIsSet()) attributes.add("title"); if (!mimetypeIsSet()) attributes.add("mimetype"); if (!prettyTypeIsSet()) attributes.add("prettyType"); if (!userIdIsSet()) attributes.add("userId"); if (!editableIsSet()) attributes.add("editable"); if (!sizeIsSet()) attributes.add("size"); if (!modeIsSet()) attributes.add("mode"); if (!externalIsSet()) attributes.add("external"); if (!publicIsSet()) attributes.add("public"); if (!publicUrlSharedIsSet()) attributes.add("publicUrlShared"); if (!displayAsBotIsSet()) attributes.add("displayAsBot"); if (!usernameIsSet()) attributes.add("username"); if (!urlPrivateIsSet()) attributes.add("urlPrivate"); if (!permalinkIsSet()) attributes.add("permalink"); if (!hasRichPreviewIsSet()) attributes.add("hasRichPreview"); return "Cannot build SlackPngFile, some of required attributes are not set " + attributes; } } private static List createSafeList(Iterable iterable, boolean checkNulls, boolean skipNulls) { ArrayList list; if (iterable instanceof Collection) { int size = ((Collection) iterable).size(); if (size == 0) return Collections.emptyList(); list = new ArrayList<>(size); } else { list = new ArrayList<>(); } for (T element : iterable) { if (skipNulls && element == null) continue; if (checkNulls) Objects.requireNonNull(element, "element"); list.add(element); } return list; } private static List createUnmodifiableList(boolean clone, List list) { switch(list.size()) { case 0: return Collections.emptyList(); case 1: return Collections.singletonList(list.get(0)); default: if (clone) { return Collections.unmodifiableList(new ArrayList<>(list)); } else { if (list instanceof ArrayList) { ((ArrayList) list).trimToSize(); } return Collections.unmodifiableList(list); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy