Class DndSnoozeResponse
java.lang.Object
com.hubspot.slack.client.models.response.dnd.DndSnoozeResponse
- All Implemented Interfaces:
DndSnoozeResponseIF,SlackResponse
@Generated(from="DndSnoozeResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class DndSnoozeResponse
extends Object
implements DndSnoozeResponseIF
Immutable implementation of
DndSnoozeResponseIF.
Use the builder to create immutable instances:
DndSnoozeResponse.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DndSnoozeResponse.Builderbuilder()Creates a builder forDndSnoozeResponse.static DndSnoozeResponsecopyOf(DndSnoozeResponseIF instance) Creates an immutable copy of aDndSnoozeResponseIFvalue.booleanThis instance is equal to all instances ofDndSnoozeResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,snoozeEnabled,snoozeEnd,snoozeRemaining.booleanisOk()booleantoString()Prints the immutable valueDndSnoozeResponsewith attribute values.final DndSnoozeResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final DndSnoozeResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final DndSnoozeResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final DndSnoozeResponsewithSnoozeEnabled(boolean value) Copy the current immutable object by setting a value for thesnoozeEnabledattribute.final DndSnoozeResponsewithSnoozeEnd(Instant value) Copy the current immutable object by setting a present value for the optionalsnoozeEndattribute.final DndSnoozeResponsewithSnoozeEnd(Optional<? extends Instant> optional) Copy the current immutable object by setting an optional value for thesnoozeEndattribute.final DndSnoozeResponsewithSnoozeRemaining(Integer value) Copy the current immutable object by setting a present value for the optionalsnoozeRemainingattribute.final DndSnoozeResponsewithSnoozeRemaining(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
-
isSnoozeEnabled
public boolean isSnoozeEnabled()- Specified by:
isSnoozeEnabledin interfaceDndSnoozeResponseIF- Returns:
- The value of the
snoozeEnabledattribute
-
getSnoozeEnd
- Specified by:
getSnoozeEndin interfaceDndSnoozeResponseIF- Returns:
- The value of the
snoozeEndattribute
-
getSnoozeRemaining
- Specified by:
getSnoozeRemainingin interfaceDndSnoozeResponseIF- 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
-
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 ofDndSnoozeResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,snoozeEnabled,snoozeEnd,snoozeRemaining. -
toString
Prints the immutable valueDndSnoozeResponsewith attribute values. -
copyOf
Creates an immutable copy of aDndSnoozeResponseIFvalue. 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 DndSnoozeResponse instance
-
builder
Creates a builder forDndSnoozeResponse.DndSnoozeResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setSnoozeEnabled(boolean) // requiredsnoozeEnabled.setSnoozeEnd(Optional<java.time.Instant>) // optionalsnoozeEnd.setSnoozeRemaining(Optional<Integer>) // optionalsnoozeRemaining.build();- Returns:
- A new DndSnoozeResponse builder
-