#![cfg(feature = "cloudflare_accounts")]
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
#![allow(clippy::missing_errors_doc, clippy::doc_markdown, clippy::useless_format)]
#![allow(unused_imports)]
use foundation_netio::{DynNetClient, PreparedRequestBuilder};
use foundation_netio::shared::client::http_client::HttpClient;
use serde::{Deserialize, Serialize};
use foundation_macros::JsonHash;
use super::shared::IamApiResponseSingleId;
use super::shared::IamApiResponseCollection;
use super::shared::IamApiResponseCommon;
use super::shared::IamApiResponseSingle;
use super::shared::IamCommonComponentsSchemasIdentifier;
use super::shared::IamResultInfo;
use super::shared::TunnelApiResponseCommon;
use super::shared::TunnelCreatedAt;
use super::shared::TunnelDeletedAt;
use super::shared::ApiResponse;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamAccount {
pub created_on: Option<String>,
pub id: IamCommonComponentsSchemasIdentifier,
pub managed_by: Option<std::collections::HashMap<String, serde_json::Value>>,
pub name: String,
pub settings: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "type")]
pub r#type: IamAccountType,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamAccountType {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamComponentsSchemasAccount {
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamCreateAccount {
pub name: String,
#[serde(rename = "type")]
pub r#type: Option<IamAccountType>,
pub unit: Option<std::collections::HashMap<String, serde_json::Value>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamResponseCollectionAccounts {
pub result: Option<Vec<IamAccount>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamResponseSingleAccount {
pub result: Option<IamAccount>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct IamSchemasMessages {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsApiResponseCollection {
pub result: Option<Vec<serde_json::Value>>,
pub result_info: Option<MagicVisibilityPcapsResultInfo>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsApiResponseCommon {
pub errors: Vec<std::collections::HashMap<String, serde_json::Value>>,
pub messages: Vec<std::collections::HashMap<String, serde_json::Value>>,
pub result: serde_json::Value,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsApiResponseSingle {
pub result: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsMessages {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsByteLimit {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsCollectionResponse {
pub result: Option<Vec<serde_json::Value>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsColoName {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsDestinationConf {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsErrorMessage {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsFilterV1 {
pub destination_address: Option<String>,
pub destination_port: Option<f64>,
pub protocol: Option<f64>,
pub source_address: Option<String>,
pub source_port: Option<f64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsId {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsOffsetTime {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsPacketLimit {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsPacketsCaptured {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsRequestFull {
pub byte_limit: Option<MagicVisibilityPcapsPcapsByteLimit>,
pub colo_name: MagicVisibilityPcapsPcapsColoName,
pub destination_conf: MagicVisibilityPcapsPcapsDestinationConf,
pub filter_v1: Option<MagicVisibilityPcapsPcapsFilterV1>,
pub packet_limit: Option<MagicVisibilityPcapsPcapsPacketLimit>,
pub system: MagicVisibilityPcapsPcapsSystem,
pub time_limit: MagicVisibilityPcapsPcapsTimeLimitFull,
#[serde(rename = "type")]
pub r#type: MagicVisibilityPcapsPcapsType,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsRequestPcap {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsRequestSimple {
pub filter_v1: Option<MagicVisibilityPcapsPcapsFilterV1>,
pub offset_time: Option<MagicVisibilityPcapsPcapsOffsetTime>,
pub packet_limit: MagicVisibilityPcapsPcapsPacketLimit,
pub system: MagicVisibilityPcapsPcapsSystem,
pub time_limit: MagicVisibilityPcapsPcapsTimeLimitSampled,
#[serde(rename = "type")]
pub r#type: MagicVisibilityPcapsPcapsType,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsResponseFull {
pub byte_limit: Option<MagicVisibilityPcapsPcapsByteLimit>,
pub colo_name: Option<MagicVisibilityPcapsPcapsColoName>,
pub destination_conf: Option<MagicVisibilityPcapsPcapsDestinationConf>,
pub error_message: Option<MagicVisibilityPcapsPcapsErrorMessage>,
pub filter_v1: Option<MagicVisibilityPcapsPcapsFilterV1>,
pub id: Option<MagicVisibilityPcapsPcapsId>,
pub packets_captured: Option<MagicVisibilityPcapsPcapsPacketsCaptured>,
pub status: Option<MagicVisibilityPcapsPcapsStatus>,
pub stop_requested: Option<MagicVisibilityPcapsPcapsStopRequested>,
pub submitted: Option<MagicVisibilityPcapsPcapsSubmitted>,
pub system: Option<MagicVisibilityPcapsPcapsSystem>,
pub time_limit: Option<MagicVisibilityPcapsPcapsTimeLimitFull>,
#[serde(rename = "type")]
pub r#type: Option<MagicVisibilityPcapsPcapsType>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsResponseSimple {
pub filter_v1: Option<MagicVisibilityPcapsPcapsFilterV1>,
pub id: Option<MagicVisibilityPcapsPcapsId>,
pub offset_time: Option<MagicVisibilityPcapsPcapsOffsetTime>,
pub status: Option<MagicVisibilityPcapsPcapsStatus>,
pub submitted: Option<MagicVisibilityPcapsPcapsSubmitted>,
pub system: Option<MagicVisibilityPcapsPcapsSystem>,
pub time_limit: Option<MagicVisibilityPcapsPcapsTimeLimitSampled>,
#[serde(rename = "type")]
pub r#type: Option<MagicVisibilityPcapsPcapsType>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsSingleResponse {
pub result: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsStatus {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsStopRequested {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsSubmitted {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsSystem {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsTimeLimitFull {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsTimeLimitSampled {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsPcapsType {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct MagicVisibilityPcapsResultInfo {
pub count: Option<f64>,
pub page: Option<f64>,
pub per_page: Option<f64>,
pub total_count: Option<f64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct StringType {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelAccountId {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelApiResponseCollection {
pub result: Option<Vec<serde_json::Value>>,
pub result_info: Option<TunnelResultInfo>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelCfdTunnel {
pub account_tag: Option<TunnelAccountId>,
pub config_src: Option<TunnelConfigSrc>,
pub connections: Option<Vec<TunnelSchemasConnection>>,
pub conns_active_at: Option<TunnelConnsActiveAt>,
pub conns_inactive_at: Option<TunnelConnsInactiveAt>,
pub created_at: Option<TunnelCreatedAt>,
pub deleted_at: Option<TunnelDeletedAt>,
pub id: Option<TunnelTunnelId>,
pub metadata: Option<TunnelMetadata>,
pub name: Option<TunnelTunnelName>,
pub remote_config: Option<TunnelRemoteConfig>,
pub status: Option<TunnelStatus>,
pub tun_type: Option<TunnelTunnelType>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelClientId {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelColoName {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelConfigSrc {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelConnectionId {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelConnectionsDeprecated {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelConnsActiveAt {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelConnsInactiveAt {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelIsPendingReconnect {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelMessages {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelMetadata {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelRemoteConfig {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelResultInfo {
pub count: Option<f64>,
pub page: Option<f64>,
pub per_page: Option<f64>,
pub total_count: Option<f64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelSchemasConnection {
pub client_id: Option<TunnelClientId>,
pub client_version: Option<TunnelVersion>,
pub colo_name: Option<TunnelColoName>,
pub id: Option<TunnelConnectionId>,
pub is_pending_reconnect: Option<TunnelIsPendingReconnect>,
pub opened_at: Option<String>,
pub origin_ip: Option<serde_json::Value>,
pub uuid: Option<TunnelConnectionId>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelStatus {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelTunnelId {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelTunnelName {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelTunnelResponseCollection {
pub result: Option<Vec<serde_json::Value>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelTunnelType {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelVersion {
#[serde(flatten)]
pub data: std::collections::HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct TunnelWarpConnectorTunnel {
pub account_tag: Option<TunnelAccountId>,
pub connections: Option<Vec<TunnelSchemasConnection>>,
pub conns_active_at: Option<TunnelConnsActiveAt>,
pub conns_inactive_at: Option<TunnelConnsInactiveAt>,
pub created_at: Option<TunnelCreatedAt>,
pub deleted_at: Option<TunnelDeletedAt>,
pub id: Option<TunnelTunnelId>,
pub metadata: Option<TunnelMetadata>,
pub name: Option<TunnelTunnelName>,
pub status: Option<TunnelStatus>,
pub tun_type: Option<TunnelTunnelType>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceRequestItem {
pub instance_id: Option<String>,
pub instance_retention: Option<WorBatchCreateWorkflowInstanceRequestItemInstanceRetention>,
pub params: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceRequestItemInstanceRetention {
pub error_retention: Option<serde_json::Value>,
pub success_retention: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceResponse {
pub errors: Vec<WorBatchCreateWorkflowInstanceResponseErrorsItem>,
pub messages: Vec<WorBatchCreateWorkflowInstanceResponseMessagesItem>,
pub result: Vec<WorBatchCreateWorkflowInstanceResponseResultItem>,
pub result_info: Option<WorBatchCreateWorkflowInstanceResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceResponseResultItem {
pub id: String,
pub status: String,
pub version_id: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesResponse {
pub errors: Vec<WorBatchTerminateWorkflowInstancesResponseErrorsItem>,
pub messages: Vec<WorBatchTerminateWorkflowInstancesResponseMessagesItem>,
pub result: WorBatchTerminateWorkflowInstancesResponseResult,
pub result_info: Option<WorBatchTerminateWorkflowInstancesResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesResponseResult {
#[serde(rename = "instancesTerminated")]
pub instances_terminated: f64,
pub status: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceRequest {
pub status: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceResponse {
pub errors: Vec<WorChangeStatusWorkflowInstanceResponseErrorsItem>,
pub messages: Vec<WorChangeStatusWorkflowInstanceResponseMessagesItem>,
pub result: WorChangeStatusWorkflowInstanceResponseResult,
pub result_info: Option<WorChangeStatusWorkflowInstanceResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceResponseResult {
pub status: String,
pub timestamp: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceRequest {
pub instance_id: Option<String>,
pub instance_retention: Option<WorCreateNewWorkflowInstanceRequestInstanceRetention>,
pub params: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceRequestInstanceRetention {
pub error_retention: Option<serde_json::Value>,
pub success_retention: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceResponse {
pub errors: Vec<WorCreateNewWorkflowInstanceResponseErrorsItem>,
pub messages: Vec<WorCreateNewWorkflowInstanceResponseMessagesItem>,
pub result: WorCreateNewWorkflowInstanceResponseResult,
pub result_info: Option<WorCreateNewWorkflowInstanceResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceResponseResult {
pub id: String,
pub status: String,
pub version_id: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowRequest {
pub class_name: String,
pub limits: Option<WorCreateOrModifyWorkflowRequestLimits>,
pub script_name: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowRequestLimits {
pub steps: Option<i64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowResponse {
pub errors: Vec<WorCreateOrModifyWorkflowResponseErrorsItem>,
pub messages: Vec<WorCreateOrModifyWorkflowResponseMessagesItem>,
pub result: WorCreateOrModifyWorkflowResponseResult,
pub result_info: Option<WorCreateOrModifyWorkflowResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowResponseResult {
pub class_name: String,
pub created_on: String,
pub id: String,
pub is_deleted: f64,
pub modified_on: String,
pub name: String,
pub script_name: String,
pub terminator_running: f64,
pub triggered_on: Option<String>,
pub version_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDeleteWorkflowResponse {
pub errors: Vec<WorDeleteWorkflowResponseErrorsItem>,
pub messages: Vec<WorDeleteWorkflowResponseMessagesItem>,
pub result: WorDeleteWorkflowResponseResult,
pub result_info: Option<WorDeleteWorkflowResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDeleteWorkflowResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDeleteWorkflowResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDeleteWorkflowResponseResult {
pub status: String,
pub success: Option<bool>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDeleteWorkflowResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponse {
pub errors: Vec<WorDescribeWorkflowInstanceResponseErrorsItem>,
pub messages: Vec<WorDescribeWorkflowInstanceResponseMessagesItem>,
pub result: WorDescribeWorkflowInstanceResponseResult,
pub result_info: Option<WorDescribeWorkflowInstanceResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseResult {
pub end: Option<String>,
pub error: Option<WorDescribeWorkflowInstanceResponseResultError>,
pub output: serde_json::Value,
pub params: serde_json::Value,
pub queued: String,
pub start: Option<String>,
pub status: String,
pub step_count: i64,
pub steps: Vec<serde_json::Value>,
pub success: Option<bool>,
pub trigger: WorDescribeWorkflowInstanceResponseResultTrigger,
#[serde(rename = "versionId")]
pub version_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseResultError {
pub message: String,
pub name: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceResponseResultTrigger {
pub source: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagResponse {
pub errors: Vec<WorDescribeWorkflowVersionsDagResponseErrorsItem>,
pub messages: Vec<WorDescribeWorkflowVersionsDagResponseMessagesItem>,
pub result: WorDescribeWorkflowVersionsDagResponseResult,
pub result_info: Option<WorDescribeWorkflowVersionsDagResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagResponseResult {
pub class_name: String,
pub created_on: String,
pub dag: Option<serde_json::Value>,
pub id: String,
pub modified_on: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponse {
pub errors: Vec<WorDescribeWorkflowVersionsGraphResponseErrorsItem>,
pub messages: Vec<WorDescribeWorkflowVersionsGraphResponseMessagesItem>,
pub result: WorDescribeWorkflowVersionsGraphResponseResult,
pub result_info: Option<WorDescribeWorkflowVersionsGraphResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseResult {
pub class_name: String,
pub created_on: String,
pub graph: Option<WorDescribeWorkflowVersionsGraphResponseResultGraph>,
pub id: String,
pub modified_on: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseResultGraph {
pub version: f64,
pub workflow: WorDescribeWorkflowVersionsGraphResponseResultGraphWorkflow,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseResultGraphWorkflow {
pub class_name: String,
pub functions: serde_json::Value,
pub nodes: Vec<serde_json::Value>,
pub payload: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponse {
pub errors: Vec<WorDescribeWorkflowVersionsResponseErrorsItem>,
pub messages: Vec<WorDescribeWorkflowVersionsResponseMessagesItem>,
pub result: WorDescribeWorkflowVersionsResponseResult,
pub result_info: Option<WorDescribeWorkflowVersionsResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponseResult {
pub class_name: String,
pub created_on: String,
pub has_dag: bool,
pub id: String,
pub limits: Option<WorDescribeWorkflowVersionsResponseResultLimits>,
pub modified_on: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsResponseResultLimits {
pub steps: Option<i64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponse {
pub errors: Vec<WorGetWorkflowDetailsResponseErrorsItem>,
pub messages: Vec<WorGetWorkflowDetailsResponseMessagesItem>,
pub result: WorGetWorkflowDetailsResponseResult,
pub result_info: Option<WorGetWorkflowDetailsResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponseResult {
pub class_name: String,
pub created_on: String,
pub id: String,
pub instances: WorGetWorkflowDetailsResponseResultInstances,
pub modified_on: String,
pub name: String,
pub script_name: String,
pub triggered_on: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorGetWorkflowDetailsResponseResultInstances {
pub complete: Option<f64>,
pub errored: Option<f64>,
pub paused: Option<f64>,
pub queued: Option<f64>,
pub running: Option<f64>,
pub terminated: Option<f64>,
pub waiting: Option<f64>,
#[serde(rename = "waitingForPause")]
pub waiting_for_pause: Option<f64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowInstancesResponse {
pub errors: Vec<WorListWorkflowInstancesResponseErrorsItem>,
pub messages: Vec<WorListWorkflowInstancesResponseMessagesItem>,
pub result: Vec<WorListWorkflowInstancesResponseResultItem>,
pub result_info: Option<WorListWorkflowInstancesResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowInstancesResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowInstancesResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowInstancesResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowInstancesResponseResultItem {
pub created_on: String,
pub ended_on: Option<String>,
pub id: String,
pub modified_on: String,
pub started_on: Option<String>,
pub status: String,
pub version_id: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponse {
pub errors: Vec<WorListWorkflowVersionsResponseErrorsItem>,
pub messages: Vec<WorListWorkflowVersionsResponseMessagesItem>,
pub result: Vec<WorListWorkflowVersionsResponseResultItem>,
pub result_info: Option<WorListWorkflowVersionsResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponseResultItem {
pub class_name: String,
pub created_on: String,
pub has_dag: bool,
pub id: String,
pub limits: Option<WorListWorkflowVersionsResponseResultItemLimits>,
pub modified_on: String,
pub workflow_id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowVersionsResponseResultItemLimits {
pub steps: Option<i64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponse {
pub errors: Vec<WorListWorkflowsResponseErrorsItem>,
pub messages: Vec<WorListWorkflowsResponseMessagesItem>,
pub result: Vec<WorListWorkflowsResponseResultItem>,
pub result_info: Option<WorListWorkflowsResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponseResultItem {
pub class_name: String,
pub created_on: String,
pub id: String,
pub instances: WorListWorkflowsResponseResultItemInstances,
pub modified_on: String,
pub name: String,
pub script_name: String,
pub triggered_on: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorListWorkflowsResponseResultItemInstances {
pub complete: Option<f64>,
pub errored: Option<f64>,
pub paused: Option<f64>,
pub queued: Option<f64>,
pub running: Option<f64>,
pub terminated: Option<f64>,
pub waiting: Option<f64>,
#[serde(rename = "waitingForPause")]
pub waiting_for_pause: Option<f64>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesResponse {
pub errors: Vec<WorStatusTerminateWorkflowInstancesResponseErrorsItem>,
pub messages: Vec<WorStatusTerminateWorkflowInstancesResponseMessagesItem>,
pub result: WorStatusTerminateWorkflowInstancesResponseResult,
pub result_info: Option<WorStatusTerminateWorkflowInstancesResponseResultInfo>,
pub success: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesResponseErrorsItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesResponseMessagesItem {
pub code: f64,
pub message: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesResponseResult {
pub status: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesResponseResultInfo {
pub count: f64,
pub cursor: Option<String>,
pub page: Option<f64>,
pub per_page: f64,
pub total_count: f64,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct AccountsListAccountsArgs {
pub name: Option<String>,
pub page: Option<String>,
pub per_page: Option<String>,
pub direction: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct AccountCreationArgs {
pub body: IamCreateAccount,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct AccountsAccountDetailsArgs {
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct AccountsUpdateAccountArgs {
pub account_id: String,
pub body: IamComponentsSchemasAccount,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct AccountDeletionArgs {
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct MagicPcapCollectionListPacketCaptureRequestsArgs {
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct MagicPcapCollectionCreatePcapRequestArgs {
pub account_id: String,
pub body: MagicVisibilityPcapsPcapsRequestPcap,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct MagicPcapCollectionGetPcapRequestArgs {
pub pcap_id: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct MagicPcapCollectionDownloadSimplePcapArgs {
pub pcap_id: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct MagicPcapCollectionStopFullPcapArgs {
pub pcap_id: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct CloudflareTunnelListAllTunnelsArgs {
pub account_id: String,
pub name: Option<String>,
pub is_deleted: Option<String>,
pub existed_at: Option<String>,
pub uuid: Option<String>,
pub was_active_at: Option<String>,
pub was_inactive_at: Option<String>,
pub include_prefix: Option<String>,
pub exclude_prefix: Option<String>,
pub tun_types: Option<String>,
pub status: Option<String>,
pub per_page: Option<String>,
pub page: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorListWorkflowsArgs {
pub account_id: String,
pub per_page: Option<String>,
pub page: Option<String>,
pub search: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorGetWorkflowDetailsArgs {
pub workflow_name: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorCreateOrModifyWorkflowArgs {
pub workflow_name: String,
pub account_id: String,
pub body: WorCreateOrModifyWorkflowRequest,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorDeleteWorkflowArgs {
pub workflow_name: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorListWorkflowInstancesArgs {
pub workflow_name: String,
pub account_id: String,
pub page: Option<String>,
pub per_page: Option<String>,
pub cursor: Option<String>,
pub direction: Option<String>,
pub status: Option<String>,
pub date_start: Option<String>,
pub date_end: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorCreateNewWorkflowInstanceArgs {
pub workflow_name: String,
pub account_id: String,
pub body: WorCreateNewWorkflowInstanceRequest,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorBatchCreateWorkflowInstanceArgs {
pub workflow_name: String,
pub account_id: String,
pub body: Vec<WorBatchCreateWorkflowInstanceRequestItem>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorBatchTerminateWorkflowInstancesArgs {
pub workflow_name: String,
pub account_id: String,
pub body: Vec<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorStatusTerminateWorkflowInstancesArgs {
pub workflow_name: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorDescribeWorkflowInstanceArgs {
pub workflow_name: String,
pub instance_id: String,
pub account_id: String,
pub simple: Option<String>,
pub order: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorChangeStatusWorkflowInstanceArgs {
pub workflow_name: String,
pub instance_id: String,
pub account_id: String,
pub body: WorChangeStatusWorkflowInstanceRequest,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorListWorkflowVersionsArgs {
pub workflow_name: String,
pub account_id: String,
pub per_page: Option<String>,
pub page: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsArgs {
pub workflow_name: String,
pub version_id: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsDagArgs {
pub workflow_name: String,
pub version_id: String,
pub account_id: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct WorDescribeWorkflowVersionsGraphArgs {
pub workflow_name: String,
pub version_id: String,
pub account_id: String,
}
pub async fn accounts_list_accounts_request<F>(
client: DynNetClient,
args: &AccountsListAccountsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<IamResponseCollectionAccounts>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts",
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("name", args.name.as_deref());
builder = builder.query("page", args.page.as_deref());
builder = builder.query("per_page", args.per_page.as_deref());
builder = builder.query("direction", args.direction.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: IamResponseCollectionAccounts = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn account_creation_request<F>(
client: DynNetClient,
args: &AccountCreationArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<IamResponseSingleAccount>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts",
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: IamResponseSingleAccount = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn accounts_account_details_request<F>(
client: DynNetClient,
args: &AccountsAccountDetailsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<IamResponseSingleAccount>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: IamResponseSingleAccount = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn accounts_update_account_request<F>(
client: DynNetClient,
args: &AccountsUpdateAccountArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<IamResponseSingleAccount>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: IamResponseSingleAccount = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn account_deletion_request<F>(
client: DynNetClient,
args: &AccountDeletionArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<IamApiResponseSingleId>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: IamApiResponseSingleId = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn magic_pcap_collection_list_packet_capture_requests_request<F>(
client: DynNetClient,
args: &MagicPcapCollectionListPacketCaptureRequestsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<MagicVisibilityPcapsPcapsCollectionResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/pcaps",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: MagicVisibilityPcapsPcapsCollectionResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn magic_pcap_collection_create_pcap_request_request<F>(
client: DynNetClient,
args: &MagicPcapCollectionCreatePcapRequestArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<MagicVisibilityPcapsPcapsSingleResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/pcaps",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: MagicVisibilityPcapsPcapsSingleResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn magic_pcap_collection_get_pcap_request_request<F>(
client: DynNetClient,
args: &MagicPcapCollectionGetPcapRequestArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<MagicVisibilityPcapsPcapsSingleResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/pcaps/{}",
args.account_id,
args.pcap_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: MagicVisibilityPcapsPcapsSingleResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn magic_pcap_collection_download_simple_pcap_request<F>(
client: DynNetClient,
args: &MagicPcapCollectionDownloadSimplePcapArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<()>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/pcaps/{}/download",
args.account_id,
args.pcap_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
Ok(ApiResponse { status: status as u16, headers, body: () })
}
pub async fn magic_pcap_collection_stop_full_pcap_request<F>(
client: DynNetClient,
args: &MagicPcapCollectionStopFullPcapArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<()>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/pcaps/{}/stop",
args.account_id,
args.pcap_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
Ok(ApiResponse { status: status as u16, headers, body: () })
}
pub async fn cloudflare_tunnel_list_all_tunnels_request<F>(
client: DynNetClient,
args: &CloudflareTunnelListAllTunnelsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<TunnelTunnelResponseCollection>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/tunnels",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("name", args.name.as_deref());
builder = builder.query("is_deleted", args.is_deleted.as_deref());
builder = builder.query("existed_at", args.existed_at.as_deref());
builder = builder.query("uuid", args.uuid.as_deref());
builder = builder.query("was_active_at", args.was_active_at.as_deref());
builder = builder.query("was_inactive_at", args.was_inactive_at.as_deref());
builder = builder.query("include_prefix", args.include_prefix.as_deref());
builder = builder.query("exclude_prefix", args.exclude_prefix.as_deref());
builder = builder.query("tun_types", args.tun_types.as_deref());
builder = builder.query("status", args.status.as_deref());
builder = builder.query("per_page", args.per_page.as_deref());
builder = builder.query("page", args.page.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: TunnelTunnelResponseCollection = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_list_workflows_request<F>(
client: DynNetClient,
args: &WorListWorkflowsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorListWorkflowsResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows",
args.account_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("per_page", args.per_page.as_deref());
builder = builder.query("page", args.page.as_deref());
builder = builder.query("search", args.search.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorListWorkflowsResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_get_workflow_details_request<F>(
client: DynNetClient,
args: &WorGetWorkflowDetailsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorGetWorkflowDetailsResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorGetWorkflowDetailsResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_create_or_modify_workflow_request<F>(
client: DynNetClient,
args: &WorCreateOrModifyWorkflowArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorCreateOrModifyWorkflowResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorCreateOrModifyWorkflowResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_delete_workflow_request<F>(
client: DynNetClient,
args: &WorDeleteWorkflowArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorDeleteWorkflowResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorDeleteWorkflowResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_list_workflow_instances_request<F>(
client: DynNetClient,
args: &WorListWorkflowInstancesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorListWorkflowInstancesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("page", args.page.as_deref());
builder = builder.query("per_page", args.per_page.as_deref());
builder = builder.query("cursor", args.cursor.as_deref());
builder = builder.query("direction", args.direction.as_deref());
builder = builder.query("status", args.status.as_deref());
builder = builder.query("date_start", args.date_start.as_deref());
builder = builder.query("date_end", args.date_end.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorListWorkflowInstancesResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_create_new_workflow_instance_request<F>(
client: DynNetClient,
args: &WorCreateNewWorkflowInstanceArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorCreateNewWorkflowInstanceResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorCreateNewWorkflowInstanceResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_batch_create_workflow_instance_request<F>(
client: DynNetClient,
args: &WorBatchCreateWorkflowInstanceArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorBatchCreateWorkflowInstanceResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances/batch",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorBatchCreateWorkflowInstanceResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_batch_terminate_workflow_instances_request<F>(
client: DynNetClient,
args: &WorBatchTerminateWorkflowInstancesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorBatchTerminateWorkflowInstancesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances/batch/terminate",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorBatchTerminateWorkflowInstancesResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_status_terminate_workflow_instances_request<F>(
client: DynNetClient,
args: &WorStatusTerminateWorkflowInstancesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorStatusTerminateWorkflowInstancesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances/terminate",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorStatusTerminateWorkflowInstancesResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_describe_workflow_instance_request<F>(
client: DynNetClient,
args: &WorDescribeWorkflowInstanceArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorDescribeWorkflowInstanceResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances/{}",
args.account_id,
args.workflow_name,
args.instance_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("simple", args.simple.as_deref());
builder = builder.query("order", args.order.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorDescribeWorkflowInstanceResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_change_status_workflow_instance_request<F>(
client: DynNetClient,
args: &WorChangeStatusWorkflowInstanceArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorChangeStatusWorkflowInstanceResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/instances/{}/status",
args.account_id,
args.workflow_name,
args.instance_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::patch(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorChangeStatusWorkflowInstanceResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_list_workflow_versions_request<F>(
client: DynNetClient,
args: &WorListWorkflowVersionsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorListWorkflowVersionsResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/versions",
args.account_id,
args.workflow_name,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("per_page", args.per_page.as_deref());
builder = builder.query("page", args.page.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorListWorkflowVersionsResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_describe_workflow_versions_request<F>(
client: DynNetClient,
args: &WorDescribeWorkflowVersionsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorDescribeWorkflowVersionsResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/versions/{}",
args.account_id,
args.workflow_name,
args.version_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorDescribeWorkflowVersionsResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_describe_workflow_versions_dag_request<F>(
client: DynNetClient,
args: &WorDescribeWorkflowVersionsDagArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorDescribeWorkflowVersionsDagResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/versions/{}/dag",
args.account_id,
args.workflow_name,
args.version_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorDescribeWorkflowVersionsDagResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}
pub async fn wor_describe_workflow_versions_graph_request<F>(
client: DynNetClient,
args: &WorDescribeWorkflowVersionsGraphArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<WorDescribeWorkflowVersionsGraphResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/workflows/{}/versions/{}/graph",
args.account_id,
args.workflow_name,
args.version_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
let response = client.send_async(builder.build()).await
.map_err(|e| super::shared::ApiError::RequestSendFailed(e.to_string()))?;
let status: usize = response.get_status().into();
let headers = response.get_headers_ref().clone();
if status < 200 || status >= 300 {
let error_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let body = (!error_bytes.is_empty())
.then(|| String::from_utf8_lossy(&error_bytes).into_owned());
return Err(super::shared::ApiError::HttpStatus { code: status as u16, headers, body });
}
let body_bytes = foundation_netio::shared::client::body_reader::collect_bytes_from_send_safe(response.take_body());
let parsed: WorDescribeWorkflowVersionsGraphResponse = serde_json::from_slice(&body_bytes).map_err(|e: serde_json::Error| super::shared::ApiError::ParseFailed(e.to_string()))?;
Ok(ApiResponse { status: status as u16, headers, body: parsed })
}