pub struct EventResponse {
    pub user: Option<Box<UserCompact>>,
    pub resource: Option<Box<AsanaNamedResource>>,
    pub _type: Option<String>,
    pub action: Option<String>,
    pub parent: Option<Box<AsanaNamedResource>>,
    pub created_at: Option<String>,
    pub change: Option<Box<EventResponseChange>>,
}
Expand description

EventResponse : An event is an object representing a change to a resource that was observed by an event subscription or delivered asynchronously to the target location of an active webhook. The event may be triggered by a different user than the subscriber. For example, if user A subscribes to a task and user B modified it, the event’s user will be user B. Note: Some events are generated by the system, and will have null as the user. API consumers should make sure to handle this case. The resource that triggered the event may be different from the one that the events were requested for or the webhook is subscribed to. For example, a subscription to a project will contain events for tasks contained within the project. Note: pay close attention to the relationship between the fields Event.action and Event.change.action. Event.action represents the action taken on the resource itself, and Event.change.action represents how the information within the resource’s fields have been modified. For instance, consider these scenarios: * When at task is added to a project, Event.action will be added, Event.parent will be on object with the id and type of the project, and there will be no change field. * When an assignee is set on the task, Event.parent will be null, Event.action will be changed, Event.change.action will be changed, and changed_value will be an object with the user’s id and type. * When a collaborator is added to the task, Event.parent will be null, Event.action will be changed, Event.change.action will be added, and added_value will be an object with the user’s id and type.

Fields

user: Option<Box<UserCompact>>resource: Option<Box<AsanaNamedResource>>_type: Option<String>

Deprecated: Refer to the resource_type of the resource. The type of the resource that generated the event.

action: Option<String>

The type of action taken on the resource that triggered the event. This can be one of changed, added, removed, deleted, or undeleted depending on the nature of the event.

parent: Option<Box<AsanaNamedResource>>created_at: Option<String>

The timestamp when the event occurred.

change: Option<Box<EventResponseChange>>

Implementations

An event is an object representing a change to a resource that was observed by an event subscription or delivered asynchronously to the target location of an active webhook. The event may be triggered by a different user than the subscriber. For example, if user A subscribes to a task and user B modified it, the event’s user will be user B. Note: Some events are generated by the system, and will have null as the user. API consumers should make sure to handle this case. The resource that triggered the event may be different from the one that the events were requested for or the webhook is subscribed to. For example, a subscription to a project will contain events for tasks contained within the project. Note: pay close attention to the relationship between the fields Event.action and Event.change.action. Event.action represents the action taken on the resource itself, and Event.change.action represents how the information within the resource’s fields have been modified. For instance, consider these scenarios: * When at task is added to a project, Event.action will be added, Event.parent will be on object with the id and type of the project, and there will be no change field. * When an assignee is set on the task, Event.parent will be null, Event.action will be changed, Event.change.action will be changed, and changed_value will be an object with the user’s id and type. * When a collaborator is added to the task, Event.parent will be null, Event.action will be changed, Event.change.action will be added, and added_value will be an object with the user’s id and type.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more