BatchEventOperation

public final class BatchEventOperation

Class representation of a single operation in an events batch request.

Use the create, update and delete factory methods to build an operation, so that each operation always carries the fields its method requires.

Properties

Link copied to clipboard
private final Object body

The request body: a CreateEventRequest for create operations, an UpdateEventRequest for update operations, and null for delete operations. Typed as Any? so one field holds either request type; the factory methods keep it type-safe.

Link copied to clipboard
private final String eventId

The ID of the event to update or delete. Null for create operations.

Link copied to clipboard
private final BatchEventMethod method

The operation to run.

Functions

Link copied to clipboard
public final static BatchEventOperation create(CreateEventRequest requestBody)

Build a create operation.

Link copied to clipboard
public final static BatchEventOperation delete(String eventId)

Build a delete operation.

Link copied to clipboard
public final Object getBody()

The request body: a CreateEventRequest for create operations, an UpdateEventRequest for update operations, and null for delete operations. Typed as Any? so one field holds either request type; the factory methods keep it type-safe.

Link copied to clipboard
public final String getEventId()

The ID of the event to update or delete. Null for create operations.

Link copied to clipboard
public final BatchEventMethod getMethod()

The operation to run.

Link copied to clipboard
public final static BatchEventOperation update(String eventId, UpdateEventRequest requestBody)

Build an update operation.