Class EmailAttachment

java.lang.Object
co.elastic.clients.elasticsearch.watcher.EmailAttachment
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<EmailAttachment.Kind,​java.lang.Object>

@JsonpDeserializable
public class EmailAttachment
extends java.lang.Object
implements TaggedUnion<EmailAttachment.Kind,​java.lang.Object>, JsonpSerializable
See Also:
API specification
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final EmailAttachment.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<EmailAttachment.Kind,​java.lang.Object>
      Returns:
      the variant kind
    • _get

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<EmailAttachment.Kind,​java.lang.Object>
    • of

      public static EmailAttachment of​(java.util.function.Function<EmailAttachment.Builder,​ObjectBuilder<EmailAttachment>> fn)
    • isHttp

      public boolean isHttp()
      Is this variant instance of kind http?
    • http

      public HttpEmailAttachment http()
      Get the http variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the http kind.
    • isReporting

      public boolean isReporting()
      Is this variant instance of kind reporting?
    • reporting

      public ReportingEmailAttachment reporting()
      Get the reporting variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the reporting kind.
    • isData

      public boolean isData()
      Is this variant instance of kind data?
    • data

      public DataEmailAttachment data()
      Get the data variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the data kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setupEmailAttachmentDeserializer

      protected static void setupEmailAttachmentDeserializer​(ObjectDeserializer<EmailAttachment.Builder> op)