use aws::common::params::*;
use aws::s3::endpoint::*;
#[derive(Debug, Clone, PartialEq, RustcDecodable, RustcEncodable)]
pub enum AdminOutputType {
Json,
Xml,
}
#[derive(Debug, Clone, Default)]
pub struct AdminRequest {
pub method: Option<String>,
pub admin_path: Option<String>,
pub path_options: Option<String>,
pub uid: Option<String>,
pub bucket: Option<String>,
pub object: Option<String>,
pub params: Params,
pub endpoint: Option<Endpoint>,
pub access_key: Option<String>,
pub secret_key: Option<String>,
pub format: Option<AdminOutputType>,
}
#[derive(Debug, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminOutput {
pub code: u16,
pub payload: String,
pub format: AdminOutputType,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminUsers {
pub users: Vec<String>,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminBuckets {
pub buckets: Vec<String>,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminUsage {
pub usage: String,
}
#[derive(Debug, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminQuota {
pub enabled: bool,
pub max_size_kb: i64,
pub max_objects: i64,
}
impl Default for AdminQuota {
fn default() -> AdminQuota {
AdminQuota{ enabled: false, max_size_kb: -1, max_objects: -1 }
}
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminBucketMetadata {
pub bucket: String,
pub pool: String,
pub index_pool: String,
pub id: String,
pub marker: String,
pub owner: String,
pub ver: String,
pub master_ver: String,
pub mtime: String, pub max_marker: String,
pub usage: AdminUsage,
pub bucket_quota: AdminQuota,
}