This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add (some) CloudWatch events Adds structs for all the events that are directly listed here: - https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html * Rename directory for CloudWatch events * Make CloudWatch events public * Resolve naming conflicts and import HashMap * Correct signature of aws.Event.affected_entities * Allow mapping request_parameters and response_elements * Run cargofmt and clippy
- Loading branch information
1 parent
1e762e9
commit fc350b1
Showing
18 changed files
with
1,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
use serde_json::Value; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct AWSAPICall<I = Value, O = Value> { | ||
pub event_version: String, | ||
pub user_identity: UserIdentity, | ||
pub event_time: String, | ||
pub event_source: String, | ||
pub event_name: String, | ||
pub aws_region: String, | ||
#[serde(rename = "sourceIPAddress")] | ||
pub source_ipaddress: String, | ||
pub user_agent: String, | ||
pub request_parameters: I, | ||
pub response_elements: O, | ||
#[serde(rename = "requestID")] | ||
pub request_id: String, | ||
#[serde(rename = "eventID")] | ||
pub event_id: String, | ||
pub event_type: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct UserIdentity { | ||
pub r#type: String, | ||
pub principal_id: String, | ||
pub arn: String, | ||
pub account_id: String, | ||
pub session_context: SessionContext, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct SessionContext { | ||
pub attributes: Attributes, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Attributes { | ||
pub mfa_authenticated: String, | ||
pub creation_date: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct StateChangeNotification { | ||
pub instance_group_id: String, | ||
pub region: String, | ||
pub application: String, | ||
pub deployment_id: String, | ||
pub state: String, | ||
pub deployment_group: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct DeploymentStateChangeNotification { | ||
pub instance_id: String, | ||
pub region: String, | ||
pub state: String, | ||
pub application: String, | ||
pub deployment_id: String, | ||
pub instance_group_id: String, | ||
pub deployment_group: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct InstanceStateChangeNotification { | ||
pub pipeline: String, | ||
pub version: String, | ||
pub state: String, | ||
#[serde(rename = "execution-id")] | ||
pub execution_id: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct PipelineExecutionStateChange { | ||
pub pipeline: String, | ||
pub version: String, | ||
pub state: String, | ||
#[serde(rename = "execution-id")] | ||
pub execution_id: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct StageExecutionStateChange { | ||
pub pipeline: String, | ||
pub version: String, | ||
#[serde(rename = "execution-id")] | ||
pub execution_id: String, | ||
pub stage: String, | ||
pub state: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ActionExecutionStateChange { | ||
pub pipeline: String, | ||
pub version: i64, | ||
#[serde(rename = "execution-id")] | ||
pub execution_id: String, | ||
pub stage: String, | ||
pub action: String, | ||
pub state: String, | ||
pub region: String, | ||
#[serde(rename = "type")] | ||
pub type_field: ActionExecutionStateChangeType, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ActionExecutionStateChangeType { | ||
pub owner: String, | ||
pub category: String, | ||
pub provider: String, | ||
pub version: i64, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct InstanceStateChange { | ||
#[serde(rename = "instance-id")] | ||
pub instance_id: String, | ||
pub state: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct AutoScalingPolicyStateChange { | ||
pub resource_id: String, | ||
pub cluster_id: String, | ||
pub state: String, | ||
pub message: String, | ||
pub scaling_resource_type: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ClusterStateChange { | ||
pub severity: String, | ||
pub state_change_reason: String, | ||
pub name: String, | ||
pub cluster_id: String, | ||
pub state: String, | ||
pub message: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct InstanceGroupStateChange { | ||
pub market: String, | ||
pub severity: String, | ||
pub requested_instance_count: String, | ||
pub instance_type: String, | ||
pub instance_group_type: String, | ||
pub instance_group_id: String, | ||
pub cluster_id: String, | ||
pub running_instance_count: String, | ||
pub state: String, | ||
pub message: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct StepStatusChange { | ||
pub severity: String, | ||
pub action_on_failure: String, | ||
pub step_id: String, | ||
pub name: String, | ||
pub cluster_id: String, | ||
pub state: String, | ||
pub message: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
use serde_derive::Deserialize; | ||
use serde_derive::Serialize; | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct MatchmakingSearching { | ||
pub tickets: Vec<Ticket>, | ||
pub estimated_wait_millis: String, | ||
pub r#type: String, | ||
pub game_session_info: GameSessionInfo, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Ticket { | ||
pub ticket_id: String, | ||
pub start_time: String, | ||
pub players: Vec<Player>, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Player { | ||
pub player_id: String, | ||
pub team: Option<String>, | ||
pub accepted: Option<bool>, | ||
pub player_session_id: Option<String>, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct GameSessionInfo { | ||
pub players: Vec<Player>, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct PotentialMatchCreated { | ||
pub tickets: Vec<Ticket>, | ||
pub acceptance_timeout: i64, | ||
pub rule_evaluation_metrics: Vec<RuleEvaluationMetric>, | ||
pub acceptance_required: bool, | ||
pub r#type: String, | ||
pub game_session_info: GameSessionInfo, | ||
pub match_id: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct RuleEvaluationMetric { | ||
pub rule_name: String, | ||
pub passed_count: i64, | ||
pub failed_count: i64, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct AcceptMatch { | ||
pub tickets: Vec<Ticket>, | ||
pub r#type: String, | ||
pub game_session_info: GameSessionInfo, | ||
pub match_id: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct AcceptMatchCompleted { | ||
pub tickets: Vec<Ticket>, | ||
pub acceptance: String, | ||
pub r#type: String, | ||
pub game_session_info: GameSessionInfo, | ||
pub match_id: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct MatchmakingSucceeded { | ||
pub tickets: Vec<Ticket>, | ||
pub r#type: String, | ||
pub game_session_info: GameSessionInfo, | ||
pub match_id: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct MatchmakingTimedOut { | ||
pub reason: String, | ||
pub tickets: Vec<Ticket>, | ||
pub rule_evaluation_metrics: Vec<RuleEvaluationMetric>, | ||
pub r#type: String, | ||
pub message: String, | ||
pub game_session_info: GameSessionInfo, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct MatchmakingCancelled { | ||
pub reason: String, | ||
pub tickets: Vec<Ticket>, | ||
pub rule_evaluation_metrics: Vec<RuleEvaluationMetric>, | ||
pub r#type: String, | ||
pub message: String, | ||
pub game_session_info: GameSessionInfo, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct MatchmakingFailed { | ||
pub tickets: Vec<Ticket>, | ||
pub custom_event_data: String, | ||
pub r#type: String, | ||
pub reason: String, | ||
pub message: String, | ||
pub game_session_info: GameSessionInfo, | ||
pub match_id: String, | ||
} |
Oops, something went wrong.