Class StreamMetadata

java.lang.Object
com.hubspot.slack.client.methods.params.stream.StreamMetadata
All Implemented Interfaces:
StreamMetadataIF

@Generated(from="StreamMetadataIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class StreamMetadata extends Object implements StreamMetadataIF
Immutable implementation of StreamMetadataIF.

Use the builder to create immutable instances: StreamMetadata.builder().

  • Method Details

    • getEventType

      public String getEventType()
      Specified by:
      getEventType in interface StreamMetadataIF
      Returns:
      The value of the eventType attribute
    • getEventPayload

      public Map<String,Object> getEventPayload()
      Specified by:
      getEventPayload in interface StreamMetadataIF
      Returns:
      The value of the eventPayload attribute
    • withEventType

      public final StreamMetadata withEventType(String value)
      Copy the current immutable object by setting a value for the eventType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for eventType
      Returns:
      A modified copy or the this object
    • withEventPayload

      public final StreamMetadata withEventPayload(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the eventPayload map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to replace the eventPayload map
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of StreamMetadata that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: eventType, eventPayload.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value StreamMetadata with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static StreamMetadata copyOf(StreamMetadataIF instance)
      Creates an immutable copy of a StreamMetadataIF value. 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 StreamMetadata instance
    • builder

      public static StreamMetadata.Builder builder()
      Creates a builder for StreamMetadata.
       StreamMetadata.builder()
          .setEventType(String) // required eventType
          .putEventPayload|putAllEventPayload(String => Object) // eventPayload mappings
          .build();
       
      Returns:
      A new StreamMetadata builder