Class Base

java.lang.Object
com.sparkpost.model.Base
Direct Known Subclasses:
ABTestCancellationEvent, ABTestCompletionEvent, AddressAttributes, AmpClickEvent, AmpInitialOpenEvent, AmpOpenEvent, AuthCredentials, AuthRequestDetails, AuthRequestDetails.AuthRequestClientDetails, BounceEvent, ClickEvent, DelayEvent, DeliveryEvent, DKIM, DKIMResults, DNSAttributes, FileAttributes, GenerationFailureEvent, GenerationRejectionEvent, IngestEventErrorEvent, IngestEventSuccessEvent, InitialOpenEvent, InjectionEvent, LinkUnsubscribeEvent, ListUnsubscribeEvent, Match, OpenEvent, OptionsAttributes, OutOfBandEvent, PolicyRejectionEvent, RecipientAttributes, RecipientList, RelayDeliveryEvent, RelayInjectionEvent, RelayPermanentFailureEvent, RelayRejectionEvent, RelayTemporaryFailureEvent, Response, SendingDomain, ServerErrorResponse, SmsStatusEvent, SpamComplaintEvent, StatusAttributes, StoredRecipientList, StoredTemplate, SubaccountInfo, SuppressionList, SuppressionListEntry, TemplateAttributes, TemplateContentAttributes, TemplateItem, TemplateSubstitutionData, TransmissionBase, VerifyAttributes, VerifyResponse, WebhookDescription, WebhookIdResponseEntry

public class Base
extends Object
Base class for all DTOs. DO NOT USE DIRECTLY. This base class takes care of the JSON serialization.
  • Constructor Details

    • Base

      public Base()
  • Method Details

    • toJson

      public String toJson()
      Generate JSON for this request
      Returns:
      json of object
    • toJson

      public String toJson​(boolean prettyPrint)
      Parameters:
      prettyPrint - true to render json pretty printed
      Returns:
      json of object
    • toJson

      public String toJson​(Class tClass)
      Generate JSON from this object for required type.
      Parameters:
      tClass - - target Class.
      Returns:
      json of object.