img_src 0.3.2

Rust SDK for img-src image processing and delivery API
Documentation
/*
 * img-src API
 *
 * Image processing and delivery API.  A serverless image processing and delivery API built on Cloudflare Workers with parameter-driven image transformation and on-demand transcoding.  ## Features  - **Image Upload**: Store original images in R2 with SHA256-based deduplication - **On-Demand Transformation**: Resize, crop, and convert images via URL parameters - **Format Conversion**: WebP, AVIF, JPEG, PNG output formats - **Path Organization**: Organize images into folders with multiple paths per image - **CDN Caching**: Automatic edge caching for transformed images  ## Authentication  Authenticate using API Keys with `imgsrc_` prefix. Create your API key at https://img-src.io/settings  ## Rate Limiting  - **Free Plan**: 100 requests/minute - **Pro Plan**: 500 requests/minute  Rate limit headers are included in all responses.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: taehun@taehun.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CurrentPeriod {
    /// Period identifier (YYYY-MM format)
    #[serde(rename = "period")]
    pub period: String,
    /// Unix timestamp of period start
    #[serde(rename = "period_start")]
    pub period_start: i64,
    /// Unix timestamp of period end
    #[serde(rename = "period_end")]
    pub period_end: i64,
    /// Uploads this period
    #[serde(rename = "uploads")]
    pub uploads: i32,
    /// Bandwidth used this period in bytes
    #[serde(rename = "bandwidth_bytes")]
    pub bandwidth_bytes: i64,
    /// API requests this period
    #[serde(rename = "api_requests")]
    pub api_requests: i32,
    /// Image transformations this period
    #[serde(rename = "transformations")]
    pub transformations: i32,
}

impl CurrentPeriod {
    pub fn new(
        period: String,
        period_start: i64,
        period_end: i64,
        uploads: i32,
        bandwidth_bytes: i64,
        api_requests: i32,
        transformations: i32,
    ) -> CurrentPeriod {
        CurrentPeriod {
            period,
            period_start,
            period_end,
            uploads,
            bandwidth_bytes,
            api_requests,
            transformations,
        }
    }
}