mod assets_cli;
mod datastore_cli;
mod experience_cli;
mod group_cli;
mod inventory_cli;
mod luau_execution_cli;
mod messaging_cli;
mod notification_cli;
mod ordered_datastore_cli;
mod place_cli;
mod subscription_cli;
mod universe_cli;
mod user_cli;
mod user_restriction_cli;
use clap::{Parser, Subcommand};
use inventory_cli::Inventory;
use luau_execution_cli::Luau;
use universe_cli::Universe;
use user_cli::User;
use user_restriction_cli::UserRestriction;
use self::{
assets_cli::Assets, datastore_cli::DataStore, experience_cli::Experience, group_cli::Group,
messaging_cli::Messaging, notification_cli::Notification,
ordered_datastore_cli::OrderedDataStore, place_cli::Place, subscription_cli::Subscription,
};
#[derive(Debug, Parser)]
#[clap(name = "rbxcloud", version)]
pub(crate) struct Cli {
#[clap(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub(crate) enum Command {
Assets(Assets),
Experience(Experience),
Messaging(Messaging),
Datastore(DataStore),
OrderedDatastore(OrderedDataStore),
Inventory(Inventory),
Group(Group),
Luau(Luau),
Subscription(Subscription),
Notification(Notification),
Place(Place),
Universe(Universe),
User(User),
UserRestriction(UserRestriction),
}
impl Cli {
pub(crate) async fn run(self) -> anyhow::Result<Option<String>> {
match self.command {
Command::Assets(command) => command.run().await,
Command::Experience(command) => command.run().await,
Command::Messaging(command) => command.run().await,
Command::Datastore(command) => command.run().await,
Command::OrderedDatastore(command) => command.run().await,
Command::Group(command) => command.run().await,
Command::Inventory(command) => command.run().await,
Command::Luau(command) => command.run().await,
Command::Subscription(command) => command.run().await,
Command::Notification(command) => command.run().await,
Command::Place(command) => command.run().await,
Command::Universe(command) => command.run().await,
Command::User(command) => command.run().await,
Command::UserRestriction(command) => command.run().await,
}
}
}