Skip to content

Commit

Permalink
Fixing formatting using cargo after SDK generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonCWang committed Oct 10, 2024
1 parent a6a8cfc commit 3d9e027
Show file tree
Hide file tree
Showing 171 changed files with 1,992 additions and 3,501 deletions.
220 changes: 144 additions & 76 deletions lightspark/src/objects/account.rs

Large diffs are not rendered by default.

25 changes: 6 additions & 19 deletions lightspark/src/objects/account_to_api_tokens_connection.rs
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use crate::objects::api_token::ApiToken;
use crate::objects::page_info::PageInfo;
use crate::objects::connection::Connection;

use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToApiTokensConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde (rename = "account_to_api_tokens_connection_count")]
#[serde(rename = "account_to_api_tokens_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde (rename = "account_to_api_tokens_connection_page_info")]
#[serde(rename = "account_to_api_tokens_connection_page_info")]
pub page_info: PageInfo,

/// The API tokens for the current page of this connection.
#[serde (rename = "account_to_api_tokens_connection_entities")]
#[serde(rename = "account_to_api_tokens_connection_entities")]
pub entities: Vec<ApiToken>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToApiTokensConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -41,15 +35,11 @@ impl Connection for AccountToApiTokensConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToApiTokensConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToApiTokensConnectionFragment on AccountToApiTokensConnection {
__typename
Expand All @@ -66,6 +56,3 @@ fragment AccountToApiTokensConnectionFragment on AccountToApiTokensConnection {
}
}
";



25 changes: 6 additions & 19 deletions lightspark/src/objects/account_to_channels_connection.rs
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use crate::objects::channel::Channel;
use crate::objects::page_info::PageInfo;
use crate::objects::connection::Connection;

use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToChannelsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde (rename = "account_to_channels_connection_count")]
#[serde(rename = "account_to_channels_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde (rename = "account_to_channels_connection_page_info")]
#[serde(rename = "account_to_channels_connection_page_info")]
pub page_info: PageInfo,

/// The channels for the current page of this connection.
#[serde (rename = "account_to_channels_connection_entities")]
#[serde(rename = "account_to_channels_connection_entities")]
pub entities: Vec<Channel>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToChannelsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -41,15 +35,11 @@ impl Connection for AccountToChannelsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToChannelsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToChannelsConnectionFragment on AccountToChannelsConnection {
__typename
Expand All @@ -66,6 +56,3 @@ fragment AccountToChannelsConnectionFragment on AccountToChannelsConnection {
}
}
";



24 changes: 6 additions & 18 deletions lightspark/src/objects/account_to_nodes_connection.rs
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use crate::objects::connection::Connection;
use std::vec::Vec;
use crate::objects::lightspark_node::LightsparkNode;

Check failure on line 3 in lightspark/src/objects/account_to_nodes_connection.rs

View workflow job for this annotation

GitHub Actions / test

unused import: `crate::objects::lightspark_node::LightsparkNode`
use crate::objects::page_info::PageInfo;
use crate::objects::lightspark_node::LightsparkNodeEnum;
use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;

/// A connection between an account and the nodes it manages.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToNodesConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde (rename = "account_to_nodes_connection_count")]
#[serde(rename = "account_to_nodes_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde (rename = "account_to_nodes_connection_page_info")]
#[serde(rename = "account_to_nodes_connection_page_info")]
pub page_info: PageInfo,

/// The nodes for the current page of this connection.
#[serde (rename = "account_to_nodes_connection_entities")]
#[serde(rename = "account_to_nodes_connection_entities")]
pub entities: Vec<LightsparkNodeEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToNodesConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -42,15 +37,11 @@ impl Connection for AccountToNodesConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToNodesConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToNodesConnectionFragment on AccountToNodesConnection {
__typename
Expand All @@ -67,6 +58,3 @@ fragment AccountToNodesConnectionFragment on AccountToNodesConnection {
}
}
";



27 changes: 7 additions & 20 deletions lightspark/src/objects/account_to_payment_requests_connection.rs
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use crate::objects::payment_request::PaymentRequest;
use crate::objects::connection::Connection;
use crate::objects::payment_request::PaymentRequestEnum;
use crate::objects::page_info::PageInfo;

use crate::objects::payment_request::PaymentRequest;

Check failure on line 4 in lightspark/src/objects/account_to_payment_requests_connection.rs

View workflow job for this annotation

GitHub Actions / test

unused import: `crate::objects::payment_request::PaymentRequest`
use crate::objects::payment_request::PaymentRequestEnum;
use serde::{Deserialize, Serialize};
use std::vec::Vec;

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToPaymentRequestsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde (rename = "account_to_payment_requests_connection_count")]
#[serde(rename = "account_to_payment_requests_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde (rename = "account_to_payment_requests_connection_page_info")]
#[serde(rename = "account_to_payment_requests_connection_page_info")]
pub page_info: PageInfo,

/// The payment requests for the current page of this connection.
#[serde (rename = "account_to_payment_requests_connection_entities")]
#[serde(rename = "account_to_payment_requests_connection_entities")]
pub entities: Vec<PaymentRequestEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToPaymentRequestsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -42,15 +36,11 @@ impl Connection for AccountToPaymentRequestsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToPaymentRequestsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToPaymentRequestsConnectionFragment on AccountToPaymentRequestsConnection {
__typename
Expand All @@ -67,6 +57,3 @@ fragment AccountToPaymentRequestsConnectionFragment on AccountToPaymentRequestsC
}
}
";



33 changes: 10 additions & 23 deletions lightspark/src/objects/account_to_transactions_connection.rs
Original file line number Diff line number Diff line change
@@ -1,50 +1,44 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use crate::objects::currency_amount::CurrencyAmount;
use std::vec::Vec;
use crate::objects::connection::Connection;
use crate::objects::currency_amount::CurrencyAmount;
use crate::objects::page_info::PageInfo;
use crate::objects::transaction::Transaction;

Check failure on line 5 in lightspark/src/objects/account_to_transactions_connection.rs

View workflow job for this annotation

GitHub Actions / test

unused import: `crate::objects::transaction::Transaction`
use crate::objects::transaction::TransactionEnum;
use crate::objects::page_info::PageInfo;

use serde::{Deserialize, Serialize};
use std::vec::Vec;

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToTransactionsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde (rename = "account_to_transactions_connection_count")]
#[serde(rename = "account_to_transactions_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde (rename = "account_to_transactions_connection_page_info")]
#[serde(rename = "account_to_transactions_connection_page_info")]
pub page_info: PageInfo,

/// Profit (or loss) generated by the transactions in this connection, with the set of filters and constraints provided.
#[serde (rename = "account_to_transactions_connection_profit_loss")]
#[serde(rename = "account_to_transactions_connection_profit_loss")]
pub profit_loss: Option<CurrencyAmount>,

/// Average fee earned for the transactions in this connection, with the set of filters and constraints provided.
#[serde (rename = "account_to_transactions_connection_average_fee_earned")]
#[serde(rename = "account_to_transactions_connection_average_fee_earned")]
pub average_fee_earned: Option<CurrencyAmount>,

/// Total amount transacted by the transactions in this connection, with the set of filters and constraints provided.
#[serde (rename = "account_to_transactions_connection_total_amount_transacted")]
#[serde(rename = "account_to_transactions_connection_total_amount_transacted")]
pub total_amount_transacted: Option<CurrencyAmount>,

/// The transactions for the current page of this connection.
#[serde (rename = "account_to_transactions_connection_entities")]
#[serde(rename = "account_to_transactions_connection_entities")]
pub entities: Vec<TransactionEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToTransactionsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -55,15 +49,11 @@ impl Connection for AccountToTransactionsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToTransactionsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToTransactionsConnectionFragment on AccountToTransactionsConnection {
__typename
Expand Down Expand Up @@ -104,6 +94,3 @@ fragment AccountToTransactionsConnectionFragment on AccountToTransactionsConnect
}
}
";



Loading

0 comments on commit 3d9e027

Please sign in to comment.