use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Alias {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AnnotationValue {
#[serde(rename = "BooleanValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub boolean_value: Option<bool>,
#[serde(rename = "NumberValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_value: Option<f64>,
#[serde(rename = "StringValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub string_value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AvailabilityZoneDetail {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BackendConnectionErrors {
#[serde(rename = "ConnectionRefusedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_refused_count: Option<i64>,
#[serde(rename = "HTTPCode4XXCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_code_4xx_count: Option<i64>,
#[serde(rename = "HTTPCode5XXCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_code_5xx_count: Option<i64>,
#[serde(rename = "OtherCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub other_count: Option<i64>,
#[serde(rename = "TimeoutCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_count: Option<i64>,
#[serde(rename = "UnknownHostCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unknown_host_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchGetTracesRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TraceIds")]
pub trace_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchGetTracesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Traces")]
#[serde(skip_serializing_if = "Option::is_none")]
pub traces: Option<Vec<Trace>>,
#[serde(rename = "UnprocessedTraceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_trace_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateGroupRequest {
#[serde(rename = "FilterExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_expression: Option<String>,
#[serde(rename = "GroupName")]
pub group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateGroupResult {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<Group>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSamplingRuleRequest {
#[serde(rename = "SamplingRule")]
pub sampling_rule: SamplingRule,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSamplingRuleResult {
#[serde(rename = "SamplingRuleRecord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_rule_record: Option<SamplingRuleRecord>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteGroupRequest {
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteGroupResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSamplingRuleRequest {
#[serde(rename = "RuleARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_arn: Option<String>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSamplingRuleResult {
#[serde(rename = "SamplingRuleRecord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_rule_record: Option<SamplingRuleRecord>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Edge {
#[serde(rename = "Aliases")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aliases: Option<Vec<Alias>>,
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "ReferenceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reference_id: Option<i64>,
#[serde(rename = "ResponseTimeHistogram")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_time_histogram: Option<Vec<HistogramEntry>>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "SummaryStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summary_statistics: Option<EdgeStatistics>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EdgeStatistics {
#[serde(rename = "ErrorStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_statistics: Option<ErrorStatistics>,
#[serde(rename = "FaultStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fault_statistics: Option<FaultStatistics>,
#[serde(rename = "OkCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ok_count: Option<i64>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
#[serde(rename = "TotalResponseTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_response_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EncryptionConfig {
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorRootCause {
#[serde(rename = "Services")]
#[serde(skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<ErrorRootCauseService>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorRootCauseEntity {
#[serde(rename = "Exceptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exceptions: Option<Vec<RootCauseException>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Remote")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorRootCauseService {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "EntityPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entity_path: Option<Vec<ErrorRootCauseEntity>>,
#[serde(rename = "Inferred")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inferred: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorStatistics {
#[serde(rename = "OtherCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub other_count: Option<i64>,
#[serde(rename = "ThrottleCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttle_count: Option<i64>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FaultRootCause {
#[serde(rename = "Services")]
#[serde(skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<FaultRootCauseService>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FaultRootCauseEntity {
#[serde(rename = "Exceptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exceptions: Option<Vec<RootCauseException>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Remote")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FaultRootCauseService {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "EntityPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entity_path: Option<Vec<FaultRootCauseEntity>>,
#[serde(rename = "Inferred")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inferred: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FaultStatistics {
#[serde(rename = "OtherCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub other_count: Option<i64>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetEncryptionConfigRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetEncryptionConfigResult {
#[serde(rename = "EncryptionConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_config: Option<EncryptionConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupRequest {
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupResult {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<Group>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupsRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupsResult {
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<GroupSummary>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSamplingRulesRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSamplingRulesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SamplingRuleRecords")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_rule_records: Option<Vec<SamplingRuleRecord>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSamplingStatisticSummariesRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSamplingStatisticSummariesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SamplingStatisticSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_statistic_summaries: Option<Vec<SamplingStatisticSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSamplingTargetsRequest {
#[serde(rename = "SamplingStatisticsDocuments")]
pub sampling_statistics_documents: Vec<SamplingStatisticsDocument>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSamplingTargetsResult {
#[serde(rename = "LastRuleModification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_rule_modification: Option<f64>,
#[serde(rename = "SamplingTargetDocuments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_target_documents: Option<Vec<SamplingTargetDocument>>,
#[serde(rename = "UnprocessedStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_statistics: Option<Vec<UnprocessedStatistics>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetServiceGraphRequest {
#[serde(rename = "EndTime")]
pub end_time: f64,
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "StartTime")]
pub start_time: f64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetServiceGraphResult {
#[serde(rename = "ContainsOldGroupVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contains_old_group_versions: Option<bool>,
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Services")]
#[serde(skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<Service>>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetTimeSeriesServiceStatisticsRequest {
#[serde(rename = "EndTime")]
pub end_time: f64,
#[serde(rename = "EntitySelectorExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entity_selector_expression: Option<String>,
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Period")]
#[serde(skip_serializing_if = "Option::is_none")]
pub period: Option<i64>,
#[serde(rename = "StartTime")]
pub start_time: f64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetTimeSeriesServiceStatisticsResult {
#[serde(rename = "ContainsOldGroupVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contains_old_group_versions: Option<bool>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TimeSeriesServiceStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_series_service_statistics: Option<Vec<TimeSeriesServiceStatistics>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetTraceGraphRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TraceIds")]
pub trace_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetTraceGraphResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Services")]
#[serde(skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<Service>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetTraceSummariesRequest {
#[serde(rename = "EndTime")]
pub end_time: f64,
#[serde(rename = "FilterExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_expression: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Sampling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling: Option<bool>,
#[serde(rename = "SamplingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_strategy: Option<SamplingStrategy>,
#[serde(rename = "StartTime")]
pub start_time: f64,
#[serde(rename = "TimeRangeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_range_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetTraceSummariesResult {
#[serde(rename = "ApproximateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approximate_time: Option<f64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TraceSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trace_summaries: Option<Vec<TraceSummary>>,
#[serde(rename = "TracesProcessedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub traces_processed_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Group {
#[serde(rename = "FilterExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_expression: Option<String>,
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GroupSummary {
#[serde(rename = "FilterExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_expression: Option<String>,
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct HistogramEntry {
#[serde(rename = "Count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Http {
#[serde(rename = "ClientIp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_ip: Option<String>,
#[serde(rename = "HttpMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_method: Option<String>,
#[serde(rename = "HttpStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_status: Option<i64>,
#[serde(rename = "HttpURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_url: Option<String>,
#[serde(rename = "UserAgent")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_agent: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceIdDetail {
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutEncryptionConfigRequest {
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutEncryptionConfigResult {
#[serde(rename = "EncryptionConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_config: Option<EncryptionConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutTelemetryRecordsRequest {
#[serde(rename = "EC2InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec2_instance_id: Option<String>,
#[serde(rename = "Hostname")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hostname: Option<String>,
#[serde(rename = "ResourceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
#[serde(rename = "TelemetryRecords")]
pub telemetry_records: Vec<TelemetryRecord>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutTelemetryRecordsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutTraceSegmentsRequest {
#[serde(rename = "TraceSegmentDocuments")]
pub trace_segment_documents: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutTraceSegmentsResult {
#[serde(rename = "UnprocessedTraceSegments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_trace_segments: Option<Vec<UnprocessedTraceSegment>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceARNDetail {
#[serde(rename = "ARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResponseTimeRootCause {
#[serde(rename = "Services")]
#[serde(skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<ResponseTimeRootCauseService>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResponseTimeRootCauseEntity {
#[serde(rename = "Coverage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Remote")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResponseTimeRootCauseService {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "EntityPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entity_path: Option<Vec<ResponseTimeRootCauseEntity>>,
#[serde(rename = "Inferred")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inferred: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RootCauseException {
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SamplingRule {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "FixedRate")]
pub fixed_rate: f64,
#[serde(rename = "HTTPMethod")]
pub http_method: String,
#[serde(rename = "Host")]
pub host: String,
#[serde(rename = "Priority")]
pub priority: i64,
#[serde(rename = "ReservoirSize")]
pub reservoir_size: i64,
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
#[serde(rename = "RuleARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_arn: Option<String>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
#[serde(rename = "ServiceName")]
pub service_name: String,
#[serde(rename = "ServiceType")]
pub service_type: String,
#[serde(rename = "URLPath")]
pub url_path: String,
#[serde(rename = "Version")]
pub version: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SamplingRuleRecord {
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "ModifiedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modified_at: Option<f64>,
#[serde(rename = "SamplingRule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_rule: Option<SamplingRule>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SamplingRuleUpdate {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "FixedRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_rate: Option<f64>,
#[serde(rename = "HTTPMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_method: Option<String>,
#[serde(rename = "Host")]
#[serde(skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ReservoirSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservoir_size: Option<i64>,
#[serde(rename = "ResourceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
#[serde(rename = "RuleARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_arn: Option<String>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
#[serde(rename = "ServiceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_name: Option<String>,
#[serde(rename = "ServiceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_type: Option<String>,
#[serde(rename = "URLPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SamplingStatisticSummary {
#[serde(rename = "BorrowCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub borrow_count: Option<i64>,
#[serde(rename = "RequestCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_count: Option<i64>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
#[serde(rename = "SampledCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampled_count: Option<i64>,
#[serde(rename = "Timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SamplingStatisticsDocument {
#[serde(rename = "BorrowCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub borrow_count: Option<i64>,
#[serde(rename = "ClientID")]
pub client_id: String,
#[serde(rename = "RequestCount")]
pub request_count: i64,
#[serde(rename = "RuleName")]
pub rule_name: String,
#[serde(rename = "SampledCount")]
pub sampled_count: i64,
#[serde(rename = "Timestamp")]
pub timestamp: f64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SamplingStrategy {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SamplingTargetDocument {
#[serde(rename = "FixedRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_rate: Option<f64>,
#[serde(rename = "Interval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interval: Option<i64>,
#[serde(rename = "ReservoirQuota")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservoir_quota: Option<i64>,
#[serde(rename = "ReservoirQuotaTTL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservoir_quota_ttl: Option<f64>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Segment {
#[serde(rename = "Document")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Service {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "DurationHistogram")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_histogram: Option<Vec<HistogramEntry>>,
#[serde(rename = "Edges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub edges: Option<Vec<Edge>>,
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "ReferenceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reference_id: Option<i64>,
#[serde(rename = "ResponseTimeHistogram")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_time_histogram: Option<Vec<HistogramEntry>>,
#[serde(rename = "Root")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root: Option<bool>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "SummaryStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summary_statistics: Option<ServiceStatistics>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ServiceId {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ServiceStatistics {
#[serde(rename = "ErrorStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_statistics: Option<ErrorStatistics>,
#[serde(rename = "FaultStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fault_statistics: Option<FaultStatistics>,
#[serde(rename = "OkCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ok_count: Option<i64>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
#[serde(rename = "TotalResponseTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_response_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TelemetryRecord {
#[serde(rename = "BackendConnectionErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backend_connection_errors: Option<BackendConnectionErrors>,
#[serde(rename = "SegmentsReceivedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_received_count: Option<i64>,
#[serde(rename = "SegmentsRejectedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_rejected_count: Option<i64>,
#[serde(rename = "SegmentsSentCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_sent_count: Option<i64>,
#[serde(rename = "SegmentsSpilloverCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_spillover_count: Option<i64>,
#[serde(rename = "Timestamp")]
pub timestamp: f64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TimeSeriesServiceStatistics {
#[serde(rename = "EdgeSummaryStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub edge_summary_statistics: Option<EdgeStatistics>,
#[serde(rename = "ResponseTimeHistogram")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_time_histogram: Option<Vec<HistogramEntry>>,
#[serde(rename = "ServiceSummaryStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_summary_statistics: Option<ServiceStatistics>,
#[serde(rename = "Timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Trace {
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<f64>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Segments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments: Option<Vec<Segment>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TraceSummary {
#[serde(rename = "Annotations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub annotations: Option<::std::collections::HashMap<String, Vec<ValueWithServiceIds>>>,
#[serde(rename = "AvailabilityZones")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zones: Option<Vec<AvailabilityZoneDetail>>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<f64>,
#[serde(rename = "EntryPoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entry_point: Option<ServiceId>,
#[serde(rename = "ErrorRootCauses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_root_causes: Option<Vec<ErrorRootCause>>,
#[serde(rename = "FaultRootCauses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fault_root_causes: Option<Vec<FaultRootCause>>,
#[serde(rename = "HasError")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_error: Option<bool>,
#[serde(rename = "HasFault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_fault: Option<bool>,
#[serde(rename = "HasThrottle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_throttle: Option<bool>,
#[serde(rename = "Http")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http: Option<Http>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InstanceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_ids: Option<Vec<InstanceIdDetail>>,
#[serde(rename = "IsPartial")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_partial: Option<bool>,
#[serde(rename = "MatchedEventTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub matched_event_time: Option<f64>,
#[serde(rename = "ResourceARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_ar_ns: Option<Vec<ResourceARNDetail>>,
#[serde(rename = "ResponseTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_time: Option<f64>,
#[serde(rename = "ResponseTimeRootCauses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_time_root_causes: Option<Vec<ResponseTimeRootCause>>,
#[serde(rename = "Revision")]
#[serde(skip_serializing_if = "Option::is_none")]
pub revision: Option<i64>,
#[serde(rename = "ServiceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_ids: Option<Vec<ServiceId>>,
#[serde(rename = "Users")]
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<TraceUser>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TraceUser {
#[serde(rename = "ServiceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_ids: Option<Vec<ServiceId>>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UnprocessedStatistics {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "RuleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UnprocessedTraceSegment {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGroupRequest {
#[serde(rename = "FilterExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_expression: Option<String>,
#[serde(rename = "GroupARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGroupResult {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<Group>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSamplingRuleRequest {
#[serde(rename = "SamplingRuleUpdate")]
pub sampling_rule_update: SamplingRuleUpdate,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSamplingRuleResult {
#[serde(rename = "SamplingRuleRecord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sampling_rule_record: Option<SamplingRuleRecord>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ValueWithServiceIds {
#[serde(rename = "AnnotationValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub annotation_value: Option<AnnotationValue>,
#[serde(rename = "ServiceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_ids: Option<Vec<ServiceId>>,
}
#[derive(Debug, PartialEq)]
pub enum BatchGetTracesError {
InvalidRequest(String),
Throttled(String),
}
impl BatchGetTracesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetTracesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(BatchGetTracesError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(BatchGetTracesError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchGetTracesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchGetTracesError {
fn description(&self) -> &str {
match *self {
BatchGetTracesError::InvalidRequest(ref cause) => cause,
BatchGetTracesError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupError {
InvalidRequest(String),
Throttled(String),
}
impl CreateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(CreateGroupError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(CreateGroupError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGroupError {
fn description(&self) -> &str {
match *self {
CreateGroupError::InvalidRequest(ref cause) => cause,
CreateGroupError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSamplingRuleError {
InvalidRequest(String),
RuleLimitExceeded(String),
Throttled(String),
}
impl CreateSamplingRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSamplingRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(CreateSamplingRuleError::InvalidRequest(err.msg))
}
"RuleLimitExceededException" => {
return RusotoError::Service(CreateSamplingRuleError::RuleLimitExceeded(
err.msg,
))
}
"ThrottledException" => {
return RusotoError::Service(CreateSamplingRuleError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSamplingRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSamplingRuleError {
fn description(&self) -> &str {
match *self {
CreateSamplingRuleError::InvalidRequest(ref cause) => cause,
CreateSamplingRuleError::RuleLimitExceeded(ref cause) => cause,
CreateSamplingRuleError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGroupError {
InvalidRequest(String),
Throttled(String),
}
impl DeleteGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DeleteGroupError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(DeleteGroupError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGroupError {
fn description(&self) -> &str {
match *self {
DeleteGroupError::InvalidRequest(ref cause) => cause,
DeleteGroupError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSamplingRuleError {
InvalidRequest(String),
Throttled(String),
}
impl DeleteSamplingRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSamplingRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DeleteSamplingRuleError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(DeleteSamplingRuleError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSamplingRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSamplingRuleError {
fn description(&self) -> &str {
match *self {
DeleteSamplingRuleError::InvalidRequest(ref cause) => cause,
DeleteSamplingRuleError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetEncryptionConfigError {
InvalidRequest(String),
Throttled(String),
}
impl GetEncryptionConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetEncryptionConfigError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetEncryptionConfigError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetEncryptionConfigError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetEncryptionConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetEncryptionConfigError {
fn description(&self) -> &str {
match *self {
GetEncryptionConfigError::InvalidRequest(ref cause) => cause,
GetEncryptionConfigError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupError {
InvalidRequest(String),
Throttled(String),
}
impl GetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetGroupError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetGroupError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupError {
fn description(&self) -> &str {
match *self {
GetGroupError::InvalidRequest(ref cause) => cause,
GetGroupError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupsError {
InvalidRequest(String),
Throttled(String),
}
impl GetGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetGroupsError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetGroupsError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupsError {
fn description(&self) -> &str {
match *self {
GetGroupsError::InvalidRequest(ref cause) => cause,
GetGroupsError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSamplingRulesError {
InvalidRequest(String),
Throttled(String),
}
impl GetSamplingRulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSamplingRulesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetSamplingRulesError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetSamplingRulesError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSamplingRulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSamplingRulesError {
fn description(&self) -> &str {
match *self {
GetSamplingRulesError::InvalidRequest(ref cause) => cause,
GetSamplingRulesError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSamplingStatisticSummariesError {
InvalidRequest(String),
Throttled(String),
}
impl GetSamplingStatisticSummariesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetSamplingStatisticSummariesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(
GetSamplingStatisticSummariesError::InvalidRequest(err.msg),
)
}
"ThrottledException" => {
return RusotoError::Service(GetSamplingStatisticSummariesError::Throttled(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSamplingStatisticSummariesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSamplingStatisticSummariesError {
fn description(&self) -> &str {
match *self {
GetSamplingStatisticSummariesError::InvalidRequest(ref cause) => cause,
GetSamplingStatisticSummariesError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSamplingTargetsError {
InvalidRequest(String),
Throttled(String),
}
impl GetSamplingTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSamplingTargetsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetSamplingTargetsError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetSamplingTargetsError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSamplingTargetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSamplingTargetsError {
fn description(&self) -> &str {
match *self {
GetSamplingTargetsError::InvalidRequest(ref cause) => cause,
GetSamplingTargetsError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServiceGraphError {
InvalidRequest(String),
Throttled(String),
}
impl GetServiceGraphError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServiceGraphError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetServiceGraphError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetServiceGraphError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetServiceGraphError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServiceGraphError {
fn description(&self) -> &str {
match *self {
GetServiceGraphError::InvalidRequest(ref cause) => cause,
GetServiceGraphError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTimeSeriesServiceStatisticsError {
InvalidRequest(String),
Throttled(String),
}
impl GetTimeSeriesServiceStatisticsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetTimeSeriesServiceStatisticsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(
GetTimeSeriesServiceStatisticsError::InvalidRequest(err.msg),
)
}
"ThrottledException" => {
return RusotoError::Service(GetTimeSeriesServiceStatisticsError::Throttled(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTimeSeriesServiceStatisticsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTimeSeriesServiceStatisticsError {
fn description(&self) -> &str {
match *self {
GetTimeSeriesServiceStatisticsError::InvalidRequest(ref cause) => cause,
GetTimeSeriesServiceStatisticsError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTraceGraphError {
InvalidRequest(String),
Throttled(String),
}
impl GetTraceGraphError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTraceGraphError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetTraceGraphError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetTraceGraphError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTraceGraphError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTraceGraphError {
fn description(&self) -> &str {
match *self {
GetTraceGraphError::InvalidRequest(ref cause) => cause,
GetTraceGraphError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTraceSummariesError {
InvalidRequest(String),
Throttled(String),
}
impl GetTraceSummariesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTraceSummariesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetTraceSummariesError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(GetTraceSummariesError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTraceSummariesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTraceSummariesError {
fn description(&self) -> &str {
match *self {
GetTraceSummariesError::InvalidRequest(ref cause) => cause,
GetTraceSummariesError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutEncryptionConfigError {
InvalidRequest(String),
Throttled(String),
}
impl PutEncryptionConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutEncryptionConfigError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(PutEncryptionConfigError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(PutEncryptionConfigError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutEncryptionConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutEncryptionConfigError {
fn description(&self) -> &str {
match *self {
PutEncryptionConfigError::InvalidRequest(ref cause) => cause,
PutEncryptionConfigError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutTelemetryRecordsError {
InvalidRequest(String),
Throttled(String),
}
impl PutTelemetryRecordsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutTelemetryRecordsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(PutTelemetryRecordsError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(PutTelemetryRecordsError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutTelemetryRecordsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutTelemetryRecordsError {
fn description(&self) -> &str {
match *self {
PutTelemetryRecordsError::InvalidRequest(ref cause) => cause,
PutTelemetryRecordsError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutTraceSegmentsError {
InvalidRequest(String),
Throttled(String),
}
impl PutTraceSegmentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutTraceSegmentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(PutTraceSegmentsError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(PutTraceSegmentsError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutTraceSegmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutTraceSegmentsError {
fn description(&self) -> &str {
match *self {
PutTraceSegmentsError::InvalidRequest(ref cause) => cause,
PutTraceSegmentsError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGroupError {
InvalidRequest(String),
Throttled(String),
}
impl UpdateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(UpdateGroupError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(UpdateGroupError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGroupError {
fn description(&self) -> &str {
match *self {
UpdateGroupError::InvalidRequest(ref cause) => cause,
UpdateGroupError::Throttled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSamplingRuleError {
InvalidRequest(String),
Throttled(String),
}
impl UpdateSamplingRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSamplingRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(UpdateSamplingRuleError::InvalidRequest(err.msg))
}
"ThrottledException" => {
return RusotoError::Service(UpdateSamplingRuleError::Throttled(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSamplingRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSamplingRuleError {
fn description(&self) -> &str {
match *self {
UpdateSamplingRuleError::InvalidRequest(ref cause) => cause,
UpdateSamplingRuleError::Throttled(ref cause) => cause,
}
}
}
pub trait XRay {
fn batch_get_traces(
&self,
input: BatchGetTracesRequest,
) -> RusotoFuture<BatchGetTracesResult, BatchGetTracesError>;
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResult, CreateGroupError>;
fn create_sampling_rule(
&self,
input: CreateSamplingRuleRequest,
) -> RusotoFuture<CreateSamplingRuleResult, CreateSamplingRuleError>;
fn delete_group(
&self,
input: DeleteGroupRequest,
) -> RusotoFuture<DeleteGroupResult, DeleteGroupError>;
fn delete_sampling_rule(
&self,
input: DeleteSamplingRuleRequest,
) -> RusotoFuture<DeleteSamplingRuleResult, DeleteSamplingRuleError>;
fn get_encryption_config(
&self,
) -> RusotoFuture<GetEncryptionConfigResult, GetEncryptionConfigError>;
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResult, GetGroupError>;
fn get_groups(&self, input: GetGroupsRequest) -> RusotoFuture<GetGroupsResult, GetGroupsError>;
fn get_sampling_rules(
&self,
input: GetSamplingRulesRequest,
) -> RusotoFuture<GetSamplingRulesResult, GetSamplingRulesError>;
fn get_sampling_statistic_summaries(
&self,
input: GetSamplingStatisticSummariesRequest,
) -> RusotoFuture<GetSamplingStatisticSummariesResult, GetSamplingStatisticSummariesError>;
fn get_sampling_targets(
&self,
input: GetSamplingTargetsRequest,
) -> RusotoFuture<GetSamplingTargetsResult, GetSamplingTargetsError>;
fn get_service_graph(
&self,
input: GetServiceGraphRequest,
) -> RusotoFuture<GetServiceGraphResult, GetServiceGraphError>;
fn get_time_series_service_statistics(
&self,
input: GetTimeSeriesServiceStatisticsRequest,
) -> RusotoFuture<GetTimeSeriesServiceStatisticsResult, GetTimeSeriesServiceStatisticsError>;
fn get_trace_graph(
&self,
input: GetTraceGraphRequest,
) -> RusotoFuture<GetTraceGraphResult, GetTraceGraphError>;
fn get_trace_summaries(
&self,
input: GetTraceSummariesRequest,
) -> RusotoFuture<GetTraceSummariesResult, GetTraceSummariesError>;
fn put_encryption_config(
&self,
input: PutEncryptionConfigRequest,
) -> RusotoFuture<PutEncryptionConfigResult, PutEncryptionConfigError>;
fn put_telemetry_records(
&self,
input: PutTelemetryRecordsRequest,
) -> RusotoFuture<PutTelemetryRecordsResult, PutTelemetryRecordsError>;
fn put_trace_segments(
&self,
input: PutTraceSegmentsRequest,
) -> RusotoFuture<PutTraceSegmentsResult, PutTraceSegmentsError>;
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResult, UpdateGroupError>;
fn update_sampling_rule(
&self,
input: UpdateSamplingRuleRequest,
) -> RusotoFuture<UpdateSamplingRuleResult, UpdateSamplingRuleError>;
}
#[derive(Clone)]
pub struct XRayClient {
client: Client,
region: region::Region,
}
impl XRayClient {
pub fn new(region: region::Region) -> XRayClient {
XRayClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> XRayClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
XRayClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl XRay for XRayClient {
fn batch_get_traces(
&self,
input: BatchGetTracesRequest,
) -> RusotoFuture<BatchGetTracesResult, BatchGetTracesError> {
let request_uri = "/Traces";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchGetTracesResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(BatchGetTracesError::from_response(response))),
)
}
})
}
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResult, CreateGroupError> {
let request_uri = "/CreateGroup";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGroupResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateGroupError::from_response(response))),
)
}
})
}
fn create_sampling_rule(
&self,
input: CreateSamplingRuleRequest,
) -> RusotoFuture<CreateSamplingRuleResult, CreateSamplingRuleError> {
let request_uri = "/CreateSamplingRule";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSamplingRuleResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSamplingRuleError::from_response(response))),
)
}
})
}
fn delete_group(
&self,
input: DeleteGroupRequest,
) -> RusotoFuture<DeleteGroupResult, DeleteGroupError> {
let request_uri = "/DeleteGroup";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteGroupResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteGroupError::from_response(response))),
)
}
})
}
fn delete_sampling_rule(
&self,
input: DeleteSamplingRuleRequest,
) -> RusotoFuture<DeleteSamplingRuleResult, DeleteSamplingRuleError> {
let request_uri = "/DeleteSamplingRule";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSamplingRuleResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteSamplingRuleError::from_response(response))),
)
}
})
}
fn get_encryption_config(
&self,
) -> RusotoFuture<GetEncryptionConfigResult, GetEncryptionConfigError> {
let request_uri = "/EncryptionConfig";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetEncryptionConfigResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetEncryptionConfigError::from_response(response))
}),
)
}
})
}
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResult, GetGroupError> {
let request_uri = "/GetGroup";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGroupError::from_response(response))),
)
}
})
}
fn get_groups(&self, input: GetGroupsRequest) -> RusotoFuture<GetGroupsResult, GetGroupsError> {
let request_uri = "/Groups";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupsResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGroupsError::from_response(response))),
)
}
})
}
fn get_sampling_rules(
&self,
input: GetSamplingRulesRequest,
) -> RusotoFuture<GetSamplingRulesResult, GetSamplingRulesError> {
let request_uri = "/GetSamplingRules";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSamplingRulesResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSamplingRulesError::from_response(response))),
)
}
})
}
fn get_sampling_statistic_summaries(
&self,
input: GetSamplingStatisticSummariesRequest,
) -> RusotoFuture<GetSamplingStatisticSummariesResult, GetSamplingStatisticSummariesError> {
let request_uri = "/SamplingStatisticSummaries";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSamplingStatisticSummariesResult, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetSamplingStatisticSummariesError::from_response(response))
}))
}
})
}
fn get_sampling_targets(
&self,
input: GetSamplingTargetsRequest,
) -> RusotoFuture<GetSamplingTargetsResult, GetSamplingTargetsError> {
let request_uri = "/SamplingTargets";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSamplingTargetsResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSamplingTargetsError::from_response(response))),
)
}
})
}
fn get_service_graph(
&self,
input: GetServiceGraphRequest,
) -> RusotoFuture<GetServiceGraphResult, GetServiceGraphError> {
let request_uri = "/ServiceGraph";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetServiceGraphResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetServiceGraphError::from_response(response))),
)
}
})
}
fn get_time_series_service_statistics(
&self,
input: GetTimeSeriesServiceStatisticsRequest,
) -> RusotoFuture<GetTimeSeriesServiceStatisticsResult, GetTimeSeriesServiceStatisticsError>
{
let request_uri = "/TimeSeriesServiceStatistics";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetTimeSeriesServiceStatisticsResult, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetTimeSeriesServiceStatisticsError::from_response(response))
}))
}
})
}
fn get_trace_graph(
&self,
input: GetTraceGraphRequest,
) -> RusotoFuture<GetTraceGraphResult, GetTraceGraphError> {
let request_uri = "/TraceGraph";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetTraceGraphResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTraceGraphError::from_response(response))),
)
}
})
}
fn get_trace_summaries(
&self,
input: GetTraceSummariesRequest,
) -> RusotoFuture<GetTraceSummariesResult, GetTraceSummariesError> {
let request_uri = "/TraceSummaries";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetTraceSummariesResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTraceSummariesError::from_response(response))),
)
}
})
}
fn put_encryption_config(
&self,
input: PutEncryptionConfigRequest,
) -> RusotoFuture<PutEncryptionConfigResult, PutEncryptionConfigError> {
let request_uri = "/PutEncryptionConfig";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutEncryptionConfigResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutEncryptionConfigError::from_response(response))
}),
)
}
})
}
fn put_telemetry_records(
&self,
input: PutTelemetryRecordsRequest,
) -> RusotoFuture<PutTelemetryRecordsResult, PutTelemetryRecordsError> {
let request_uri = "/TelemetryRecords";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutTelemetryRecordsResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutTelemetryRecordsError::from_response(response))
}),
)
}
})
}
fn put_trace_segments(
&self,
input: PutTraceSegmentsRequest,
) -> RusotoFuture<PutTraceSegmentsResult, PutTraceSegmentsError> {
let request_uri = "/TraceSegments";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutTraceSegmentsResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutTraceSegmentsError::from_response(response))),
)
}
})
}
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResult, UpdateGroupError> {
let request_uri = "/UpdateGroup";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGroupResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateGroupError::from_response(response))),
)
}
})
}
fn update_sampling_rule(
&self,
input: UpdateSamplingRuleRequest,
) -> RusotoFuture<UpdateSamplingRuleResult, UpdateSamplingRuleError> {
let request_uri = "/UpdateSamplingRule";
let mut request = SignedRequest::new("POST", "xray", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSamplingRuleResult, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateSamplingRuleError::from_response(response))),
)
}
})
}
}