1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//! # Gemini API Client for Rust
//!
//! A Rust client library for Google's Gemini API.
//!
//! ## Governing Principle : "Thin Client, Rich API"
//!
//! This client exposes all server-side functionality transparently while maintaining
//! zero client-side intelligence or automatic behaviors. The client is a transparent
//! window to the Gemini API, not a smart assistant that makes decisions for developers.
//!
//! Key principles:
//! - **API Transparency**: One-to-one mapping with Gemini API endpoints
//! - **Zero Client Intelligence**: No automatic behaviors or magic thresholds
//! - **Explicit Control**: Developer decides when, how, and why operations occur
//! - **Information vs Action**: Clear separation between data retrieval and state changes
//!
//! ## Enterprise Reliability Features
//!
//! The following enterprise reliability features are **explicitly allowed** when implemented
//! with explicit configuration and transparent operation:
//!
//! - **Configurable Retry Logic**: Exponential backoff with explicit configuration
//! - **Circuit Breaker Pattern**: Failure threshold management with transparent state
//! - **Rate Limiting**: Request throttling with explicit rate configuration
//! - **Failover Support**: Multi-endpoint configuration and automatic switching
//! - **Health Checks**: Periodic endpoint health verification and monitoring
//!
//! ## State Management Policy
//!
//! **✅ ALLOWED: Runtime-Stateful, Process-Stateless**
//! - Connection pools, circuit breaker state, rate limiting buckets
//! - Retry logic state, failover state, health check state
//! - Runtime state that dies with the process
//! - No persistent storage or cross-process state
//!
//! **❌ PROHIBITED: Process-Persistent State**
//! - File storage, databases, configuration accumulation
//! - State that survives process restarts
//!
//! **Implementation Requirements**:
//! - Feature gating behind cargo features (`retry`, `circuit_breaker`, `rate_limiting`, `failover`, `health_checks`)
//! - Explicit configuration required (no automatic enabling)
//! - Transparent method naming (e.g., `execute_with_retries()`, `execute_with_circuit_breaker()`)
//! - Zero overhead when features disabled
/// Client module containing the main Client struct and builder pattern
/// Models module containing all API request and response data structures
/// Cached content API implementation
/// Error handling types and utilities
/// Internal implementation details (exposed for testing)
/// Diagnostics module for debugging and development tools
/// Input validation utilities for API requests
/// WebSocket streaming integration for real-time bidirectional communication
/// Batch Mode API for async job-based processing with 50% cost discount
/// Enterprise features for production deployments
/// Model comparison and A/B testing functionality
/// Request templates for common use cases
/// Buffered streaming for smoother UX
// Re-export key types at the top level for easier access
pub use *;
// Re-export compression types when feature is enabled
pub use ;
// Re-export cost quota types when feature is enabled
pub use
;
// Re-export diagnostic types when feature is enabled
pub use ;
// Re-export streaming control types when feature is enabled
pub use
;