Class DndInfoResponse
java.lang.Object
com.hubspot.slack.client.models.response.dnd.DndInfoResponse
- All Implemented Interfaces:
DndInfoResponseIF,SlackResponse
@Generated(from="DndInfoResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class DndInfoResponse
extends Object
implements DndInfoResponseIF
Immutable implementation of
DndInfoResponseIF.
Use the builder to create immutable instances:
DndInfoResponse.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DndInfoResponse.Builderbuilder()Creates a builder forDndInfoResponse.static DndInfoResponsecopyOf(DndInfoResponseIF instance) Creates an immutable copy of aDndInfoResponseIFvalue.booleanThis instance is equal to all instances ofDndInfoResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,dndEnabled,nextDndStart,nextDndEnd,snoozeEnabled,snoozeEnd,snoozeRemaining.booleanbooleanisOk()booleantoString()Prints the immutable valueDndInfoResponsewith attribute values.final DndInfoResponsewithDndEnabled(boolean value) Copy the current immutable object by setting a value for thedndEnabledattribute.final DndInfoResponsewithNextDndEnd(Instant value) Copy the current immutable object by setting a present value for the optionalnextDndEndattribute.final DndInfoResponsewithNextDndEnd(Optional<? extends Instant> optional) Copy the current immutable object by setting an optional value for thenextDndEndattribute.final DndInfoResponsewithNextDndStart(Instant value) Copy the current immutable object by setting a present value for the optionalnextDndStartattribute.final DndInfoResponsewithNextDndStart(Optional<? extends Instant> optional) Copy the current immutable object by setting an optional value for thenextDndStartattribute.final DndInfoResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final DndInfoResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final DndInfoResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final DndInfoResponsewithSnoozeEnabled(boolean value) Copy the current immutable object by setting a value for thesnoozeEnabledattribute.final DndInfoResponsewithSnoozeEnd(Instant value) Copy the current immutable object by setting a present value for the optionalsnoozeEndattribute.final DndInfoResponsewithSnoozeEnd(Optional<? extends Instant> optional) Copy the current immutable object by setting an optional value for thesnoozeEndattribute.final DndInfoResponsewithSnoozeRemaining(Integer value) Copy the current immutable object by setting a present value for the optionalsnoozeRemainingattribute.final DndInfoResponsewithSnoozeRemaining(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thesnoozeRemainingattribute.
-
Method Details
-
isOk
public boolean isOk()- Specified by:
isOkin interfaceSlackResponse- Returns:
- The value of the
okattribute
-
getResponseMetadata
- Specified by:
getResponseMetadatain interfaceSlackResponse- Returns:
- The value of the
responseMetadataattribute
-
isDndEnabled
public boolean isDndEnabled()- Specified by:
isDndEnabledin interfaceDndInfoResponseIF- Returns:
- The value of the
dndEnabledattribute
-
getNextDndStart
- Specified by:
getNextDndStartin interfaceDndInfoResponseIF- Returns:
- The value of the
nextDndStartattribute
-
getNextDndEnd
- Specified by:
getNextDndEndin interfaceDndInfoResponseIF- Returns:
- The value of the
nextDndEndattribute
-
isSnoozeEnabled
public boolean isSnoozeEnabled()- Specified by:
isSnoozeEnabledin interfaceDndInfoResponseIF- Returns:
- The value of the
snoozeEnabledattribute
-
getSnoozeEnd
- Specified by:
getSnoozeEndin interfaceDndInfoResponseIF- Returns:
- The value of the
snoozeEndattribute
-
getSnoozeRemaining
- Specified by:
getSnoozeRemainingin interfaceDndInfoResponseIF- Returns:
- The value of the
snoozeRemainingattribute
-
withOk
Copy the current immutable object by setting a value for theokattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ok- Returns:
- A modified copy or the
thisobject
-
withResponseMetadata
Copy the current immutable object by setting a present value for the optionalresponseMetadataattribute.- Parameters:
value- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withResponseMetadata
Copy the current immutable object by setting an optional value for theresponseMetadataattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for responseMetadata- Returns:
- A modified copy or
thisif not changed
-
withDndEnabled
Copy the current immutable object by setting a value for thedndEnabledattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dndEnabled- Returns:
- A modified copy or the
thisobject
-
withNextDndStart
Copy the current immutable object by setting a present value for the optionalnextDndStartattribute.- Parameters:
value- The value for nextDndStart,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withNextDndStart
Copy the current immutable object by setting an optional value for thenextDndStartattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for nextDndStart- Returns:
- A modified copy or
thisif not changed
-
withNextDndEnd
Copy the current immutable object by setting a present value for the optionalnextDndEndattribute.- Parameters:
value- The value for nextDndEnd,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withNextDndEnd
Copy the current immutable object by setting an optional value for thenextDndEndattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for nextDndEnd- Returns:
- A modified copy or
thisif not changed
-
withSnoozeEnabled
Copy the current immutable object by setting a value for thesnoozeEnabledattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for snoozeEnabled- Returns:
- A modified copy or the
thisobject
-
withSnoozeEnd
Copy the current immutable object by setting a present value for the optionalsnoozeEndattribute.- Parameters:
value- The value for snoozeEnd,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSnoozeEnd
Copy the current immutable object by setting an optional value for thesnoozeEndattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for snoozeEnd- Returns:
- A modified copy or
thisif not changed
-
withSnoozeRemaining
Copy the current immutable object by setting a present value for the optionalsnoozeRemainingattribute.- Parameters:
value- The value for snoozeRemaining,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSnoozeRemaining
Copy the current immutable object by setting an optional value for thesnoozeRemainingattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for snoozeRemaining- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofDndInfoResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,dndEnabled,nextDndStart,nextDndEnd,snoozeEnabled,snoozeEnd,snoozeRemaining. -
toString
Prints the immutable valueDndInfoResponsewith attribute values. -
copyOf
Creates an immutable copy of aDndInfoResponseIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DndInfoResponse instance
-
builder
Creates a builder forDndInfoResponse.DndInfoResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setDndEnabled(boolean) // requireddndEnabled.setNextDndStart(Optional<java.time.Instant>) // optionalnextDndStart.setNextDndEnd(Optional<java.time.Instant>) // optionalnextDndEnd.setSnoozeEnabled(boolean) // requiredsnoozeEnabled.setSnoozeEnd(Optional<java.time.Instant>) // optionalsnoozeEnd.setSnoozeRemaining(Optional<Integer>) // optionalsnoozeRemaining.build();- Returns:
- A new DndInfoResponse builder
-