Class BetaMessageBatch

    • Constructor Detail

    • Method Detail

      • id

         final String id()

        Unique object identifier.

        The format and length of IDs may change over time.

      • archivedAt

         final Optional<OffsetDateTime> archivedAt()

        RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

      • cancelInitiatedAt

         final Optional<OffsetDateTime> cancelInitiatedAt()

        RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

      • createdAt

         final OffsetDateTime createdAt()

        RFC 3339 datetime string representing the time at which the Message Batch was created.

      • endedAt

         final Optional<OffsetDateTime> endedAt()

        RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

        Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

      • expiresAt

         final OffsetDateTime expiresAt()

        RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

      • requestCounts

         final BetaMessageBatchRequestCounts requestCounts()

        Tallies requests within the Message Batch, categorized by their status.

        Requests start as processing and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

      • resultsUrl

         final Optional<String> resultsUrl()

        URL to a .jsonl file containing the results of the Message Batch requests. Specified only once processing ends.

        Results in the file are not guaranteed to be in the same order as requests. Use the custom_id field to match results to requests.

      • _type

         final JsonValue _type()

        Object type.

        For Message Batches, this is always "message_batch".

        Expected to always return the following:

        JsonValue.from("message_batch")

        However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).

      • _id

         final JsonField<String> _id()

        Returns the raw JSON value of id.

        Unlike id, this method doesn't throw if the JSON field has an unexpected type.

      • _archivedAt

         final JsonField<OffsetDateTime> _archivedAt()

        Returns the raw JSON value of archivedAt.

        Unlike archivedAt, this method doesn't throw if the JSON field has an unexpected type.

      • _cancelInitiatedAt

         final JsonField<OffsetDateTime> _cancelInitiatedAt()

        Returns the raw JSON value of cancelInitiatedAt.

        Unlike cancelInitiatedAt, this method doesn't throw if the JSON field has an unexpected type.

      • _createdAt

         final JsonField<OffsetDateTime> _createdAt()

        Returns the raw JSON value of createdAt.

        Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.

      • _endedAt

         final JsonField<OffsetDateTime> _endedAt()

        Returns the raw JSON value of endedAt.

        Unlike endedAt, this method doesn't throw if the JSON field has an unexpected type.

      • _expiresAt

         final JsonField<OffsetDateTime> _expiresAt()

        Returns the raw JSON value of expiresAt.

        Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.

      • _resultsUrl

         final JsonField<String> _resultsUrl()

        Returns the raw JSON value of resultsUrl.

        Unlike resultsUrl, this method doesn't throw if the JSON field has an unexpected type.

      • validate

         final BetaMessageBatch validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.

      • builder

         final static BetaMessageBatch.Builder builder()

        Returns a mutable builder for constructing an instance of BetaMessageBatch.

        The following fields are required:

        .id()
        .archivedAt()
        .cancelInitiatedAt()
        .createdAt()
        .endedAt()
        .expiresAt()
        .processingStatus()
        .requestCounts()
        .resultsUrl()