88
99
1010class CouchbaseClusterOptions (dict ):
11+ """ClusterOptions is a dictionary that contains the options for the Couchbase cluster."""
12+
1113 __cluster_level_timedelta_fields : ClassVar [List [str ]] = [
1214 "tcp_keep_alive_interval" ,
1315 "config_poll_interval" ,
@@ -136,18 +138,87 @@ def __init__(
136138 disable_mozilla_ca_certificates : Optional [bool ] = None ,
137139 dump_configuration : Optional [bool ] = None ,
138140 ):
139- """ClusterOptions instance."""
141+ """Initialize CouchbaseClusterOptions with explicit parameters.
142+
143+ Args:
144+ profile: The profile to use for the Couchbase cluster. Defaults to None.
145+ bootstrap_timeout: The timeout for the bootstrap operation. Defaults to None.
146+ resolve_timeout: The timeout for the resolve operation. Defaults to None.
147+ connect_timeout: The timeout for the connect operation. Defaults to None.
148+ kv_timeout: The timeout for the KV operation. Defaults to None.
149+ kv_durable_timeout: The timeout for the KV durable operation. Defaults to None.
150+ views_timeout: The timeout for the views operation. Defaults to None.
151+ query_timeout: The timeout for the query operation. Defaults to None.
152+ analytics_timeout: The timeout for the analytics operation. Defaults to None.
153+ search_timeout: The timeout for the search operation. Defaults to None.
154+ management_timeout: The timeout for the management operation. Defaults to None.
155+ dns_srv_timeout: The timeout for the DNS SRV operation. Defaults to None.
156+ idle_http_connection_timeout: The timeout for idle HTTP connections. Defaults to None.
157+ config_idle_redial_timeout: The timeout for idle config redials. Defaults to None.
158+ config_total_timeout: The total timeout for config operations. Defaults to None.
159+ tracing_threshold_kv: The threshold for KV tracing. Defaults to None.
160+ tracing_threshold_view: The threshold for view tracing. Defaults to None.
161+ tracing_threshold_query: The threshold for query tracing. Defaults to None.
162+ tracing_threshold_search: The threshold for search tracing. Defaults to None.
163+ tracing_threshold_analytics: The threshold for analytics tracing. Defaults to None.
164+ tracing_threshold_eventing: The threshold for eventing tracing. Defaults to None.
165+ tracing_threshold_management: The threshold for management tracing. Defaults to None.
166+ tracing_threshold_queue_size: The queue size for tracing threshold. Defaults to None.
167+ tracing_threshold_queue_flush_interval: The interval for tracing threshold queue flushing. Defaults to None.
168+ tracing_orphaned_queue_size: The queue size for tracing orphaned events. Defaults to None.
169+ tracing_orphaned_queue_flush_interval: The interval for tracing orphaned queue flushing. Defaults to None.
170+ enable_tls: Whether to enable TLS. Defaults to None.
171+ enable_mutation_tokens: Whether to enable mutation tokens. Defaults to None.
172+ enable_tcp_keep_alive: Whether to enable TCP keep-alive. Defaults to None.
173+ ip_protocol: The IP protocol to use. Defaults to None.
174+ enable_dns_srv: Whether to enable DNS SRV. Defaults to None.
175+ show_queries: Whether to show queries. Defaults to None.
176+ enable_unordered_execution: Whether to enable unordered execution. Defaults to None.
177+ enable_clustermap_notification: Whether to enable clustermap notification. Defaults to None.
178+ enable_compression: Whether to enable compression. Defaults to None.
179+ enable_tracing: Whether to enable tracing. Defaults to None.
180+ enable_metrics: Whether to enable metrics. Defaults to None.
181+ network: The network to use. Defaults to None.
182+ tls_verify: The TLS verification mode. Defaults to None.
183+ tcp_keep_alive_interval: The interval for TCP keep-alive. Defaults to None.
184+ config_poll_interval: The interval for config polling. Defaults to None.
185+ config_poll_floor: The floor for config polling. Defaults to None.
186+ max_http_connections: The maximum number of HTTP connections. Defaults to None.
187+ user_agent_extra: Extra user agent information. Defaults to None.
188+ logging_meter_emit_interval: The interval for logging meter emission. Defaults to None.
189+ log_redaction: Whether to redact logs. Defaults to None.
190+ compression: The compression to use. Defaults to None.
191+ compression_min_size: The minimum size for compression. Defaults to None.
192+ compression_min_ratio: The minimum ratio for compression. Defaults to None.
193+ dns_nameserver: The DNS nameserver to use. Defaults to None.
194+ dns_port: The DNS port to use. Defaults to None.
195+ disable_mozilla_ca_certificates: Whether to disable Mozilla CA certificates. Defaults to None.
196+ dump_configuration: Whether to dump configuration. Defaults to None.
197+ """
140198
141199 @overload
142200 def __init__ (self , ** kwargs ):
143- """ClusterOptions instance."""
201+ """Initialize CouchbaseClusterOptions with keyword arguments.
202+
203+ Any parameter accepted by the explicit overload can be passed as a keyword argument.
204+ """
144205
145206 def __init__ (self , ** kwargs ):
207+ """Initialize CouchbaseClusterOptions by passing all keyword arguments to the parent dictionary class."""
146208 super ().__init__ (** kwargs )
147209
148210 def get_cluster_options (
149211 self , auth : Union [CouchbasePasswordAuthenticator , CouchbaseCertificateAuthenticator ]
150212 ) -> "ClusterOptions" :
213+ """Creates a ClusterOptions object with the provided authenticator.
214+
215+ Args:
216+ auth: The authenticator to use for the Couchbase cluster.
217+
218+ Returns:
219+ A ClusterOptions object configured with the provided authenticator and any other options.
220+ """
221+
151222 options = list (self .keys ())
152223 obj = {}
153224 obj ["authenticator" ] = auth
@@ -156,13 +227,11 @@ def get_cluster_options(
156227 return ClusterOptions (** obj )
157228
158229 def to_dict (self ) -> Dict [str , Any ]:
159- """
160- Serializes the component to a dictionary.
230+ """Serializes the component to a dictionary.
161231
162- :returns :
232+ Returns :
163233 Dictionary with serialized data.
164234 """
165-
166235 obj : Dict [str , Any ] = {}
167236
168237 # cluster level direct fields includes timeout and trace as they are flattened
@@ -184,14 +253,14 @@ def to_dict(self) -> Dict[str, Any]:
184253 return default_to_dict (self , ** obj )
185254
186255 @classmethod
187- def from_dict (cls , data : Dict [str , Any ]) -> "ClusterOptions" :
188- """
189- Deserializes the component from a dictionary.
256+ def from_dict (cls , data : Dict [str , Any ]) -> "CouchbaseClusterOptions" :
257+ """Deserializes the component from a dictionary.
258+
259+ Args:
260+ data: Dictionary to deserialize from.
190261
191- :param data:
192- Dictionary to deserialize from.
193- :returns:
194- Deserialized component.
262+ Returns:
263+ Deserialized component.
195264 """
196265 obj = {}
197266 # cluster level direct fields includes timeout and trace as they are flattened
0 commit comments