Skip to main content

inference_gateway_adk/
a2a_types.rs

1#![allow(irrefutable_let_patterns)]
2#![allow(clippy::unit_arg)]
3#![allow(clippy::large_enum_variant)]
4#![allow(clippy::enum_variant_names)]
5#![allow(clippy::derivable_impls)]
6#![allow(clippy::uninlined_format_args)]
7#![allow(clippy::redundant_closure_call)]
8#![allow(clippy::needless_lifetimes)]
9#![allow(clippy::match_single_binding)]
10#![allow(clippy::clone_on_copy)]
11
12#[doc = r" Error types."]
13pub mod error {
14    #[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
15    pub struct ConversionError(::std::borrow::Cow<'static, str>);
16    impl ::std::error::Error for ConversionError {}
17    impl ::std::fmt::Display for ConversionError {
18        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
19            ::std::fmt::Display::fmt(&self.0, f)
20        }
21    }
22    impl ::std::fmt::Debug for ConversionError {
23        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
24            ::std::fmt::Debug::fmt(&self.0, f)
25        }
26    }
27    impl From<&'static str> for ConversionError {
28        fn from(value: &'static str) -> Self {
29            Self(value.into())
30        }
31    }
32    impl From<String> for ConversionError {
33        fn from(value: String) -> Self {
34            Self(value.into())
35        }
36    }
37}
38#[doc = "Defines optional capabilities supported by an agent."]
39#[doc = r""]
40#[doc = r" <details><summary>JSON schema</summary>"]
41#[doc = r""]
42#[doc = r" ```json"]
43#[doc = "{"]
44#[doc = "  \"title\": \"Agent Capabilities\","]
45#[doc = "  \"description\": \"Defines optional capabilities supported by an agent.\","]
46#[doc = "  \"type\": \"object\","]
47#[doc = "  \"properties\": {"]
48#[doc = "    \"extensions\": {"]
49#[doc = "      \"description\": \"A list of protocol extensions supported by the agent.\","]
50#[doc = "      \"type\": \"array\","]
51#[doc = "      \"items\": {"]
52#[doc = "        \"$ref\": \"#/definitions/AgentExtension\""]
53#[doc = "      }"]
54#[doc = "    },"]
55#[doc = "    \"pushNotifications\": {"]
56#[doc = "      \"description\": \"Indicates if the agent supports sending push notifications for asynchronous task updates.\","]
57#[doc = "      \"type\": \"boolean\""]
58#[doc = "    },"]
59#[doc = "    \"stateTransitionHistory\": {"]
60#[doc = "      \"description\": \"Indicates if the agent provides a history of state transitions for a task.\","]
61#[doc = "      \"type\": \"boolean\""]
62#[doc = "    },"]
63#[doc = "    \"streaming\": {"]
64#[doc = "      \"description\": \"Indicates if the agent supports streaming responses.\","]
65#[doc = "      \"type\": \"boolean\""]
66#[doc = "    }"]
67#[doc = "  },"]
68#[doc = "  \"additionalProperties\": false,"]
69#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
70#[doc = "}"]
71#[doc = r" ```"]
72#[doc = r" </details>"]
73#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
74#[serde(deny_unknown_fields)]
75pub struct AgentCapabilities {
76    #[doc = "A list of protocol extensions supported by the agent."]
77    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
78    pub extensions: ::std::vec::Vec<AgentExtension>,
79    #[doc = "Indicates if the agent supports sending push notifications for asynchronous task updates."]
80    #[serde(
81        rename = "pushNotifications",
82        default,
83        skip_serializing_if = "::std::option::Option::is_none"
84    )]
85    pub push_notifications: ::std::option::Option<bool>,
86    #[doc = "Indicates if the agent provides a history of state transitions for a task."]
87    #[serde(
88        rename = "stateTransitionHistory",
89        default,
90        skip_serializing_if = "::std::option::Option::is_none"
91    )]
92    pub state_transition_history: ::std::option::Option<bool>,
93    #[doc = "Indicates if the agent supports streaming responses."]
94    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
95    pub streaming: ::std::option::Option<bool>,
96}
97impl ::std::default::Default for AgentCapabilities {
98    fn default() -> Self {
99        Self {
100            extensions: Default::default(),
101            push_notifications: Default::default(),
102            state_transition_history: Default::default(),
103            streaming: Default::default(),
104        }
105    }
106}
107impl AgentCapabilities {
108    pub fn builder() -> builder::AgentCapabilities {
109        Default::default()
110    }
111}
112#[doc = "AgentCard is a self-describing manifest for an agent. It provides essential\n metadata including the agent's identity, capabilities, skills, supported\n communication methods, and security requirements.\n Next ID: 20"]
113#[doc = r""]
114#[doc = r" <details><summary>JSON schema</summary>"]
115#[doc = r""]
116#[doc = r" ```json"]
117#[doc = "{"]
118#[doc = "  \"title\": \"Agent Card\","]
119#[doc = "  \"description\": \"AgentCard is a self-describing manifest for an agent. It provides essential\\n metadata including the agent's identity, capabilities, skills, supported\\n communication methods, and security requirements.\\n Next ID: 20\","]
120#[doc = "  \"type\": \"object\","]
121#[doc = "  \"required\": ["]
122#[doc = "    \"capabilities\","]
123#[doc = "    \"defaultInputModes\","]
124#[doc = "    \"defaultOutputModes\","]
125#[doc = "    \"description\","]
126#[doc = "    \"name\","]
127#[doc = "    \"protocolVersion\","]
128#[doc = "    \"skills\","]
129#[doc = "    \"version\""]
130#[doc = "  ],"]
131#[doc = "  \"properties\": {"]
132#[doc = "    \"additionalInterfaces\": {"]
133#[doc = "      \"description\": \"DEPRECATED: Use 'supported_interfaces' instead.\","]
134#[doc = "      \"type\": \"array\","]
135#[doc = "      \"items\": {"]
136#[doc = "        \"$ref\": \"#/definitions/AgentInterface\""]
137#[doc = "      }"]
138#[doc = "    },"]
139#[doc = "    \"capabilities\": {"]
140#[doc = "      \"description\": \"A2A Capability set supported by the agent.\","]
141#[doc = "      \"$ref\": \"#/definitions/AgentCapabilities\""]
142#[doc = "    },"]
143#[doc = "    \"defaultInputModes\": {"]
144#[doc = "      \"description\": \"protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\\n The set of interaction modes that the agent supports across all skills.\\n This can be overridden per skill. Defined as media types.\","]
145#[doc = "      \"type\": \"array\","]
146#[doc = "      \"items\": {"]
147#[doc = "        \"type\": \"string\""]
148#[doc = "      }"]
149#[doc = "    },"]
150#[doc = "    \"defaultOutputModes\": {"]
151#[doc = "      \"description\": \"The media types supported as outputs from this agent.\","]
152#[doc = "      \"type\": \"array\","]
153#[doc = "      \"items\": {"]
154#[doc = "        \"type\": \"string\""]
155#[doc = "      }"]
156#[doc = "    },"]
157#[doc = "    \"description\": {"]
158#[doc = "      \"description\": \"A human-readable description of the agent, assisting users and other agents\\n in understanding its purpose.\\n Example: \\\"Agent that helps users with recipes and cooking.\\\"\","]
159#[doc = "      \"type\": \"string\""]
160#[doc = "    },"]
161#[doc = "    \"documentationUrl\": {"]
162#[doc = "      \"description\": \"A url to provide additional documentation about the agent.\","]
163#[doc = "      \"type\": \"string\""]
164#[doc = "    },"]
165#[doc = "    \"iconUrl\": {"]
166#[doc = "      \"description\": \"An optional URL to an icon for the agent.\","]
167#[doc = "      \"type\": \"string\""]
168#[doc = "    },"]
169#[doc = "    \"name\": {"]
170#[doc = "      \"description\": \"A human readable name for the agent.\\n Example: \\\"Recipe Agent\\\"\","]
171#[doc = "      \"type\": \"string\""]
172#[doc = "    },"]
173#[doc = "    \"preferredTransport\": {"]
174#[doc = "      \"description\": \"DEPRECATED: Use 'supported_interfaces' instead.\","]
175#[doc = "      \"type\": \"string\""]
176#[doc = "    },"]
177#[doc = "    \"protocolVersion\": {"]
178#[doc = "      \"description\": \"The version of the A2A protocol this agent supports.\\n Default: \\\"1.0\\\"\","]
179#[doc = "      \"type\": \"string\""]
180#[doc = "    },"]
181#[doc = "    \"provider\": {"]
182#[doc = "      \"description\": \"The service provider of the agent.\","]
183#[doc = "      \"$ref\": \"#/definitions/AgentProvider\""]
184#[doc = "    },"]
185#[doc = "    \"security\": {"]
186#[doc = "      \"description\": \"protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\\n Security requirements for contacting the agent.\","]
187#[doc = "      \"type\": \"array\","]
188#[doc = "      \"items\": {"]
189#[doc = "        \"$ref\": \"#/definitions/Security\""]
190#[doc = "      }"]
191#[doc = "    },"]
192#[doc = "    \"securitySchemes\": {"]
193#[doc = "      \"description\": \"The security scheme details used for authenticating with this agent.\","]
194#[doc = "      \"type\": \"object\","]
195#[doc = "      \"additionalProperties\": {"]
196#[doc = "        \"$ref\": \"#/definitions/SecurityScheme\""]
197#[doc = "      },"]
198#[doc = "      \"propertyNames\": {"]
199#[doc = "        \"type\": \"string\""]
200#[doc = "      }"]
201#[doc = "    },"]
202#[doc = "    \"signatures\": {"]
203#[doc = "      \"description\": \"JSON Web Signatures computed for this AgentCard.\","]
204#[doc = "      \"type\": \"array\","]
205#[doc = "      \"items\": {"]
206#[doc = "        \"$ref\": \"#/definitions/AgentCardSignature\""]
207#[doc = "      }"]
208#[doc = "    },"]
209#[doc = "    \"skills\": {"]
210#[doc = "      \"description\": \"Skills represent an ability of an agent. It is largely\\n a descriptive concept but represents a more focused set of behaviors that the\\n agent is likely to succeed at.\","]
211#[doc = "      \"type\": \"array\","]
212#[doc = "      \"items\": {"]
213#[doc = "        \"$ref\": \"#/definitions/AgentSkill\""]
214#[doc = "      }"]
215#[doc = "    },"]
216#[doc = "    \"supportedInterfaces\": {"]
217#[doc = "      \"description\": \"Ordered list of supported interfaces. First entry is preferred.\","]
218#[doc = "      \"type\": \"array\","]
219#[doc = "      \"items\": {"]
220#[doc = "        \"$ref\": \"#/definitions/AgentInterface\""]
221#[doc = "      }"]
222#[doc = "    },"]
223#[doc = "    \"supportsExtendedAgentCard\": {"]
224#[doc = "      \"description\": \"Whether the agent supports providing an extended agent card when authenticated.\","]
225#[doc = "      \"type\": \"boolean\""]
226#[doc = "    },"]
227#[doc = "    \"url\": {"]
228#[doc = "      \"description\": \"DEPRECATED: Use 'supported_interfaces' instead.\","]
229#[doc = "      \"type\": \"string\""]
230#[doc = "    },"]
231#[doc = "    \"version\": {"]
232#[doc = "      \"description\": \"The version of the agent.\\n Example: \\\"1.0.0\\\"\","]
233#[doc = "      \"type\": \"string\""]
234#[doc = "    }"]
235#[doc = "  },"]
236#[doc = "  \"additionalProperties\": false,"]
237#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
238#[doc = "}"]
239#[doc = r" ```"]
240#[doc = r" </details>"]
241#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
242#[serde(deny_unknown_fields)]
243pub struct AgentCard {
244    #[doc = "DEPRECATED: Use 'supported_interfaces' instead."]
245    #[serde(
246        rename = "additionalInterfaces",
247        default,
248        skip_serializing_if = "::std::vec::Vec::is_empty"
249    )]
250    pub additional_interfaces: ::std::vec::Vec<AgentInterface>,
251    #[doc = "A2A Capability set supported by the agent."]
252    pub capabilities: AgentCapabilities,
253    #[doc = "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\n The set of interaction modes that the agent supports across all skills.\n This can be overridden per skill. Defined as media types."]
254    #[serde(rename = "defaultInputModes")]
255    pub default_input_modes: ::std::vec::Vec<::std::string::String>,
256    #[doc = "The media types supported as outputs from this agent."]
257    #[serde(rename = "defaultOutputModes")]
258    pub default_output_modes: ::std::vec::Vec<::std::string::String>,
259    #[doc = "A human-readable description of the agent, assisting users and other agents\n in understanding its purpose.\n Example: \"Agent that helps users with recipes and cooking.\""]
260    pub description: ::std::string::String,
261    #[doc = "A url to provide additional documentation about the agent."]
262    #[serde(
263        rename = "documentationUrl",
264        default,
265        skip_serializing_if = "::std::option::Option::is_none"
266    )]
267    pub documentation_url: ::std::option::Option<::std::string::String>,
268    #[doc = "An optional URL to an icon for the agent."]
269    #[serde(
270        rename = "iconUrl",
271        default,
272        skip_serializing_if = "::std::option::Option::is_none"
273    )]
274    pub icon_url: ::std::option::Option<::std::string::String>,
275    #[doc = "A human readable name for the agent.\n Example: \"Recipe Agent\""]
276    pub name: ::std::string::String,
277    #[doc = "DEPRECATED: Use 'supported_interfaces' instead."]
278    #[serde(
279        rename = "preferredTransport",
280        default,
281        skip_serializing_if = "::std::option::Option::is_none"
282    )]
283    pub preferred_transport: ::std::option::Option<::std::string::String>,
284    #[doc = "The version of the A2A protocol this agent supports.\n Default: \"1.0\""]
285    #[serde(rename = "protocolVersion")]
286    pub protocol_version: ::std::string::String,
287    #[doc = "The service provider of the agent."]
288    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
289    pub provider: ::std::option::Option<AgentProvider>,
290    #[doc = "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\n Security requirements for contacting the agent."]
291    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
292    pub security: ::std::vec::Vec<Security>,
293    #[doc = "The security scheme details used for authenticating with this agent."]
294    #[serde(
295        rename = "securitySchemes",
296        default,
297        skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
298    )]
299    pub security_schemes: ::std::collections::HashMap<::std::string::String, SecurityScheme>,
300    #[doc = "JSON Web Signatures computed for this AgentCard."]
301    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
302    pub signatures: ::std::vec::Vec<AgentCardSignature>,
303    #[doc = "Skills represent an ability of an agent. It is largely\n a descriptive concept but represents a more focused set of behaviors that the\n agent is likely to succeed at."]
304    pub skills: ::std::vec::Vec<AgentSkill>,
305    #[doc = "Ordered list of supported interfaces. First entry is preferred."]
306    #[serde(
307        rename = "supportedInterfaces",
308        default,
309        skip_serializing_if = "::std::vec::Vec::is_empty"
310    )]
311    pub supported_interfaces: ::std::vec::Vec<AgentInterface>,
312    #[doc = "Whether the agent supports providing an extended agent card when authenticated."]
313    #[serde(
314        rename = "supportsExtendedAgentCard",
315        default,
316        skip_serializing_if = "::std::option::Option::is_none"
317    )]
318    pub supports_extended_agent_card: ::std::option::Option<bool>,
319    #[doc = "DEPRECATED: Use 'supported_interfaces' instead."]
320    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
321    pub url: ::std::option::Option<::std::string::String>,
322    #[doc = "The version of the agent.\n Example: \"1.0.0\""]
323    pub version: ::std::string::String,
324}
325impl AgentCard {
326    pub fn builder() -> builder::AgentCard {
327        Default::default()
328    }
329}
330#[doc = "AgentCardSignature represents a JWS signature of an AgentCard.\n This follows the JSON format of an RFC 7515 JSON Web Signature (JWS)."]
331#[doc = r""]
332#[doc = r" <details><summary>JSON schema</summary>"]
333#[doc = r""]
334#[doc = r" ```json"]
335#[doc = "{"]
336#[doc = "  \"title\": \"Agent Card Signature\","]
337#[doc = "  \"description\": \"AgentCardSignature represents a JWS signature of an AgentCard.\\n This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).\","]
338#[doc = "  \"type\": \"object\","]
339#[doc = "  \"required\": ["]
340#[doc = "    \"protected\","]
341#[doc = "    \"signature\""]
342#[doc = "  ],"]
343#[doc = "  \"properties\": {"]
344#[doc = "    \"header\": {"]
345#[doc = "      \"description\": \"The unprotected JWS header values.\","]
346#[doc = "      \"$ref\": \"#/definitions/Struct\""]
347#[doc = "    },"]
348#[doc = "    \"protected\": {"]
349#[doc = "      \"description\": \"The protected JWS header for the signature. This is always a\\n base64url-encoded JSON object. Required.\","]
350#[doc = "      \"type\": \"string\""]
351#[doc = "    },"]
352#[doc = "    \"signature\": {"]
353#[doc = "      \"description\": \"The computed signature, base64url-encoded. Required.\","]
354#[doc = "      \"type\": \"string\""]
355#[doc = "    }"]
356#[doc = "  },"]
357#[doc = "  \"additionalProperties\": false,"]
358#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
359#[doc = "}"]
360#[doc = r" ```"]
361#[doc = r" </details>"]
362#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
363#[serde(deny_unknown_fields)]
364pub struct AgentCardSignature {
365    #[doc = "The unprotected JWS header values."]
366    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
367    pub header: ::std::option::Option<Struct>,
368    #[doc = "The protected JWS header for the signature. This is always a\n base64url-encoded JSON object. Required."]
369    pub protected: ::std::string::String,
370    #[doc = "The computed signature, base64url-encoded. Required."]
371    pub signature: ::std::string::String,
372}
373impl AgentCardSignature {
374    pub fn builder() -> builder::AgentCardSignature {
375        Default::default()
376    }
377}
378#[doc = "A declaration of a protocol extension supported by an Agent."]
379#[doc = r""]
380#[doc = r" <details><summary>JSON schema</summary>"]
381#[doc = r""]
382#[doc = r" ```json"]
383#[doc = "{"]
384#[doc = "  \"title\": \"Agent Extension\","]
385#[doc = "  \"description\": \"A declaration of a protocol extension supported by an Agent.\","]
386#[doc = "  \"type\": \"object\","]
387#[doc = "  \"required\": ["]
388#[doc = "    \"description\","]
389#[doc = "    \"required\","]
390#[doc = "    \"uri\""]
391#[doc = "  ],"]
392#[doc = "  \"properties\": {"]
393#[doc = "    \"description\": {"]
394#[doc = "      \"description\": \"A human-readable description of how this agent uses the extension.\","]
395#[doc = "      \"type\": \"string\""]
396#[doc = "    },"]
397#[doc = "    \"params\": {"]
398#[doc = "      \"description\": \"Optional, extension-specific configuration parameters.\","]
399#[doc = "      \"$ref\": \"#/definitions/Struct\""]
400#[doc = "    },"]
401#[doc = "    \"required\": {"]
402#[doc = "      \"description\": \"If true, the client must understand and comply with the extension's requirements.\","]
403#[doc = "      \"type\": \"boolean\""]
404#[doc = "    },"]
405#[doc = "    \"uri\": {"]
406#[doc = "      \"description\": \"The unique URI identifying the extension.\","]
407#[doc = "      \"type\": \"string\""]
408#[doc = "    }"]
409#[doc = "  },"]
410#[doc = "  \"additionalProperties\": false,"]
411#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
412#[doc = "}"]
413#[doc = r" ```"]
414#[doc = r" </details>"]
415#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
416#[serde(deny_unknown_fields)]
417pub struct AgentExtension {
418    #[doc = "A human-readable description of how this agent uses the extension."]
419    pub description: ::std::string::String,
420    #[doc = "Optional, extension-specific configuration parameters."]
421    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
422    pub params: ::std::option::Option<Struct>,
423    #[doc = "If true, the client must understand and comply with the extension's requirements."]
424    pub required: bool,
425    #[doc = "The unique URI identifying the extension."]
426    pub uri: ::std::string::String,
427}
428impl AgentExtension {
429    pub fn builder() -> builder::AgentExtension {
430        Default::default()
431    }
432}
433#[doc = "Declares a combination of a target URL and a transport protocol for interacting with the agent.\n This allows agents to expose the same functionality over multiple protocol binding mechanisms."]
434#[doc = r""]
435#[doc = r" <details><summary>JSON schema</summary>"]
436#[doc = r""]
437#[doc = r" ```json"]
438#[doc = "{"]
439#[doc = "  \"title\": \"Agent Interface\","]
440#[doc = "  \"description\": \"Declares a combination of a target URL and a transport protocol for interacting with the agent.\\n This allows agents to expose the same functionality over multiple protocol binding mechanisms.\","]
441#[doc = "  \"type\": \"object\","]
442#[doc = "  \"required\": ["]
443#[doc = "    \"protocolBinding\","]
444#[doc = "    \"url\""]
445#[doc = "  ],"]
446#[doc = "  \"properties\": {"]
447#[doc = "    \"protocolBinding\": {"]
448#[doc = "      \"description\": \"The protocol binding supported at this URL. This is an open form string, to be\\n easily extended for other protocol bindings. The core ones officially\\n supported are `JSONRPC`, `GRPC` and `HTTP+JSON`.\","]
449#[doc = "      \"type\": \"string\""]
450#[doc = "    },"]
451#[doc = "    \"tenant\": {"]
452#[doc = "      \"description\": \"Tenant to be set in the request when calling the agent.\","]
453#[doc = "      \"type\": \"string\""]
454#[doc = "    },"]
455#[doc = "    \"url\": {"]
456#[doc = "      \"description\": \"The URL where this interface is available. Must be a valid absolute HTTPS URL in production.\\n Example: \\\"https://api.example.com/a2a/v1\\\", \\\"https://grpc.example.com/a2a\\\"\","]
457#[doc = "      \"type\": \"string\""]
458#[doc = "    }"]
459#[doc = "  },"]
460#[doc = "  \"additionalProperties\": false,"]
461#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
462#[doc = "}"]
463#[doc = r" ```"]
464#[doc = r" </details>"]
465#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
466#[serde(deny_unknown_fields)]
467pub struct AgentInterface {
468    #[doc = "The protocol binding supported at this URL. This is an open form string, to be\n easily extended for other protocol bindings. The core ones officially\n supported are `JSONRPC`, `GRPC` and `HTTP+JSON`."]
469    #[serde(rename = "protocolBinding")]
470    pub protocol_binding: ::std::string::String,
471    #[doc = "Tenant to be set in the request when calling the agent."]
472    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
473    pub tenant: ::std::option::Option<::std::string::String>,
474    #[doc = "The URL where this interface is available. Must be a valid absolute HTTPS URL in production.\n Example: \"https://api.example.com/a2a/v1\", \"https://grpc.example.com/a2a\""]
475    pub url: ::std::string::String,
476}
477impl AgentInterface {
478    pub fn builder() -> builder::AgentInterface {
479        Default::default()
480    }
481}
482#[doc = "Represents the service provider of an agent."]
483#[doc = r""]
484#[doc = r" <details><summary>JSON schema</summary>"]
485#[doc = r""]
486#[doc = r" ```json"]
487#[doc = "{"]
488#[doc = "  \"title\": \"Agent Provider\","]
489#[doc = "  \"description\": \"Represents the service provider of an agent.\","]
490#[doc = "  \"type\": \"object\","]
491#[doc = "  \"required\": ["]
492#[doc = "    \"organization\","]
493#[doc = "    \"url\""]
494#[doc = "  ],"]
495#[doc = "  \"properties\": {"]
496#[doc = "    \"organization\": {"]
497#[doc = "      \"description\": \"The name of the agent provider's organization.\\n Example: \\\"Google\\\"\","]
498#[doc = "      \"type\": \"string\""]
499#[doc = "    },"]
500#[doc = "    \"url\": {"]
501#[doc = "      \"description\": \"A URL for the agent provider's website or relevant documentation.\\n Example: \\\"https://ai.google.dev\\\"\","]
502#[doc = "      \"type\": \"string\""]
503#[doc = "    }"]
504#[doc = "  },"]
505#[doc = "  \"additionalProperties\": false,"]
506#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
507#[doc = "}"]
508#[doc = r" ```"]
509#[doc = r" </details>"]
510#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
511#[serde(deny_unknown_fields)]
512pub struct AgentProvider {
513    #[doc = "The name of the agent provider's organization.\n Example: \"Google\""]
514    pub organization: ::std::string::String,
515    #[doc = "A URL for the agent provider's website or relevant documentation.\n Example: \"https://ai.google.dev\""]
516    pub url: ::std::string::String,
517}
518impl AgentProvider {
519    pub fn builder() -> builder::AgentProvider {
520        Default::default()
521    }
522}
523#[doc = "Represents a distinct capability or function that an agent can perform."]
524#[doc = r""]
525#[doc = r" <details><summary>JSON schema</summary>"]
526#[doc = r""]
527#[doc = r" ```json"]
528#[doc = "{"]
529#[doc = "  \"title\": \"Agent Skill\","]
530#[doc = "  \"description\": \"Represents a distinct capability or function that an agent can perform.\","]
531#[doc = "  \"type\": \"object\","]
532#[doc = "  \"required\": ["]
533#[doc = "    \"description\","]
534#[doc = "    \"id\","]
535#[doc = "    \"name\","]
536#[doc = "    \"tags\""]
537#[doc = "  ],"]
538#[doc = "  \"properties\": {"]
539#[doc = "    \"description\": {"]
540#[doc = "      \"description\": \"A detailed description of the skill.\","]
541#[doc = "      \"type\": \"string\""]
542#[doc = "    },"]
543#[doc = "    \"examples\": {"]
544#[doc = "      \"description\": \"Example prompts or scenarios that this skill can handle.\","]
545#[doc = "      \"type\": \"array\","]
546#[doc = "      \"items\": {"]
547#[doc = "        \"type\": \"string\""]
548#[doc = "      }"]
549#[doc = "    },"]
550#[doc = "    \"id\": {"]
551#[doc = "      \"description\": \"A unique identifier for the agent's skill.\","]
552#[doc = "      \"type\": \"string\""]
553#[doc = "    },"]
554#[doc = "    \"inputModes\": {"]
555#[doc = "      \"description\": \"The set of supported input media types for this skill, overriding the agent's defaults.\","]
556#[doc = "      \"type\": \"array\","]
557#[doc = "      \"items\": {"]
558#[doc = "        \"type\": \"string\""]
559#[doc = "      }"]
560#[doc = "    },"]
561#[doc = "    \"name\": {"]
562#[doc = "      \"description\": \"A human-readable name for the skill.\","]
563#[doc = "      \"type\": \"string\""]
564#[doc = "    },"]
565#[doc = "    \"outputModes\": {"]
566#[doc = "      \"description\": \"The set of supported output media types for this skill, overriding the agent's defaults.\","]
567#[doc = "      \"type\": \"array\","]
568#[doc = "      \"items\": {"]
569#[doc = "        \"type\": \"string\""]
570#[doc = "      }"]
571#[doc = "    },"]
572#[doc = "    \"security\": {"]
573#[doc = "      \"description\": \"protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\\n Security schemes necessary for this skill.\","]
574#[doc = "      \"type\": \"array\","]
575#[doc = "      \"items\": {"]
576#[doc = "        \"$ref\": \"#/definitions/Security\""]
577#[doc = "      }"]
578#[doc = "    },"]
579#[doc = "    \"tags\": {"]
580#[doc = "      \"description\": \"A set of keywords describing the skill's capabilities.\","]
581#[doc = "      \"type\": \"array\","]
582#[doc = "      \"items\": {"]
583#[doc = "        \"type\": \"string\""]
584#[doc = "      }"]
585#[doc = "    }"]
586#[doc = "  },"]
587#[doc = "  \"additionalProperties\": false,"]
588#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
589#[doc = "}"]
590#[doc = r" ```"]
591#[doc = r" </details>"]
592#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
593#[serde(deny_unknown_fields)]
594pub struct AgentSkill {
595    #[doc = "A detailed description of the skill."]
596    pub description: ::std::string::String,
597    #[doc = "Example prompts or scenarios that this skill can handle."]
598    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
599    pub examples: ::std::vec::Vec<::std::string::String>,
600    #[doc = "A unique identifier for the agent's skill."]
601    pub id: ::std::string::String,
602    #[doc = "The set of supported input media types for this skill, overriding the agent's defaults."]
603    #[serde(
604        rename = "inputModes",
605        default,
606        skip_serializing_if = "::std::vec::Vec::is_empty"
607    )]
608    pub input_modes: ::std::vec::Vec<::std::string::String>,
609    #[doc = "A human-readable name for the skill."]
610    pub name: ::std::string::String,
611    #[doc = "The set of supported output media types for this skill, overriding the agent's defaults."]
612    #[serde(
613        rename = "outputModes",
614        default,
615        skip_serializing_if = "::std::vec::Vec::is_empty"
616    )]
617    pub output_modes: ::std::vec::Vec<::std::string::String>,
618    #[doc = "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\n Security schemes necessary for this skill."]
619    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
620    pub security: ::std::vec::Vec<Security>,
621    #[doc = "A set of keywords describing the skill's capabilities."]
622    pub tags: ::std::vec::Vec<::std::string::String>,
623}
624impl AgentSkill {
625    pub fn builder() -> builder::AgentSkill {
626        Default::default()
627    }
628}
629#[doc = "Defines a security scheme using an API key."]
630#[doc = r""]
631#[doc = r" <details><summary>JSON schema</summary>"]
632#[doc = r""]
633#[doc = r" ```json"]
634#[doc = "{"]
635#[doc = "  \"title\": \"API Key Security Scheme\","]
636#[doc = "  \"description\": \"Defines a security scheme using an API key.\","]
637#[doc = "  \"type\": \"object\","]
638#[doc = "  \"required\": ["]
639#[doc = "    \"location\","]
640#[doc = "    \"name\""]
641#[doc = "  ],"]
642#[doc = "  \"properties\": {"]
643#[doc = "    \"description\": {"]
644#[doc = "      \"description\": \"An optional description for the security scheme.\","]
645#[doc = "      \"type\": \"string\""]
646#[doc = "    },"]
647#[doc = "    \"location\": {"]
648#[doc = "      \"description\": \"The location of the API key. Valid values are \\\"query\\\", \\\"header\\\", or \\\"cookie\\\".\","]
649#[doc = "      \"type\": \"string\""]
650#[doc = "    },"]
651#[doc = "    \"name\": {"]
652#[doc = "      \"description\": \"The name of the header, query, or cookie parameter to be used.\","]
653#[doc = "      \"type\": \"string\""]
654#[doc = "    }"]
655#[doc = "  },"]
656#[doc = "  \"additionalProperties\": false,"]
657#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
658#[doc = "}"]
659#[doc = r" ```"]
660#[doc = r" </details>"]
661#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
662#[serde(deny_unknown_fields)]
663pub struct ApiKeySecurityScheme {
664    #[doc = "An optional description for the security scheme."]
665    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
666    pub description: ::std::option::Option<::std::string::String>,
667    #[doc = "The location of the API key. Valid values are \"query\", \"header\", or \"cookie\"."]
668    pub location: ::std::string::String,
669    #[doc = "The name of the header, query, or cookie parameter to be used."]
670    pub name: ::std::string::String,
671}
672impl ApiKeySecurityScheme {
673    pub fn builder() -> builder::ApiKeySecurityScheme {
674        Default::default()
675    }
676}
677#[doc = "Artifacts represent task outputs."]
678#[doc = r""]
679#[doc = r" <details><summary>JSON schema</summary>"]
680#[doc = r""]
681#[doc = r" ```json"]
682#[doc = "{"]
683#[doc = "  \"title\": \"Artifact\","]
684#[doc = "  \"description\": \"Artifacts represent task outputs.\","]
685#[doc = "  \"type\": \"object\","]
686#[doc = "  \"required\": ["]
687#[doc = "    \"artifactId\","]
688#[doc = "    \"parts\""]
689#[doc = "  ],"]
690#[doc = "  \"properties\": {"]
691#[doc = "    \"artifactId\": {"]
692#[doc = "      \"description\": \"Unique identifier (e.g. UUID) for the artifact. It must be at least unique\\n within a task.\","]
693#[doc = "      \"type\": \"string\""]
694#[doc = "    },"]
695#[doc = "    \"description\": {"]
696#[doc = "      \"description\": \"A human readable description of the artifact, optional.\","]
697#[doc = "      \"type\": \"string\""]
698#[doc = "    },"]
699#[doc = "    \"extensions\": {"]
700#[doc = "      \"description\": \"The URIs of extensions that are present or contributed to this Artifact.\","]
701#[doc = "      \"type\": \"array\","]
702#[doc = "      \"items\": {"]
703#[doc = "        \"type\": \"string\""]
704#[doc = "      }"]
705#[doc = "    },"]
706#[doc = "    \"metadata\": {"]
707#[doc = "      \"description\": \"Optional metadata included with the artifact.\","]
708#[doc = "      \"$ref\": \"#/definitions/Struct\""]
709#[doc = "    },"]
710#[doc = "    \"name\": {"]
711#[doc = "      \"description\": \"A human readable name for the artifact.\","]
712#[doc = "      \"type\": \"string\""]
713#[doc = "    },"]
714#[doc = "    \"parts\": {"]
715#[doc = "      \"description\": \"The content of the artifact. Must contain at least one part.\","]
716#[doc = "      \"type\": \"array\","]
717#[doc = "      \"items\": {"]
718#[doc = "        \"$ref\": \"#/definitions/Part\""]
719#[doc = "      }"]
720#[doc = "    }"]
721#[doc = "  },"]
722#[doc = "  \"additionalProperties\": false,"]
723#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
724#[doc = "}"]
725#[doc = r" ```"]
726#[doc = r" </details>"]
727#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
728#[serde(deny_unknown_fields)]
729pub struct Artifact {
730    #[doc = "Unique identifier (e.g. UUID) for the artifact. It must be at least unique\n within a task."]
731    #[serde(rename = "artifactId")]
732    pub artifact_id: ::std::string::String,
733    #[doc = "A human readable description of the artifact, optional."]
734    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
735    pub description: ::std::option::Option<::std::string::String>,
736    #[doc = "The URIs of extensions that are present or contributed to this Artifact."]
737    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
738    pub extensions: ::std::vec::Vec<::std::string::String>,
739    #[doc = "Optional metadata included with the artifact."]
740    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
741    pub metadata: ::std::option::Option<Struct>,
742    #[doc = "A human readable name for the artifact."]
743    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
744    pub name: ::std::option::Option<::std::string::String>,
745    #[doc = "The content of the artifact. Must contain at least one part."]
746    pub parts: ::std::vec::Vec<Part>,
747}
748impl Artifact {
749    pub fn builder() -> builder::Artifact {
750        Default::default()
751    }
752}
753#[doc = "Defines authentication details, used for push notifications."]
754#[doc = r""]
755#[doc = r" <details><summary>JSON schema</summary>"]
756#[doc = r""]
757#[doc = r" ```json"]
758#[doc = "{"]
759#[doc = "  \"title\": \"Authentication Info\","]
760#[doc = "  \"description\": \"Defines authentication details, used for push notifications.\","]
761#[doc = "  \"type\": \"object\","]
762#[doc = "  \"required\": ["]
763#[doc = "    \"schemes\""]
764#[doc = "  ],"]
765#[doc = "  \"properties\": {"]
766#[doc = "    \"credentials\": {"]
767#[doc = "      \"description\": \"Optional credentials\","]
768#[doc = "      \"type\": \"string\""]
769#[doc = "    },"]
770#[doc = "    \"schemes\": {"]
771#[doc = "      \"description\": \"A list of supported authentication schemes (e.g., 'Basic', 'Bearer').\","]
772#[doc = "      \"type\": \"array\","]
773#[doc = "      \"items\": {"]
774#[doc = "        \"type\": \"string\""]
775#[doc = "      }"]
776#[doc = "    }"]
777#[doc = "  },"]
778#[doc = "  \"additionalProperties\": false,"]
779#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
780#[doc = "}"]
781#[doc = r" ```"]
782#[doc = r" </details>"]
783#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
784#[serde(deny_unknown_fields)]
785pub struct AuthenticationInfo {
786    #[doc = "Optional credentials"]
787    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
788    pub credentials: ::std::option::Option<::std::string::String>,
789    #[doc = "A list of supported authentication schemes (e.g., 'Basic', 'Bearer')."]
790    pub schemes: ::std::vec::Vec<::std::string::String>,
791}
792impl AuthenticationInfo {
793    pub fn builder() -> builder::AuthenticationInfo {
794        Default::default()
795    }
796}
797#[doc = "Defines configuration details for the OAuth 2.0 Authorization Code flow."]
798#[doc = r""]
799#[doc = r" <details><summary>JSON schema</summary>"]
800#[doc = r""]
801#[doc = r" ```json"]
802#[doc = "{"]
803#[doc = "  \"title\": \"Authorization CodeO Auth Flow\","]
804#[doc = "  \"description\": \"Defines configuration details for the OAuth 2.0 Authorization Code flow.\","]
805#[doc = "  \"type\": \"object\","]
806#[doc = "  \"required\": ["]
807#[doc = "    \"authorizationUrl\","]
808#[doc = "    \"scopes\","]
809#[doc = "    \"tokenUrl\""]
810#[doc = "  ],"]
811#[doc = "  \"properties\": {"]
812#[doc = "    \"authorizationUrl\": {"]
813#[doc = "      \"description\": \"The authorization URL to be used for this flow.\","]
814#[doc = "      \"type\": \"string\""]
815#[doc = "    },"]
816#[doc = "    \"refreshUrl\": {"]
817#[doc = "      \"description\": \"The URL to be used for obtaining refresh tokens.\","]
818#[doc = "      \"type\": \"string\""]
819#[doc = "    },"]
820#[doc = "    \"scopes\": {"]
821#[doc = "      \"description\": \"The available scopes for the OAuth2 security scheme.\","]
822#[doc = "      \"type\": \"object\","]
823#[doc = "      \"additionalProperties\": {"]
824#[doc = "        \"type\": \"string\""]
825#[doc = "      },"]
826#[doc = "      \"propertyNames\": {"]
827#[doc = "        \"type\": \"string\""]
828#[doc = "      }"]
829#[doc = "    },"]
830#[doc = "    \"tokenUrl\": {"]
831#[doc = "      \"description\": \"The token URL to be used for this flow.\","]
832#[doc = "      \"type\": \"string\""]
833#[doc = "    }"]
834#[doc = "  },"]
835#[doc = "  \"additionalProperties\": false,"]
836#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
837#[doc = "}"]
838#[doc = r" ```"]
839#[doc = r" </details>"]
840#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
841#[serde(deny_unknown_fields)]
842pub struct AuthorizationCodeOAuthFlow {
843    #[doc = "The authorization URL to be used for this flow."]
844    #[serde(rename = "authorizationUrl")]
845    pub authorization_url: ::std::string::String,
846    #[doc = "The URL to be used for obtaining refresh tokens."]
847    #[serde(
848        rename = "refreshUrl",
849        default,
850        skip_serializing_if = "::std::option::Option::is_none"
851    )]
852    pub refresh_url: ::std::option::Option<::std::string::String>,
853    #[doc = "The available scopes for the OAuth2 security scheme."]
854    pub scopes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
855    #[doc = "The token URL to be used for this flow."]
856    #[serde(rename = "tokenUrl")]
857    pub token_url: ::std::string::String,
858}
859impl AuthorizationCodeOAuthFlow {
860    pub fn builder() -> builder::AuthorizationCodeOAuthFlow {
861        Default::default()
862    }
863}
864#[doc = "Represents a request for the `tasks/cancel` method."]
865#[doc = r""]
866#[doc = r" <details><summary>JSON schema</summary>"]
867#[doc = r""]
868#[doc = r" ```json"]
869#[doc = "{"]
870#[doc = "  \"title\": \"Cancel Task Request\","]
871#[doc = "  \"description\": \"Represents a request for the `tasks/cancel` method.\","]
872#[doc = "  \"type\": \"object\","]
873#[doc = "  \"required\": ["]
874#[doc = "    \"name\","]
875#[doc = "    \"tenant\""]
876#[doc = "  ],"]
877#[doc = "  \"properties\": {"]
878#[doc = "    \"name\": {"]
879#[doc = "      \"description\": \"The resource name of the task to cancel.\\n Format: tasks/{task_id}\","]
880#[doc = "      \"type\": \"string\""]
881#[doc = "    },"]
882#[doc = "    \"tenant\": {"]
883#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
884#[doc = "      \"type\": \"string\""]
885#[doc = "    }"]
886#[doc = "  },"]
887#[doc = "  \"additionalProperties\": false,"]
888#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
889#[doc = "}"]
890#[doc = r" ```"]
891#[doc = r" </details>"]
892#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
893#[serde(deny_unknown_fields)]
894pub struct CancelTaskRequest {
895    #[doc = "The resource name of the task to cancel.\n Format: tasks/{task_id}"]
896    pub name: ::std::string::String,
897    #[doc = "Optional tenant, provided as a path parameter."]
898    pub tenant: ::std::string::String,
899}
900impl CancelTaskRequest {
901    pub fn builder() -> builder::CancelTaskRequest {
902        Default::default()
903    }
904}
905#[doc = "Defines configuration details for the OAuth 2.0 Client Credentials flow."]
906#[doc = r""]
907#[doc = r" <details><summary>JSON schema</summary>"]
908#[doc = r""]
909#[doc = r" ```json"]
910#[doc = "{"]
911#[doc = "  \"title\": \"Client CredentialsO Auth Flow\","]
912#[doc = "  \"description\": \"Defines configuration details for the OAuth 2.0 Client Credentials flow.\","]
913#[doc = "  \"type\": \"object\","]
914#[doc = "  \"required\": ["]
915#[doc = "    \"scopes\","]
916#[doc = "    \"tokenUrl\""]
917#[doc = "  ],"]
918#[doc = "  \"properties\": {"]
919#[doc = "    \"refreshUrl\": {"]
920#[doc = "      \"description\": \"The URL to be used for obtaining refresh tokens.\","]
921#[doc = "      \"type\": \"string\""]
922#[doc = "    },"]
923#[doc = "    \"scopes\": {"]
924#[doc = "      \"description\": \"The available scopes for the OAuth2 security scheme.\","]
925#[doc = "      \"type\": \"object\","]
926#[doc = "      \"additionalProperties\": {"]
927#[doc = "        \"type\": \"string\""]
928#[doc = "      },"]
929#[doc = "      \"propertyNames\": {"]
930#[doc = "        \"type\": \"string\""]
931#[doc = "      }"]
932#[doc = "    },"]
933#[doc = "    \"tokenUrl\": {"]
934#[doc = "      \"description\": \"The token URL to be used for this flow.\","]
935#[doc = "      \"type\": \"string\""]
936#[doc = "    }"]
937#[doc = "  },"]
938#[doc = "  \"additionalProperties\": false,"]
939#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
940#[doc = "}"]
941#[doc = r" ```"]
942#[doc = r" </details>"]
943#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
944#[serde(deny_unknown_fields)]
945pub struct ClientCredentialsOAuthFlow {
946    #[doc = "The URL to be used for obtaining refresh tokens."]
947    #[serde(
948        rename = "refreshUrl",
949        default,
950        skip_serializing_if = "::std::option::Option::is_none"
951    )]
952    pub refresh_url: ::std::option::Option<::std::string::String>,
953    #[doc = "The available scopes for the OAuth2 security scheme."]
954    pub scopes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
955    #[doc = "The token URL to be used for this flow."]
956    #[serde(rename = "tokenUrl")]
957    pub token_url: ::std::string::String,
958}
959impl ClientCredentialsOAuthFlow {
960    pub fn builder() -> builder::ClientCredentialsOAuthFlow {
961        Default::default()
962    }
963}
964#[doc = "DataPart represents a structured blob."]
965#[doc = r""]
966#[doc = r" <details><summary>JSON schema</summary>"]
967#[doc = r""]
968#[doc = r" ```json"]
969#[doc = "{"]
970#[doc = "  \"title\": \"Data Part\","]
971#[doc = "  \"description\": \"DataPart represents a structured blob.\","]
972#[doc = "  \"type\": \"object\","]
973#[doc = "  \"required\": ["]
974#[doc = "    \"data\""]
975#[doc = "  ],"]
976#[doc = "  \"properties\": {"]
977#[doc = "    \"data\": {"]
978#[doc = "      \"description\": \"A JSON object containing arbitrary data.\","]
979#[doc = "      \"$ref\": \"#/definitions/Struct\""]
980#[doc = "    }"]
981#[doc = "  },"]
982#[doc = "  \"additionalProperties\": false,"]
983#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
984#[doc = "}"]
985#[doc = r" ```"]
986#[doc = r" </details>"]
987#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
988#[serde(deny_unknown_fields)]
989pub struct DataPart {
990    #[doc = "A JSON object containing arbitrary data."]
991    pub data: Struct,
992}
993impl DataPart {
994    pub fn builder() -> builder::DataPart {
995        Default::default()
996    }
997}
998#[doc = "Represents a request for the `tasks/pushNotificationConfig/delete` method."]
999#[doc = r""]
1000#[doc = r" <details><summary>JSON schema</summary>"]
1001#[doc = r""]
1002#[doc = r" ```json"]
1003#[doc = "{"]
1004#[doc = "  \"title\": \"Delete Task Push Notification Config Request\","]
1005#[doc = "  \"description\": \"Represents a request for the `tasks/pushNotificationConfig/delete` method.\","]
1006#[doc = "  \"type\": \"object\","]
1007#[doc = "  \"required\": ["]
1008#[doc = "    \"name\","]
1009#[doc = "    \"tenant\""]
1010#[doc = "  ],"]
1011#[doc = "  \"properties\": {"]
1012#[doc = "    \"name\": {"]
1013#[doc = "      \"description\": \"The resource name of the config to delete.\\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}\","]
1014#[doc = "      \"type\": \"string\""]
1015#[doc = "    },"]
1016#[doc = "    \"tenant\": {"]
1017#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1018#[doc = "      \"type\": \"string\""]
1019#[doc = "    }"]
1020#[doc = "  },"]
1021#[doc = "  \"additionalProperties\": false,"]
1022#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1023#[doc = "}"]
1024#[doc = r" ```"]
1025#[doc = r" </details>"]
1026#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1027#[serde(deny_unknown_fields)]
1028pub struct DeleteTaskPushNotificationConfigRequest {
1029    #[doc = "The resource name of the config to delete.\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}"]
1030    pub name: ::std::string::String,
1031    #[doc = "Optional tenant, provided as a path parameter."]
1032    pub tenant: ::std::string::String,
1033}
1034impl DeleteTaskPushNotificationConfigRequest {
1035    pub fn builder() -> builder::DeleteTaskPushNotificationConfigRequest {
1036        Default::default()
1037    }
1038}
1039#[doc = "FilePart represents the different ways files can be provided. If files are\n small, directly feeding the bytes is supported via file_with_bytes. If the\n file is large, the agent should read the content as appropriate directly\n from the file_with_uri source."]
1040#[doc = r""]
1041#[doc = r" <details><summary>JSON schema</summary>"]
1042#[doc = r""]
1043#[doc = r" ```json"]
1044#[doc = "{"]
1045#[doc = "  \"title\": \"File Part\","]
1046#[doc = "  \"description\": \"FilePart represents the different ways files can be provided. If files are\\n small, directly feeding the bytes is supported via file_with_bytes. If the\\n file is large, the agent should read the content as appropriate directly\\n from the file_with_uri source.\","]
1047#[doc = "  \"type\": \"object\","]
1048#[doc = "  \"required\": ["]
1049#[doc = "    \"mediaType\","]
1050#[doc = "    \"name\""]
1051#[doc = "  ],"]
1052#[doc = "  \"properties\": {"]
1053#[doc = "    \"fileWithBytes\": {"]
1054#[doc = "      \"description\": \"The base64-encoded content of the file.\","]
1055#[doc = "      \"type\": \"string\","]
1056#[doc = "      \"pattern\": \"^[A-Za-z0-9+/]*={0,2}$\""]
1057#[doc = "    },"]
1058#[doc = "    \"fileWithUri\": {"]
1059#[doc = "      \"description\": \"A URL pointing to the file's content.\","]
1060#[doc = "      \"type\": \"string\""]
1061#[doc = "    },"]
1062#[doc = "    \"mediaType\": {"]
1063#[doc = "      \"description\": \"The media type of the file (e.g., \\\"application/pdf\\\").\","]
1064#[doc = "      \"type\": \"string\""]
1065#[doc = "    },"]
1066#[doc = "    \"name\": {"]
1067#[doc = "      \"description\": \"An optional name for the file (e.g., \\\"document.pdf\\\").\","]
1068#[doc = "      \"type\": \"string\""]
1069#[doc = "    }"]
1070#[doc = "  },"]
1071#[doc = "  \"additionalProperties\": false,"]
1072#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1073#[doc = "}"]
1074#[doc = r" ```"]
1075#[doc = r" </details>"]
1076#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1077#[serde(deny_unknown_fields)]
1078pub struct FilePart {
1079    #[doc = "The base64-encoded content of the file."]
1080    #[serde(
1081        rename = "fileWithBytes",
1082        default,
1083        skip_serializing_if = "::std::option::Option::is_none"
1084    )]
1085    pub file_with_bytes: ::std::option::Option<FilePartFileWithBytes>,
1086    #[doc = "A URL pointing to the file's content."]
1087    #[serde(
1088        rename = "fileWithUri",
1089        default,
1090        skip_serializing_if = "::std::option::Option::is_none"
1091    )]
1092    pub file_with_uri: ::std::option::Option<::std::string::String>,
1093    #[doc = "The media type of the file (e.g., \"application/pdf\")."]
1094    #[serde(rename = "mediaType")]
1095    pub media_type: ::std::string::String,
1096    #[doc = "An optional name for the file (e.g., \"document.pdf\")."]
1097    pub name: ::std::string::String,
1098}
1099impl FilePart {
1100    pub fn builder() -> builder::FilePart {
1101        Default::default()
1102    }
1103}
1104#[doc = "The base64-encoded content of the file."]
1105#[doc = r""]
1106#[doc = r" <details><summary>JSON schema</summary>"]
1107#[doc = r""]
1108#[doc = r" ```json"]
1109#[doc = "{"]
1110#[doc = "  \"description\": \"The base64-encoded content of the file.\","]
1111#[doc = "  \"type\": \"string\","]
1112#[doc = "  \"pattern\": \"^[A-Za-z0-9+/]*={0,2}$\""]
1113#[doc = "}"]
1114#[doc = r" ```"]
1115#[doc = r" </details>"]
1116#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1117#[serde(transparent)]
1118pub struct FilePartFileWithBytes(::std::string::String);
1119impl ::std::ops::Deref for FilePartFileWithBytes {
1120    type Target = ::std::string::String;
1121    fn deref(&self) -> &::std::string::String {
1122        &self.0
1123    }
1124}
1125impl ::std::convert::From<FilePartFileWithBytes> for ::std::string::String {
1126    fn from(value: FilePartFileWithBytes) -> Self {
1127        value.0
1128    }
1129}
1130impl ::std::str::FromStr for FilePartFileWithBytes {
1131    type Err = self::error::ConversionError;
1132    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1133        static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1134            ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[A-Za-z0-9+/]*={0,2}$").unwrap());
1135        if PATTERN.find(value).is_none() {
1136            return Err("doesn't match pattern \"^[A-Za-z0-9+/]*={0,2}$\"".into());
1137        }
1138        Ok(Self(value.to_string()))
1139    }
1140}
1141impl ::std::convert::TryFrom<&str> for FilePartFileWithBytes {
1142    type Error = self::error::ConversionError;
1143    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1144        value.parse()
1145    }
1146}
1147impl ::std::convert::TryFrom<&::std::string::String> for FilePartFileWithBytes {
1148    type Error = self::error::ConversionError;
1149    fn try_from(
1150        value: &::std::string::String,
1151    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1152        value.parse()
1153    }
1154}
1155impl ::std::convert::TryFrom<::std::string::String> for FilePartFileWithBytes {
1156    type Error = self::error::ConversionError;
1157    fn try_from(
1158        value: ::std::string::String,
1159    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1160        value.parse()
1161    }
1162}
1163impl<'de> ::serde::Deserialize<'de> for FilePartFileWithBytes {
1164    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1165    where
1166        D: ::serde::Deserializer<'de>,
1167    {
1168        ::std::string::String::deserialize(deserializer)?
1169            .parse()
1170            .map_err(|e: self::error::ConversionError| {
1171                <D::Error as ::serde::de::Error>::custom(e.to_string())
1172            })
1173    }
1174}
1175#[doc = "`GetExtendedAgentCardRequest`"]
1176#[doc = r""]
1177#[doc = r" <details><summary>JSON schema</summary>"]
1178#[doc = r""]
1179#[doc = r" ```json"]
1180#[doc = "{"]
1181#[doc = "  \"title\": \"Get Extended Agent Card Request\","]
1182#[doc = "  \"type\": \"object\","]
1183#[doc = "  \"required\": ["]
1184#[doc = "    \"tenant\""]
1185#[doc = "  ],"]
1186#[doc = "  \"properties\": {"]
1187#[doc = "    \"tenant\": {"]
1188#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1189#[doc = "      \"type\": \"string\""]
1190#[doc = "    }"]
1191#[doc = "  },"]
1192#[doc = "  \"additionalProperties\": false,"]
1193#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1194#[doc = "}"]
1195#[doc = r" ```"]
1196#[doc = r" </details>"]
1197#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1198#[serde(deny_unknown_fields)]
1199pub struct GetExtendedAgentCardRequest {
1200    #[doc = "Optional tenant, provided as a path parameter."]
1201    pub tenant: ::std::string::String,
1202}
1203impl GetExtendedAgentCardRequest {
1204    pub fn builder() -> builder::GetExtendedAgentCardRequest {
1205        Default::default()
1206    }
1207}
1208#[doc = "`GetTaskPushNotificationConfigRequest`"]
1209#[doc = r""]
1210#[doc = r" <details><summary>JSON schema</summary>"]
1211#[doc = r""]
1212#[doc = r" ```json"]
1213#[doc = "{"]
1214#[doc = "  \"title\": \"Get Task Push Notification Config Request\","]
1215#[doc = "  \"type\": \"object\","]
1216#[doc = "  \"required\": ["]
1217#[doc = "    \"name\","]
1218#[doc = "    \"tenant\""]
1219#[doc = "  ],"]
1220#[doc = "  \"properties\": {"]
1221#[doc = "    \"name\": {"]
1222#[doc = "      \"description\": \"The resource name of the config to retrieve.\\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}\","]
1223#[doc = "      \"type\": \"string\""]
1224#[doc = "    },"]
1225#[doc = "    \"tenant\": {"]
1226#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1227#[doc = "      \"type\": \"string\""]
1228#[doc = "    }"]
1229#[doc = "  },"]
1230#[doc = "  \"additionalProperties\": false,"]
1231#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1232#[doc = "}"]
1233#[doc = r" ```"]
1234#[doc = r" </details>"]
1235#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1236#[serde(deny_unknown_fields)]
1237pub struct GetTaskPushNotificationConfigRequest {
1238    #[doc = "The resource name of the config to retrieve.\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}"]
1239    pub name: ::std::string::String,
1240    #[doc = "Optional tenant, provided as a path parameter."]
1241    pub tenant: ::std::string::String,
1242}
1243impl GetTaskPushNotificationConfigRequest {
1244    pub fn builder() -> builder::GetTaskPushNotificationConfigRequest {
1245        Default::default()
1246    }
1247}
1248#[doc = "Represents a request for the `tasks/get` method."]
1249#[doc = r""]
1250#[doc = r" <details><summary>JSON schema</summary>"]
1251#[doc = r""]
1252#[doc = r" ```json"]
1253#[doc = "{"]
1254#[doc = "  \"title\": \"Get Task Request\","]
1255#[doc = "  \"description\": \"Represents a request for the `tasks/get` method.\","]
1256#[doc = "  \"type\": \"object\","]
1257#[doc = "  \"required\": ["]
1258#[doc = "    \"name\""]
1259#[doc = "  ],"]
1260#[doc = "  \"properties\": {"]
1261#[doc = "    \"historyLength\": {"]
1262#[doc = "      \"description\": \"The maximum number of messages to include in the history.\","]
1263#[doc = "      \"type\": \"integer\","]
1264#[doc = "      \"maximum\": 2147483647.0,"]
1265#[doc = "      \"minimum\": -2147483648.0"]
1266#[doc = "    },"]
1267#[doc = "    \"name\": {"]
1268#[doc = "      \"description\": \"The resource name of the task.\\n Format: tasks/{task_id}\","]
1269#[doc = "      \"type\": \"string\""]
1270#[doc = "    },"]
1271#[doc = "    \"tenant\": {"]
1272#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1273#[doc = "      \"type\": \"string\""]
1274#[doc = "    }"]
1275#[doc = "  },"]
1276#[doc = "  \"additionalProperties\": false,"]
1277#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1278#[doc = "}"]
1279#[doc = r" ```"]
1280#[doc = r" </details>"]
1281#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1282#[serde(deny_unknown_fields)]
1283pub struct GetTaskRequest {
1284    #[doc = "The maximum number of messages to include in the history."]
1285    #[serde(
1286        rename = "historyLength",
1287        default,
1288        skip_serializing_if = "::std::option::Option::is_none"
1289    )]
1290    pub history_length: ::std::option::Option<i32>,
1291    #[doc = "The resource name of the task.\n Format: tasks/{task_id}"]
1292    pub name: ::std::string::String,
1293    #[doc = "Optional tenant, provided as a path parameter."]
1294    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1295    pub tenant: ::std::option::Option<::std::string::String>,
1296}
1297impl GetTaskRequest {
1298    pub fn builder() -> builder::GetTaskRequest {
1299        Default::default()
1300    }
1301}
1302#[doc = "Defines a security scheme using HTTP authentication."]
1303#[doc = r""]
1304#[doc = r" <details><summary>JSON schema</summary>"]
1305#[doc = r""]
1306#[doc = r" ```json"]
1307#[doc = "{"]
1308#[doc = "  \"title\": \"HTTP Auth Security Scheme\","]
1309#[doc = "  \"description\": \"Defines a security scheme using HTTP authentication.\","]
1310#[doc = "  \"type\": \"object\","]
1311#[doc = "  \"required\": ["]
1312#[doc = "    \"scheme\""]
1313#[doc = "  ],"]
1314#[doc = "  \"properties\": {"]
1315#[doc = "    \"bearerFormat\": {"]
1316#[doc = "      \"description\": \"A hint to the client to identify how the bearer token is formatted (e.g., \\\"JWT\\\").\\n This is primarily for documentation purposes.\","]
1317#[doc = "      \"type\": \"string\""]
1318#[doc = "    },"]
1319#[doc = "    \"description\": {"]
1320#[doc = "      \"description\": \"An optional description for the security scheme.\","]
1321#[doc = "      \"type\": \"string\""]
1322#[doc = "    },"]
1323#[doc = "    \"scheme\": {"]
1324#[doc = "      \"description\": \"The name of the HTTP Authentication scheme to be used in the Authorization header,\\n as defined in RFC7235 (e.g., \\\"Bearer\\\").\\n This value should be registered in the IANA Authentication Scheme registry.\","]
1325#[doc = "      \"type\": \"string\""]
1326#[doc = "    }"]
1327#[doc = "  },"]
1328#[doc = "  \"additionalProperties\": false,"]
1329#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1330#[doc = "}"]
1331#[doc = r" ```"]
1332#[doc = r" </details>"]
1333#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1334#[serde(deny_unknown_fields)]
1335pub struct HttpAuthSecurityScheme {
1336    #[doc = "A hint to the client to identify how the bearer token is formatted (e.g., \"JWT\").\n This is primarily for documentation purposes."]
1337    #[serde(
1338        rename = "bearerFormat",
1339        default,
1340        skip_serializing_if = "::std::option::Option::is_none"
1341    )]
1342    pub bearer_format: ::std::option::Option<::std::string::String>,
1343    #[doc = "An optional description for the security scheme."]
1344    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1345    pub description: ::std::option::Option<::std::string::String>,
1346    #[doc = "The name of the HTTP Authentication scheme to be used in the Authorization header,\n as defined in RFC7235 (e.g., \"Bearer\").\n This value should be registered in the IANA Authentication Scheme registry."]
1347    pub scheme: ::std::string::String,
1348}
1349impl HttpAuthSecurityScheme {
1350    pub fn builder() -> builder::HttpAuthSecurityScheme {
1351        Default::default()
1352    }
1353}
1354#[doc = "Defines configuration details for the OAuth 2.0 Implicit flow."]
1355#[doc = r""]
1356#[doc = r" <details><summary>JSON schema</summary>"]
1357#[doc = r""]
1358#[doc = r" ```json"]
1359#[doc = "{"]
1360#[doc = "  \"title\": \"ImplicitO Auth Flow\","]
1361#[doc = "  \"description\": \"Defines configuration details for the OAuth 2.0 Implicit flow.\","]
1362#[doc = "  \"type\": \"object\","]
1363#[doc = "  \"required\": ["]
1364#[doc = "    \"authorizationUrl\","]
1365#[doc = "    \"scopes\""]
1366#[doc = "  ],"]
1367#[doc = "  \"properties\": {"]
1368#[doc = "    \"authorizationUrl\": {"]
1369#[doc = "      \"description\": \"The authorization URL to be used for this flow.\","]
1370#[doc = "      \"type\": \"string\""]
1371#[doc = "    },"]
1372#[doc = "    \"refreshUrl\": {"]
1373#[doc = "      \"description\": \"The URL to be used for obtaining refresh tokens.\","]
1374#[doc = "      \"type\": \"string\""]
1375#[doc = "    },"]
1376#[doc = "    \"scopes\": {"]
1377#[doc = "      \"description\": \"The available scopes for the OAuth2 security scheme.\","]
1378#[doc = "      \"type\": \"object\","]
1379#[doc = "      \"additionalProperties\": {"]
1380#[doc = "        \"type\": \"string\""]
1381#[doc = "      },"]
1382#[doc = "      \"propertyNames\": {"]
1383#[doc = "        \"type\": \"string\""]
1384#[doc = "      }"]
1385#[doc = "    }"]
1386#[doc = "  },"]
1387#[doc = "  \"additionalProperties\": false,"]
1388#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1389#[doc = "}"]
1390#[doc = r" ```"]
1391#[doc = r" </details>"]
1392#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1393#[serde(deny_unknown_fields)]
1394pub struct ImplicitOAuthFlow {
1395    #[doc = "The authorization URL to be used for this flow."]
1396    #[serde(rename = "authorizationUrl")]
1397    pub authorization_url: ::std::string::String,
1398    #[doc = "The URL to be used for obtaining refresh tokens."]
1399    #[serde(
1400        rename = "refreshUrl",
1401        default,
1402        skip_serializing_if = "::std::option::Option::is_none"
1403    )]
1404    pub refresh_url: ::std::option::Option<::std::string::String>,
1405    #[doc = "The available scopes for the OAuth2 security scheme."]
1406    pub scopes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
1407}
1408impl ImplicitOAuthFlow {
1409    pub fn builder() -> builder::ImplicitOAuthFlow {
1410        Default::default()
1411    }
1412}
1413#[doc = "`ListTaskPushNotificationConfigRequest`"]
1414#[doc = r""]
1415#[doc = r" <details><summary>JSON schema</summary>"]
1416#[doc = r""]
1417#[doc = r" ```json"]
1418#[doc = "{"]
1419#[doc = "  \"title\": \"List Task Push Notification Config Request\","]
1420#[doc = "  \"type\": \"object\","]
1421#[doc = "  \"required\": ["]
1422#[doc = "    \"pageSize\","]
1423#[doc = "    \"pageToken\","]
1424#[doc = "    \"parent\","]
1425#[doc = "    \"tenant\""]
1426#[doc = "  ],"]
1427#[doc = "  \"properties\": {"]
1428#[doc = "    \"pageSize\": {"]
1429#[doc = "      \"description\": \"The maximum number of configurations to return.\","]
1430#[doc = "      \"type\": \"integer\","]
1431#[doc = "      \"maximum\": 2147483647.0,"]
1432#[doc = "      \"minimum\": -2147483648.0"]
1433#[doc = "    },"]
1434#[doc = "    \"pageToken\": {"]
1435#[doc = "      \"description\": \"A page token received from a previous ListTaskPushNotificationConfigRequest call.\","]
1436#[doc = "      \"type\": \"string\""]
1437#[doc = "    },"]
1438#[doc = "    \"parent\": {"]
1439#[doc = "      \"description\": \"The parent task resource.\\n Format: tasks/{task_id}\","]
1440#[doc = "      \"type\": \"string\""]
1441#[doc = "    },"]
1442#[doc = "    \"tenant\": {"]
1443#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1444#[doc = "      \"type\": \"string\""]
1445#[doc = "    }"]
1446#[doc = "  },"]
1447#[doc = "  \"additionalProperties\": false,"]
1448#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1449#[doc = "}"]
1450#[doc = r" ```"]
1451#[doc = r" </details>"]
1452#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1453#[serde(deny_unknown_fields)]
1454pub struct ListTaskPushNotificationConfigRequest {
1455    #[doc = "The maximum number of configurations to return."]
1456    #[serde(rename = "pageSize")]
1457    pub page_size: i32,
1458    #[doc = "A page token received from a previous ListTaskPushNotificationConfigRequest call."]
1459    #[serde(rename = "pageToken")]
1460    pub page_token: ::std::string::String,
1461    #[doc = "The parent task resource.\n Format: tasks/{task_id}"]
1462    pub parent: ::std::string::String,
1463    #[doc = "Optional tenant, provided as a path parameter."]
1464    pub tenant: ::std::string::String,
1465}
1466impl ListTaskPushNotificationConfigRequest {
1467    pub fn builder() -> builder::ListTaskPushNotificationConfigRequest {
1468        Default::default()
1469    }
1470}
1471#[doc = "Represents a successful response for the `tasks/pushNotificationConfig/list`\n method."]
1472#[doc = r""]
1473#[doc = r" <details><summary>JSON schema</summary>"]
1474#[doc = r""]
1475#[doc = r" ```json"]
1476#[doc = "{"]
1477#[doc = "  \"title\": \"List Task Push Notification Config Response\","]
1478#[doc = "  \"description\": \"Represents a successful response for the `tasks/pushNotificationConfig/list`\\n method.\","]
1479#[doc = "  \"type\": \"object\","]
1480#[doc = "  \"required\": ["]
1481#[doc = "    \"nextPageToken\""]
1482#[doc = "  ],"]
1483#[doc = "  \"properties\": {"]
1484#[doc = "    \"configs\": {"]
1485#[doc = "      \"description\": \"The list of push notification configurations.\","]
1486#[doc = "      \"type\": \"array\","]
1487#[doc = "      \"items\": {"]
1488#[doc = "        \"$ref\": \"#/definitions/TaskPushNotificationConfig\""]
1489#[doc = "      }"]
1490#[doc = "    },"]
1491#[doc = "    \"nextPageToken\": {"]
1492#[doc = "      \"description\": \"A token, which can be sent as `page_token` to retrieve the next page.\\n If this field is omitted, there are no subsequent pages.\","]
1493#[doc = "      \"type\": \"string\""]
1494#[doc = "    }"]
1495#[doc = "  },"]
1496#[doc = "  \"additionalProperties\": false,"]
1497#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1498#[doc = "}"]
1499#[doc = r" ```"]
1500#[doc = r" </details>"]
1501#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1502#[serde(deny_unknown_fields)]
1503pub struct ListTaskPushNotificationConfigResponse {
1504    #[doc = "The list of push notification configurations."]
1505    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1506    pub configs: ::std::vec::Vec<TaskPushNotificationConfig>,
1507    #[doc = "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages."]
1508    #[serde(rename = "nextPageToken")]
1509    pub next_page_token: ::std::string::String,
1510}
1511impl ListTaskPushNotificationConfigResponse {
1512    pub fn builder() -> builder::ListTaskPushNotificationConfigResponse {
1513        Default::default()
1514    }
1515}
1516#[doc = "Parameters for listing tasks with optional filtering criteria."]
1517#[doc = r""]
1518#[doc = r" <details><summary>JSON schema</summary>"]
1519#[doc = r""]
1520#[doc = r" ```json"]
1521#[doc = "{"]
1522#[doc = "  \"title\": \"List Tasks Request\","]
1523#[doc = "  \"description\": \"Parameters for listing tasks with optional filtering criteria.\","]
1524#[doc = "  \"type\": \"object\","]
1525#[doc = "  \"required\": ["]
1526#[doc = "    \"contextId\","]
1527#[doc = "    \"lastUpdatedAfter\","]
1528#[doc = "    \"pageToken\","]
1529#[doc = "    \"status\","]
1530#[doc = "    \"tenant\""]
1531#[doc = "  ],"]
1532#[doc = "  \"properties\": {"]
1533#[doc = "    \"contextId\": {"]
1534#[doc = "      \"description\": \"Filter tasks by context ID to get tasks from a specific conversation or session.\","]
1535#[doc = "      \"type\": \"string\""]
1536#[doc = "    },"]
1537#[doc = "    \"historyLength\": {"]
1538#[doc = "      \"description\": \"The maximum number of messages to include in each task's history.\","]
1539#[doc = "      \"type\": \"integer\","]
1540#[doc = "      \"maximum\": 2147483647.0,"]
1541#[doc = "      \"minimum\": -2147483648.0"]
1542#[doc = "    },"]
1543#[doc = "    \"includeArtifacts\": {"]
1544#[doc = "      \"description\": \"Whether to include artifacts in the returned tasks.\\n Defaults to false to reduce payload size.\","]
1545#[doc = "      \"type\": \"boolean\""]
1546#[doc = "    },"]
1547#[doc = "    \"lastUpdatedAfter\": {"]
1548#[doc = "      \"description\": \"Filter tasks updated after this timestamp (milliseconds since epoch).\\n Only tasks with a last updated time greater than or equal to this value will be returned.\","]
1549#[doc = "      \"type\": \"integer\""]
1550#[doc = "    },"]
1551#[doc = "    \"pageSize\": {"]
1552#[doc = "      \"description\": \"Maximum number of tasks to return. Must be between 1 and 100.\\n Defaults to 50 if not specified.\","]
1553#[doc = "      \"type\": \"integer\","]
1554#[doc = "      \"maximum\": 2147483647.0,"]
1555#[doc = "      \"minimum\": -2147483648.0"]
1556#[doc = "    },"]
1557#[doc = "    \"pageToken\": {"]
1558#[doc = "      \"description\": \"Token for pagination. Use the next_page_token from a previous ListTasksResponse.\","]
1559#[doc = "      \"type\": \"string\""]
1560#[doc = "    },"]
1561#[doc = "    \"status\": {"]
1562#[doc = "      \"title\": \"Task State\","]
1563#[doc = "      \"description\": \"Filter tasks by their current status state.\","]
1564#[doc = "      \"type\": \"string\","]
1565#[doc = "      \"enum\": ["]
1566#[doc = "        \"TASK_STATE_UNSPECIFIED\","]
1567#[doc = "        \"TASK_STATE_SUBMITTED\","]
1568#[doc = "        \"TASK_STATE_WORKING\","]
1569#[doc = "        \"TASK_STATE_COMPLETED\","]
1570#[doc = "        \"TASK_STATE_FAILED\","]
1571#[doc = "        \"TASK_STATE_CANCELLED\","]
1572#[doc = "        \"TASK_STATE_INPUT_REQUIRED\","]
1573#[doc = "        \"TASK_STATE_REJECTED\","]
1574#[doc = "        \"TASK_STATE_AUTH_REQUIRED\""]
1575#[doc = "      ]"]
1576#[doc = "    },"]
1577#[doc = "    \"tenant\": {"]
1578#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
1579#[doc = "      \"type\": \"string\""]
1580#[doc = "    }"]
1581#[doc = "  },"]
1582#[doc = "  \"additionalProperties\": false,"]
1583#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1584#[doc = "}"]
1585#[doc = r" ```"]
1586#[doc = r" </details>"]
1587#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1588#[serde(deny_unknown_fields)]
1589pub struct ListTasksRequest {
1590    #[doc = "Filter tasks by context ID to get tasks from a specific conversation or session."]
1591    #[serde(rename = "contextId")]
1592    pub context_id: ::std::string::String,
1593    #[doc = "The maximum number of messages to include in each task's history."]
1594    #[serde(
1595        rename = "historyLength",
1596        default,
1597        skip_serializing_if = "::std::option::Option::is_none"
1598    )]
1599    pub history_length: ::std::option::Option<i32>,
1600    #[doc = "Whether to include artifacts in the returned tasks.\n Defaults to false to reduce payload size."]
1601    #[serde(
1602        rename = "includeArtifacts",
1603        default,
1604        skip_serializing_if = "::std::option::Option::is_none"
1605    )]
1606    pub include_artifacts: ::std::option::Option<bool>,
1607    #[doc = "Filter tasks updated after this timestamp (milliseconds since epoch).\n Only tasks with a last updated time greater than or equal to this value will be returned."]
1608    #[serde(rename = "lastUpdatedAfter")]
1609    pub last_updated_after: i64,
1610    #[doc = "Maximum number of tasks to return. Must be between 1 and 100.\n Defaults to 50 if not specified."]
1611    #[serde(
1612        rename = "pageSize",
1613        default,
1614        skip_serializing_if = "::std::option::Option::is_none"
1615    )]
1616    pub page_size: ::std::option::Option<i32>,
1617    #[doc = "Token for pagination. Use the next_page_token from a previous ListTasksResponse."]
1618    #[serde(rename = "pageToken")]
1619    pub page_token: ::std::string::String,
1620    #[doc = "Filter tasks by their current status state."]
1621    pub status: TaskState,
1622    #[doc = "Optional tenant, provided as a path parameter."]
1623    pub tenant: ::std::string::String,
1624}
1625impl ListTasksRequest {
1626    pub fn builder() -> builder::ListTasksRequest {
1627        Default::default()
1628    }
1629}
1630#[doc = "Result object for tasks/list method containing an array of tasks and pagination information."]
1631#[doc = r""]
1632#[doc = r" <details><summary>JSON schema</summary>"]
1633#[doc = r""]
1634#[doc = r" ```json"]
1635#[doc = "{"]
1636#[doc = "  \"title\": \"List Tasks Response\","]
1637#[doc = "  \"description\": \"Result object for tasks/list method containing an array of tasks and pagination information.\","]
1638#[doc = "  \"type\": \"object\","]
1639#[doc = "  \"required\": ["]
1640#[doc = "    \"nextPageToken\","]
1641#[doc = "    \"pageSize\","]
1642#[doc = "    \"tasks\","]
1643#[doc = "    \"totalSize\""]
1644#[doc = "  ],"]
1645#[doc = "  \"properties\": {"]
1646#[doc = "    \"nextPageToken\": {"]
1647#[doc = "      \"description\": \"Token for retrieving the next page. Empty string if no more results.\","]
1648#[doc = "      \"type\": \"string\""]
1649#[doc = "    },"]
1650#[doc = "    \"pageSize\": {"]
1651#[doc = "      \"description\": \"The size of page requested.\","]
1652#[doc = "      \"type\": \"integer\","]
1653#[doc = "      \"maximum\": 2147483647.0,"]
1654#[doc = "      \"minimum\": -2147483648.0"]
1655#[doc = "    },"]
1656#[doc = "    \"tasks\": {"]
1657#[doc = "      \"description\": \"Array of tasks matching the specified criteria.\","]
1658#[doc = "      \"type\": \"array\","]
1659#[doc = "      \"items\": {"]
1660#[doc = "        \"$ref\": \"#/definitions/Task\""]
1661#[doc = "      }"]
1662#[doc = "    },"]
1663#[doc = "    \"totalSize\": {"]
1664#[doc = "      \"description\": \"Total number of tasks available (before pagination).\","]
1665#[doc = "      \"type\": \"integer\","]
1666#[doc = "      \"maximum\": 2147483647.0,"]
1667#[doc = "      \"minimum\": -2147483648.0"]
1668#[doc = "    }"]
1669#[doc = "  },"]
1670#[doc = "  \"additionalProperties\": false,"]
1671#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1672#[doc = "}"]
1673#[doc = r" ```"]
1674#[doc = r" </details>"]
1675#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1676#[serde(deny_unknown_fields)]
1677pub struct ListTasksResponse {
1678    #[doc = "Token for retrieving the next page. Empty string if no more results."]
1679    #[serde(rename = "nextPageToken")]
1680    pub next_page_token: ::std::string::String,
1681    #[doc = "The size of page requested."]
1682    #[serde(rename = "pageSize")]
1683    pub page_size: i32,
1684    #[doc = "Array of tasks matching the specified criteria."]
1685    pub tasks: ::std::vec::Vec<Task>,
1686    #[doc = "Total number of tasks available (before pagination)."]
1687    #[serde(rename = "totalSize")]
1688    pub total_size: i32,
1689}
1690impl ListTasksResponse {
1691    pub fn builder() -> builder::ListTasksResponse {
1692        Default::default()
1693    }
1694}
1695#[doc = "Message is one unit of communication between client and server. It is\n associated with a context and optionally a task. Since the server is\n responsible for the context definition, it must always provide a context_id\n in its messages. The client can optionally provide the context_id if it\n knows the context to associate the message to. Similarly for task_id,\n except the server decides if a task is created and whether to include the\n task_id."]
1696#[doc = r""]
1697#[doc = r" <details><summary>JSON schema</summary>"]
1698#[doc = r""]
1699#[doc = r" ```json"]
1700#[doc = "{"]
1701#[doc = "  \"title\": \"Message\","]
1702#[doc = "  \"description\": \"Message is one unit of communication between client and server. It is\\n associated with a context and optionally a task. Since the server is\\n responsible for the context definition, it must always provide a context_id\\n in its messages. The client can optionally provide the context_id if it\\n knows the context to associate the message to. Similarly for task_id,\\n except the server decides if a task is created and whether to include the\\n task_id.\","]
1703#[doc = "  \"type\": \"object\","]
1704#[doc = "  \"required\": ["]
1705#[doc = "    \"messageId\","]
1706#[doc = "    \"parts\","]
1707#[doc = "    \"role\""]
1708#[doc = "  ],"]
1709#[doc = "  \"properties\": {"]
1710#[doc = "    \"contextId\": {"]
1711#[doc = "      \"description\": \"The context id of the message. This is optional and if set, the message\\n will be associated with the given context.\","]
1712#[doc = "      \"type\": \"string\""]
1713#[doc = "    },"]
1714#[doc = "    \"extensions\": {"]
1715#[doc = "      \"description\": \"The URIs of extensions that are present or contributed to this Message.\","]
1716#[doc = "      \"type\": \"array\","]
1717#[doc = "      \"items\": {"]
1718#[doc = "        \"type\": \"string\""]
1719#[doc = "      }"]
1720#[doc = "    },"]
1721#[doc = "    \"messageId\": {"]
1722#[doc = "      \"description\": \"The unique identifier (e.g. UUID) of the message. This is required and\\n created by the message creator.\","]
1723#[doc = "      \"type\": \"string\""]
1724#[doc = "    },"]
1725#[doc = "    \"metadata\": {"]
1726#[doc = "      \"description\": \"protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\\n Any optional metadata to provide along with the message.\","]
1727#[doc = "      \"$ref\": \"#/definitions/Struct\""]
1728#[doc = "    },"]
1729#[doc = "    \"parts\": {"]
1730#[doc = "      \"description\": \"protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\\n Parts is the container of the message content.\","]
1731#[doc = "      \"type\": \"array\","]
1732#[doc = "      \"items\": {"]
1733#[doc = "        \"$ref\": \"#/definitions/Part\""]
1734#[doc = "      }"]
1735#[doc = "    },"]
1736#[doc = "    \"referenceTaskIds\": {"]
1737#[doc = "      \"description\": \"A list of task IDs that this message references for additional context.\","]
1738#[doc = "      \"type\": \"array\","]
1739#[doc = "      \"items\": {"]
1740#[doc = "        \"type\": \"string\""]
1741#[doc = "      }"]
1742#[doc = "    },"]
1743#[doc = "    \"role\": {"]
1744#[doc = "      \"title\": \"Role\","]
1745#[doc = "      \"description\": \"Identifies the sender of the message.\","]
1746#[doc = "      \"type\": \"string\","]
1747#[doc = "      \"enum\": ["]
1748#[doc = "        \"ROLE_UNSPECIFIED\","]
1749#[doc = "        \"ROLE_USER\","]
1750#[doc = "        \"ROLE_AGENT\""]
1751#[doc = "      ]"]
1752#[doc = "    },"]
1753#[doc = "    \"taskId\": {"]
1754#[doc = "      \"description\": \"The task id of the message. This is optional and if set, the message\\n will be associated with the given task.\","]
1755#[doc = "      \"type\": \"string\""]
1756#[doc = "    }"]
1757#[doc = "  },"]
1758#[doc = "  \"additionalProperties\": false,"]
1759#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1760#[doc = "}"]
1761#[doc = r" ```"]
1762#[doc = r" </details>"]
1763#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1764#[serde(deny_unknown_fields)]
1765pub struct Message {
1766    #[doc = "The context id of the message. This is optional and if set, the message\n will be associated with the given context."]
1767    #[serde(
1768        rename = "contextId",
1769        default,
1770        skip_serializing_if = "::std::option::Option::is_none"
1771    )]
1772    pub context_id: ::std::option::Option<::std::string::String>,
1773    #[doc = "The URIs of extensions that are present or contributed to this Message."]
1774    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1775    pub extensions: ::std::vec::Vec<::std::string::String>,
1776    #[doc = "The unique identifier (e.g. UUID) of the message. This is required and\n created by the message creator."]
1777    #[serde(rename = "messageId")]
1778    pub message_id: ::std::string::String,
1779    #[doc = "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\n Any optional metadata to provide along with the message."]
1780    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1781    pub metadata: ::std::option::Option<Struct>,
1782    #[doc = "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\n Parts is the container of the message content."]
1783    pub parts: ::std::vec::Vec<Part>,
1784    #[doc = "A list of task IDs that this message references for additional context."]
1785    #[serde(
1786        rename = "referenceTaskIds",
1787        default,
1788        skip_serializing_if = "::std::vec::Vec::is_empty"
1789    )]
1790    pub reference_task_ids: ::std::vec::Vec<::std::string::String>,
1791    #[doc = "Identifies the sender of the message."]
1792    pub role: Role,
1793    #[doc = "The task id of the message. This is optional and if set, the message\n will be associated with the given task."]
1794    #[serde(
1795        rename = "taskId",
1796        default,
1797        skip_serializing_if = "::std::option::Option::is_none"
1798    )]
1799    pub task_id: ::std::option::Option<::std::string::String>,
1800}
1801impl Message {
1802    pub fn builder() -> builder::Message {
1803        Default::default()
1804    }
1805}
1806#[doc = "Defines a security scheme using mTLS authentication."]
1807#[doc = r""]
1808#[doc = r" <details><summary>JSON schema</summary>"]
1809#[doc = r""]
1810#[doc = r" ```json"]
1811#[doc = "{"]
1812#[doc = "  \"title\": \"Mutual Tls Security Scheme\","]
1813#[doc = "  \"description\": \"Defines a security scheme using mTLS authentication.\","]
1814#[doc = "  \"type\": \"object\","]
1815#[doc = "  \"required\": ["]
1816#[doc = "    \"description\""]
1817#[doc = "  ],"]
1818#[doc = "  \"properties\": {"]
1819#[doc = "    \"description\": {"]
1820#[doc = "      \"description\": \"An optional description for the security scheme.\","]
1821#[doc = "      \"type\": \"string\""]
1822#[doc = "    }"]
1823#[doc = "  },"]
1824#[doc = "  \"additionalProperties\": false,"]
1825#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1826#[doc = "}"]
1827#[doc = r" ```"]
1828#[doc = r" </details>"]
1829#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1830#[serde(deny_unknown_fields)]
1831pub struct MutualTlsSecurityScheme {
1832    #[doc = "An optional description for the security scheme."]
1833    pub description: ::std::string::String,
1834}
1835impl MutualTlsSecurityScheme {
1836    pub fn builder() -> builder::MutualTlsSecurityScheme {
1837        Default::default()
1838    }
1839}
1840#[doc = "Defines a security scheme using OAuth 2.0."]
1841#[doc = r""]
1842#[doc = r" <details><summary>JSON schema</summary>"]
1843#[doc = r""]
1844#[doc = r" ```json"]
1845#[doc = "{"]
1846#[doc = "  \"title\": \"O Auth2 Security Scheme\","]
1847#[doc = "  \"description\": \"Defines a security scheme using OAuth 2.0.\","]
1848#[doc = "  \"type\": \"object\","]
1849#[doc = "  \"required\": ["]
1850#[doc = "    \"flows\""]
1851#[doc = "  ],"]
1852#[doc = "  \"properties\": {"]
1853#[doc = "    \"description\": {"]
1854#[doc = "      \"description\": \"An optional description for the security scheme.\","]
1855#[doc = "      \"type\": \"string\""]
1856#[doc = "    },"]
1857#[doc = "    \"flows\": {"]
1858#[doc = "      \"description\": \"An object containing configuration information for the supported OAuth 2.0 flows.\","]
1859#[doc = "      \"$ref\": \"#/definitions/OAuthFlows\""]
1860#[doc = "    },"]
1861#[doc = "    \"oauth2MetadataUrl\": {"]
1862#[doc = "      \"description\": \"URL to the oauth2 authorization server metadata\\n RFC8414 (https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.\","]
1863#[doc = "      \"type\": \"string\""]
1864#[doc = "    }"]
1865#[doc = "  },"]
1866#[doc = "  \"additionalProperties\": false,"]
1867#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1868#[doc = "}"]
1869#[doc = r" ```"]
1870#[doc = r" </details>"]
1871#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1872#[serde(deny_unknown_fields)]
1873pub struct OAuth2SecurityScheme {
1874    #[doc = "An optional description for the security scheme."]
1875    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1876    pub description: ::std::option::Option<::std::string::String>,
1877    #[doc = "An object containing configuration information for the supported OAuth 2.0 flows."]
1878    pub flows: OAuthFlows,
1879    #[doc = "URL to the oauth2 authorization server metadata\n RFC8414 (https://datatracker.ietf.org/doc/html/rfc8414). TLS is required."]
1880    #[serde(
1881        rename = "oauth2MetadataUrl",
1882        default,
1883        skip_serializing_if = "::std::option::Option::is_none"
1884    )]
1885    pub oauth2_metadata_url: ::std::option::Option<::std::string::String>,
1886}
1887impl OAuth2SecurityScheme {
1888    pub fn builder() -> builder::OAuth2SecurityScheme {
1889        Default::default()
1890    }
1891}
1892#[doc = "Defines the configuration for the supported OAuth 2.0 flows."]
1893#[doc = r""]
1894#[doc = r" <details><summary>JSON schema</summary>"]
1895#[doc = r""]
1896#[doc = r" ```json"]
1897#[doc = "{"]
1898#[doc = "  \"title\": \"O Auth Flows\","]
1899#[doc = "  \"description\": \"Defines the configuration for the supported OAuth 2.0 flows.\","]
1900#[doc = "  \"type\": \"object\","]
1901#[doc = "  \"properties\": {"]
1902#[doc = "    \"authorizationCode\": {"]
1903#[doc = "      \"description\": \"Configuration for the OAuth Authorization Code flow.\","]
1904#[doc = "      \"$ref\": \"#/definitions/AuthorizationCodeOAuthFlow\""]
1905#[doc = "    },"]
1906#[doc = "    \"clientCredentials\": {"]
1907#[doc = "      \"description\": \"Configuration for the OAuth Client Credentials flow.\","]
1908#[doc = "      \"$ref\": \"#/definitions/ClientCredentialsOAuthFlow\""]
1909#[doc = "    },"]
1910#[doc = "    \"implicit\": {"]
1911#[doc = "      \"description\": \"Configuration for the OAuth Implicit flow.\","]
1912#[doc = "      \"$ref\": \"#/definitions/ImplicitOAuthFlow\""]
1913#[doc = "    },"]
1914#[doc = "    \"password\": {"]
1915#[doc = "      \"description\": \"Configuration for the OAuth Resource Owner Password flow.\","]
1916#[doc = "      \"$ref\": \"#/definitions/PasswordOAuthFlow\""]
1917#[doc = "    }"]
1918#[doc = "  },"]
1919#[doc = "  \"additionalProperties\": false,"]
1920#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1921#[doc = "}"]
1922#[doc = r" ```"]
1923#[doc = r" </details>"]
1924#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1925#[serde(deny_unknown_fields)]
1926pub struct OAuthFlows {
1927    #[doc = "Configuration for the OAuth Authorization Code flow."]
1928    #[serde(
1929        rename = "authorizationCode",
1930        default,
1931        skip_serializing_if = "::std::option::Option::is_none"
1932    )]
1933    pub authorization_code: ::std::option::Option<AuthorizationCodeOAuthFlow>,
1934    #[doc = "Configuration for the OAuth Client Credentials flow."]
1935    #[serde(
1936        rename = "clientCredentials",
1937        default,
1938        skip_serializing_if = "::std::option::Option::is_none"
1939    )]
1940    pub client_credentials: ::std::option::Option<ClientCredentialsOAuthFlow>,
1941    #[doc = "Configuration for the OAuth Implicit flow."]
1942    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1943    pub implicit: ::std::option::Option<ImplicitOAuthFlow>,
1944    #[doc = "Configuration for the OAuth Resource Owner Password flow."]
1945    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1946    pub password: ::std::option::Option<PasswordOAuthFlow>,
1947}
1948impl ::std::default::Default for OAuthFlows {
1949    fn default() -> Self {
1950        Self {
1951            authorization_code: Default::default(),
1952            client_credentials: Default::default(),
1953            implicit: Default::default(),
1954            password: Default::default(),
1955        }
1956    }
1957}
1958impl OAuthFlows {
1959    pub fn builder() -> builder::OAuthFlows {
1960        Default::default()
1961    }
1962}
1963#[doc = "Defines a security scheme using OpenID Connect."]
1964#[doc = r""]
1965#[doc = r" <details><summary>JSON schema</summary>"]
1966#[doc = r""]
1967#[doc = r" ```json"]
1968#[doc = "{"]
1969#[doc = "  \"title\": \"Open Id Connect Security Scheme\","]
1970#[doc = "  \"description\": \"Defines a security scheme using OpenID Connect.\","]
1971#[doc = "  \"type\": \"object\","]
1972#[doc = "  \"required\": ["]
1973#[doc = "    \"openIdConnectUrl\""]
1974#[doc = "  ],"]
1975#[doc = "  \"properties\": {"]
1976#[doc = "    \"description\": {"]
1977#[doc = "      \"description\": \"An optional description for the security scheme.\","]
1978#[doc = "      \"type\": \"string\""]
1979#[doc = "    },"]
1980#[doc = "    \"openIdConnectUrl\": {"]
1981#[doc = "      \"description\": \"The OpenID Connect Discovery URL for the OIDC provider's metadata.\\n See: https://openid.net/specs/openid-connect-discovery-1_0.html\","]
1982#[doc = "      \"type\": \"string\""]
1983#[doc = "    }"]
1984#[doc = "  },"]
1985#[doc = "  \"additionalProperties\": false,"]
1986#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
1987#[doc = "}"]
1988#[doc = r" ```"]
1989#[doc = r" </details>"]
1990#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1991#[serde(deny_unknown_fields)]
1992pub struct OpenIdConnectSecurityScheme {
1993    #[doc = "An optional description for the security scheme."]
1994    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1995    pub description: ::std::option::Option<::std::string::String>,
1996    #[doc = "The OpenID Connect Discovery URL for the OIDC provider's metadata.\n See: https://openid.net/specs/openid-connect-discovery-1_0.html"]
1997    #[serde(rename = "openIdConnectUrl")]
1998    pub open_id_connect_url: ::std::string::String,
1999}
2000impl OpenIdConnectSecurityScheme {
2001    pub fn builder() -> builder::OpenIdConnectSecurityScheme {
2002        Default::default()
2003    }
2004}
2005#[doc = "Part represents a container for a section of communication content.\n Parts can be purely textual, some sort of file (image, video, etc) or\n a structured data blob (i.e. JSON)."]
2006#[doc = r""]
2007#[doc = r" <details><summary>JSON schema</summary>"]
2008#[doc = r""]
2009#[doc = r" ```json"]
2010#[doc = "{"]
2011#[doc = "  \"title\": \"Part\","]
2012#[doc = "  \"description\": \"Part represents a container for a section of communication content.\\n Parts can be purely textual, some sort of file (image, video, etc) or\\n a structured data blob (i.e. JSON).\","]
2013#[doc = "  \"type\": \"object\","]
2014#[doc = "  \"properties\": {"]
2015#[doc = "    \"data\": {"]
2016#[doc = "      \"description\": \"The structured data content.\","]
2017#[doc = "      \"$ref\": \"#/definitions/DataPart\""]
2018#[doc = "    },"]
2019#[doc = "    \"file\": {"]
2020#[doc = "      \"description\": \"The file content, represented as either a URI or as base64-encoded bytes.\","]
2021#[doc = "      \"$ref\": \"#/definitions/FilePart\""]
2022#[doc = "    },"]
2023#[doc = "    \"metadata\": {"]
2024#[doc = "      \"description\": \"Optional metadata associated with this part.\","]
2025#[doc = "      \"$ref\": \"#/definitions/Struct\""]
2026#[doc = "    },"]
2027#[doc = "    \"text\": {"]
2028#[doc = "      \"description\": \"The string content of the text part.\","]
2029#[doc = "      \"type\": \"string\""]
2030#[doc = "    }"]
2031#[doc = "  },"]
2032#[doc = "  \"additionalProperties\": false,"]
2033#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2034#[doc = "}"]
2035#[doc = r" ```"]
2036#[doc = r" </details>"]
2037#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2038#[serde(deny_unknown_fields)]
2039pub struct Part {
2040    #[doc = "The structured data content."]
2041    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2042    pub data: ::std::option::Option<DataPart>,
2043    #[doc = "The file content, represented as either a URI or as base64-encoded bytes."]
2044    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2045    pub file: ::std::option::Option<FilePart>,
2046    #[doc = "Optional metadata associated with this part."]
2047    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2048    pub metadata: ::std::option::Option<Struct>,
2049    #[doc = "The string content of the text part."]
2050    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2051    pub text: ::std::option::Option<::std::string::String>,
2052}
2053impl ::std::default::Default for Part {
2054    fn default() -> Self {
2055        Self {
2056            data: Default::default(),
2057            file: Default::default(),
2058            metadata: Default::default(),
2059            text: Default::default(),
2060        }
2061    }
2062}
2063impl Part {
2064    pub fn builder() -> builder::Part {
2065        Default::default()
2066    }
2067}
2068#[doc = "Defines configuration details for the OAuth 2.0 Resource Owner Password flow."]
2069#[doc = r""]
2070#[doc = r" <details><summary>JSON schema</summary>"]
2071#[doc = r""]
2072#[doc = r" ```json"]
2073#[doc = "{"]
2074#[doc = "  \"title\": \"PasswordO Auth Flow\","]
2075#[doc = "  \"description\": \"Defines configuration details for the OAuth 2.0 Resource Owner Password flow.\","]
2076#[doc = "  \"type\": \"object\","]
2077#[doc = "  \"required\": ["]
2078#[doc = "    \"scopes\","]
2079#[doc = "    \"tokenUrl\""]
2080#[doc = "  ],"]
2081#[doc = "  \"properties\": {"]
2082#[doc = "    \"refreshUrl\": {"]
2083#[doc = "      \"description\": \"The URL to be used for obtaining refresh tokens.\","]
2084#[doc = "      \"type\": \"string\""]
2085#[doc = "    },"]
2086#[doc = "    \"scopes\": {"]
2087#[doc = "      \"description\": \"The available scopes for the OAuth2 security scheme.\","]
2088#[doc = "      \"type\": \"object\","]
2089#[doc = "      \"additionalProperties\": {"]
2090#[doc = "        \"type\": \"string\""]
2091#[doc = "      },"]
2092#[doc = "      \"propertyNames\": {"]
2093#[doc = "        \"type\": \"string\""]
2094#[doc = "      }"]
2095#[doc = "    },"]
2096#[doc = "    \"tokenUrl\": {"]
2097#[doc = "      \"description\": \"The token URL to be used for this flow.\","]
2098#[doc = "      \"type\": \"string\""]
2099#[doc = "    }"]
2100#[doc = "  },"]
2101#[doc = "  \"additionalProperties\": false,"]
2102#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2103#[doc = "}"]
2104#[doc = r" ```"]
2105#[doc = r" </details>"]
2106#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2107#[serde(deny_unknown_fields)]
2108pub struct PasswordOAuthFlow {
2109    #[doc = "The URL to be used for obtaining refresh tokens."]
2110    #[serde(
2111        rename = "refreshUrl",
2112        default,
2113        skip_serializing_if = "::std::option::Option::is_none"
2114    )]
2115    pub refresh_url: ::std::option::Option<::std::string::String>,
2116    #[doc = "The available scopes for the OAuth2 security scheme."]
2117    pub scopes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2118    #[doc = "The token URL to be used for this flow."]
2119    #[serde(rename = "tokenUrl")]
2120    pub token_url: ::std::string::String,
2121}
2122impl PasswordOAuthFlow {
2123    pub fn builder() -> builder::PasswordOAuthFlow {
2124        Default::default()
2125    }
2126}
2127#[doc = "Configuration for setting up push notifications for task updates."]
2128#[doc = r""]
2129#[doc = r" <details><summary>JSON schema</summary>"]
2130#[doc = r""]
2131#[doc = r" ```json"]
2132#[doc = "{"]
2133#[doc = "  \"title\": \"Push Notification Config\","]
2134#[doc = "  \"description\": \"Configuration for setting up push notifications for task updates.\","]
2135#[doc = "  \"type\": \"object\","]
2136#[doc = "  \"required\": ["]
2137#[doc = "    \"url\""]
2138#[doc = "  ],"]
2139#[doc = "  \"properties\": {"]
2140#[doc = "    \"authentication\": {"]
2141#[doc = "      \"description\": \"Information about the authentication to sent with the notification\","]
2142#[doc = "      \"$ref\": \"#/definitions/AuthenticationInfo\""]
2143#[doc = "    },"]
2144#[doc = "    \"id\": {"]
2145#[doc = "      \"description\": \"A unique identifier (e.g. UUID) for this push notification.\","]
2146#[doc = "      \"type\": \"string\""]
2147#[doc = "    },"]
2148#[doc = "    \"token\": {"]
2149#[doc = "      \"description\": \"Token unique for this task/session\","]
2150#[doc = "      \"type\": \"string\""]
2151#[doc = "    },"]
2152#[doc = "    \"url\": {"]
2153#[doc = "      \"description\": \"Url to send the notification too\","]
2154#[doc = "      \"type\": \"string\""]
2155#[doc = "    }"]
2156#[doc = "  },"]
2157#[doc = "  \"additionalProperties\": false,"]
2158#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2159#[doc = "}"]
2160#[doc = r" ```"]
2161#[doc = r" </details>"]
2162#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2163#[serde(deny_unknown_fields)]
2164pub struct PushNotificationConfig {
2165    #[doc = "Information about the authentication to sent with the notification"]
2166    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2167    pub authentication: ::std::option::Option<AuthenticationInfo>,
2168    #[doc = "A unique identifier (e.g. UUID) for this push notification."]
2169    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2170    pub id: ::std::option::Option<::std::string::String>,
2171    #[doc = "Token unique for this task/session"]
2172    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2173    pub token: ::std::option::Option<::std::string::String>,
2174    #[doc = "Url to send the notification too"]
2175    pub url: ::std::string::String,
2176}
2177impl PushNotificationConfig {
2178    pub fn builder() -> builder::PushNotificationConfig {
2179        Default::default()
2180    }
2181}
2182#[doc = "Identifies the sender of the message."]
2183#[doc = r""]
2184#[doc = r" <details><summary>JSON schema</summary>"]
2185#[doc = r""]
2186#[doc = r" ```json"]
2187#[doc = "{"]
2188#[doc = "  \"title\": \"Role\","]
2189#[doc = "  \"description\": \"Identifies the sender of the message.\","]
2190#[doc = "  \"type\": \"string\","]
2191#[doc = "  \"enum\": ["]
2192#[doc = "    \"ROLE_UNSPECIFIED\","]
2193#[doc = "    \"ROLE_USER\","]
2194#[doc = "    \"ROLE_AGENT\""]
2195#[doc = "  ]"]
2196#[doc = "}"]
2197#[doc = r" ```"]
2198#[doc = r" </details>"]
2199#[derive(
2200    :: serde :: Deserialize,
2201    :: serde :: Serialize,
2202    Clone,
2203    Copy,
2204    Debug,
2205    Eq,
2206    Hash,
2207    Ord,
2208    PartialEq,
2209    PartialOrd,
2210)]
2211pub enum Role {
2212    #[serde(rename = "ROLE_UNSPECIFIED")]
2213    RoleUnspecified,
2214    #[serde(rename = "ROLE_USER")]
2215    RoleUser,
2216    #[serde(rename = "ROLE_AGENT")]
2217    RoleAgent,
2218}
2219impl ::std::fmt::Display for Role {
2220    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2221        match *self {
2222            Self::RoleUnspecified => f.write_str("ROLE_UNSPECIFIED"),
2223            Self::RoleUser => f.write_str("ROLE_USER"),
2224            Self::RoleAgent => f.write_str("ROLE_AGENT"),
2225        }
2226    }
2227}
2228impl ::std::str::FromStr for Role {
2229    type Err = self::error::ConversionError;
2230    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2231        match value {
2232            "ROLE_UNSPECIFIED" => Ok(Self::RoleUnspecified),
2233            "ROLE_USER" => Ok(Self::RoleUser),
2234            "ROLE_AGENT" => Ok(Self::RoleAgent),
2235            _ => Err("invalid value".into()),
2236        }
2237    }
2238}
2239impl ::std::convert::TryFrom<&str> for Role {
2240    type Error = self::error::ConversionError;
2241    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2242        value.parse()
2243    }
2244}
2245impl ::std::convert::TryFrom<&::std::string::String> for Role {
2246    type Error = self::error::ConversionError;
2247    fn try_from(
2248        value: &::std::string::String,
2249    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2250        value.parse()
2251    }
2252}
2253impl ::std::convert::TryFrom<::std::string::String> for Role {
2254    type Error = self::error::ConversionError;
2255    fn try_from(
2256        value: ::std::string::String,
2257    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2258        value.parse()
2259    }
2260}
2261#[doc = "`Security`"]
2262#[doc = r""]
2263#[doc = r" <details><summary>JSON schema</summary>"]
2264#[doc = r""]
2265#[doc = r" ```json"]
2266#[doc = "{"]
2267#[doc = "  \"title\": \"Security\","]
2268#[doc = "  \"type\": \"object\","]
2269#[doc = "  \"properties\": {"]
2270#[doc = "    \"schemes\": {"]
2271#[doc = "      \"type\": \"object\","]
2272#[doc = "      \"additionalProperties\": {"]
2273#[doc = "        \"$ref\": \"#/definitions/StringList\""]
2274#[doc = "      },"]
2275#[doc = "      \"propertyNames\": {"]
2276#[doc = "        \"type\": \"string\""]
2277#[doc = "      }"]
2278#[doc = "    }"]
2279#[doc = "  },"]
2280#[doc = "  \"additionalProperties\": false,"]
2281#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2282#[doc = "}"]
2283#[doc = r" ```"]
2284#[doc = r" </details>"]
2285#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2286#[serde(deny_unknown_fields)]
2287pub struct Security {
2288    #[serde(
2289        default,
2290        skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
2291    )]
2292    pub schemes: ::std::collections::HashMap<::std::string::String, StringList>,
2293}
2294impl ::std::default::Default for Security {
2295    fn default() -> Self {
2296        Self {
2297            schemes: Default::default(),
2298        }
2299    }
2300}
2301impl Security {
2302    pub fn builder() -> builder::Security {
2303        Default::default()
2304    }
2305}
2306#[doc = "Defines a security scheme that can be used to secure an agent's endpoints.\n This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object.\n See: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object"]
2307#[doc = r""]
2308#[doc = r" <details><summary>JSON schema</summary>"]
2309#[doc = r""]
2310#[doc = r" ```json"]
2311#[doc = "{"]
2312#[doc = "  \"title\": \"Security Scheme\","]
2313#[doc = "  \"description\": \"Defines a security scheme that can be used to secure an agent's endpoints.\\n This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object.\\n See: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object\","]
2314#[doc = "  \"type\": \"object\","]
2315#[doc = "  \"properties\": {"]
2316#[doc = "    \"apiKeySecurityScheme\": {"]
2317#[doc = "      \"description\": \"API key-based authentication.\","]
2318#[doc = "      \"$ref\": \"#/definitions/APIKeySecurityScheme\""]
2319#[doc = "    },"]
2320#[doc = "    \"httpAuthSecurityScheme\": {"]
2321#[doc = "      \"description\": \"HTTP authentication (Basic, Bearer, etc.).\","]
2322#[doc = "      \"$ref\": \"#/definitions/HTTPAuthSecurityScheme\""]
2323#[doc = "    },"]
2324#[doc = "    \"mtlsSecurityScheme\": {"]
2325#[doc = "      \"description\": \"Mutual TLS authentication.\","]
2326#[doc = "      \"$ref\": \"#/definitions/MutualTlsSecurityScheme\""]
2327#[doc = "    },"]
2328#[doc = "    \"oauth2SecurityScheme\": {"]
2329#[doc = "      \"description\": \"OAuth 2.0 authentication.\","]
2330#[doc = "      \"$ref\": \"#/definitions/OAuth2SecurityScheme\""]
2331#[doc = "    },"]
2332#[doc = "    \"openIdConnectSecurityScheme\": {"]
2333#[doc = "      \"description\": \"OpenID Connect authentication.\","]
2334#[doc = "      \"$ref\": \"#/definitions/OpenIdConnectSecurityScheme\""]
2335#[doc = "    }"]
2336#[doc = "  },"]
2337#[doc = "  \"additionalProperties\": false,"]
2338#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2339#[doc = "}"]
2340#[doc = r" ```"]
2341#[doc = r" </details>"]
2342#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2343#[serde(deny_unknown_fields)]
2344pub struct SecurityScheme {
2345    #[doc = "API key-based authentication."]
2346    #[serde(
2347        rename = "apiKeySecurityScheme",
2348        default,
2349        skip_serializing_if = "::std::option::Option::is_none"
2350    )]
2351    pub api_key_security_scheme: ::std::option::Option<ApiKeySecurityScheme>,
2352    #[doc = "HTTP authentication (Basic, Bearer, etc.)."]
2353    #[serde(
2354        rename = "httpAuthSecurityScheme",
2355        default,
2356        skip_serializing_if = "::std::option::Option::is_none"
2357    )]
2358    pub http_auth_security_scheme: ::std::option::Option<HttpAuthSecurityScheme>,
2359    #[doc = "Mutual TLS authentication."]
2360    #[serde(
2361        rename = "mtlsSecurityScheme",
2362        default,
2363        skip_serializing_if = "::std::option::Option::is_none"
2364    )]
2365    pub mtls_security_scheme: ::std::option::Option<MutualTlsSecurityScheme>,
2366    #[doc = "OAuth 2.0 authentication."]
2367    #[serde(
2368        rename = "oauth2SecurityScheme",
2369        default,
2370        skip_serializing_if = "::std::option::Option::is_none"
2371    )]
2372    pub oauth2_security_scheme: ::std::option::Option<OAuth2SecurityScheme>,
2373    #[doc = "OpenID Connect authentication."]
2374    #[serde(
2375        rename = "openIdConnectSecurityScheme",
2376        default,
2377        skip_serializing_if = "::std::option::Option::is_none"
2378    )]
2379    pub open_id_connect_security_scheme: ::std::option::Option<OpenIdConnectSecurityScheme>,
2380}
2381impl ::std::default::Default for SecurityScheme {
2382    fn default() -> Self {
2383        Self {
2384            api_key_security_scheme: Default::default(),
2385            http_auth_security_scheme: Default::default(),
2386            mtls_security_scheme: Default::default(),
2387            oauth2_security_scheme: Default::default(),
2388            open_id_connect_security_scheme: Default::default(),
2389        }
2390    }
2391}
2392impl SecurityScheme {
2393    pub fn builder() -> builder::SecurityScheme {
2394        Default::default()
2395    }
2396}
2397#[doc = "Configuration of a send message request."]
2398#[doc = r""]
2399#[doc = r" <details><summary>JSON schema</summary>"]
2400#[doc = r""]
2401#[doc = r" ```json"]
2402#[doc = "{"]
2403#[doc = "  \"title\": \"Send Message Configuration\","]
2404#[doc = "  \"description\": \"Configuration of a send message request.\","]
2405#[doc = "  \"type\": \"object\","]
2406#[doc = "  \"required\": ["]
2407#[doc = "    \"blocking\""]
2408#[doc = "  ],"]
2409#[doc = "  \"properties\": {"]
2410#[doc = "    \"acceptedOutputModes\": {"]
2411#[doc = "      \"description\": \"A list of media types the client is prepared to accept for response parts. Agents SHOULD use this to tailor their output.\","]
2412#[doc = "      \"type\": \"array\","]
2413#[doc = "      \"items\": {"]
2414#[doc = "        \"type\": \"string\""]
2415#[doc = "      }"]
2416#[doc = "    },"]
2417#[doc = "    \"blocking\": {"]
2418#[doc = "      \"description\": \"If true, the operation waits until the task reaches a terminal state before returning. Default is false.\","]
2419#[doc = "      \"type\": \"boolean\""]
2420#[doc = "    },"]
2421#[doc = "    \"historyLength\": {"]
2422#[doc = "      \"description\": \"The maximum number of messages to include in the history.\","]
2423#[doc = "      \"type\": \"integer\","]
2424#[doc = "      \"maximum\": 2147483647.0,"]
2425#[doc = "      \"minimum\": -2147483648.0"]
2426#[doc = "    },"]
2427#[doc = "    \"pushNotificationConfig\": {"]
2428#[doc = "      \"description\": \"Configuration for the agent to send push notifications for task updates.\","]
2429#[doc = "      \"$ref\": \"#/definitions/PushNotificationConfig\""]
2430#[doc = "    }"]
2431#[doc = "  },"]
2432#[doc = "  \"additionalProperties\": false,"]
2433#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2434#[doc = "}"]
2435#[doc = r" ```"]
2436#[doc = r" </details>"]
2437#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2438#[serde(deny_unknown_fields)]
2439pub struct SendMessageConfiguration {
2440    #[doc = "A list of media types the client is prepared to accept for response parts. Agents SHOULD use this to tailor their output."]
2441    #[serde(
2442        rename = "acceptedOutputModes",
2443        default,
2444        skip_serializing_if = "::std::vec::Vec::is_empty"
2445    )]
2446    pub accepted_output_modes: ::std::vec::Vec<::std::string::String>,
2447    #[doc = "If true, the operation waits until the task reaches a terminal state before returning. Default is false."]
2448    pub blocking: bool,
2449    #[doc = "The maximum number of messages to include in the history."]
2450    #[serde(
2451        rename = "historyLength",
2452        default,
2453        skip_serializing_if = "::std::option::Option::is_none"
2454    )]
2455    pub history_length: ::std::option::Option<i32>,
2456    #[doc = "Configuration for the agent to send push notifications for task updates."]
2457    #[serde(
2458        rename = "pushNotificationConfig",
2459        default,
2460        skip_serializing_if = "::std::option::Option::is_none"
2461    )]
2462    pub push_notification_config: ::std::option::Option<PushNotificationConfig>,
2463}
2464impl SendMessageConfiguration {
2465    pub fn builder() -> builder::SendMessageConfiguration {
2466        Default::default()
2467    }
2468}
2469#[doc = "/////////// Request Messages ///////////\n Represents a request for the `message/send` method."]
2470#[doc = r""]
2471#[doc = r" <details><summary>JSON schema</summary>"]
2472#[doc = r""]
2473#[doc = r" ```json"]
2474#[doc = "{"]
2475#[doc = "  \"title\": \"Send Message Request\","]
2476#[doc = "  \"description\": \"/////////// Request Messages ///////////\\n Represents a request for the `message/send` method.\","]
2477#[doc = "  \"type\": \"object\","]
2478#[doc = "  \"required\": ["]
2479#[doc = "    \"tenant\""]
2480#[doc = "  ],"]
2481#[doc = "  \"properties\": {"]
2482#[doc = "    \"configuration\": {"]
2483#[doc = "      \"description\": \"Configuration for the send request.\","]
2484#[doc = "      \"$ref\": \"#/definitions/SendMessageConfiguration\""]
2485#[doc = "    },"]
2486#[doc = "    \"message\": {"]
2487#[doc = "      \"description\": \"The message to send to the agent.\","]
2488#[doc = "      \"$ref\": \"#/definitions/Message\""]
2489#[doc = "    },"]
2490#[doc = "    \"metadata\": {"]
2491#[doc = "      \"description\": \"A flexible key-value map for passing additional context or parameters.\","]
2492#[doc = "      \"$ref\": \"#/definitions/Struct\""]
2493#[doc = "    },"]
2494#[doc = "    \"tenant\": {"]
2495#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
2496#[doc = "      \"type\": \"string\""]
2497#[doc = "    }"]
2498#[doc = "  },"]
2499#[doc = "  \"additionalProperties\": false,"]
2500#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2501#[doc = "}"]
2502#[doc = r" ```"]
2503#[doc = r" </details>"]
2504#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2505#[serde(deny_unknown_fields)]
2506pub struct SendMessageRequest {
2507    #[doc = "Configuration for the send request."]
2508    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2509    pub configuration: ::std::option::Option<SendMessageConfiguration>,
2510    #[doc = "The message to send to the agent."]
2511    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2512    pub message: ::std::option::Option<Message>,
2513    #[doc = "A flexible key-value map for passing additional context or parameters."]
2514    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2515    pub metadata: ::std::option::Option<Struct>,
2516    #[doc = "Optional tenant, provided as a path parameter."]
2517    pub tenant: ::std::string::String,
2518}
2519impl SendMessageRequest {
2520    pub fn builder() -> builder::SendMessageRequest {
2521        Default::default()
2522    }
2523}
2524#[doc = "////// Response Messages ///////////"]
2525#[doc = r""]
2526#[doc = r" <details><summary>JSON schema</summary>"]
2527#[doc = r""]
2528#[doc = r" ```json"]
2529#[doc = "{"]
2530#[doc = "  \"title\": \"Send Message Response\","]
2531#[doc = "  \"description\": \"////// Response Messages ///////////\","]
2532#[doc = "  \"type\": \"object\","]
2533#[doc = "  \"properties\": {"]
2534#[doc = "    \"message\": {"]
2535#[doc = "      \"$ref\": \"#/definitions/Message\""]
2536#[doc = "    },"]
2537#[doc = "    \"task\": {"]
2538#[doc = "      \"$ref\": \"#/definitions/Task\""]
2539#[doc = "    }"]
2540#[doc = "  },"]
2541#[doc = "  \"additionalProperties\": false,"]
2542#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2543#[doc = "}"]
2544#[doc = r" ```"]
2545#[doc = r" </details>"]
2546#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2547#[serde(deny_unknown_fields)]
2548pub struct SendMessageResponse {
2549    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2550    pub message: ::std::option::Option<Message>,
2551    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2552    pub task: ::std::option::Option<Task>,
2553}
2554impl ::std::default::Default for SendMessageResponse {
2555    fn default() -> Self {
2556        Self {
2557            message: Default::default(),
2558            task: Default::default(),
2559        }
2560    }
2561}
2562impl SendMessageResponse {
2563    pub fn builder() -> builder::SendMessageResponse {
2564        Default::default()
2565    }
2566}
2567#[doc = "Represents a request for the `tasks/pushNotificationConfig/set` method."]
2568#[doc = r""]
2569#[doc = r" <details><summary>JSON schema</summary>"]
2570#[doc = r""]
2571#[doc = r" ```json"]
2572#[doc = "{"]
2573#[doc = "  \"title\": \"Set Task Push Notification Config Request\","]
2574#[doc = "  \"description\": \"Represents a request for the `tasks/pushNotificationConfig/set` method.\","]
2575#[doc = "  \"type\": \"object\","]
2576#[doc = "  \"required\": ["]
2577#[doc = "    \"config\","]
2578#[doc = "    \"configId\","]
2579#[doc = "    \"parent\""]
2580#[doc = "  ],"]
2581#[doc = "  \"properties\": {"]
2582#[doc = "    \"config\": {"]
2583#[doc = "      \"description\": \"The configuration to create.\","]
2584#[doc = "      \"$ref\": \"#/definitions/TaskPushNotificationConfig\""]
2585#[doc = "    },"]
2586#[doc = "    \"configId\": {"]
2587#[doc = "      \"description\": \"The ID for the new config.\","]
2588#[doc = "      \"type\": \"string\""]
2589#[doc = "    },"]
2590#[doc = "    \"parent\": {"]
2591#[doc = "      \"description\": \"The parent task resource for this config.\\n Format: tasks/{task_id}\","]
2592#[doc = "      \"type\": \"string\""]
2593#[doc = "    },"]
2594#[doc = "    \"tenant\": {"]
2595#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
2596#[doc = "      \"type\": \"string\""]
2597#[doc = "    }"]
2598#[doc = "  },"]
2599#[doc = "  \"additionalProperties\": false,"]
2600#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2601#[doc = "}"]
2602#[doc = r" ```"]
2603#[doc = r" </details>"]
2604#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2605#[serde(deny_unknown_fields)]
2606pub struct SetTaskPushNotificationConfigRequest {
2607    #[doc = "The configuration to create."]
2608    pub config: TaskPushNotificationConfig,
2609    #[doc = "The ID for the new config."]
2610    #[serde(rename = "configId")]
2611    pub config_id: ::std::string::String,
2612    #[doc = "The parent task resource for this config.\n Format: tasks/{task_id}"]
2613    pub parent: ::std::string::String,
2614    #[doc = "Optional tenant, provided as a path parameter."]
2615    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2616    pub tenant: ::std::option::Option<::std::string::String>,
2617}
2618impl SetTaskPushNotificationConfigRequest {
2619    pub fn builder() -> builder::SetTaskPushNotificationConfigRequest {
2620        Default::default()
2621    }
2622}
2623#[doc = "A wrapper object used in streaming operations to encapsulate different types of response data."]
2624#[doc = r""]
2625#[doc = r" <details><summary>JSON schema</summary>"]
2626#[doc = r""]
2627#[doc = r" ```json"]
2628#[doc = "{"]
2629#[doc = "  \"title\": \"Stream Response\","]
2630#[doc = "  \"description\": \"A wrapper object used in streaming operations to encapsulate different types of response data.\","]
2631#[doc = "  \"type\": \"object\","]
2632#[doc = "  \"properties\": {"]
2633#[doc = "    \"artifactUpdate\": {"]
2634#[doc = "      \"description\": \"An event indicating a task artifact update.\","]
2635#[doc = "      \"$ref\": \"#/definitions/TaskArtifactUpdateEvent\""]
2636#[doc = "    },"]
2637#[doc = "    \"message\": {"]
2638#[doc = "      \"description\": \"A Message object containing a message from the agent.\","]
2639#[doc = "      \"$ref\": \"#/definitions/Message\""]
2640#[doc = "    },"]
2641#[doc = "    \"statusUpdate\": {"]
2642#[doc = "      \"description\": \"An event indicating a task status update.\","]
2643#[doc = "      \"$ref\": \"#/definitions/TaskStatusUpdateEvent\""]
2644#[doc = "    },"]
2645#[doc = "    \"task\": {"]
2646#[doc = "      \"description\": \"A Task object containing the current state of the task.\","]
2647#[doc = "      \"$ref\": \"#/definitions/Task\""]
2648#[doc = "    }"]
2649#[doc = "  },"]
2650#[doc = "  \"additionalProperties\": false,"]
2651#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2652#[doc = "}"]
2653#[doc = r" ```"]
2654#[doc = r" </details>"]
2655#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2656#[serde(deny_unknown_fields)]
2657pub struct StreamResponse {
2658    #[doc = "An event indicating a task artifact update."]
2659    #[serde(
2660        rename = "artifactUpdate",
2661        default,
2662        skip_serializing_if = "::std::option::Option::is_none"
2663    )]
2664    pub artifact_update: ::std::option::Option<TaskArtifactUpdateEvent>,
2665    #[doc = "A Message object containing a message from the agent."]
2666    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2667    pub message: ::std::option::Option<Message>,
2668    #[doc = "An event indicating a task status update."]
2669    #[serde(
2670        rename = "statusUpdate",
2671        default,
2672        skip_serializing_if = "::std::option::Option::is_none"
2673    )]
2674    pub status_update: ::std::option::Option<TaskStatusUpdateEvent>,
2675    #[doc = "A Task object containing the current state of the task."]
2676    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2677    pub task: ::std::option::Option<Task>,
2678}
2679impl ::std::default::Default for StreamResponse {
2680    fn default() -> Self {
2681        Self {
2682            artifact_update: Default::default(),
2683            message: Default::default(),
2684            status_update: Default::default(),
2685            task: Default::default(),
2686        }
2687    }
2688}
2689impl StreamResponse {
2690    pub fn builder() -> builder::StreamResponse {
2691        Default::default()
2692    }
2693}
2694#[doc = "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED"]
2695#[doc = r""]
2696#[doc = r" <details><summary>JSON schema</summary>"]
2697#[doc = r""]
2698#[doc = r" ```json"]
2699#[doc = "{"]
2700#[doc = "  \"title\": \"String List\","]
2701#[doc = "  \"description\": \"protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\","]
2702#[doc = "  \"type\": \"object\","]
2703#[doc = "  \"properties\": {"]
2704#[doc = "    \"list\": {"]
2705#[doc = "      \"type\": \"array\","]
2706#[doc = "      \"items\": {"]
2707#[doc = "        \"type\": \"string\""]
2708#[doc = "      }"]
2709#[doc = "    }"]
2710#[doc = "  },"]
2711#[doc = "  \"additionalProperties\": false,"]
2712#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2713#[doc = "}"]
2714#[doc = r" ```"]
2715#[doc = r" </details>"]
2716#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2717#[serde(deny_unknown_fields)]
2718pub struct StringList {
2719    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2720    pub list: ::std::vec::Vec<::std::string::String>,
2721}
2722impl ::std::default::Default for StringList {
2723    fn default() -> Self {
2724        Self {
2725            list: Default::default(),
2726        }
2727    }
2728}
2729impl StringList {
2730    pub fn builder() -> builder::StringList {
2731        Default::default()
2732    }
2733}
2734#[doc = "`Struct`"]
2735#[doc = r""]
2736#[doc = r" <details><summary>JSON schema</summary>"]
2737#[doc = r""]
2738#[doc = r" ```json"]
2739#[doc = "{"]
2740#[doc = "  \"title\": \"Struct\","]
2741#[doc = "  \"type\": \"object\","]
2742#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2743#[doc = "}"]
2744#[doc = r" ```"]
2745#[doc = r" </details>"]
2746#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2747#[serde(transparent)]
2748pub struct Struct(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
2749impl ::std::ops::Deref for Struct {
2750    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
2751    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
2752        &self.0
2753    }
2754}
2755impl ::std::convert::From<Struct>
2756    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
2757{
2758    fn from(value: Struct) -> Self {
2759        value.0
2760    }
2761}
2762impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
2763    for Struct
2764{
2765    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
2766        Self(value)
2767    }
2768}
2769#[doc = "`SubscribeToTaskRequest`"]
2770#[doc = r""]
2771#[doc = r" <details><summary>JSON schema</summary>"]
2772#[doc = r""]
2773#[doc = r" ```json"]
2774#[doc = "{"]
2775#[doc = "  \"title\": \"Subscribe To Task Request\","]
2776#[doc = "  \"type\": \"object\","]
2777#[doc = "  \"required\": ["]
2778#[doc = "    \"name\","]
2779#[doc = "    \"tenant\""]
2780#[doc = "  ],"]
2781#[doc = "  \"properties\": {"]
2782#[doc = "    \"name\": {"]
2783#[doc = "      \"description\": \"The resource name of the task to subscribe to.\\n Format: tasks/{task_id}\","]
2784#[doc = "      \"type\": \"string\""]
2785#[doc = "    },"]
2786#[doc = "    \"tenant\": {"]
2787#[doc = "      \"description\": \"Optional tenant, provided as a path parameter.\","]
2788#[doc = "      \"type\": \"string\""]
2789#[doc = "    }"]
2790#[doc = "  },"]
2791#[doc = "  \"additionalProperties\": false,"]
2792#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2793#[doc = "}"]
2794#[doc = r" ```"]
2795#[doc = r" </details>"]
2796#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2797#[serde(deny_unknown_fields)]
2798pub struct SubscribeToTaskRequest {
2799    #[doc = "The resource name of the task to subscribe to.\n Format: tasks/{task_id}"]
2800    pub name: ::std::string::String,
2801    #[doc = "Optional tenant, provided as a path parameter."]
2802    pub tenant: ::std::string::String,
2803}
2804impl SubscribeToTaskRequest {
2805    pub fn builder() -> builder::SubscribeToTaskRequest {
2806        Default::default()
2807    }
2808}
2809#[doc = "Task is the core unit of action for A2A. It has a current status\n and when results are created for the task they are stored in the\n artifact. If there are multiple turns for a task, these are stored in\n history."]
2810#[doc = r""]
2811#[doc = r" <details><summary>JSON schema</summary>"]
2812#[doc = r""]
2813#[doc = r" ```json"]
2814#[doc = "{"]
2815#[doc = "  \"title\": \"Task\","]
2816#[doc = "  \"description\": \"Task is the core unit of action for A2A. It has a current status\\n and when results are created for the task they are stored in the\\n artifact. If there are multiple turns for a task, these are stored in\\n history.\","]
2817#[doc = "  \"type\": \"object\","]
2818#[doc = "  \"required\": ["]
2819#[doc = "    \"contextId\","]
2820#[doc = "    \"id\","]
2821#[doc = "    \"status\""]
2822#[doc = "  ],"]
2823#[doc = "  \"properties\": {"]
2824#[doc = "    \"artifacts\": {"]
2825#[doc = "      \"description\": \"A set of output artifacts for a Task.\","]
2826#[doc = "      \"type\": \"array\","]
2827#[doc = "      \"items\": {"]
2828#[doc = "        \"$ref\": \"#/definitions/Artifact\""]
2829#[doc = "      }"]
2830#[doc = "    },"]
2831#[doc = "    \"contextId\": {"]
2832#[doc = "      \"description\": \"Unique identifier (e.g. UUID) for the contextual collection of interactions\\n (tasks and messages). Created by the A2A server.\","]
2833#[doc = "      \"type\": \"string\""]
2834#[doc = "    },"]
2835#[doc = "    \"history\": {"]
2836#[doc = "      \"description\": \"protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\\n The history of interactions from a task.\","]
2837#[doc = "      \"type\": \"array\","]
2838#[doc = "      \"items\": {"]
2839#[doc = "        \"$ref\": \"#/definitions/Message\""]
2840#[doc = "      }"]
2841#[doc = "    },"]
2842#[doc = "    \"id\": {"]
2843#[doc = "      \"description\": \"Unique identifier (e.g. UUID) for the task, generated by the server for a\\n new task.\","]
2844#[doc = "      \"type\": \"string\""]
2845#[doc = "    },"]
2846#[doc = "    \"metadata\": {"]
2847#[doc = "      \"description\": \"protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\\n A key/value object to store custom metadata about a task.\","]
2848#[doc = "      \"$ref\": \"#/definitions/Struct\""]
2849#[doc = "    },"]
2850#[doc = "    \"status\": {"]
2851#[doc = "      \"description\": \"The current status of a Task, including state and a message.\","]
2852#[doc = "      \"$ref\": \"#/definitions/TaskStatus\""]
2853#[doc = "    }"]
2854#[doc = "  },"]
2855#[doc = "  \"additionalProperties\": false,"]
2856#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2857#[doc = "}"]
2858#[doc = r" ```"]
2859#[doc = r" </details>"]
2860#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2861#[serde(deny_unknown_fields)]
2862pub struct Task {
2863    #[doc = "A set of output artifacts for a Task."]
2864    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2865    pub artifacts: ::std::vec::Vec<Artifact>,
2866    #[doc = "Unique identifier (e.g. UUID) for the contextual collection of interactions\n (tasks and messages). Created by the A2A server."]
2867    #[serde(rename = "contextId")]
2868    pub context_id: ::std::string::String,
2869    #[doc = "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\n The history of interactions from a task."]
2870    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2871    pub history: ::std::vec::Vec<Message>,
2872    #[doc = "Unique identifier (e.g. UUID) for the task, generated by the server for a\n new task."]
2873    pub id: ::std::string::String,
2874    #[doc = "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\n A key/value object to store custom metadata about a task."]
2875    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2876    pub metadata: ::std::option::Option<Struct>,
2877    #[doc = "The current status of a Task, including state and a message."]
2878    pub status: TaskStatus,
2879}
2880impl Task {
2881    pub fn builder() -> builder::Task {
2882        Default::default()
2883    }
2884}
2885#[doc = "TaskArtifactUpdateEvent represents a task delta where an artifact has\n been generated."]
2886#[doc = r""]
2887#[doc = r" <details><summary>JSON schema</summary>"]
2888#[doc = r""]
2889#[doc = r" ```json"]
2890#[doc = "{"]
2891#[doc = "  \"title\": \"Task Artifact Update Event\","]
2892#[doc = "  \"description\": \"TaskArtifactUpdateEvent represents a task delta where an artifact has\\n been generated.\","]
2893#[doc = "  \"type\": \"object\","]
2894#[doc = "  \"required\": ["]
2895#[doc = "    \"artifact\","]
2896#[doc = "    \"contextId\","]
2897#[doc = "    \"taskId\""]
2898#[doc = "  ],"]
2899#[doc = "  \"properties\": {"]
2900#[doc = "    \"append\": {"]
2901#[doc = "      \"description\": \"If true, the content of this artifact should be appended to a previously\\n sent artifact with the same ID.\","]
2902#[doc = "      \"type\": \"boolean\""]
2903#[doc = "    },"]
2904#[doc = "    \"artifact\": {"]
2905#[doc = "      \"description\": \"The artifact that was generated or updated.\","]
2906#[doc = "      \"$ref\": \"#/definitions/Artifact\""]
2907#[doc = "    },"]
2908#[doc = "    \"contextId\": {"]
2909#[doc = "      \"description\": \"The id of the context that this task belongs to.\","]
2910#[doc = "      \"type\": \"string\""]
2911#[doc = "    },"]
2912#[doc = "    \"lastChunk\": {"]
2913#[doc = "      \"description\": \"If true, this is the final chunk of the artifact.\","]
2914#[doc = "      \"type\": \"boolean\""]
2915#[doc = "    },"]
2916#[doc = "    \"metadata\": {"]
2917#[doc = "      \"description\": \"Optional metadata associated with the artifact update.\","]
2918#[doc = "      \"$ref\": \"#/definitions/Struct\""]
2919#[doc = "    },"]
2920#[doc = "    \"taskId\": {"]
2921#[doc = "      \"description\": \"The id of the task for this artifact.\","]
2922#[doc = "      \"type\": \"string\""]
2923#[doc = "    }"]
2924#[doc = "  },"]
2925#[doc = "  \"additionalProperties\": false,"]
2926#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2927#[doc = "}"]
2928#[doc = r" ```"]
2929#[doc = r" </details>"]
2930#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2931#[serde(deny_unknown_fields)]
2932pub struct TaskArtifactUpdateEvent {
2933    #[doc = "If true, the content of this artifact should be appended to a previously\n sent artifact with the same ID."]
2934    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2935    pub append: ::std::option::Option<bool>,
2936    #[doc = "The artifact that was generated or updated."]
2937    pub artifact: Artifact,
2938    #[doc = "The id of the context that this task belongs to."]
2939    #[serde(rename = "contextId")]
2940    pub context_id: ::std::string::String,
2941    #[doc = "If true, this is the final chunk of the artifact."]
2942    #[serde(
2943        rename = "lastChunk",
2944        default,
2945        skip_serializing_if = "::std::option::Option::is_none"
2946    )]
2947    pub last_chunk: ::std::option::Option<bool>,
2948    #[doc = "Optional metadata associated with the artifact update."]
2949    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2950    pub metadata: ::std::option::Option<Struct>,
2951    #[doc = "The id of the task for this artifact."]
2952    #[serde(rename = "taskId")]
2953    pub task_id: ::std::string::String,
2954}
2955impl TaskArtifactUpdateEvent {
2956    pub fn builder() -> builder::TaskArtifactUpdateEvent {
2957        Default::default()
2958    }
2959}
2960#[doc = "A container associating a push notification configuration with a specific\n task."]
2961#[doc = r""]
2962#[doc = r" <details><summary>JSON schema</summary>"]
2963#[doc = r""]
2964#[doc = r" ```json"]
2965#[doc = "{"]
2966#[doc = "  \"title\": \"Task Push Notification Config\","]
2967#[doc = "  \"description\": \"A container associating a push notification configuration with a specific\\n task.\","]
2968#[doc = "  \"type\": \"object\","]
2969#[doc = "  \"required\": ["]
2970#[doc = "    \"name\","]
2971#[doc = "    \"pushNotificationConfig\""]
2972#[doc = "  ],"]
2973#[doc = "  \"properties\": {"]
2974#[doc = "    \"name\": {"]
2975#[doc = "      \"description\": \"The resource name of the config.\\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}\","]
2976#[doc = "      \"type\": \"string\""]
2977#[doc = "    },"]
2978#[doc = "    \"pushNotificationConfig\": {"]
2979#[doc = "      \"description\": \"The push notification configuration details.\","]
2980#[doc = "      \"$ref\": \"#/definitions/PushNotificationConfig\""]
2981#[doc = "    }"]
2982#[doc = "  },"]
2983#[doc = "  \"additionalProperties\": false,"]
2984#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
2985#[doc = "}"]
2986#[doc = r" ```"]
2987#[doc = r" </details>"]
2988#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2989#[serde(deny_unknown_fields)]
2990pub struct TaskPushNotificationConfig {
2991    #[doc = "The resource name of the config.\n Format: tasks/{task_id}/pushNotificationConfigs/{config_id}"]
2992    pub name: ::std::string::String,
2993    #[doc = "The push notification configuration details."]
2994    #[serde(rename = "pushNotificationConfig")]
2995    pub push_notification_config: PushNotificationConfig,
2996}
2997impl TaskPushNotificationConfig {
2998    pub fn builder() -> builder::TaskPushNotificationConfig {
2999        Default::default()
3000    }
3001}
3002#[doc = "Filter tasks by their current status state."]
3003#[doc = r""]
3004#[doc = r" <details><summary>JSON schema</summary>"]
3005#[doc = r""]
3006#[doc = r" ```json"]
3007#[doc = "{"]
3008#[doc = "  \"title\": \"Task State\","]
3009#[doc = "  \"description\": \"Filter tasks by their current status state.\","]
3010#[doc = "  \"type\": \"string\","]
3011#[doc = "  \"enum\": ["]
3012#[doc = "    \"TASK_STATE_UNSPECIFIED\","]
3013#[doc = "    \"TASK_STATE_SUBMITTED\","]
3014#[doc = "    \"TASK_STATE_WORKING\","]
3015#[doc = "    \"TASK_STATE_COMPLETED\","]
3016#[doc = "    \"TASK_STATE_FAILED\","]
3017#[doc = "    \"TASK_STATE_CANCELLED\","]
3018#[doc = "    \"TASK_STATE_INPUT_REQUIRED\","]
3019#[doc = "    \"TASK_STATE_REJECTED\","]
3020#[doc = "    \"TASK_STATE_AUTH_REQUIRED\""]
3021#[doc = "  ]"]
3022#[doc = "}"]
3023#[doc = r" ```"]
3024#[doc = r" </details>"]
3025#[derive(
3026    :: serde :: Deserialize,
3027    :: serde :: Serialize,
3028    Clone,
3029    Copy,
3030    Debug,
3031    Eq,
3032    Hash,
3033    Ord,
3034    PartialEq,
3035    PartialOrd,
3036)]
3037pub enum TaskState {
3038    #[serde(rename = "TASK_STATE_UNSPECIFIED")]
3039    TaskStateUnspecified,
3040    #[serde(rename = "TASK_STATE_SUBMITTED")]
3041    TaskStateSubmitted,
3042    #[serde(rename = "TASK_STATE_WORKING")]
3043    TaskStateWorking,
3044    #[serde(rename = "TASK_STATE_COMPLETED")]
3045    TaskStateCompleted,
3046    #[serde(rename = "TASK_STATE_FAILED")]
3047    TaskStateFailed,
3048    #[serde(rename = "TASK_STATE_CANCELLED")]
3049    TaskStateCancelled,
3050    #[serde(rename = "TASK_STATE_INPUT_REQUIRED")]
3051    TaskStateInputRequired,
3052    #[serde(rename = "TASK_STATE_REJECTED")]
3053    TaskStateRejected,
3054    #[serde(rename = "TASK_STATE_AUTH_REQUIRED")]
3055    TaskStateAuthRequired,
3056}
3057impl ::std::fmt::Display for TaskState {
3058    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3059        match *self {
3060            Self::TaskStateUnspecified => f.write_str("TASK_STATE_UNSPECIFIED"),
3061            Self::TaskStateSubmitted => f.write_str("TASK_STATE_SUBMITTED"),
3062            Self::TaskStateWorking => f.write_str("TASK_STATE_WORKING"),
3063            Self::TaskStateCompleted => f.write_str("TASK_STATE_COMPLETED"),
3064            Self::TaskStateFailed => f.write_str("TASK_STATE_FAILED"),
3065            Self::TaskStateCancelled => f.write_str("TASK_STATE_CANCELLED"),
3066            Self::TaskStateInputRequired => f.write_str("TASK_STATE_INPUT_REQUIRED"),
3067            Self::TaskStateRejected => f.write_str("TASK_STATE_REJECTED"),
3068            Self::TaskStateAuthRequired => f.write_str("TASK_STATE_AUTH_REQUIRED"),
3069        }
3070    }
3071}
3072impl ::std::str::FromStr for TaskState {
3073    type Err = self::error::ConversionError;
3074    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3075        match value {
3076            "TASK_STATE_UNSPECIFIED" => Ok(Self::TaskStateUnspecified),
3077            "TASK_STATE_SUBMITTED" => Ok(Self::TaskStateSubmitted),
3078            "TASK_STATE_WORKING" => Ok(Self::TaskStateWorking),
3079            "TASK_STATE_COMPLETED" => Ok(Self::TaskStateCompleted),
3080            "TASK_STATE_FAILED" => Ok(Self::TaskStateFailed),
3081            "TASK_STATE_CANCELLED" => Ok(Self::TaskStateCancelled),
3082            "TASK_STATE_INPUT_REQUIRED" => Ok(Self::TaskStateInputRequired),
3083            "TASK_STATE_REJECTED" => Ok(Self::TaskStateRejected),
3084            "TASK_STATE_AUTH_REQUIRED" => Ok(Self::TaskStateAuthRequired),
3085            _ => Err("invalid value".into()),
3086        }
3087    }
3088}
3089impl ::std::convert::TryFrom<&str> for TaskState {
3090    type Error = self::error::ConversionError;
3091    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3092        value.parse()
3093    }
3094}
3095impl ::std::convert::TryFrom<&::std::string::String> for TaskState {
3096    type Error = self::error::ConversionError;
3097    fn try_from(
3098        value: &::std::string::String,
3099    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3100        value.parse()
3101    }
3102}
3103impl ::std::convert::TryFrom<::std::string::String> for TaskState {
3104    type Error = self::error::ConversionError;
3105    fn try_from(
3106        value: ::std::string::String,
3107    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3108        value.parse()
3109    }
3110}
3111#[doc = "A container for the status of a task"]
3112#[doc = r""]
3113#[doc = r" <details><summary>JSON schema</summary>"]
3114#[doc = r""]
3115#[doc = r" ```json"]
3116#[doc = "{"]
3117#[doc = "  \"title\": \"Task Status\","]
3118#[doc = "  \"description\": \"A container for the status of a task\","]
3119#[doc = "  \"type\": \"object\","]
3120#[doc = "  \"required\": ["]
3121#[doc = "    \"state\""]
3122#[doc = "  ],"]
3123#[doc = "  \"properties\": {"]
3124#[doc = "    \"message\": {"]
3125#[doc = "      \"description\": \"A message associated with the status.\","]
3126#[doc = "      \"$ref\": \"#/definitions/Message\""]
3127#[doc = "    },"]
3128#[doc = "    \"state\": {"]
3129#[doc = "      \"title\": \"Task State\","]
3130#[doc = "      \"description\": \"The current state of this task.\","]
3131#[doc = "      \"type\": \"string\","]
3132#[doc = "      \"enum\": ["]
3133#[doc = "        \"TASK_STATE_UNSPECIFIED\","]
3134#[doc = "        \"TASK_STATE_SUBMITTED\","]
3135#[doc = "        \"TASK_STATE_WORKING\","]
3136#[doc = "        \"TASK_STATE_COMPLETED\","]
3137#[doc = "        \"TASK_STATE_FAILED\","]
3138#[doc = "        \"TASK_STATE_CANCELLED\","]
3139#[doc = "        \"TASK_STATE_INPUT_REQUIRED\","]
3140#[doc = "        \"TASK_STATE_REJECTED\","]
3141#[doc = "        \"TASK_STATE_AUTH_REQUIRED\""]
3142#[doc = "      ]"]
3143#[doc = "    },"]
3144#[doc = "    \"timestamp\": {"]
3145#[doc = "      \"description\": \"ISO 8601 Timestamp when the status was recorded.\\n Example: \\\"2023-10-27T10:00:00Z\\\"\","]
3146#[doc = "      \"$ref\": \"#/definitions/Timestamp\""]
3147#[doc = "    }"]
3148#[doc = "  },"]
3149#[doc = "  \"additionalProperties\": false,"]
3150#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
3151#[doc = "}"]
3152#[doc = r" ```"]
3153#[doc = r" </details>"]
3154#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3155#[serde(deny_unknown_fields)]
3156pub struct TaskStatus {
3157    #[doc = "A message associated with the status."]
3158    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3159    pub message: ::std::option::Option<Message>,
3160    #[doc = "The current state of this task."]
3161    pub state: TaskState,
3162    #[doc = "ISO 8601 Timestamp when the status was recorded.\n Example: \"2023-10-27T10:00:00Z\""]
3163    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3164    pub timestamp: ::std::option::Option<Timestamp>,
3165}
3166impl TaskStatus {
3167    pub fn builder() -> builder::TaskStatus {
3168        Default::default()
3169    }
3170}
3171#[doc = "An event sent by the agent to notify the client of a change in a task's\n status."]
3172#[doc = r""]
3173#[doc = r" <details><summary>JSON schema</summary>"]
3174#[doc = r""]
3175#[doc = r" ```json"]
3176#[doc = "{"]
3177#[doc = "  \"title\": \"Task Status Update Event\","]
3178#[doc = "  \"description\": \"An event sent by the agent to notify the client of a change in a task's\\n status.\","]
3179#[doc = "  \"type\": \"object\","]
3180#[doc = "  \"required\": ["]
3181#[doc = "    \"contextId\","]
3182#[doc = "    \"final\","]
3183#[doc = "    \"status\","]
3184#[doc = "    \"taskId\""]
3185#[doc = "  ],"]
3186#[doc = "  \"properties\": {"]
3187#[doc = "    \"contextId\": {"]
3188#[doc = "      \"description\": \"The id of the context that the task belongs to\","]
3189#[doc = "      \"type\": \"string\""]
3190#[doc = "    },"]
3191#[doc = "    \"final\": {"]
3192#[doc = "      \"description\": \"If true, this is the final event in the stream for this interaction.\","]
3193#[doc = "      \"type\": \"boolean\""]
3194#[doc = "    },"]
3195#[doc = "    \"metadata\": {"]
3196#[doc = "      \"description\": \"Optional metadata to associate with the task update.\","]
3197#[doc = "      \"$ref\": \"#/definitions/Struct\""]
3198#[doc = "    },"]
3199#[doc = "    \"status\": {"]
3200#[doc = "      \"description\": \"The new status of the task.\","]
3201#[doc = "      \"$ref\": \"#/definitions/TaskStatus\""]
3202#[doc = "    },"]
3203#[doc = "    \"taskId\": {"]
3204#[doc = "      \"description\": \"The id of the task that is changed\","]
3205#[doc = "      \"type\": \"string\""]
3206#[doc = "    }"]
3207#[doc = "  },"]
3208#[doc = "  \"additionalProperties\": false,"]
3209#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
3210#[doc = "}"]
3211#[doc = r" ```"]
3212#[doc = r" </details>"]
3213#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3214#[serde(deny_unknown_fields)]
3215pub struct TaskStatusUpdateEvent {
3216    #[doc = "The id of the context that the task belongs to"]
3217    #[serde(rename = "contextId")]
3218    pub context_id: ::std::string::String,
3219    #[doc = "If true, this is the final event in the stream for this interaction."]
3220    #[serde(rename = "final")]
3221    pub final_: bool,
3222    #[doc = "Optional metadata to associate with the task update."]
3223    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3224    pub metadata: ::std::option::Option<Struct>,
3225    #[doc = "The new status of the task."]
3226    pub status: TaskStatus,
3227    #[doc = "The id of the task that is changed"]
3228    #[serde(rename = "taskId")]
3229    pub task_id: ::std::string::String,
3230}
3231impl TaskStatusUpdateEvent {
3232    pub fn builder() -> builder::TaskStatusUpdateEvent {
3233        Default::default()
3234    }
3235}
3236#[doc = "`Timestamp`"]
3237#[doc = r""]
3238#[doc = r" <details><summary>JSON schema</summary>"]
3239#[doc = r""]
3240#[doc = r" ```json"]
3241#[doc = "{"]
3242#[doc = "  \"title\": \"Timestamp\","]
3243#[doc = "  \"type\": \"string\","]
3244#[doc = "  \"format\": \"date-time\","]
3245#[doc = "  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\""]
3246#[doc = "}"]
3247#[doc = r" ```"]
3248#[doc = r" </details>"]
3249#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3250#[serde(transparent)]
3251pub struct Timestamp(pub ::chrono::DateTime<::chrono::offset::Utc>);
3252impl ::std::ops::Deref for Timestamp {
3253    type Target = ::chrono::DateTime<::chrono::offset::Utc>;
3254    fn deref(&self) -> &::chrono::DateTime<::chrono::offset::Utc> {
3255        &self.0
3256    }
3257}
3258impl ::std::convert::From<Timestamp> for ::chrono::DateTime<::chrono::offset::Utc> {
3259    fn from(value: Timestamp) -> Self {
3260        value.0
3261    }
3262}
3263impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for Timestamp {
3264    fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
3265        Self(value)
3266    }
3267}
3268impl ::std::str::FromStr for Timestamp {
3269    type Err = <::chrono::DateTime<::chrono::offset::Utc> as ::std::str::FromStr>::Err;
3270    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
3271        Ok(Self(value.parse()?))
3272    }
3273}
3274impl ::std::convert::TryFrom<&str> for Timestamp {
3275    type Error = <::chrono::DateTime<::chrono::offset::Utc> as ::std::str::FromStr>::Err;
3276    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
3277        value.parse()
3278    }
3279}
3280impl ::std::convert::TryFrom<String> for Timestamp {
3281    type Error = <::chrono::DateTime<::chrono::offset::Utc> as ::std::str::FromStr>::Err;
3282    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
3283        value.parse()
3284    }
3285}
3286impl ::std::fmt::Display for Timestamp {
3287    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3288        self.0.fmt(f)
3289    }
3290}
3291#[doc = r" Types for composing complex structures."]
3292pub mod builder {
3293    #[derive(Clone, Debug)]
3294    pub struct AgentCapabilities {
3295        extensions:
3296            ::std::result::Result<::std::vec::Vec<super::AgentExtension>, ::std::string::String>,
3297        push_notifications:
3298            ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
3299        state_transition_history:
3300            ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
3301        streaming: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
3302    }
3303    impl ::std::default::Default for AgentCapabilities {
3304        fn default() -> Self {
3305            Self {
3306                extensions: Ok(Default::default()),
3307                push_notifications: Ok(Default::default()),
3308                state_transition_history: Ok(Default::default()),
3309                streaming: Ok(Default::default()),
3310            }
3311        }
3312    }
3313    impl AgentCapabilities {
3314        pub fn extensions<T>(mut self, value: T) -> Self
3315        where
3316            T: ::std::convert::TryInto<::std::vec::Vec<super::AgentExtension>>,
3317            T::Error: ::std::fmt::Display,
3318        {
3319            self.extensions = value
3320                .try_into()
3321                .map_err(|e| format!("error converting supplied value for extensions: {e}"));
3322            self
3323        }
3324        pub fn push_notifications<T>(mut self, value: T) -> Self
3325        where
3326            T: ::std::convert::TryInto<::std::option::Option<bool>>,
3327            T::Error: ::std::fmt::Display,
3328        {
3329            self.push_notifications = value.try_into().map_err(|e| {
3330                format!("error converting supplied value for push_notifications: {e}")
3331            });
3332            self
3333        }
3334        pub fn state_transition_history<T>(mut self, value: T) -> Self
3335        where
3336            T: ::std::convert::TryInto<::std::option::Option<bool>>,
3337            T::Error: ::std::fmt::Display,
3338        {
3339            self.state_transition_history = value.try_into().map_err(|e| {
3340                format!("error converting supplied value for state_transition_history: {e}")
3341            });
3342            self
3343        }
3344        pub fn streaming<T>(mut self, value: T) -> Self
3345        where
3346            T: ::std::convert::TryInto<::std::option::Option<bool>>,
3347            T::Error: ::std::fmt::Display,
3348        {
3349            self.streaming = value
3350                .try_into()
3351                .map_err(|e| format!("error converting supplied value for streaming: {e}"));
3352            self
3353        }
3354    }
3355    impl ::std::convert::TryFrom<AgentCapabilities> for super::AgentCapabilities {
3356        type Error = super::error::ConversionError;
3357        fn try_from(
3358            value: AgentCapabilities,
3359        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3360            Ok(Self {
3361                extensions: value.extensions?,
3362                push_notifications: value.push_notifications?,
3363                state_transition_history: value.state_transition_history?,
3364                streaming: value.streaming?,
3365            })
3366        }
3367    }
3368    impl ::std::convert::From<super::AgentCapabilities> for AgentCapabilities {
3369        fn from(value: super::AgentCapabilities) -> Self {
3370            Self {
3371                extensions: Ok(value.extensions),
3372                push_notifications: Ok(value.push_notifications),
3373                state_transition_history: Ok(value.state_transition_history),
3374                streaming: Ok(value.streaming),
3375            }
3376        }
3377    }
3378    #[derive(Clone, Debug)]
3379    pub struct AgentCard {
3380        additional_interfaces:
3381            ::std::result::Result<::std::vec::Vec<super::AgentInterface>, ::std::string::String>,
3382        capabilities: ::std::result::Result<super::AgentCapabilities, ::std::string::String>,
3383        default_input_modes:
3384            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3385        default_output_modes:
3386            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3387        description: ::std::result::Result<::std::string::String, ::std::string::String>,
3388        documentation_url: ::std::result::Result<
3389            ::std::option::Option<::std::string::String>,
3390            ::std::string::String,
3391        >,
3392        icon_url: ::std::result::Result<
3393            ::std::option::Option<::std::string::String>,
3394            ::std::string::String,
3395        >,
3396        name: ::std::result::Result<::std::string::String, ::std::string::String>,
3397        preferred_transport: ::std::result::Result<
3398            ::std::option::Option<::std::string::String>,
3399            ::std::string::String,
3400        >,
3401        protocol_version: ::std::result::Result<::std::string::String, ::std::string::String>,
3402        provider: ::std::result::Result<
3403            ::std::option::Option<super::AgentProvider>,
3404            ::std::string::String,
3405        >,
3406        security: ::std::result::Result<::std::vec::Vec<super::Security>, ::std::string::String>,
3407        security_schemes: ::std::result::Result<
3408            ::std::collections::HashMap<::std::string::String, super::SecurityScheme>,
3409            ::std::string::String,
3410        >,
3411        signatures: ::std::result::Result<
3412            ::std::vec::Vec<super::AgentCardSignature>,
3413            ::std::string::String,
3414        >,
3415        skills: ::std::result::Result<::std::vec::Vec<super::AgentSkill>, ::std::string::String>,
3416        supported_interfaces:
3417            ::std::result::Result<::std::vec::Vec<super::AgentInterface>, ::std::string::String>,
3418        supports_extended_agent_card:
3419            ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
3420        url: ::std::result::Result<
3421            ::std::option::Option<::std::string::String>,
3422            ::std::string::String,
3423        >,
3424        version: ::std::result::Result<::std::string::String, ::std::string::String>,
3425    }
3426    impl ::std::default::Default for AgentCard {
3427        fn default() -> Self {
3428            Self {
3429                additional_interfaces: Ok(Default::default()),
3430                capabilities: Err("no value supplied for capabilities".to_string()),
3431                default_input_modes: Err("no value supplied for default_input_modes".to_string()),
3432                default_output_modes: Err("no value supplied for default_output_modes".to_string()),
3433                description: Err("no value supplied for description".to_string()),
3434                documentation_url: Ok(Default::default()),
3435                icon_url: Ok(Default::default()),
3436                name: Err("no value supplied for name".to_string()),
3437                preferred_transport: Ok(Default::default()),
3438                protocol_version: Err("no value supplied for protocol_version".to_string()),
3439                provider: Ok(Default::default()),
3440                security: Ok(Default::default()),
3441                security_schemes: Ok(Default::default()),
3442                signatures: Ok(Default::default()),
3443                skills: Err("no value supplied for skills".to_string()),
3444                supported_interfaces: Ok(Default::default()),
3445                supports_extended_agent_card: Ok(Default::default()),
3446                url: Ok(Default::default()),
3447                version: Err("no value supplied for version".to_string()),
3448            }
3449        }
3450    }
3451    impl AgentCard {
3452        pub fn additional_interfaces<T>(mut self, value: T) -> Self
3453        where
3454            T: ::std::convert::TryInto<::std::vec::Vec<super::AgentInterface>>,
3455            T::Error: ::std::fmt::Display,
3456        {
3457            self.additional_interfaces = value.try_into().map_err(|e| {
3458                format!("error converting supplied value for additional_interfaces: {e}")
3459            });
3460            self
3461        }
3462        pub fn capabilities<T>(mut self, value: T) -> Self
3463        where
3464            T: ::std::convert::TryInto<super::AgentCapabilities>,
3465            T::Error: ::std::fmt::Display,
3466        {
3467            self.capabilities = value
3468                .try_into()
3469                .map_err(|e| format!("error converting supplied value for capabilities: {e}"));
3470            self
3471        }
3472        pub fn default_input_modes<T>(mut self, value: T) -> Self
3473        where
3474            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
3475            T::Error: ::std::fmt::Display,
3476        {
3477            self.default_input_modes = value.try_into().map_err(|e| {
3478                format!("error converting supplied value for default_input_modes: {e}")
3479            });
3480            self
3481        }
3482        pub fn default_output_modes<T>(mut self, value: T) -> Self
3483        where
3484            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
3485            T::Error: ::std::fmt::Display,
3486        {
3487            self.default_output_modes = value.try_into().map_err(|e| {
3488                format!("error converting supplied value for default_output_modes: {e}")
3489            });
3490            self
3491        }
3492        pub fn description<T>(mut self, value: T) -> Self
3493        where
3494            T: ::std::convert::TryInto<::std::string::String>,
3495            T::Error: ::std::fmt::Display,
3496        {
3497            self.description = value
3498                .try_into()
3499                .map_err(|e| format!("error converting supplied value for description: {e}"));
3500            self
3501        }
3502        pub fn documentation_url<T>(mut self, value: T) -> Self
3503        where
3504            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
3505            T::Error: ::std::fmt::Display,
3506        {
3507            self.documentation_url = value
3508                .try_into()
3509                .map_err(|e| format!("error converting supplied value for documentation_url: {e}"));
3510            self
3511        }
3512        pub fn icon_url<T>(mut self, value: T) -> Self
3513        where
3514            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
3515            T::Error: ::std::fmt::Display,
3516        {
3517            self.icon_url = value
3518                .try_into()
3519                .map_err(|e| format!("error converting supplied value for icon_url: {e}"));
3520            self
3521        }
3522        pub fn name<T>(mut self, value: T) -> Self
3523        where
3524            T: ::std::convert::TryInto<::std::string::String>,
3525            T::Error: ::std::fmt::Display,
3526        {
3527            self.name = value
3528                .try_into()
3529                .map_err(|e| format!("error converting supplied value for name: {e}"));
3530            self
3531        }
3532        pub fn preferred_transport<T>(mut self, value: T) -> Self
3533        where
3534            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
3535            T::Error: ::std::fmt::Display,
3536        {
3537            self.preferred_transport = value.try_into().map_err(|e| {
3538                format!("error converting supplied value for preferred_transport: {e}")
3539            });
3540            self
3541        }
3542        pub fn protocol_version<T>(mut self, value: T) -> Self
3543        where
3544            T: ::std::convert::TryInto<::std::string::String>,
3545            T::Error: ::std::fmt::Display,
3546        {
3547            self.protocol_version = value
3548                .try_into()
3549                .map_err(|e| format!("error converting supplied value for protocol_version: {e}"));
3550            self
3551        }
3552        pub fn provider<T>(mut self, value: T) -> Self
3553        where
3554            T: ::std::convert::TryInto<::std::option::Option<super::AgentProvider>>,
3555            T::Error: ::std::fmt::Display,
3556        {
3557            self.provider = value
3558                .try_into()
3559                .map_err(|e| format!("error converting supplied value for provider: {e}"));
3560            self
3561        }
3562        pub fn security<T>(mut self, value: T) -> Self
3563        where
3564            T: ::std::convert::TryInto<::std::vec::Vec<super::Security>>,
3565            T::Error: ::std::fmt::Display,
3566        {
3567            self.security = value
3568                .try_into()
3569                .map_err(|e| format!("error converting supplied value for security: {e}"));
3570            self
3571        }
3572        pub fn security_schemes<T>(mut self, value: T) -> Self
3573        where
3574            T: ::std::convert::TryInto<
3575                    ::std::collections::HashMap<::std::string::String, super::SecurityScheme>,
3576                >,
3577            T::Error: ::std::fmt::Display,
3578        {
3579            self.security_schemes = value
3580                .try_into()
3581                .map_err(|e| format!("error converting supplied value for security_schemes: {e}"));
3582            self
3583        }
3584        pub fn signatures<T>(mut self, value: T) -> Self
3585        where
3586            T: ::std::convert::TryInto<::std::vec::Vec<super::AgentCardSignature>>,
3587            T::Error: ::std::fmt::Display,
3588        {
3589            self.signatures = value
3590                .try_into()
3591                .map_err(|e| format!("error converting supplied value for signatures: {e}"));
3592            self
3593        }
3594        pub fn skills<T>(mut self, value: T) -> Self
3595        where
3596            T: ::std::convert::TryInto<::std::vec::Vec<super::AgentSkill>>,
3597            T::Error: ::std::fmt::Display,
3598        {
3599            self.skills = value
3600                .try_into()
3601                .map_err(|e| format!("error converting supplied value for skills: {e}"));
3602            self
3603        }
3604        pub fn supported_interfaces<T>(mut self, value: T) -> Self
3605        where
3606            T: ::std::convert::TryInto<::std::vec::Vec<super::AgentInterface>>,
3607            T::Error: ::std::fmt::Display,
3608        {
3609            self.supported_interfaces = value.try_into().map_err(|e| {
3610                format!("error converting supplied value for supported_interfaces: {e}")
3611            });
3612            self
3613        }
3614        pub fn supports_extended_agent_card<T>(mut self, value: T) -> Self
3615        where
3616            T: ::std::convert::TryInto<::std::option::Option<bool>>,
3617            T::Error: ::std::fmt::Display,
3618        {
3619            self.supports_extended_agent_card = value.try_into().map_err(|e| {
3620                format!("error converting supplied value for supports_extended_agent_card: {e}")
3621            });
3622            self
3623        }
3624        pub fn url<T>(mut self, value: T) -> Self
3625        where
3626            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
3627            T::Error: ::std::fmt::Display,
3628        {
3629            self.url = value
3630                .try_into()
3631                .map_err(|e| format!("error converting supplied value for url: {e}"));
3632            self
3633        }
3634        pub fn version<T>(mut self, value: T) -> Self
3635        where
3636            T: ::std::convert::TryInto<::std::string::String>,
3637            T::Error: ::std::fmt::Display,
3638        {
3639            self.version = value
3640                .try_into()
3641                .map_err(|e| format!("error converting supplied value for version: {e}"));
3642            self
3643        }
3644    }
3645    impl ::std::convert::TryFrom<AgentCard> for super::AgentCard {
3646        type Error = super::error::ConversionError;
3647        fn try_from(
3648            value: AgentCard,
3649        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3650            Ok(Self {
3651                additional_interfaces: value.additional_interfaces?,
3652                capabilities: value.capabilities?,
3653                default_input_modes: value.default_input_modes?,
3654                default_output_modes: value.default_output_modes?,
3655                description: value.description?,
3656                documentation_url: value.documentation_url?,
3657                icon_url: value.icon_url?,
3658                name: value.name?,
3659                preferred_transport: value.preferred_transport?,
3660                protocol_version: value.protocol_version?,
3661                provider: value.provider?,
3662                security: value.security?,
3663                security_schemes: value.security_schemes?,
3664                signatures: value.signatures?,
3665                skills: value.skills?,
3666                supported_interfaces: value.supported_interfaces?,
3667                supports_extended_agent_card: value.supports_extended_agent_card?,
3668                url: value.url?,
3669                version: value.version?,
3670            })
3671        }
3672    }
3673    impl ::std::convert::From<super::AgentCard> for AgentCard {
3674        fn from(value: super::AgentCard) -> Self {
3675            Self {
3676                additional_interfaces: Ok(value.additional_interfaces),
3677                capabilities: Ok(value.capabilities),
3678                default_input_modes: Ok(value.default_input_modes),
3679                default_output_modes: Ok(value.default_output_modes),
3680                description: Ok(value.description),
3681                documentation_url: Ok(value.documentation_url),
3682                icon_url: Ok(value.icon_url),
3683                name: Ok(value.name),
3684                preferred_transport: Ok(value.preferred_transport),
3685                protocol_version: Ok(value.protocol_version),
3686                provider: Ok(value.provider),
3687                security: Ok(value.security),
3688                security_schemes: Ok(value.security_schemes),
3689                signatures: Ok(value.signatures),
3690                skills: Ok(value.skills),
3691                supported_interfaces: Ok(value.supported_interfaces),
3692                supports_extended_agent_card: Ok(value.supports_extended_agent_card),
3693                url: Ok(value.url),
3694                version: Ok(value.version),
3695            }
3696        }
3697    }
3698    #[derive(Clone, Debug)]
3699    pub struct AgentCardSignature {
3700        header: ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
3701        protected: ::std::result::Result<::std::string::String, ::std::string::String>,
3702        signature: ::std::result::Result<::std::string::String, ::std::string::String>,
3703    }
3704    impl ::std::default::Default for AgentCardSignature {
3705        fn default() -> Self {
3706            Self {
3707                header: Ok(Default::default()),
3708                protected: Err("no value supplied for protected".to_string()),
3709                signature: Err("no value supplied for signature".to_string()),
3710            }
3711        }
3712    }
3713    impl AgentCardSignature {
3714        pub fn header<T>(mut self, value: T) -> Self
3715        where
3716            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
3717            T::Error: ::std::fmt::Display,
3718        {
3719            self.header = value
3720                .try_into()
3721                .map_err(|e| format!("error converting supplied value for header: {e}"));
3722            self
3723        }
3724        pub fn protected<T>(mut self, value: T) -> Self
3725        where
3726            T: ::std::convert::TryInto<::std::string::String>,
3727            T::Error: ::std::fmt::Display,
3728        {
3729            self.protected = value
3730                .try_into()
3731                .map_err(|e| format!("error converting supplied value for protected: {e}"));
3732            self
3733        }
3734        pub fn signature<T>(mut self, value: T) -> Self
3735        where
3736            T: ::std::convert::TryInto<::std::string::String>,
3737            T::Error: ::std::fmt::Display,
3738        {
3739            self.signature = value
3740                .try_into()
3741                .map_err(|e| format!("error converting supplied value for signature: {e}"));
3742            self
3743        }
3744    }
3745    impl ::std::convert::TryFrom<AgentCardSignature> for super::AgentCardSignature {
3746        type Error = super::error::ConversionError;
3747        fn try_from(
3748            value: AgentCardSignature,
3749        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3750            Ok(Self {
3751                header: value.header?,
3752                protected: value.protected?,
3753                signature: value.signature?,
3754            })
3755        }
3756    }
3757    impl ::std::convert::From<super::AgentCardSignature> for AgentCardSignature {
3758        fn from(value: super::AgentCardSignature) -> Self {
3759            Self {
3760                header: Ok(value.header),
3761                protected: Ok(value.protected),
3762                signature: Ok(value.signature),
3763            }
3764        }
3765    }
3766    #[derive(Clone, Debug)]
3767    pub struct AgentExtension {
3768        description: ::std::result::Result<::std::string::String, ::std::string::String>,
3769        params: ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
3770        required: ::std::result::Result<bool, ::std::string::String>,
3771        uri: ::std::result::Result<::std::string::String, ::std::string::String>,
3772    }
3773    impl ::std::default::Default for AgentExtension {
3774        fn default() -> Self {
3775            Self {
3776                description: Err("no value supplied for description".to_string()),
3777                params: Ok(Default::default()),
3778                required: Err("no value supplied for required".to_string()),
3779                uri: Err("no value supplied for uri".to_string()),
3780            }
3781        }
3782    }
3783    impl AgentExtension {
3784        pub fn description<T>(mut self, value: T) -> Self
3785        where
3786            T: ::std::convert::TryInto<::std::string::String>,
3787            T::Error: ::std::fmt::Display,
3788        {
3789            self.description = value
3790                .try_into()
3791                .map_err(|e| format!("error converting supplied value for description: {e}"));
3792            self
3793        }
3794        pub fn params<T>(mut self, value: T) -> Self
3795        where
3796            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
3797            T::Error: ::std::fmt::Display,
3798        {
3799            self.params = value
3800                .try_into()
3801                .map_err(|e| format!("error converting supplied value for params: {e}"));
3802            self
3803        }
3804        pub fn required<T>(mut self, value: T) -> Self
3805        where
3806            T: ::std::convert::TryInto<bool>,
3807            T::Error: ::std::fmt::Display,
3808        {
3809            self.required = value
3810                .try_into()
3811                .map_err(|e| format!("error converting supplied value for required: {e}"));
3812            self
3813        }
3814        pub fn uri<T>(mut self, value: T) -> Self
3815        where
3816            T: ::std::convert::TryInto<::std::string::String>,
3817            T::Error: ::std::fmt::Display,
3818        {
3819            self.uri = value
3820                .try_into()
3821                .map_err(|e| format!("error converting supplied value for uri: {e}"));
3822            self
3823        }
3824    }
3825    impl ::std::convert::TryFrom<AgentExtension> for super::AgentExtension {
3826        type Error = super::error::ConversionError;
3827        fn try_from(
3828            value: AgentExtension,
3829        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3830            Ok(Self {
3831                description: value.description?,
3832                params: value.params?,
3833                required: value.required?,
3834                uri: value.uri?,
3835            })
3836        }
3837    }
3838    impl ::std::convert::From<super::AgentExtension> for AgentExtension {
3839        fn from(value: super::AgentExtension) -> Self {
3840            Self {
3841                description: Ok(value.description),
3842                params: Ok(value.params),
3843                required: Ok(value.required),
3844                uri: Ok(value.uri),
3845            }
3846        }
3847    }
3848    #[derive(Clone, Debug)]
3849    pub struct AgentInterface {
3850        protocol_binding: ::std::result::Result<::std::string::String, ::std::string::String>,
3851        tenant: ::std::result::Result<
3852            ::std::option::Option<::std::string::String>,
3853            ::std::string::String,
3854        >,
3855        url: ::std::result::Result<::std::string::String, ::std::string::String>,
3856    }
3857    impl ::std::default::Default for AgentInterface {
3858        fn default() -> Self {
3859            Self {
3860                protocol_binding: Err("no value supplied for protocol_binding".to_string()),
3861                tenant: Ok(Default::default()),
3862                url: Err("no value supplied for url".to_string()),
3863            }
3864        }
3865    }
3866    impl AgentInterface {
3867        pub fn protocol_binding<T>(mut self, value: T) -> Self
3868        where
3869            T: ::std::convert::TryInto<::std::string::String>,
3870            T::Error: ::std::fmt::Display,
3871        {
3872            self.protocol_binding = value
3873                .try_into()
3874                .map_err(|e| format!("error converting supplied value for protocol_binding: {e}"));
3875            self
3876        }
3877        pub fn tenant<T>(mut self, value: T) -> Self
3878        where
3879            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
3880            T::Error: ::std::fmt::Display,
3881        {
3882            self.tenant = value
3883                .try_into()
3884                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
3885            self
3886        }
3887        pub fn url<T>(mut self, value: T) -> Self
3888        where
3889            T: ::std::convert::TryInto<::std::string::String>,
3890            T::Error: ::std::fmt::Display,
3891        {
3892            self.url = value
3893                .try_into()
3894                .map_err(|e| format!("error converting supplied value for url: {e}"));
3895            self
3896        }
3897    }
3898    impl ::std::convert::TryFrom<AgentInterface> for super::AgentInterface {
3899        type Error = super::error::ConversionError;
3900        fn try_from(
3901            value: AgentInterface,
3902        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3903            Ok(Self {
3904                protocol_binding: value.protocol_binding?,
3905                tenant: value.tenant?,
3906                url: value.url?,
3907            })
3908        }
3909    }
3910    impl ::std::convert::From<super::AgentInterface> for AgentInterface {
3911        fn from(value: super::AgentInterface) -> Self {
3912            Self {
3913                protocol_binding: Ok(value.protocol_binding),
3914                tenant: Ok(value.tenant),
3915                url: Ok(value.url),
3916            }
3917        }
3918    }
3919    #[derive(Clone, Debug)]
3920    pub struct AgentProvider {
3921        organization: ::std::result::Result<::std::string::String, ::std::string::String>,
3922        url: ::std::result::Result<::std::string::String, ::std::string::String>,
3923    }
3924    impl ::std::default::Default for AgentProvider {
3925        fn default() -> Self {
3926            Self {
3927                organization: Err("no value supplied for organization".to_string()),
3928                url: Err("no value supplied for url".to_string()),
3929            }
3930        }
3931    }
3932    impl AgentProvider {
3933        pub fn organization<T>(mut self, value: T) -> Self
3934        where
3935            T: ::std::convert::TryInto<::std::string::String>,
3936            T::Error: ::std::fmt::Display,
3937        {
3938            self.organization = value
3939                .try_into()
3940                .map_err(|e| format!("error converting supplied value for organization: {e}"));
3941            self
3942        }
3943        pub fn url<T>(mut self, value: T) -> Self
3944        where
3945            T: ::std::convert::TryInto<::std::string::String>,
3946            T::Error: ::std::fmt::Display,
3947        {
3948            self.url = value
3949                .try_into()
3950                .map_err(|e| format!("error converting supplied value for url: {e}"));
3951            self
3952        }
3953    }
3954    impl ::std::convert::TryFrom<AgentProvider> for super::AgentProvider {
3955        type Error = super::error::ConversionError;
3956        fn try_from(
3957            value: AgentProvider,
3958        ) -> ::std::result::Result<Self, super::error::ConversionError> {
3959            Ok(Self {
3960                organization: value.organization?,
3961                url: value.url?,
3962            })
3963        }
3964    }
3965    impl ::std::convert::From<super::AgentProvider> for AgentProvider {
3966        fn from(value: super::AgentProvider) -> Self {
3967            Self {
3968                organization: Ok(value.organization),
3969                url: Ok(value.url),
3970            }
3971        }
3972    }
3973    #[derive(Clone, Debug)]
3974    pub struct AgentSkill {
3975        description: ::std::result::Result<::std::string::String, ::std::string::String>,
3976        examples:
3977            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3978        id: ::std::result::Result<::std::string::String, ::std::string::String>,
3979        input_modes:
3980            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3981        name: ::std::result::Result<::std::string::String, ::std::string::String>,
3982        output_modes:
3983            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3984        security: ::std::result::Result<::std::vec::Vec<super::Security>, ::std::string::String>,
3985        tags: ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
3986    }
3987    impl ::std::default::Default for AgentSkill {
3988        fn default() -> Self {
3989            Self {
3990                description: Err("no value supplied for description".to_string()),
3991                examples: Ok(Default::default()),
3992                id: Err("no value supplied for id".to_string()),
3993                input_modes: Ok(Default::default()),
3994                name: Err("no value supplied for name".to_string()),
3995                output_modes: Ok(Default::default()),
3996                security: Ok(Default::default()),
3997                tags: Err("no value supplied for tags".to_string()),
3998            }
3999        }
4000    }
4001    impl AgentSkill {
4002        pub fn description<T>(mut self, value: T) -> Self
4003        where
4004            T: ::std::convert::TryInto<::std::string::String>,
4005            T::Error: ::std::fmt::Display,
4006        {
4007            self.description = value
4008                .try_into()
4009                .map_err(|e| format!("error converting supplied value for description: {e}"));
4010            self
4011        }
4012        pub fn examples<T>(mut self, value: T) -> Self
4013        where
4014            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4015            T::Error: ::std::fmt::Display,
4016        {
4017            self.examples = value
4018                .try_into()
4019                .map_err(|e| format!("error converting supplied value for examples: {e}"));
4020            self
4021        }
4022        pub fn id<T>(mut self, value: T) -> Self
4023        where
4024            T: ::std::convert::TryInto<::std::string::String>,
4025            T::Error: ::std::fmt::Display,
4026        {
4027            self.id = value
4028                .try_into()
4029                .map_err(|e| format!("error converting supplied value for id: {e}"));
4030            self
4031        }
4032        pub fn input_modes<T>(mut self, value: T) -> Self
4033        where
4034            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4035            T::Error: ::std::fmt::Display,
4036        {
4037            self.input_modes = value
4038                .try_into()
4039                .map_err(|e| format!("error converting supplied value for input_modes: {e}"));
4040            self
4041        }
4042        pub fn name<T>(mut self, value: T) -> Self
4043        where
4044            T: ::std::convert::TryInto<::std::string::String>,
4045            T::Error: ::std::fmt::Display,
4046        {
4047            self.name = value
4048                .try_into()
4049                .map_err(|e| format!("error converting supplied value for name: {e}"));
4050            self
4051        }
4052        pub fn output_modes<T>(mut self, value: T) -> Self
4053        where
4054            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4055            T::Error: ::std::fmt::Display,
4056        {
4057            self.output_modes = value
4058                .try_into()
4059                .map_err(|e| format!("error converting supplied value for output_modes: {e}"));
4060            self
4061        }
4062        pub fn security<T>(mut self, value: T) -> Self
4063        where
4064            T: ::std::convert::TryInto<::std::vec::Vec<super::Security>>,
4065            T::Error: ::std::fmt::Display,
4066        {
4067            self.security = value
4068                .try_into()
4069                .map_err(|e| format!("error converting supplied value for security: {e}"));
4070            self
4071        }
4072        pub fn tags<T>(mut self, value: T) -> Self
4073        where
4074            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4075            T::Error: ::std::fmt::Display,
4076        {
4077            self.tags = value
4078                .try_into()
4079                .map_err(|e| format!("error converting supplied value for tags: {e}"));
4080            self
4081        }
4082    }
4083    impl ::std::convert::TryFrom<AgentSkill> for super::AgentSkill {
4084        type Error = super::error::ConversionError;
4085        fn try_from(
4086            value: AgentSkill,
4087        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4088            Ok(Self {
4089                description: value.description?,
4090                examples: value.examples?,
4091                id: value.id?,
4092                input_modes: value.input_modes?,
4093                name: value.name?,
4094                output_modes: value.output_modes?,
4095                security: value.security?,
4096                tags: value.tags?,
4097            })
4098        }
4099    }
4100    impl ::std::convert::From<super::AgentSkill> for AgentSkill {
4101        fn from(value: super::AgentSkill) -> Self {
4102            Self {
4103                description: Ok(value.description),
4104                examples: Ok(value.examples),
4105                id: Ok(value.id),
4106                input_modes: Ok(value.input_modes),
4107                name: Ok(value.name),
4108                output_modes: Ok(value.output_modes),
4109                security: Ok(value.security),
4110                tags: Ok(value.tags),
4111            }
4112        }
4113    }
4114    #[derive(Clone, Debug)]
4115    pub struct ApiKeySecurityScheme {
4116        description: ::std::result::Result<
4117            ::std::option::Option<::std::string::String>,
4118            ::std::string::String,
4119        >,
4120        location: ::std::result::Result<::std::string::String, ::std::string::String>,
4121        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4122    }
4123    impl ::std::default::Default for ApiKeySecurityScheme {
4124        fn default() -> Self {
4125            Self {
4126                description: Ok(Default::default()),
4127                location: Err("no value supplied for location".to_string()),
4128                name: Err("no value supplied for name".to_string()),
4129            }
4130        }
4131    }
4132    impl ApiKeySecurityScheme {
4133        pub fn description<T>(mut self, value: T) -> Self
4134        where
4135            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4136            T::Error: ::std::fmt::Display,
4137        {
4138            self.description = value
4139                .try_into()
4140                .map_err(|e| format!("error converting supplied value for description: {e}"));
4141            self
4142        }
4143        pub fn location<T>(mut self, value: T) -> Self
4144        where
4145            T: ::std::convert::TryInto<::std::string::String>,
4146            T::Error: ::std::fmt::Display,
4147        {
4148            self.location = value
4149                .try_into()
4150                .map_err(|e| format!("error converting supplied value for location: {e}"));
4151            self
4152        }
4153        pub fn name<T>(mut self, value: T) -> Self
4154        where
4155            T: ::std::convert::TryInto<::std::string::String>,
4156            T::Error: ::std::fmt::Display,
4157        {
4158            self.name = value
4159                .try_into()
4160                .map_err(|e| format!("error converting supplied value for name: {e}"));
4161            self
4162        }
4163    }
4164    impl ::std::convert::TryFrom<ApiKeySecurityScheme> for super::ApiKeySecurityScheme {
4165        type Error = super::error::ConversionError;
4166        fn try_from(
4167            value: ApiKeySecurityScheme,
4168        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4169            Ok(Self {
4170                description: value.description?,
4171                location: value.location?,
4172                name: value.name?,
4173            })
4174        }
4175    }
4176    impl ::std::convert::From<super::ApiKeySecurityScheme> for ApiKeySecurityScheme {
4177        fn from(value: super::ApiKeySecurityScheme) -> Self {
4178            Self {
4179                description: Ok(value.description),
4180                location: Ok(value.location),
4181                name: Ok(value.name),
4182            }
4183        }
4184    }
4185    #[derive(Clone, Debug)]
4186    pub struct Artifact {
4187        artifact_id: ::std::result::Result<::std::string::String, ::std::string::String>,
4188        description: ::std::result::Result<
4189            ::std::option::Option<::std::string::String>,
4190            ::std::string::String,
4191        >,
4192        extensions:
4193            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
4194        metadata:
4195            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
4196        name: ::std::result::Result<
4197            ::std::option::Option<::std::string::String>,
4198            ::std::string::String,
4199        >,
4200        parts: ::std::result::Result<::std::vec::Vec<super::Part>, ::std::string::String>,
4201    }
4202    impl ::std::default::Default for Artifact {
4203        fn default() -> Self {
4204            Self {
4205                artifact_id: Err("no value supplied for artifact_id".to_string()),
4206                description: Ok(Default::default()),
4207                extensions: Ok(Default::default()),
4208                metadata: Ok(Default::default()),
4209                name: Ok(Default::default()),
4210                parts: Err("no value supplied for parts".to_string()),
4211            }
4212        }
4213    }
4214    impl Artifact {
4215        pub fn artifact_id<T>(mut self, value: T) -> Self
4216        where
4217            T: ::std::convert::TryInto<::std::string::String>,
4218            T::Error: ::std::fmt::Display,
4219        {
4220            self.artifact_id = value
4221                .try_into()
4222                .map_err(|e| format!("error converting supplied value for artifact_id: {e}"));
4223            self
4224        }
4225        pub fn description<T>(mut self, value: T) -> Self
4226        where
4227            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4228            T::Error: ::std::fmt::Display,
4229        {
4230            self.description = value
4231                .try_into()
4232                .map_err(|e| format!("error converting supplied value for description: {e}"));
4233            self
4234        }
4235        pub fn extensions<T>(mut self, value: T) -> Self
4236        where
4237            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4238            T::Error: ::std::fmt::Display,
4239        {
4240            self.extensions = value
4241                .try_into()
4242                .map_err(|e| format!("error converting supplied value for extensions: {e}"));
4243            self
4244        }
4245        pub fn metadata<T>(mut self, value: T) -> Self
4246        where
4247            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
4248            T::Error: ::std::fmt::Display,
4249        {
4250            self.metadata = value
4251                .try_into()
4252                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
4253            self
4254        }
4255        pub fn name<T>(mut self, value: T) -> Self
4256        where
4257            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4258            T::Error: ::std::fmt::Display,
4259        {
4260            self.name = value
4261                .try_into()
4262                .map_err(|e| format!("error converting supplied value for name: {e}"));
4263            self
4264        }
4265        pub fn parts<T>(mut self, value: T) -> Self
4266        where
4267            T: ::std::convert::TryInto<::std::vec::Vec<super::Part>>,
4268            T::Error: ::std::fmt::Display,
4269        {
4270            self.parts = value
4271                .try_into()
4272                .map_err(|e| format!("error converting supplied value for parts: {e}"));
4273            self
4274        }
4275    }
4276    impl ::std::convert::TryFrom<Artifact> for super::Artifact {
4277        type Error = super::error::ConversionError;
4278        fn try_from(value: Artifact) -> ::std::result::Result<Self, super::error::ConversionError> {
4279            Ok(Self {
4280                artifact_id: value.artifact_id?,
4281                description: value.description?,
4282                extensions: value.extensions?,
4283                metadata: value.metadata?,
4284                name: value.name?,
4285                parts: value.parts?,
4286            })
4287        }
4288    }
4289    impl ::std::convert::From<super::Artifact> for Artifact {
4290        fn from(value: super::Artifact) -> Self {
4291            Self {
4292                artifact_id: Ok(value.artifact_id),
4293                description: Ok(value.description),
4294                extensions: Ok(value.extensions),
4295                metadata: Ok(value.metadata),
4296                name: Ok(value.name),
4297                parts: Ok(value.parts),
4298            }
4299        }
4300    }
4301    #[derive(Clone, Debug)]
4302    pub struct AuthenticationInfo {
4303        credentials: ::std::result::Result<
4304            ::std::option::Option<::std::string::String>,
4305            ::std::string::String,
4306        >,
4307        schemes:
4308            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
4309    }
4310    impl ::std::default::Default for AuthenticationInfo {
4311        fn default() -> Self {
4312            Self {
4313                credentials: Ok(Default::default()),
4314                schemes: Err("no value supplied for schemes".to_string()),
4315            }
4316        }
4317    }
4318    impl AuthenticationInfo {
4319        pub fn credentials<T>(mut self, value: T) -> Self
4320        where
4321            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4322            T::Error: ::std::fmt::Display,
4323        {
4324            self.credentials = value
4325                .try_into()
4326                .map_err(|e| format!("error converting supplied value for credentials: {e}"));
4327            self
4328        }
4329        pub fn schemes<T>(mut self, value: T) -> Self
4330        where
4331            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
4332            T::Error: ::std::fmt::Display,
4333        {
4334            self.schemes = value
4335                .try_into()
4336                .map_err(|e| format!("error converting supplied value for schemes: {e}"));
4337            self
4338        }
4339    }
4340    impl ::std::convert::TryFrom<AuthenticationInfo> for super::AuthenticationInfo {
4341        type Error = super::error::ConversionError;
4342        fn try_from(
4343            value: AuthenticationInfo,
4344        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4345            Ok(Self {
4346                credentials: value.credentials?,
4347                schemes: value.schemes?,
4348            })
4349        }
4350    }
4351    impl ::std::convert::From<super::AuthenticationInfo> for AuthenticationInfo {
4352        fn from(value: super::AuthenticationInfo) -> Self {
4353            Self {
4354                credentials: Ok(value.credentials),
4355                schemes: Ok(value.schemes),
4356            }
4357        }
4358    }
4359    #[derive(Clone, Debug)]
4360    pub struct AuthorizationCodeOAuthFlow {
4361        authorization_url: ::std::result::Result<::std::string::String, ::std::string::String>,
4362        refresh_url: ::std::result::Result<
4363            ::std::option::Option<::std::string::String>,
4364            ::std::string::String,
4365        >,
4366        scopes: ::std::result::Result<
4367            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
4368            ::std::string::String,
4369        >,
4370        token_url: ::std::result::Result<::std::string::String, ::std::string::String>,
4371    }
4372    impl ::std::default::Default for AuthorizationCodeOAuthFlow {
4373        fn default() -> Self {
4374            Self {
4375                authorization_url: Err("no value supplied for authorization_url".to_string()),
4376                refresh_url: Ok(Default::default()),
4377                scopes: Err("no value supplied for scopes".to_string()),
4378                token_url: Err("no value supplied for token_url".to_string()),
4379            }
4380        }
4381    }
4382    impl AuthorizationCodeOAuthFlow {
4383        pub fn authorization_url<T>(mut self, value: T) -> Self
4384        where
4385            T: ::std::convert::TryInto<::std::string::String>,
4386            T::Error: ::std::fmt::Display,
4387        {
4388            self.authorization_url = value
4389                .try_into()
4390                .map_err(|e| format!("error converting supplied value for authorization_url: {e}"));
4391            self
4392        }
4393        pub fn refresh_url<T>(mut self, value: T) -> Self
4394        where
4395            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4396            T::Error: ::std::fmt::Display,
4397        {
4398            self.refresh_url = value
4399                .try_into()
4400                .map_err(|e| format!("error converting supplied value for refresh_url: {e}"));
4401            self
4402        }
4403        pub fn scopes<T>(mut self, value: T) -> Self
4404        where
4405            T: ::std::convert::TryInto<
4406                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
4407                >,
4408            T::Error: ::std::fmt::Display,
4409        {
4410            self.scopes = value
4411                .try_into()
4412                .map_err(|e| format!("error converting supplied value for scopes: {e}"));
4413            self
4414        }
4415        pub fn token_url<T>(mut self, value: T) -> Self
4416        where
4417            T: ::std::convert::TryInto<::std::string::String>,
4418            T::Error: ::std::fmt::Display,
4419        {
4420            self.token_url = value
4421                .try_into()
4422                .map_err(|e| format!("error converting supplied value for token_url: {e}"));
4423            self
4424        }
4425    }
4426    impl ::std::convert::TryFrom<AuthorizationCodeOAuthFlow> for super::AuthorizationCodeOAuthFlow {
4427        type Error = super::error::ConversionError;
4428        fn try_from(
4429            value: AuthorizationCodeOAuthFlow,
4430        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4431            Ok(Self {
4432                authorization_url: value.authorization_url?,
4433                refresh_url: value.refresh_url?,
4434                scopes: value.scopes?,
4435                token_url: value.token_url?,
4436            })
4437        }
4438    }
4439    impl ::std::convert::From<super::AuthorizationCodeOAuthFlow> for AuthorizationCodeOAuthFlow {
4440        fn from(value: super::AuthorizationCodeOAuthFlow) -> Self {
4441            Self {
4442                authorization_url: Ok(value.authorization_url),
4443                refresh_url: Ok(value.refresh_url),
4444                scopes: Ok(value.scopes),
4445                token_url: Ok(value.token_url),
4446            }
4447        }
4448    }
4449    #[derive(Clone, Debug)]
4450    pub struct CancelTaskRequest {
4451        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4452        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
4453    }
4454    impl ::std::default::Default for CancelTaskRequest {
4455        fn default() -> Self {
4456            Self {
4457                name: Err("no value supplied for name".to_string()),
4458                tenant: Err("no value supplied for tenant".to_string()),
4459            }
4460        }
4461    }
4462    impl CancelTaskRequest {
4463        pub fn name<T>(mut self, value: T) -> Self
4464        where
4465            T: ::std::convert::TryInto<::std::string::String>,
4466            T::Error: ::std::fmt::Display,
4467        {
4468            self.name = value
4469                .try_into()
4470                .map_err(|e| format!("error converting supplied value for name: {e}"));
4471            self
4472        }
4473        pub fn tenant<T>(mut self, value: T) -> Self
4474        where
4475            T: ::std::convert::TryInto<::std::string::String>,
4476            T::Error: ::std::fmt::Display,
4477        {
4478            self.tenant = value
4479                .try_into()
4480                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
4481            self
4482        }
4483    }
4484    impl ::std::convert::TryFrom<CancelTaskRequest> for super::CancelTaskRequest {
4485        type Error = super::error::ConversionError;
4486        fn try_from(
4487            value: CancelTaskRequest,
4488        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4489            Ok(Self {
4490                name: value.name?,
4491                tenant: value.tenant?,
4492            })
4493        }
4494    }
4495    impl ::std::convert::From<super::CancelTaskRequest> for CancelTaskRequest {
4496        fn from(value: super::CancelTaskRequest) -> Self {
4497            Self {
4498                name: Ok(value.name),
4499                tenant: Ok(value.tenant),
4500            }
4501        }
4502    }
4503    #[derive(Clone, Debug)]
4504    pub struct ClientCredentialsOAuthFlow {
4505        refresh_url: ::std::result::Result<
4506            ::std::option::Option<::std::string::String>,
4507            ::std::string::String,
4508        >,
4509        scopes: ::std::result::Result<
4510            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
4511            ::std::string::String,
4512        >,
4513        token_url: ::std::result::Result<::std::string::String, ::std::string::String>,
4514    }
4515    impl ::std::default::Default for ClientCredentialsOAuthFlow {
4516        fn default() -> Self {
4517            Self {
4518                refresh_url: Ok(Default::default()),
4519                scopes: Err("no value supplied for scopes".to_string()),
4520                token_url: Err("no value supplied for token_url".to_string()),
4521            }
4522        }
4523    }
4524    impl ClientCredentialsOAuthFlow {
4525        pub fn refresh_url<T>(mut self, value: T) -> Self
4526        where
4527            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4528            T::Error: ::std::fmt::Display,
4529        {
4530            self.refresh_url = value
4531                .try_into()
4532                .map_err(|e| format!("error converting supplied value for refresh_url: {e}"));
4533            self
4534        }
4535        pub fn scopes<T>(mut self, value: T) -> Self
4536        where
4537            T: ::std::convert::TryInto<
4538                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
4539                >,
4540            T::Error: ::std::fmt::Display,
4541        {
4542            self.scopes = value
4543                .try_into()
4544                .map_err(|e| format!("error converting supplied value for scopes: {e}"));
4545            self
4546        }
4547        pub fn token_url<T>(mut self, value: T) -> Self
4548        where
4549            T: ::std::convert::TryInto<::std::string::String>,
4550            T::Error: ::std::fmt::Display,
4551        {
4552            self.token_url = value
4553                .try_into()
4554                .map_err(|e| format!("error converting supplied value for token_url: {e}"));
4555            self
4556        }
4557    }
4558    impl ::std::convert::TryFrom<ClientCredentialsOAuthFlow> for super::ClientCredentialsOAuthFlow {
4559        type Error = super::error::ConversionError;
4560        fn try_from(
4561            value: ClientCredentialsOAuthFlow,
4562        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4563            Ok(Self {
4564                refresh_url: value.refresh_url?,
4565                scopes: value.scopes?,
4566                token_url: value.token_url?,
4567            })
4568        }
4569    }
4570    impl ::std::convert::From<super::ClientCredentialsOAuthFlow> for ClientCredentialsOAuthFlow {
4571        fn from(value: super::ClientCredentialsOAuthFlow) -> Self {
4572            Self {
4573                refresh_url: Ok(value.refresh_url),
4574                scopes: Ok(value.scopes),
4575                token_url: Ok(value.token_url),
4576            }
4577        }
4578    }
4579    #[derive(Clone, Debug)]
4580    pub struct DataPart {
4581        data: ::std::result::Result<super::Struct, ::std::string::String>,
4582    }
4583    impl ::std::default::Default for DataPart {
4584        fn default() -> Self {
4585            Self {
4586                data: Err("no value supplied for data".to_string()),
4587            }
4588        }
4589    }
4590    impl DataPart {
4591        pub fn data<T>(mut self, value: T) -> Self
4592        where
4593            T: ::std::convert::TryInto<super::Struct>,
4594            T::Error: ::std::fmt::Display,
4595        {
4596            self.data = value
4597                .try_into()
4598                .map_err(|e| format!("error converting supplied value for data: {e}"));
4599            self
4600        }
4601    }
4602    impl ::std::convert::TryFrom<DataPart> for super::DataPart {
4603        type Error = super::error::ConversionError;
4604        fn try_from(value: DataPart) -> ::std::result::Result<Self, super::error::ConversionError> {
4605            Ok(Self { data: value.data? })
4606        }
4607    }
4608    impl ::std::convert::From<super::DataPart> for DataPart {
4609        fn from(value: super::DataPart) -> Self {
4610            Self {
4611                data: Ok(value.data),
4612            }
4613        }
4614    }
4615    #[derive(Clone, Debug)]
4616    pub struct DeleteTaskPushNotificationConfigRequest {
4617        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4618        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
4619    }
4620    impl ::std::default::Default for DeleteTaskPushNotificationConfigRequest {
4621        fn default() -> Self {
4622            Self {
4623                name: Err("no value supplied for name".to_string()),
4624                tenant: Err("no value supplied for tenant".to_string()),
4625            }
4626        }
4627    }
4628    impl DeleteTaskPushNotificationConfigRequest {
4629        pub fn name<T>(mut self, value: T) -> Self
4630        where
4631            T: ::std::convert::TryInto<::std::string::String>,
4632            T::Error: ::std::fmt::Display,
4633        {
4634            self.name = value
4635                .try_into()
4636                .map_err(|e| format!("error converting supplied value for name: {e}"));
4637            self
4638        }
4639        pub fn tenant<T>(mut self, value: T) -> Self
4640        where
4641            T: ::std::convert::TryInto<::std::string::String>,
4642            T::Error: ::std::fmt::Display,
4643        {
4644            self.tenant = value
4645                .try_into()
4646                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
4647            self
4648        }
4649    }
4650    impl ::std::convert::TryFrom<DeleteTaskPushNotificationConfigRequest>
4651        for super::DeleteTaskPushNotificationConfigRequest
4652    {
4653        type Error = super::error::ConversionError;
4654        fn try_from(
4655            value: DeleteTaskPushNotificationConfigRequest,
4656        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4657            Ok(Self {
4658                name: value.name?,
4659                tenant: value.tenant?,
4660            })
4661        }
4662    }
4663    impl ::std::convert::From<super::DeleteTaskPushNotificationConfigRequest>
4664        for DeleteTaskPushNotificationConfigRequest
4665    {
4666        fn from(value: super::DeleteTaskPushNotificationConfigRequest) -> Self {
4667            Self {
4668                name: Ok(value.name),
4669                tenant: Ok(value.tenant),
4670            }
4671        }
4672    }
4673    #[derive(Clone, Debug)]
4674    pub struct FilePart {
4675        file_with_bytes: ::std::result::Result<
4676            ::std::option::Option<super::FilePartFileWithBytes>,
4677            ::std::string::String,
4678        >,
4679        file_with_uri: ::std::result::Result<
4680            ::std::option::Option<::std::string::String>,
4681            ::std::string::String,
4682        >,
4683        media_type: ::std::result::Result<::std::string::String, ::std::string::String>,
4684        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4685    }
4686    impl ::std::default::Default for FilePart {
4687        fn default() -> Self {
4688            Self {
4689                file_with_bytes: Ok(Default::default()),
4690                file_with_uri: Ok(Default::default()),
4691                media_type: Err("no value supplied for media_type".to_string()),
4692                name: Err("no value supplied for name".to_string()),
4693            }
4694        }
4695    }
4696    impl FilePart {
4697        pub fn file_with_bytes<T>(mut self, value: T) -> Self
4698        where
4699            T: ::std::convert::TryInto<::std::option::Option<super::FilePartFileWithBytes>>,
4700            T::Error: ::std::fmt::Display,
4701        {
4702            self.file_with_bytes = value
4703                .try_into()
4704                .map_err(|e| format!("error converting supplied value for file_with_bytes: {e}"));
4705            self
4706        }
4707        pub fn file_with_uri<T>(mut self, value: T) -> Self
4708        where
4709            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4710            T::Error: ::std::fmt::Display,
4711        {
4712            self.file_with_uri = value
4713                .try_into()
4714                .map_err(|e| format!("error converting supplied value for file_with_uri: {e}"));
4715            self
4716        }
4717        pub fn media_type<T>(mut self, value: T) -> Self
4718        where
4719            T: ::std::convert::TryInto<::std::string::String>,
4720            T::Error: ::std::fmt::Display,
4721        {
4722            self.media_type = value
4723                .try_into()
4724                .map_err(|e| format!("error converting supplied value for media_type: {e}"));
4725            self
4726        }
4727        pub fn name<T>(mut self, value: T) -> Self
4728        where
4729            T: ::std::convert::TryInto<::std::string::String>,
4730            T::Error: ::std::fmt::Display,
4731        {
4732            self.name = value
4733                .try_into()
4734                .map_err(|e| format!("error converting supplied value for name: {e}"));
4735            self
4736        }
4737    }
4738    impl ::std::convert::TryFrom<FilePart> for super::FilePart {
4739        type Error = super::error::ConversionError;
4740        fn try_from(value: FilePart) -> ::std::result::Result<Self, super::error::ConversionError> {
4741            Ok(Self {
4742                file_with_bytes: value.file_with_bytes?,
4743                file_with_uri: value.file_with_uri?,
4744                media_type: value.media_type?,
4745                name: value.name?,
4746            })
4747        }
4748    }
4749    impl ::std::convert::From<super::FilePart> for FilePart {
4750        fn from(value: super::FilePart) -> Self {
4751            Self {
4752                file_with_bytes: Ok(value.file_with_bytes),
4753                file_with_uri: Ok(value.file_with_uri),
4754                media_type: Ok(value.media_type),
4755                name: Ok(value.name),
4756            }
4757        }
4758    }
4759    #[derive(Clone, Debug)]
4760    pub struct GetExtendedAgentCardRequest {
4761        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
4762    }
4763    impl ::std::default::Default for GetExtendedAgentCardRequest {
4764        fn default() -> Self {
4765            Self {
4766                tenant: Err("no value supplied for tenant".to_string()),
4767            }
4768        }
4769    }
4770    impl GetExtendedAgentCardRequest {
4771        pub fn tenant<T>(mut self, value: T) -> Self
4772        where
4773            T: ::std::convert::TryInto<::std::string::String>,
4774            T::Error: ::std::fmt::Display,
4775        {
4776            self.tenant = value
4777                .try_into()
4778                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
4779            self
4780        }
4781    }
4782    impl ::std::convert::TryFrom<GetExtendedAgentCardRequest> for super::GetExtendedAgentCardRequest {
4783        type Error = super::error::ConversionError;
4784        fn try_from(
4785            value: GetExtendedAgentCardRequest,
4786        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4787            Ok(Self {
4788                tenant: value.tenant?,
4789            })
4790        }
4791    }
4792    impl ::std::convert::From<super::GetExtendedAgentCardRequest> for GetExtendedAgentCardRequest {
4793        fn from(value: super::GetExtendedAgentCardRequest) -> Self {
4794            Self {
4795                tenant: Ok(value.tenant),
4796            }
4797        }
4798    }
4799    #[derive(Clone, Debug)]
4800    pub struct GetTaskPushNotificationConfigRequest {
4801        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4802        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
4803    }
4804    impl ::std::default::Default for GetTaskPushNotificationConfigRequest {
4805        fn default() -> Self {
4806            Self {
4807                name: Err("no value supplied for name".to_string()),
4808                tenant: Err("no value supplied for tenant".to_string()),
4809            }
4810        }
4811    }
4812    impl GetTaskPushNotificationConfigRequest {
4813        pub fn name<T>(mut self, value: T) -> Self
4814        where
4815            T: ::std::convert::TryInto<::std::string::String>,
4816            T::Error: ::std::fmt::Display,
4817        {
4818            self.name = value
4819                .try_into()
4820                .map_err(|e| format!("error converting supplied value for name: {e}"));
4821            self
4822        }
4823        pub fn tenant<T>(mut self, value: T) -> Self
4824        where
4825            T: ::std::convert::TryInto<::std::string::String>,
4826            T::Error: ::std::fmt::Display,
4827        {
4828            self.tenant = value
4829                .try_into()
4830                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
4831            self
4832        }
4833    }
4834    impl ::std::convert::TryFrom<GetTaskPushNotificationConfigRequest>
4835        for super::GetTaskPushNotificationConfigRequest
4836    {
4837        type Error = super::error::ConversionError;
4838        fn try_from(
4839            value: GetTaskPushNotificationConfigRequest,
4840        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4841            Ok(Self {
4842                name: value.name?,
4843                tenant: value.tenant?,
4844            })
4845        }
4846    }
4847    impl ::std::convert::From<super::GetTaskPushNotificationConfigRequest>
4848        for GetTaskPushNotificationConfigRequest
4849    {
4850        fn from(value: super::GetTaskPushNotificationConfigRequest) -> Self {
4851            Self {
4852                name: Ok(value.name),
4853                tenant: Ok(value.tenant),
4854            }
4855        }
4856    }
4857    #[derive(Clone, Debug)]
4858    pub struct GetTaskRequest {
4859        history_length: ::std::result::Result<::std::option::Option<i32>, ::std::string::String>,
4860        name: ::std::result::Result<::std::string::String, ::std::string::String>,
4861        tenant: ::std::result::Result<
4862            ::std::option::Option<::std::string::String>,
4863            ::std::string::String,
4864        >,
4865    }
4866    impl ::std::default::Default for GetTaskRequest {
4867        fn default() -> Self {
4868            Self {
4869                history_length: Ok(Default::default()),
4870                name: Err("no value supplied for name".to_string()),
4871                tenant: Ok(Default::default()),
4872            }
4873        }
4874    }
4875    impl GetTaskRequest {
4876        pub fn history_length<T>(mut self, value: T) -> Self
4877        where
4878            T: ::std::convert::TryInto<::std::option::Option<i32>>,
4879            T::Error: ::std::fmt::Display,
4880        {
4881            self.history_length = value
4882                .try_into()
4883                .map_err(|e| format!("error converting supplied value for history_length: {e}"));
4884            self
4885        }
4886        pub fn name<T>(mut self, value: T) -> Self
4887        where
4888            T: ::std::convert::TryInto<::std::string::String>,
4889            T::Error: ::std::fmt::Display,
4890        {
4891            self.name = value
4892                .try_into()
4893                .map_err(|e| format!("error converting supplied value for name: {e}"));
4894            self
4895        }
4896        pub fn tenant<T>(mut self, value: T) -> Self
4897        where
4898            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4899            T::Error: ::std::fmt::Display,
4900        {
4901            self.tenant = value
4902                .try_into()
4903                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
4904            self
4905        }
4906    }
4907    impl ::std::convert::TryFrom<GetTaskRequest> for super::GetTaskRequest {
4908        type Error = super::error::ConversionError;
4909        fn try_from(
4910            value: GetTaskRequest,
4911        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4912            Ok(Self {
4913                history_length: value.history_length?,
4914                name: value.name?,
4915                tenant: value.tenant?,
4916            })
4917        }
4918    }
4919    impl ::std::convert::From<super::GetTaskRequest> for GetTaskRequest {
4920        fn from(value: super::GetTaskRequest) -> Self {
4921            Self {
4922                history_length: Ok(value.history_length),
4923                name: Ok(value.name),
4924                tenant: Ok(value.tenant),
4925            }
4926        }
4927    }
4928    #[derive(Clone, Debug)]
4929    pub struct HttpAuthSecurityScheme {
4930        bearer_format: ::std::result::Result<
4931            ::std::option::Option<::std::string::String>,
4932            ::std::string::String,
4933        >,
4934        description: ::std::result::Result<
4935            ::std::option::Option<::std::string::String>,
4936            ::std::string::String,
4937        >,
4938        scheme: ::std::result::Result<::std::string::String, ::std::string::String>,
4939    }
4940    impl ::std::default::Default for HttpAuthSecurityScheme {
4941        fn default() -> Self {
4942            Self {
4943                bearer_format: Ok(Default::default()),
4944                description: Ok(Default::default()),
4945                scheme: Err("no value supplied for scheme".to_string()),
4946            }
4947        }
4948    }
4949    impl HttpAuthSecurityScheme {
4950        pub fn bearer_format<T>(mut self, value: T) -> Self
4951        where
4952            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4953            T::Error: ::std::fmt::Display,
4954        {
4955            self.bearer_format = value
4956                .try_into()
4957                .map_err(|e| format!("error converting supplied value for bearer_format: {e}"));
4958            self
4959        }
4960        pub fn description<T>(mut self, value: T) -> Self
4961        where
4962            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
4963            T::Error: ::std::fmt::Display,
4964        {
4965            self.description = value
4966                .try_into()
4967                .map_err(|e| format!("error converting supplied value for description: {e}"));
4968            self
4969        }
4970        pub fn scheme<T>(mut self, value: T) -> Self
4971        where
4972            T: ::std::convert::TryInto<::std::string::String>,
4973            T::Error: ::std::fmt::Display,
4974        {
4975            self.scheme = value
4976                .try_into()
4977                .map_err(|e| format!("error converting supplied value for scheme: {e}"));
4978            self
4979        }
4980    }
4981    impl ::std::convert::TryFrom<HttpAuthSecurityScheme> for super::HttpAuthSecurityScheme {
4982        type Error = super::error::ConversionError;
4983        fn try_from(
4984            value: HttpAuthSecurityScheme,
4985        ) -> ::std::result::Result<Self, super::error::ConversionError> {
4986            Ok(Self {
4987                bearer_format: value.bearer_format?,
4988                description: value.description?,
4989                scheme: value.scheme?,
4990            })
4991        }
4992    }
4993    impl ::std::convert::From<super::HttpAuthSecurityScheme> for HttpAuthSecurityScheme {
4994        fn from(value: super::HttpAuthSecurityScheme) -> Self {
4995            Self {
4996                bearer_format: Ok(value.bearer_format),
4997                description: Ok(value.description),
4998                scheme: Ok(value.scheme),
4999            }
5000        }
5001    }
5002    #[derive(Clone, Debug)]
5003    pub struct ImplicitOAuthFlow {
5004        authorization_url: ::std::result::Result<::std::string::String, ::std::string::String>,
5005        refresh_url: ::std::result::Result<
5006            ::std::option::Option<::std::string::String>,
5007            ::std::string::String,
5008        >,
5009        scopes: ::std::result::Result<
5010            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5011            ::std::string::String,
5012        >,
5013    }
5014    impl ::std::default::Default for ImplicitOAuthFlow {
5015        fn default() -> Self {
5016            Self {
5017                authorization_url: Err("no value supplied for authorization_url".to_string()),
5018                refresh_url: Ok(Default::default()),
5019                scopes: Err("no value supplied for scopes".to_string()),
5020            }
5021        }
5022    }
5023    impl ImplicitOAuthFlow {
5024        pub fn authorization_url<T>(mut self, value: T) -> Self
5025        where
5026            T: ::std::convert::TryInto<::std::string::String>,
5027            T::Error: ::std::fmt::Display,
5028        {
5029            self.authorization_url = value
5030                .try_into()
5031                .map_err(|e| format!("error converting supplied value for authorization_url: {e}"));
5032            self
5033        }
5034        pub fn refresh_url<T>(mut self, value: T) -> Self
5035        where
5036            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5037            T::Error: ::std::fmt::Display,
5038        {
5039            self.refresh_url = value
5040                .try_into()
5041                .map_err(|e| format!("error converting supplied value for refresh_url: {e}"));
5042            self
5043        }
5044        pub fn scopes<T>(mut self, value: T) -> Self
5045        where
5046            T: ::std::convert::TryInto<
5047                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5048                >,
5049            T::Error: ::std::fmt::Display,
5050        {
5051            self.scopes = value
5052                .try_into()
5053                .map_err(|e| format!("error converting supplied value for scopes: {e}"));
5054            self
5055        }
5056    }
5057    impl ::std::convert::TryFrom<ImplicitOAuthFlow> for super::ImplicitOAuthFlow {
5058        type Error = super::error::ConversionError;
5059        fn try_from(
5060            value: ImplicitOAuthFlow,
5061        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5062            Ok(Self {
5063                authorization_url: value.authorization_url?,
5064                refresh_url: value.refresh_url?,
5065                scopes: value.scopes?,
5066            })
5067        }
5068    }
5069    impl ::std::convert::From<super::ImplicitOAuthFlow> for ImplicitOAuthFlow {
5070        fn from(value: super::ImplicitOAuthFlow) -> Self {
5071            Self {
5072                authorization_url: Ok(value.authorization_url),
5073                refresh_url: Ok(value.refresh_url),
5074                scopes: Ok(value.scopes),
5075            }
5076        }
5077    }
5078    #[derive(Clone, Debug)]
5079    pub struct ListTaskPushNotificationConfigRequest {
5080        page_size: ::std::result::Result<i32, ::std::string::String>,
5081        page_token: ::std::result::Result<::std::string::String, ::std::string::String>,
5082        parent: ::std::result::Result<::std::string::String, ::std::string::String>,
5083        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
5084    }
5085    impl ::std::default::Default for ListTaskPushNotificationConfigRequest {
5086        fn default() -> Self {
5087            Self {
5088                page_size: Err("no value supplied for page_size".to_string()),
5089                page_token: Err("no value supplied for page_token".to_string()),
5090                parent: Err("no value supplied for parent".to_string()),
5091                tenant: Err("no value supplied for tenant".to_string()),
5092            }
5093        }
5094    }
5095    impl ListTaskPushNotificationConfigRequest {
5096        pub fn page_size<T>(mut self, value: T) -> Self
5097        where
5098            T: ::std::convert::TryInto<i32>,
5099            T::Error: ::std::fmt::Display,
5100        {
5101            self.page_size = value
5102                .try_into()
5103                .map_err(|e| format!("error converting supplied value for page_size: {e}"));
5104            self
5105        }
5106        pub fn page_token<T>(mut self, value: T) -> Self
5107        where
5108            T: ::std::convert::TryInto<::std::string::String>,
5109            T::Error: ::std::fmt::Display,
5110        {
5111            self.page_token = value
5112                .try_into()
5113                .map_err(|e| format!("error converting supplied value for page_token: {e}"));
5114            self
5115        }
5116        pub fn parent<T>(mut self, value: T) -> Self
5117        where
5118            T: ::std::convert::TryInto<::std::string::String>,
5119            T::Error: ::std::fmt::Display,
5120        {
5121            self.parent = value
5122                .try_into()
5123                .map_err(|e| format!("error converting supplied value for parent: {e}"));
5124            self
5125        }
5126        pub fn tenant<T>(mut self, value: T) -> Self
5127        where
5128            T: ::std::convert::TryInto<::std::string::String>,
5129            T::Error: ::std::fmt::Display,
5130        {
5131            self.tenant = value
5132                .try_into()
5133                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
5134            self
5135        }
5136    }
5137    impl ::std::convert::TryFrom<ListTaskPushNotificationConfigRequest>
5138        for super::ListTaskPushNotificationConfigRequest
5139    {
5140        type Error = super::error::ConversionError;
5141        fn try_from(
5142            value: ListTaskPushNotificationConfigRequest,
5143        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5144            Ok(Self {
5145                page_size: value.page_size?,
5146                page_token: value.page_token?,
5147                parent: value.parent?,
5148                tenant: value.tenant?,
5149            })
5150        }
5151    }
5152    impl ::std::convert::From<super::ListTaskPushNotificationConfigRequest>
5153        for ListTaskPushNotificationConfigRequest
5154    {
5155        fn from(value: super::ListTaskPushNotificationConfigRequest) -> Self {
5156            Self {
5157                page_size: Ok(value.page_size),
5158                page_token: Ok(value.page_token),
5159                parent: Ok(value.parent),
5160                tenant: Ok(value.tenant),
5161            }
5162        }
5163    }
5164    #[derive(Clone, Debug)]
5165    pub struct ListTaskPushNotificationConfigResponse {
5166        configs: ::std::result::Result<
5167            ::std::vec::Vec<super::TaskPushNotificationConfig>,
5168            ::std::string::String,
5169        >,
5170        next_page_token: ::std::result::Result<::std::string::String, ::std::string::String>,
5171    }
5172    impl ::std::default::Default for ListTaskPushNotificationConfigResponse {
5173        fn default() -> Self {
5174            Self {
5175                configs: Ok(Default::default()),
5176                next_page_token: Err("no value supplied for next_page_token".to_string()),
5177            }
5178        }
5179    }
5180    impl ListTaskPushNotificationConfigResponse {
5181        pub fn configs<T>(mut self, value: T) -> Self
5182        where
5183            T: ::std::convert::TryInto<::std::vec::Vec<super::TaskPushNotificationConfig>>,
5184            T::Error: ::std::fmt::Display,
5185        {
5186            self.configs = value
5187                .try_into()
5188                .map_err(|e| format!("error converting supplied value for configs: {e}"));
5189            self
5190        }
5191        pub fn next_page_token<T>(mut self, value: T) -> Self
5192        where
5193            T: ::std::convert::TryInto<::std::string::String>,
5194            T::Error: ::std::fmt::Display,
5195        {
5196            self.next_page_token = value
5197                .try_into()
5198                .map_err(|e| format!("error converting supplied value for next_page_token: {e}"));
5199            self
5200        }
5201    }
5202    impl ::std::convert::TryFrom<ListTaskPushNotificationConfigResponse>
5203        for super::ListTaskPushNotificationConfigResponse
5204    {
5205        type Error = super::error::ConversionError;
5206        fn try_from(
5207            value: ListTaskPushNotificationConfigResponse,
5208        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5209            Ok(Self {
5210                configs: value.configs?,
5211                next_page_token: value.next_page_token?,
5212            })
5213        }
5214    }
5215    impl ::std::convert::From<super::ListTaskPushNotificationConfigResponse>
5216        for ListTaskPushNotificationConfigResponse
5217    {
5218        fn from(value: super::ListTaskPushNotificationConfigResponse) -> Self {
5219            Self {
5220                configs: Ok(value.configs),
5221                next_page_token: Ok(value.next_page_token),
5222            }
5223        }
5224    }
5225    #[derive(Clone, Debug)]
5226    pub struct ListTasksRequest {
5227        context_id: ::std::result::Result<::std::string::String, ::std::string::String>,
5228        history_length: ::std::result::Result<::std::option::Option<i32>, ::std::string::String>,
5229        include_artifacts:
5230            ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
5231        last_updated_after: ::std::result::Result<i64, ::std::string::String>,
5232        page_size: ::std::result::Result<::std::option::Option<i32>, ::std::string::String>,
5233        page_token: ::std::result::Result<::std::string::String, ::std::string::String>,
5234        status: ::std::result::Result<super::TaskState, ::std::string::String>,
5235        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
5236    }
5237    impl ::std::default::Default for ListTasksRequest {
5238        fn default() -> Self {
5239            Self {
5240                context_id: Err("no value supplied for context_id".to_string()),
5241                history_length: Ok(Default::default()),
5242                include_artifacts: Ok(Default::default()),
5243                last_updated_after: Err("no value supplied for last_updated_after".to_string()),
5244                page_size: Ok(Default::default()),
5245                page_token: Err("no value supplied for page_token".to_string()),
5246                status: Err("no value supplied for status".to_string()),
5247                tenant: Err("no value supplied for tenant".to_string()),
5248            }
5249        }
5250    }
5251    impl ListTasksRequest {
5252        pub fn context_id<T>(mut self, value: T) -> Self
5253        where
5254            T: ::std::convert::TryInto<::std::string::String>,
5255            T::Error: ::std::fmt::Display,
5256        {
5257            self.context_id = value
5258                .try_into()
5259                .map_err(|e| format!("error converting supplied value for context_id: {e}"));
5260            self
5261        }
5262        pub fn history_length<T>(mut self, value: T) -> Self
5263        where
5264            T: ::std::convert::TryInto<::std::option::Option<i32>>,
5265            T::Error: ::std::fmt::Display,
5266        {
5267            self.history_length = value
5268                .try_into()
5269                .map_err(|e| format!("error converting supplied value for history_length: {e}"));
5270            self
5271        }
5272        pub fn include_artifacts<T>(mut self, value: T) -> Self
5273        where
5274            T: ::std::convert::TryInto<::std::option::Option<bool>>,
5275            T::Error: ::std::fmt::Display,
5276        {
5277            self.include_artifacts = value
5278                .try_into()
5279                .map_err(|e| format!("error converting supplied value for include_artifacts: {e}"));
5280            self
5281        }
5282        pub fn last_updated_after<T>(mut self, value: T) -> Self
5283        where
5284            T: ::std::convert::TryInto<i64>,
5285            T::Error: ::std::fmt::Display,
5286        {
5287            self.last_updated_after = value.try_into().map_err(|e| {
5288                format!("error converting supplied value for last_updated_after: {e}")
5289            });
5290            self
5291        }
5292        pub fn page_size<T>(mut self, value: T) -> Self
5293        where
5294            T: ::std::convert::TryInto<::std::option::Option<i32>>,
5295            T::Error: ::std::fmt::Display,
5296        {
5297            self.page_size = value
5298                .try_into()
5299                .map_err(|e| format!("error converting supplied value for page_size: {e}"));
5300            self
5301        }
5302        pub fn page_token<T>(mut self, value: T) -> Self
5303        where
5304            T: ::std::convert::TryInto<::std::string::String>,
5305            T::Error: ::std::fmt::Display,
5306        {
5307            self.page_token = value
5308                .try_into()
5309                .map_err(|e| format!("error converting supplied value for page_token: {e}"));
5310            self
5311        }
5312        pub fn status<T>(mut self, value: T) -> Self
5313        where
5314            T: ::std::convert::TryInto<super::TaskState>,
5315            T::Error: ::std::fmt::Display,
5316        {
5317            self.status = value
5318                .try_into()
5319                .map_err(|e| format!("error converting supplied value for status: {e}"));
5320            self
5321        }
5322        pub fn tenant<T>(mut self, value: T) -> Self
5323        where
5324            T: ::std::convert::TryInto<::std::string::String>,
5325            T::Error: ::std::fmt::Display,
5326        {
5327            self.tenant = value
5328                .try_into()
5329                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
5330            self
5331        }
5332    }
5333    impl ::std::convert::TryFrom<ListTasksRequest> for super::ListTasksRequest {
5334        type Error = super::error::ConversionError;
5335        fn try_from(
5336            value: ListTasksRequest,
5337        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5338            Ok(Self {
5339                context_id: value.context_id?,
5340                history_length: value.history_length?,
5341                include_artifacts: value.include_artifacts?,
5342                last_updated_after: value.last_updated_after?,
5343                page_size: value.page_size?,
5344                page_token: value.page_token?,
5345                status: value.status?,
5346                tenant: value.tenant?,
5347            })
5348        }
5349    }
5350    impl ::std::convert::From<super::ListTasksRequest> for ListTasksRequest {
5351        fn from(value: super::ListTasksRequest) -> Self {
5352            Self {
5353                context_id: Ok(value.context_id),
5354                history_length: Ok(value.history_length),
5355                include_artifacts: Ok(value.include_artifacts),
5356                last_updated_after: Ok(value.last_updated_after),
5357                page_size: Ok(value.page_size),
5358                page_token: Ok(value.page_token),
5359                status: Ok(value.status),
5360                tenant: Ok(value.tenant),
5361            }
5362        }
5363    }
5364    #[derive(Clone, Debug)]
5365    pub struct ListTasksResponse {
5366        next_page_token: ::std::result::Result<::std::string::String, ::std::string::String>,
5367        page_size: ::std::result::Result<i32, ::std::string::String>,
5368        tasks: ::std::result::Result<::std::vec::Vec<super::Task>, ::std::string::String>,
5369        total_size: ::std::result::Result<i32, ::std::string::String>,
5370    }
5371    impl ::std::default::Default for ListTasksResponse {
5372        fn default() -> Self {
5373            Self {
5374                next_page_token: Err("no value supplied for next_page_token".to_string()),
5375                page_size: Err("no value supplied for page_size".to_string()),
5376                tasks: Err("no value supplied for tasks".to_string()),
5377                total_size: Err("no value supplied for total_size".to_string()),
5378            }
5379        }
5380    }
5381    impl ListTasksResponse {
5382        pub fn next_page_token<T>(mut self, value: T) -> Self
5383        where
5384            T: ::std::convert::TryInto<::std::string::String>,
5385            T::Error: ::std::fmt::Display,
5386        {
5387            self.next_page_token = value
5388                .try_into()
5389                .map_err(|e| format!("error converting supplied value for next_page_token: {e}"));
5390            self
5391        }
5392        pub fn page_size<T>(mut self, value: T) -> Self
5393        where
5394            T: ::std::convert::TryInto<i32>,
5395            T::Error: ::std::fmt::Display,
5396        {
5397            self.page_size = value
5398                .try_into()
5399                .map_err(|e| format!("error converting supplied value for page_size: {e}"));
5400            self
5401        }
5402        pub fn tasks<T>(mut self, value: T) -> Self
5403        where
5404            T: ::std::convert::TryInto<::std::vec::Vec<super::Task>>,
5405            T::Error: ::std::fmt::Display,
5406        {
5407            self.tasks = value
5408                .try_into()
5409                .map_err(|e| format!("error converting supplied value for tasks: {e}"));
5410            self
5411        }
5412        pub fn total_size<T>(mut self, value: T) -> Self
5413        where
5414            T: ::std::convert::TryInto<i32>,
5415            T::Error: ::std::fmt::Display,
5416        {
5417            self.total_size = value
5418                .try_into()
5419                .map_err(|e| format!("error converting supplied value for total_size: {e}"));
5420            self
5421        }
5422    }
5423    impl ::std::convert::TryFrom<ListTasksResponse> for super::ListTasksResponse {
5424        type Error = super::error::ConversionError;
5425        fn try_from(
5426            value: ListTasksResponse,
5427        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5428            Ok(Self {
5429                next_page_token: value.next_page_token?,
5430                page_size: value.page_size?,
5431                tasks: value.tasks?,
5432                total_size: value.total_size?,
5433            })
5434        }
5435    }
5436    impl ::std::convert::From<super::ListTasksResponse> for ListTasksResponse {
5437        fn from(value: super::ListTasksResponse) -> Self {
5438            Self {
5439                next_page_token: Ok(value.next_page_token),
5440                page_size: Ok(value.page_size),
5441                tasks: Ok(value.tasks),
5442                total_size: Ok(value.total_size),
5443            }
5444        }
5445    }
5446    #[derive(Clone, Debug)]
5447    pub struct Message {
5448        context_id: ::std::result::Result<
5449            ::std::option::Option<::std::string::String>,
5450            ::std::string::String,
5451        >,
5452        extensions:
5453            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
5454        message_id: ::std::result::Result<::std::string::String, ::std::string::String>,
5455        metadata:
5456            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
5457        parts: ::std::result::Result<::std::vec::Vec<super::Part>, ::std::string::String>,
5458        reference_task_ids:
5459            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
5460        role: ::std::result::Result<super::Role, ::std::string::String>,
5461        task_id: ::std::result::Result<
5462            ::std::option::Option<::std::string::String>,
5463            ::std::string::String,
5464        >,
5465    }
5466    impl ::std::default::Default for Message {
5467        fn default() -> Self {
5468            Self {
5469                context_id: Ok(Default::default()),
5470                extensions: Ok(Default::default()),
5471                message_id: Err("no value supplied for message_id".to_string()),
5472                metadata: Ok(Default::default()),
5473                parts: Err("no value supplied for parts".to_string()),
5474                reference_task_ids: Ok(Default::default()),
5475                role: Err("no value supplied for role".to_string()),
5476                task_id: Ok(Default::default()),
5477            }
5478        }
5479    }
5480    impl Message {
5481        pub fn context_id<T>(mut self, value: T) -> Self
5482        where
5483            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5484            T::Error: ::std::fmt::Display,
5485        {
5486            self.context_id = value
5487                .try_into()
5488                .map_err(|e| format!("error converting supplied value for context_id: {e}"));
5489            self
5490        }
5491        pub fn extensions<T>(mut self, value: T) -> Self
5492        where
5493            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
5494            T::Error: ::std::fmt::Display,
5495        {
5496            self.extensions = value
5497                .try_into()
5498                .map_err(|e| format!("error converting supplied value for extensions: {e}"));
5499            self
5500        }
5501        pub fn message_id<T>(mut self, value: T) -> Self
5502        where
5503            T: ::std::convert::TryInto<::std::string::String>,
5504            T::Error: ::std::fmt::Display,
5505        {
5506            self.message_id = value
5507                .try_into()
5508                .map_err(|e| format!("error converting supplied value for message_id: {e}"));
5509            self
5510        }
5511        pub fn metadata<T>(mut self, value: T) -> Self
5512        where
5513            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
5514            T::Error: ::std::fmt::Display,
5515        {
5516            self.metadata = value
5517                .try_into()
5518                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
5519            self
5520        }
5521        pub fn parts<T>(mut self, value: T) -> Self
5522        where
5523            T: ::std::convert::TryInto<::std::vec::Vec<super::Part>>,
5524            T::Error: ::std::fmt::Display,
5525        {
5526            self.parts = value
5527                .try_into()
5528                .map_err(|e| format!("error converting supplied value for parts: {e}"));
5529            self
5530        }
5531        pub fn reference_task_ids<T>(mut self, value: T) -> Self
5532        where
5533            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
5534            T::Error: ::std::fmt::Display,
5535        {
5536            self.reference_task_ids = value.try_into().map_err(|e| {
5537                format!("error converting supplied value for reference_task_ids: {e}")
5538            });
5539            self
5540        }
5541        pub fn role<T>(mut self, value: T) -> Self
5542        where
5543            T: ::std::convert::TryInto<super::Role>,
5544            T::Error: ::std::fmt::Display,
5545        {
5546            self.role = value
5547                .try_into()
5548                .map_err(|e| format!("error converting supplied value for role: {e}"));
5549            self
5550        }
5551        pub fn task_id<T>(mut self, value: T) -> Self
5552        where
5553            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5554            T::Error: ::std::fmt::Display,
5555        {
5556            self.task_id = value
5557                .try_into()
5558                .map_err(|e| format!("error converting supplied value for task_id: {e}"));
5559            self
5560        }
5561    }
5562    impl ::std::convert::TryFrom<Message> for super::Message {
5563        type Error = super::error::ConversionError;
5564        fn try_from(value: Message) -> ::std::result::Result<Self, super::error::ConversionError> {
5565            Ok(Self {
5566                context_id: value.context_id?,
5567                extensions: value.extensions?,
5568                message_id: value.message_id?,
5569                metadata: value.metadata?,
5570                parts: value.parts?,
5571                reference_task_ids: value.reference_task_ids?,
5572                role: value.role?,
5573                task_id: value.task_id?,
5574            })
5575        }
5576    }
5577    impl ::std::convert::From<super::Message> for Message {
5578        fn from(value: super::Message) -> Self {
5579            Self {
5580                context_id: Ok(value.context_id),
5581                extensions: Ok(value.extensions),
5582                message_id: Ok(value.message_id),
5583                metadata: Ok(value.metadata),
5584                parts: Ok(value.parts),
5585                reference_task_ids: Ok(value.reference_task_ids),
5586                role: Ok(value.role),
5587                task_id: Ok(value.task_id),
5588            }
5589        }
5590    }
5591    #[derive(Clone, Debug)]
5592    pub struct MutualTlsSecurityScheme {
5593        description: ::std::result::Result<::std::string::String, ::std::string::String>,
5594    }
5595    impl ::std::default::Default for MutualTlsSecurityScheme {
5596        fn default() -> Self {
5597            Self {
5598                description: Err("no value supplied for description".to_string()),
5599            }
5600        }
5601    }
5602    impl MutualTlsSecurityScheme {
5603        pub fn description<T>(mut self, value: T) -> Self
5604        where
5605            T: ::std::convert::TryInto<::std::string::String>,
5606            T::Error: ::std::fmt::Display,
5607        {
5608            self.description = value
5609                .try_into()
5610                .map_err(|e| format!("error converting supplied value for description: {e}"));
5611            self
5612        }
5613    }
5614    impl ::std::convert::TryFrom<MutualTlsSecurityScheme> for super::MutualTlsSecurityScheme {
5615        type Error = super::error::ConversionError;
5616        fn try_from(
5617            value: MutualTlsSecurityScheme,
5618        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5619            Ok(Self {
5620                description: value.description?,
5621            })
5622        }
5623    }
5624    impl ::std::convert::From<super::MutualTlsSecurityScheme> for MutualTlsSecurityScheme {
5625        fn from(value: super::MutualTlsSecurityScheme) -> Self {
5626            Self {
5627                description: Ok(value.description),
5628            }
5629        }
5630    }
5631    #[derive(Clone, Debug)]
5632    pub struct OAuth2SecurityScheme {
5633        description: ::std::result::Result<
5634            ::std::option::Option<::std::string::String>,
5635            ::std::string::String,
5636        >,
5637        flows: ::std::result::Result<super::OAuthFlows, ::std::string::String>,
5638        oauth2_metadata_url: ::std::result::Result<
5639            ::std::option::Option<::std::string::String>,
5640            ::std::string::String,
5641        >,
5642    }
5643    impl ::std::default::Default for OAuth2SecurityScheme {
5644        fn default() -> Self {
5645            Self {
5646                description: Ok(Default::default()),
5647                flows: Err("no value supplied for flows".to_string()),
5648                oauth2_metadata_url: Ok(Default::default()),
5649            }
5650        }
5651    }
5652    impl OAuth2SecurityScheme {
5653        pub fn description<T>(mut self, value: T) -> Self
5654        where
5655            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5656            T::Error: ::std::fmt::Display,
5657        {
5658            self.description = value
5659                .try_into()
5660                .map_err(|e| format!("error converting supplied value for description: {e}"));
5661            self
5662        }
5663        pub fn flows<T>(mut self, value: T) -> Self
5664        where
5665            T: ::std::convert::TryInto<super::OAuthFlows>,
5666            T::Error: ::std::fmt::Display,
5667        {
5668            self.flows = value
5669                .try_into()
5670                .map_err(|e| format!("error converting supplied value for flows: {e}"));
5671            self
5672        }
5673        pub fn oauth2_metadata_url<T>(mut self, value: T) -> Self
5674        where
5675            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5676            T::Error: ::std::fmt::Display,
5677        {
5678            self.oauth2_metadata_url = value.try_into().map_err(|e| {
5679                format!("error converting supplied value for oauth2_metadata_url: {e}")
5680            });
5681            self
5682        }
5683    }
5684    impl ::std::convert::TryFrom<OAuth2SecurityScheme> for super::OAuth2SecurityScheme {
5685        type Error = super::error::ConversionError;
5686        fn try_from(
5687            value: OAuth2SecurityScheme,
5688        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5689            Ok(Self {
5690                description: value.description?,
5691                flows: value.flows?,
5692                oauth2_metadata_url: value.oauth2_metadata_url?,
5693            })
5694        }
5695    }
5696    impl ::std::convert::From<super::OAuth2SecurityScheme> for OAuth2SecurityScheme {
5697        fn from(value: super::OAuth2SecurityScheme) -> Self {
5698            Self {
5699                description: Ok(value.description),
5700                flows: Ok(value.flows),
5701                oauth2_metadata_url: Ok(value.oauth2_metadata_url),
5702            }
5703        }
5704    }
5705    #[derive(Clone, Debug)]
5706    pub struct OAuthFlows {
5707        authorization_code: ::std::result::Result<
5708            ::std::option::Option<super::AuthorizationCodeOAuthFlow>,
5709            ::std::string::String,
5710        >,
5711        client_credentials: ::std::result::Result<
5712            ::std::option::Option<super::ClientCredentialsOAuthFlow>,
5713            ::std::string::String,
5714        >,
5715        implicit: ::std::result::Result<
5716            ::std::option::Option<super::ImplicitOAuthFlow>,
5717            ::std::string::String,
5718        >,
5719        password: ::std::result::Result<
5720            ::std::option::Option<super::PasswordOAuthFlow>,
5721            ::std::string::String,
5722        >,
5723    }
5724    impl ::std::default::Default for OAuthFlows {
5725        fn default() -> Self {
5726            Self {
5727                authorization_code: Ok(Default::default()),
5728                client_credentials: Ok(Default::default()),
5729                implicit: Ok(Default::default()),
5730                password: Ok(Default::default()),
5731            }
5732        }
5733    }
5734    impl OAuthFlows {
5735        pub fn authorization_code<T>(mut self, value: T) -> Self
5736        where
5737            T: ::std::convert::TryInto<::std::option::Option<super::AuthorizationCodeOAuthFlow>>,
5738            T::Error: ::std::fmt::Display,
5739        {
5740            self.authorization_code = value.try_into().map_err(|e| {
5741                format!("error converting supplied value for authorization_code: {e}")
5742            });
5743            self
5744        }
5745        pub fn client_credentials<T>(mut self, value: T) -> Self
5746        where
5747            T: ::std::convert::TryInto<::std::option::Option<super::ClientCredentialsOAuthFlow>>,
5748            T::Error: ::std::fmt::Display,
5749        {
5750            self.client_credentials = value.try_into().map_err(|e| {
5751                format!("error converting supplied value for client_credentials: {e}")
5752            });
5753            self
5754        }
5755        pub fn implicit<T>(mut self, value: T) -> Self
5756        where
5757            T: ::std::convert::TryInto<::std::option::Option<super::ImplicitOAuthFlow>>,
5758            T::Error: ::std::fmt::Display,
5759        {
5760            self.implicit = value
5761                .try_into()
5762                .map_err(|e| format!("error converting supplied value for implicit: {e}"));
5763            self
5764        }
5765        pub fn password<T>(mut self, value: T) -> Self
5766        where
5767            T: ::std::convert::TryInto<::std::option::Option<super::PasswordOAuthFlow>>,
5768            T::Error: ::std::fmt::Display,
5769        {
5770            self.password = value
5771                .try_into()
5772                .map_err(|e| format!("error converting supplied value for password: {e}"));
5773            self
5774        }
5775    }
5776    impl ::std::convert::TryFrom<OAuthFlows> for super::OAuthFlows {
5777        type Error = super::error::ConversionError;
5778        fn try_from(
5779            value: OAuthFlows,
5780        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5781            Ok(Self {
5782                authorization_code: value.authorization_code?,
5783                client_credentials: value.client_credentials?,
5784                implicit: value.implicit?,
5785                password: value.password?,
5786            })
5787        }
5788    }
5789    impl ::std::convert::From<super::OAuthFlows> for OAuthFlows {
5790        fn from(value: super::OAuthFlows) -> Self {
5791            Self {
5792                authorization_code: Ok(value.authorization_code),
5793                client_credentials: Ok(value.client_credentials),
5794                implicit: Ok(value.implicit),
5795                password: Ok(value.password),
5796            }
5797        }
5798    }
5799    #[derive(Clone, Debug)]
5800    pub struct OpenIdConnectSecurityScheme {
5801        description: ::std::result::Result<
5802            ::std::option::Option<::std::string::String>,
5803            ::std::string::String,
5804        >,
5805        open_id_connect_url: ::std::result::Result<::std::string::String, ::std::string::String>,
5806    }
5807    impl ::std::default::Default for OpenIdConnectSecurityScheme {
5808        fn default() -> Self {
5809            Self {
5810                description: Ok(Default::default()),
5811                open_id_connect_url: Err("no value supplied for open_id_connect_url".to_string()),
5812            }
5813        }
5814    }
5815    impl OpenIdConnectSecurityScheme {
5816        pub fn description<T>(mut self, value: T) -> Self
5817        where
5818            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5819            T::Error: ::std::fmt::Display,
5820        {
5821            self.description = value
5822                .try_into()
5823                .map_err(|e| format!("error converting supplied value for description: {e}"));
5824            self
5825        }
5826        pub fn open_id_connect_url<T>(mut self, value: T) -> Self
5827        where
5828            T: ::std::convert::TryInto<::std::string::String>,
5829            T::Error: ::std::fmt::Display,
5830        {
5831            self.open_id_connect_url = value.try_into().map_err(|e| {
5832                format!("error converting supplied value for open_id_connect_url: {e}")
5833            });
5834            self
5835        }
5836    }
5837    impl ::std::convert::TryFrom<OpenIdConnectSecurityScheme> for super::OpenIdConnectSecurityScheme {
5838        type Error = super::error::ConversionError;
5839        fn try_from(
5840            value: OpenIdConnectSecurityScheme,
5841        ) -> ::std::result::Result<Self, super::error::ConversionError> {
5842            Ok(Self {
5843                description: value.description?,
5844                open_id_connect_url: value.open_id_connect_url?,
5845            })
5846        }
5847    }
5848    impl ::std::convert::From<super::OpenIdConnectSecurityScheme> for OpenIdConnectSecurityScheme {
5849        fn from(value: super::OpenIdConnectSecurityScheme) -> Self {
5850            Self {
5851                description: Ok(value.description),
5852                open_id_connect_url: Ok(value.open_id_connect_url),
5853            }
5854        }
5855    }
5856    #[derive(Clone, Debug)]
5857    pub struct Part {
5858        data: ::std::result::Result<::std::option::Option<super::DataPart>, ::std::string::String>,
5859        file: ::std::result::Result<::std::option::Option<super::FilePart>, ::std::string::String>,
5860        metadata:
5861            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
5862        text: ::std::result::Result<
5863            ::std::option::Option<::std::string::String>,
5864            ::std::string::String,
5865        >,
5866    }
5867    impl ::std::default::Default for Part {
5868        fn default() -> Self {
5869            Self {
5870                data: Ok(Default::default()),
5871                file: Ok(Default::default()),
5872                metadata: Ok(Default::default()),
5873                text: Ok(Default::default()),
5874            }
5875        }
5876    }
5877    impl Part {
5878        pub fn data<T>(mut self, value: T) -> Self
5879        where
5880            T: ::std::convert::TryInto<::std::option::Option<super::DataPart>>,
5881            T::Error: ::std::fmt::Display,
5882        {
5883            self.data = value
5884                .try_into()
5885                .map_err(|e| format!("error converting supplied value for data: {e}"));
5886            self
5887        }
5888        pub fn file<T>(mut self, value: T) -> Self
5889        where
5890            T: ::std::convert::TryInto<::std::option::Option<super::FilePart>>,
5891            T::Error: ::std::fmt::Display,
5892        {
5893            self.file = value
5894                .try_into()
5895                .map_err(|e| format!("error converting supplied value for file: {e}"));
5896            self
5897        }
5898        pub fn metadata<T>(mut self, value: T) -> Self
5899        where
5900            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
5901            T::Error: ::std::fmt::Display,
5902        {
5903            self.metadata = value
5904                .try_into()
5905                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
5906            self
5907        }
5908        pub fn text<T>(mut self, value: T) -> Self
5909        where
5910            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5911            T::Error: ::std::fmt::Display,
5912        {
5913            self.text = value
5914                .try_into()
5915                .map_err(|e| format!("error converting supplied value for text: {e}"));
5916            self
5917        }
5918    }
5919    impl ::std::convert::TryFrom<Part> for super::Part {
5920        type Error = super::error::ConversionError;
5921        fn try_from(value: Part) -> ::std::result::Result<Self, super::error::ConversionError> {
5922            Ok(Self {
5923                data: value.data?,
5924                file: value.file?,
5925                metadata: value.metadata?,
5926                text: value.text?,
5927            })
5928        }
5929    }
5930    impl ::std::convert::From<super::Part> for Part {
5931        fn from(value: super::Part) -> Self {
5932            Self {
5933                data: Ok(value.data),
5934                file: Ok(value.file),
5935                metadata: Ok(value.metadata),
5936                text: Ok(value.text),
5937            }
5938        }
5939    }
5940    #[derive(Clone, Debug)]
5941    pub struct PasswordOAuthFlow {
5942        refresh_url: ::std::result::Result<
5943            ::std::option::Option<::std::string::String>,
5944            ::std::string::String,
5945        >,
5946        scopes: ::std::result::Result<
5947            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5948            ::std::string::String,
5949        >,
5950        token_url: ::std::result::Result<::std::string::String, ::std::string::String>,
5951    }
5952    impl ::std::default::Default for PasswordOAuthFlow {
5953        fn default() -> Self {
5954            Self {
5955                refresh_url: Ok(Default::default()),
5956                scopes: Err("no value supplied for scopes".to_string()),
5957                token_url: Err("no value supplied for token_url".to_string()),
5958            }
5959        }
5960    }
5961    impl PasswordOAuthFlow {
5962        pub fn refresh_url<T>(mut self, value: T) -> Self
5963        where
5964            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
5965            T::Error: ::std::fmt::Display,
5966        {
5967            self.refresh_url = value
5968                .try_into()
5969                .map_err(|e| format!("error converting supplied value for refresh_url: {e}"));
5970            self
5971        }
5972        pub fn scopes<T>(mut self, value: T) -> Self
5973        where
5974            T: ::std::convert::TryInto<
5975                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5976                >,
5977            T::Error: ::std::fmt::Display,
5978        {
5979            self.scopes = value
5980                .try_into()
5981                .map_err(|e| format!("error converting supplied value for scopes: {e}"));
5982            self
5983        }
5984        pub fn token_url<T>(mut self, value: T) -> Self
5985        where
5986            T: ::std::convert::TryInto<::std::string::String>,
5987            T::Error: ::std::fmt::Display,
5988        {
5989            self.token_url = value
5990                .try_into()
5991                .map_err(|e| format!("error converting supplied value for token_url: {e}"));
5992            self
5993        }
5994    }
5995    impl ::std::convert::TryFrom<PasswordOAuthFlow> for super::PasswordOAuthFlow {
5996        type Error = super::error::ConversionError;
5997        fn try_from(
5998            value: PasswordOAuthFlow,
5999        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6000            Ok(Self {
6001                refresh_url: value.refresh_url?,
6002                scopes: value.scopes?,
6003                token_url: value.token_url?,
6004            })
6005        }
6006    }
6007    impl ::std::convert::From<super::PasswordOAuthFlow> for PasswordOAuthFlow {
6008        fn from(value: super::PasswordOAuthFlow) -> Self {
6009            Self {
6010                refresh_url: Ok(value.refresh_url),
6011                scopes: Ok(value.scopes),
6012                token_url: Ok(value.token_url),
6013            }
6014        }
6015    }
6016    #[derive(Clone, Debug)]
6017    pub struct PushNotificationConfig {
6018        authentication: ::std::result::Result<
6019            ::std::option::Option<super::AuthenticationInfo>,
6020            ::std::string::String,
6021        >,
6022        id: ::std::result::Result<
6023            ::std::option::Option<::std::string::String>,
6024            ::std::string::String,
6025        >,
6026        token: ::std::result::Result<
6027            ::std::option::Option<::std::string::String>,
6028            ::std::string::String,
6029        >,
6030        url: ::std::result::Result<::std::string::String, ::std::string::String>,
6031    }
6032    impl ::std::default::Default for PushNotificationConfig {
6033        fn default() -> Self {
6034            Self {
6035                authentication: Ok(Default::default()),
6036                id: Ok(Default::default()),
6037                token: Ok(Default::default()),
6038                url: Err("no value supplied for url".to_string()),
6039            }
6040        }
6041    }
6042    impl PushNotificationConfig {
6043        pub fn authentication<T>(mut self, value: T) -> Self
6044        where
6045            T: ::std::convert::TryInto<::std::option::Option<super::AuthenticationInfo>>,
6046            T::Error: ::std::fmt::Display,
6047        {
6048            self.authentication = value
6049                .try_into()
6050                .map_err(|e| format!("error converting supplied value for authentication: {e}"));
6051            self
6052        }
6053        pub fn id<T>(mut self, value: T) -> Self
6054        where
6055            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
6056            T::Error: ::std::fmt::Display,
6057        {
6058            self.id = value
6059                .try_into()
6060                .map_err(|e| format!("error converting supplied value for id: {e}"));
6061            self
6062        }
6063        pub fn token<T>(mut self, value: T) -> Self
6064        where
6065            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
6066            T::Error: ::std::fmt::Display,
6067        {
6068            self.token = value
6069                .try_into()
6070                .map_err(|e| format!("error converting supplied value for token: {e}"));
6071            self
6072        }
6073        pub fn url<T>(mut self, value: T) -> Self
6074        where
6075            T: ::std::convert::TryInto<::std::string::String>,
6076            T::Error: ::std::fmt::Display,
6077        {
6078            self.url = value
6079                .try_into()
6080                .map_err(|e| format!("error converting supplied value for url: {e}"));
6081            self
6082        }
6083    }
6084    impl ::std::convert::TryFrom<PushNotificationConfig> for super::PushNotificationConfig {
6085        type Error = super::error::ConversionError;
6086        fn try_from(
6087            value: PushNotificationConfig,
6088        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6089            Ok(Self {
6090                authentication: value.authentication?,
6091                id: value.id?,
6092                token: value.token?,
6093                url: value.url?,
6094            })
6095        }
6096    }
6097    impl ::std::convert::From<super::PushNotificationConfig> for PushNotificationConfig {
6098        fn from(value: super::PushNotificationConfig) -> Self {
6099            Self {
6100                authentication: Ok(value.authentication),
6101                id: Ok(value.id),
6102                token: Ok(value.token),
6103                url: Ok(value.url),
6104            }
6105        }
6106    }
6107    #[derive(Clone, Debug)]
6108    pub struct Security {
6109        schemes: ::std::result::Result<
6110            ::std::collections::HashMap<::std::string::String, super::StringList>,
6111            ::std::string::String,
6112        >,
6113    }
6114    impl ::std::default::Default for Security {
6115        fn default() -> Self {
6116            Self {
6117                schemes: Ok(Default::default()),
6118            }
6119        }
6120    }
6121    impl Security {
6122        pub fn schemes<T>(mut self, value: T) -> Self
6123        where
6124            T: ::std::convert::TryInto<
6125                    ::std::collections::HashMap<::std::string::String, super::StringList>,
6126                >,
6127            T::Error: ::std::fmt::Display,
6128        {
6129            self.schemes = value
6130                .try_into()
6131                .map_err(|e| format!("error converting supplied value for schemes: {e}"));
6132            self
6133        }
6134    }
6135    impl ::std::convert::TryFrom<Security> for super::Security {
6136        type Error = super::error::ConversionError;
6137        fn try_from(value: Security) -> ::std::result::Result<Self, super::error::ConversionError> {
6138            Ok(Self {
6139                schemes: value.schemes?,
6140            })
6141        }
6142    }
6143    impl ::std::convert::From<super::Security> for Security {
6144        fn from(value: super::Security) -> Self {
6145            Self {
6146                schemes: Ok(value.schemes),
6147            }
6148        }
6149    }
6150    #[derive(Clone, Debug)]
6151    pub struct SecurityScheme {
6152        api_key_security_scheme: ::std::result::Result<
6153            ::std::option::Option<super::ApiKeySecurityScheme>,
6154            ::std::string::String,
6155        >,
6156        http_auth_security_scheme: ::std::result::Result<
6157            ::std::option::Option<super::HttpAuthSecurityScheme>,
6158            ::std::string::String,
6159        >,
6160        mtls_security_scheme: ::std::result::Result<
6161            ::std::option::Option<super::MutualTlsSecurityScheme>,
6162            ::std::string::String,
6163        >,
6164        oauth2_security_scheme: ::std::result::Result<
6165            ::std::option::Option<super::OAuth2SecurityScheme>,
6166            ::std::string::String,
6167        >,
6168        open_id_connect_security_scheme: ::std::result::Result<
6169            ::std::option::Option<super::OpenIdConnectSecurityScheme>,
6170            ::std::string::String,
6171        >,
6172    }
6173    impl ::std::default::Default for SecurityScheme {
6174        fn default() -> Self {
6175            Self {
6176                api_key_security_scheme: Ok(Default::default()),
6177                http_auth_security_scheme: Ok(Default::default()),
6178                mtls_security_scheme: Ok(Default::default()),
6179                oauth2_security_scheme: Ok(Default::default()),
6180                open_id_connect_security_scheme: Ok(Default::default()),
6181            }
6182        }
6183    }
6184    impl SecurityScheme {
6185        pub fn api_key_security_scheme<T>(mut self, value: T) -> Self
6186        where
6187            T: ::std::convert::TryInto<::std::option::Option<super::ApiKeySecurityScheme>>,
6188            T::Error: ::std::fmt::Display,
6189        {
6190            self.api_key_security_scheme = value.try_into().map_err(|e| {
6191                format!("error converting supplied value for api_key_security_scheme: {e}")
6192            });
6193            self
6194        }
6195        pub fn http_auth_security_scheme<T>(mut self, value: T) -> Self
6196        where
6197            T: ::std::convert::TryInto<::std::option::Option<super::HttpAuthSecurityScheme>>,
6198            T::Error: ::std::fmt::Display,
6199        {
6200            self.http_auth_security_scheme = value.try_into().map_err(|e| {
6201                format!("error converting supplied value for http_auth_security_scheme: {e}")
6202            });
6203            self
6204        }
6205        pub fn mtls_security_scheme<T>(mut self, value: T) -> Self
6206        where
6207            T: ::std::convert::TryInto<::std::option::Option<super::MutualTlsSecurityScheme>>,
6208            T::Error: ::std::fmt::Display,
6209        {
6210            self.mtls_security_scheme = value.try_into().map_err(|e| {
6211                format!("error converting supplied value for mtls_security_scheme: {e}")
6212            });
6213            self
6214        }
6215        pub fn oauth2_security_scheme<T>(mut self, value: T) -> Self
6216        where
6217            T: ::std::convert::TryInto<::std::option::Option<super::OAuth2SecurityScheme>>,
6218            T::Error: ::std::fmt::Display,
6219        {
6220            self.oauth2_security_scheme = value.try_into().map_err(|e| {
6221                format!("error converting supplied value for oauth2_security_scheme: {e}")
6222            });
6223            self
6224        }
6225        pub fn open_id_connect_security_scheme<T>(mut self, value: T) -> Self
6226        where
6227            T: ::std::convert::TryInto<::std::option::Option<super::OpenIdConnectSecurityScheme>>,
6228            T::Error: ::std::fmt::Display,
6229        {
6230            self.open_id_connect_security_scheme = value.try_into().map_err(|e| {
6231                format!("error converting supplied value for open_id_connect_security_scheme: {e}")
6232            });
6233            self
6234        }
6235    }
6236    impl ::std::convert::TryFrom<SecurityScheme> for super::SecurityScheme {
6237        type Error = super::error::ConversionError;
6238        fn try_from(
6239            value: SecurityScheme,
6240        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6241            Ok(Self {
6242                api_key_security_scheme: value.api_key_security_scheme?,
6243                http_auth_security_scheme: value.http_auth_security_scheme?,
6244                mtls_security_scheme: value.mtls_security_scheme?,
6245                oauth2_security_scheme: value.oauth2_security_scheme?,
6246                open_id_connect_security_scheme: value.open_id_connect_security_scheme?,
6247            })
6248        }
6249    }
6250    impl ::std::convert::From<super::SecurityScheme> for SecurityScheme {
6251        fn from(value: super::SecurityScheme) -> Self {
6252            Self {
6253                api_key_security_scheme: Ok(value.api_key_security_scheme),
6254                http_auth_security_scheme: Ok(value.http_auth_security_scheme),
6255                mtls_security_scheme: Ok(value.mtls_security_scheme),
6256                oauth2_security_scheme: Ok(value.oauth2_security_scheme),
6257                open_id_connect_security_scheme: Ok(value.open_id_connect_security_scheme),
6258            }
6259        }
6260    }
6261    #[derive(Clone, Debug)]
6262    pub struct SendMessageConfiguration {
6263        accepted_output_modes:
6264            ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
6265        blocking: ::std::result::Result<bool, ::std::string::String>,
6266        history_length: ::std::result::Result<::std::option::Option<i32>, ::std::string::String>,
6267        push_notification_config: ::std::result::Result<
6268            ::std::option::Option<super::PushNotificationConfig>,
6269            ::std::string::String,
6270        >,
6271    }
6272    impl ::std::default::Default for SendMessageConfiguration {
6273        fn default() -> Self {
6274            Self {
6275                accepted_output_modes: Ok(Default::default()),
6276                blocking: Err("no value supplied for blocking".to_string()),
6277                history_length: Ok(Default::default()),
6278                push_notification_config: Ok(Default::default()),
6279            }
6280        }
6281    }
6282    impl SendMessageConfiguration {
6283        pub fn accepted_output_modes<T>(mut self, value: T) -> Self
6284        where
6285            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
6286            T::Error: ::std::fmt::Display,
6287        {
6288            self.accepted_output_modes = value.try_into().map_err(|e| {
6289                format!("error converting supplied value for accepted_output_modes: {e}")
6290            });
6291            self
6292        }
6293        pub fn blocking<T>(mut self, value: T) -> Self
6294        where
6295            T: ::std::convert::TryInto<bool>,
6296            T::Error: ::std::fmt::Display,
6297        {
6298            self.blocking = value
6299                .try_into()
6300                .map_err(|e| format!("error converting supplied value for blocking: {e}"));
6301            self
6302        }
6303        pub fn history_length<T>(mut self, value: T) -> Self
6304        where
6305            T: ::std::convert::TryInto<::std::option::Option<i32>>,
6306            T::Error: ::std::fmt::Display,
6307        {
6308            self.history_length = value
6309                .try_into()
6310                .map_err(|e| format!("error converting supplied value for history_length: {e}"));
6311            self
6312        }
6313        pub fn push_notification_config<T>(mut self, value: T) -> Self
6314        where
6315            T: ::std::convert::TryInto<::std::option::Option<super::PushNotificationConfig>>,
6316            T::Error: ::std::fmt::Display,
6317        {
6318            self.push_notification_config = value.try_into().map_err(|e| {
6319                format!("error converting supplied value for push_notification_config: {e}")
6320            });
6321            self
6322        }
6323    }
6324    impl ::std::convert::TryFrom<SendMessageConfiguration> for super::SendMessageConfiguration {
6325        type Error = super::error::ConversionError;
6326        fn try_from(
6327            value: SendMessageConfiguration,
6328        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6329            Ok(Self {
6330                accepted_output_modes: value.accepted_output_modes?,
6331                blocking: value.blocking?,
6332                history_length: value.history_length?,
6333                push_notification_config: value.push_notification_config?,
6334            })
6335        }
6336    }
6337    impl ::std::convert::From<super::SendMessageConfiguration> for SendMessageConfiguration {
6338        fn from(value: super::SendMessageConfiguration) -> Self {
6339            Self {
6340                accepted_output_modes: Ok(value.accepted_output_modes),
6341                blocking: Ok(value.blocking),
6342                history_length: Ok(value.history_length),
6343                push_notification_config: Ok(value.push_notification_config),
6344            }
6345        }
6346    }
6347    #[derive(Clone, Debug)]
6348    pub struct SendMessageRequest {
6349        configuration: ::std::result::Result<
6350            ::std::option::Option<super::SendMessageConfiguration>,
6351            ::std::string::String,
6352        >,
6353        message:
6354            ::std::result::Result<::std::option::Option<super::Message>, ::std::string::String>,
6355        metadata:
6356            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
6357        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
6358    }
6359    impl ::std::default::Default for SendMessageRequest {
6360        fn default() -> Self {
6361            Self {
6362                configuration: Ok(Default::default()),
6363                message: Ok(Default::default()),
6364                metadata: Ok(Default::default()),
6365                tenant: Err("no value supplied for tenant".to_string()),
6366            }
6367        }
6368    }
6369    impl SendMessageRequest {
6370        pub fn configuration<T>(mut self, value: T) -> Self
6371        where
6372            T: ::std::convert::TryInto<::std::option::Option<super::SendMessageConfiguration>>,
6373            T::Error: ::std::fmt::Display,
6374        {
6375            self.configuration = value
6376                .try_into()
6377                .map_err(|e| format!("error converting supplied value for configuration: {e}"));
6378            self
6379        }
6380        pub fn message<T>(mut self, value: T) -> Self
6381        where
6382            T: ::std::convert::TryInto<::std::option::Option<super::Message>>,
6383            T::Error: ::std::fmt::Display,
6384        {
6385            self.message = value
6386                .try_into()
6387                .map_err(|e| format!("error converting supplied value for message: {e}"));
6388            self
6389        }
6390        pub fn metadata<T>(mut self, value: T) -> Self
6391        where
6392            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
6393            T::Error: ::std::fmt::Display,
6394        {
6395            self.metadata = value
6396                .try_into()
6397                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
6398            self
6399        }
6400        pub fn tenant<T>(mut self, value: T) -> Self
6401        where
6402            T: ::std::convert::TryInto<::std::string::String>,
6403            T::Error: ::std::fmt::Display,
6404        {
6405            self.tenant = value
6406                .try_into()
6407                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
6408            self
6409        }
6410    }
6411    impl ::std::convert::TryFrom<SendMessageRequest> for super::SendMessageRequest {
6412        type Error = super::error::ConversionError;
6413        fn try_from(
6414            value: SendMessageRequest,
6415        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6416            Ok(Self {
6417                configuration: value.configuration?,
6418                message: value.message?,
6419                metadata: value.metadata?,
6420                tenant: value.tenant?,
6421            })
6422        }
6423    }
6424    impl ::std::convert::From<super::SendMessageRequest> for SendMessageRequest {
6425        fn from(value: super::SendMessageRequest) -> Self {
6426            Self {
6427                configuration: Ok(value.configuration),
6428                message: Ok(value.message),
6429                metadata: Ok(value.metadata),
6430                tenant: Ok(value.tenant),
6431            }
6432        }
6433    }
6434    #[derive(Clone, Debug)]
6435    pub struct SendMessageResponse {
6436        message:
6437            ::std::result::Result<::std::option::Option<super::Message>, ::std::string::String>,
6438        task: ::std::result::Result<::std::option::Option<super::Task>, ::std::string::String>,
6439    }
6440    impl ::std::default::Default for SendMessageResponse {
6441        fn default() -> Self {
6442            Self {
6443                message: Ok(Default::default()),
6444                task: Ok(Default::default()),
6445            }
6446        }
6447    }
6448    impl SendMessageResponse {
6449        pub fn message<T>(mut self, value: T) -> Self
6450        where
6451            T: ::std::convert::TryInto<::std::option::Option<super::Message>>,
6452            T::Error: ::std::fmt::Display,
6453        {
6454            self.message = value
6455                .try_into()
6456                .map_err(|e| format!("error converting supplied value for message: {e}"));
6457            self
6458        }
6459        pub fn task<T>(mut self, value: T) -> Self
6460        where
6461            T: ::std::convert::TryInto<::std::option::Option<super::Task>>,
6462            T::Error: ::std::fmt::Display,
6463        {
6464            self.task = value
6465                .try_into()
6466                .map_err(|e| format!("error converting supplied value for task: {e}"));
6467            self
6468        }
6469    }
6470    impl ::std::convert::TryFrom<SendMessageResponse> for super::SendMessageResponse {
6471        type Error = super::error::ConversionError;
6472        fn try_from(
6473            value: SendMessageResponse,
6474        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6475            Ok(Self {
6476                message: value.message?,
6477                task: value.task?,
6478            })
6479        }
6480    }
6481    impl ::std::convert::From<super::SendMessageResponse> for SendMessageResponse {
6482        fn from(value: super::SendMessageResponse) -> Self {
6483            Self {
6484                message: Ok(value.message),
6485                task: Ok(value.task),
6486            }
6487        }
6488    }
6489    #[derive(Clone, Debug)]
6490    pub struct SetTaskPushNotificationConfigRequest {
6491        config: ::std::result::Result<super::TaskPushNotificationConfig, ::std::string::String>,
6492        config_id: ::std::result::Result<::std::string::String, ::std::string::String>,
6493        parent: ::std::result::Result<::std::string::String, ::std::string::String>,
6494        tenant: ::std::result::Result<
6495            ::std::option::Option<::std::string::String>,
6496            ::std::string::String,
6497        >,
6498    }
6499    impl ::std::default::Default for SetTaskPushNotificationConfigRequest {
6500        fn default() -> Self {
6501            Self {
6502                config: Err("no value supplied for config".to_string()),
6503                config_id: Err("no value supplied for config_id".to_string()),
6504                parent: Err("no value supplied for parent".to_string()),
6505                tenant: Ok(Default::default()),
6506            }
6507        }
6508    }
6509    impl SetTaskPushNotificationConfigRequest {
6510        pub fn config<T>(mut self, value: T) -> Self
6511        where
6512            T: ::std::convert::TryInto<super::TaskPushNotificationConfig>,
6513            T::Error: ::std::fmt::Display,
6514        {
6515            self.config = value
6516                .try_into()
6517                .map_err(|e| format!("error converting supplied value for config: {e}"));
6518            self
6519        }
6520        pub fn config_id<T>(mut self, value: T) -> Self
6521        where
6522            T: ::std::convert::TryInto<::std::string::String>,
6523            T::Error: ::std::fmt::Display,
6524        {
6525            self.config_id = value
6526                .try_into()
6527                .map_err(|e| format!("error converting supplied value for config_id: {e}"));
6528            self
6529        }
6530        pub fn parent<T>(mut self, value: T) -> Self
6531        where
6532            T: ::std::convert::TryInto<::std::string::String>,
6533            T::Error: ::std::fmt::Display,
6534        {
6535            self.parent = value
6536                .try_into()
6537                .map_err(|e| format!("error converting supplied value for parent: {e}"));
6538            self
6539        }
6540        pub fn tenant<T>(mut self, value: T) -> Self
6541        where
6542            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
6543            T::Error: ::std::fmt::Display,
6544        {
6545            self.tenant = value
6546                .try_into()
6547                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
6548            self
6549        }
6550    }
6551    impl ::std::convert::TryFrom<SetTaskPushNotificationConfigRequest>
6552        for super::SetTaskPushNotificationConfigRequest
6553    {
6554        type Error = super::error::ConversionError;
6555        fn try_from(
6556            value: SetTaskPushNotificationConfigRequest,
6557        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6558            Ok(Self {
6559                config: value.config?,
6560                config_id: value.config_id?,
6561                parent: value.parent?,
6562                tenant: value.tenant?,
6563            })
6564        }
6565    }
6566    impl ::std::convert::From<super::SetTaskPushNotificationConfigRequest>
6567        for SetTaskPushNotificationConfigRequest
6568    {
6569        fn from(value: super::SetTaskPushNotificationConfigRequest) -> Self {
6570            Self {
6571                config: Ok(value.config),
6572                config_id: Ok(value.config_id),
6573                parent: Ok(value.parent),
6574                tenant: Ok(value.tenant),
6575            }
6576        }
6577    }
6578    #[derive(Clone, Debug)]
6579    pub struct StreamResponse {
6580        artifact_update: ::std::result::Result<
6581            ::std::option::Option<super::TaskArtifactUpdateEvent>,
6582            ::std::string::String,
6583        >,
6584        message:
6585            ::std::result::Result<::std::option::Option<super::Message>, ::std::string::String>,
6586        status_update: ::std::result::Result<
6587            ::std::option::Option<super::TaskStatusUpdateEvent>,
6588            ::std::string::String,
6589        >,
6590        task: ::std::result::Result<::std::option::Option<super::Task>, ::std::string::String>,
6591    }
6592    impl ::std::default::Default for StreamResponse {
6593        fn default() -> Self {
6594            Self {
6595                artifact_update: Ok(Default::default()),
6596                message: Ok(Default::default()),
6597                status_update: Ok(Default::default()),
6598                task: Ok(Default::default()),
6599            }
6600        }
6601    }
6602    impl StreamResponse {
6603        pub fn artifact_update<T>(mut self, value: T) -> Self
6604        where
6605            T: ::std::convert::TryInto<::std::option::Option<super::TaskArtifactUpdateEvent>>,
6606            T::Error: ::std::fmt::Display,
6607        {
6608            self.artifact_update = value
6609                .try_into()
6610                .map_err(|e| format!("error converting supplied value for artifact_update: {e}"));
6611            self
6612        }
6613        pub fn message<T>(mut self, value: T) -> Self
6614        where
6615            T: ::std::convert::TryInto<::std::option::Option<super::Message>>,
6616            T::Error: ::std::fmt::Display,
6617        {
6618            self.message = value
6619                .try_into()
6620                .map_err(|e| format!("error converting supplied value for message: {e}"));
6621            self
6622        }
6623        pub fn status_update<T>(mut self, value: T) -> Self
6624        where
6625            T: ::std::convert::TryInto<::std::option::Option<super::TaskStatusUpdateEvent>>,
6626            T::Error: ::std::fmt::Display,
6627        {
6628            self.status_update = value
6629                .try_into()
6630                .map_err(|e| format!("error converting supplied value for status_update: {e}"));
6631            self
6632        }
6633        pub fn task<T>(mut self, value: T) -> Self
6634        where
6635            T: ::std::convert::TryInto<::std::option::Option<super::Task>>,
6636            T::Error: ::std::fmt::Display,
6637        {
6638            self.task = value
6639                .try_into()
6640                .map_err(|e| format!("error converting supplied value for task: {e}"));
6641            self
6642        }
6643    }
6644    impl ::std::convert::TryFrom<StreamResponse> for super::StreamResponse {
6645        type Error = super::error::ConversionError;
6646        fn try_from(
6647            value: StreamResponse,
6648        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6649            Ok(Self {
6650                artifact_update: value.artifact_update?,
6651                message: value.message?,
6652                status_update: value.status_update?,
6653                task: value.task?,
6654            })
6655        }
6656    }
6657    impl ::std::convert::From<super::StreamResponse> for StreamResponse {
6658        fn from(value: super::StreamResponse) -> Self {
6659            Self {
6660                artifact_update: Ok(value.artifact_update),
6661                message: Ok(value.message),
6662                status_update: Ok(value.status_update),
6663                task: Ok(value.task),
6664            }
6665        }
6666    }
6667    #[derive(Clone, Debug)]
6668    pub struct StringList {
6669        list: ::std::result::Result<::std::vec::Vec<::std::string::String>, ::std::string::String>,
6670    }
6671    impl ::std::default::Default for StringList {
6672        fn default() -> Self {
6673            Self {
6674                list: Ok(Default::default()),
6675            }
6676        }
6677    }
6678    impl StringList {
6679        pub fn list<T>(mut self, value: T) -> Self
6680        where
6681            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
6682            T::Error: ::std::fmt::Display,
6683        {
6684            self.list = value
6685                .try_into()
6686                .map_err(|e| format!("error converting supplied value for list: {e}"));
6687            self
6688        }
6689    }
6690    impl ::std::convert::TryFrom<StringList> for super::StringList {
6691        type Error = super::error::ConversionError;
6692        fn try_from(
6693            value: StringList,
6694        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6695            Ok(Self { list: value.list? })
6696        }
6697    }
6698    impl ::std::convert::From<super::StringList> for StringList {
6699        fn from(value: super::StringList) -> Self {
6700            Self {
6701                list: Ok(value.list),
6702            }
6703        }
6704    }
6705    #[derive(Clone, Debug)]
6706    pub struct SubscribeToTaskRequest {
6707        name: ::std::result::Result<::std::string::String, ::std::string::String>,
6708        tenant: ::std::result::Result<::std::string::String, ::std::string::String>,
6709    }
6710    impl ::std::default::Default for SubscribeToTaskRequest {
6711        fn default() -> Self {
6712            Self {
6713                name: Err("no value supplied for name".to_string()),
6714                tenant: Err("no value supplied for tenant".to_string()),
6715            }
6716        }
6717    }
6718    impl SubscribeToTaskRequest {
6719        pub fn name<T>(mut self, value: T) -> Self
6720        where
6721            T: ::std::convert::TryInto<::std::string::String>,
6722            T::Error: ::std::fmt::Display,
6723        {
6724            self.name = value
6725                .try_into()
6726                .map_err(|e| format!("error converting supplied value for name: {e}"));
6727            self
6728        }
6729        pub fn tenant<T>(mut self, value: T) -> Self
6730        where
6731            T: ::std::convert::TryInto<::std::string::String>,
6732            T::Error: ::std::fmt::Display,
6733        {
6734            self.tenant = value
6735                .try_into()
6736                .map_err(|e| format!("error converting supplied value for tenant: {e}"));
6737            self
6738        }
6739    }
6740    impl ::std::convert::TryFrom<SubscribeToTaskRequest> for super::SubscribeToTaskRequest {
6741        type Error = super::error::ConversionError;
6742        fn try_from(
6743            value: SubscribeToTaskRequest,
6744        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6745            Ok(Self {
6746                name: value.name?,
6747                tenant: value.tenant?,
6748            })
6749        }
6750    }
6751    impl ::std::convert::From<super::SubscribeToTaskRequest> for SubscribeToTaskRequest {
6752        fn from(value: super::SubscribeToTaskRequest) -> Self {
6753            Self {
6754                name: Ok(value.name),
6755                tenant: Ok(value.tenant),
6756            }
6757        }
6758    }
6759    #[derive(Clone, Debug)]
6760    pub struct Task {
6761        artifacts: ::std::result::Result<::std::vec::Vec<super::Artifact>, ::std::string::String>,
6762        context_id: ::std::result::Result<::std::string::String, ::std::string::String>,
6763        history: ::std::result::Result<::std::vec::Vec<super::Message>, ::std::string::String>,
6764        id: ::std::result::Result<::std::string::String, ::std::string::String>,
6765        metadata:
6766            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
6767        status: ::std::result::Result<super::TaskStatus, ::std::string::String>,
6768    }
6769    impl ::std::default::Default for Task {
6770        fn default() -> Self {
6771            Self {
6772                artifacts: Ok(Default::default()),
6773                context_id: Err("no value supplied for context_id".to_string()),
6774                history: Ok(Default::default()),
6775                id: Err("no value supplied for id".to_string()),
6776                metadata: Ok(Default::default()),
6777                status: Err("no value supplied for status".to_string()),
6778            }
6779        }
6780    }
6781    impl Task {
6782        pub fn artifacts<T>(mut self, value: T) -> Self
6783        where
6784            T: ::std::convert::TryInto<::std::vec::Vec<super::Artifact>>,
6785            T::Error: ::std::fmt::Display,
6786        {
6787            self.artifacts = value
6788                .try_into()
6789                .map_err(|e| format!("error converting supplied value for artifacts: {e}"));
6790            self
6791        }
6792        pub fn context_id<T>(mut self, value: T) -> Self
6793        where
6794            T: ::std::convert::TryInto<::std::string::String>,
6795            T::Error: ::std::fmt::Display,
6796        {
6797            self.context_id = value
6798                .try_into()
6799                .map_err(|e| format!("error converting supplied value for context_id: {e}"));
6800            self
6801        }
6802        pub fn history<T>(mut self, value: T) -> Self
6803        where
6804            T: ::std::convert::TryInto<::std::vec::Vec<super::Message>>,
6805            T::Error: ::std::fmt::Display,
6806        {
6807            self.history = value
6808                .try_into()
6809                .map_err(|e| format!("error converting supplied value for history: {e}"));
6810            self
6811        }
6812        pub fn id<T>(mut self, value: T) -> Self
6813        where
6814            T: ::std::convert::TryInto<::std::string::String>,
6815            T::Error: ::std::fmt::Display,
6816        {
6817            self.id = value
6818                .try_into()
6819                .map_err(|e| format!("error converting supplied value for id: {e}"));
6820            self
6821        }
6822        pub fn metadata<T>(mut self, value: T) -> Self
6823        where
6824            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
6825            T::Error: ::std::fmt::Display,
6826        {
6827            self.metadata = value
6828                .try_into()
6829                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
6830            self
6831        }
6832        pub fn status<T>(mut self, value: T) -> Self
6833        where
6834            T: ::std::convert::TryInto<super::TaskStatus>,
6835            T::Error: ::std::fmt::Display,
6836        {
6837            self.status = value
6838                .try_into()
6839                .map_err(|e| format!("error converting supplied value for status: {e}"));
6840            self
6841        }
6842    }
6843    impl ::std::convert::TryFrom<Task> for super::Task {
6844        type Error = super::error::ConversionError;
6845        fn try_from(value: Task) -> ::std::result::Result<Self, super::error::ConversionError> {
6846            Ok(Self {
6847                artifacts: value.artifacts?,
6848                context_id: value.context_id?,
6849                history: value.history?,
6850                id: value.id?,
6851                metadata: value.metadata?,
6852                status: value.status?,
6853            })
6854        }
6855    }
6856    impl ::std::convert::From<super::Task> for Task {
6857        fn from(value: super::Task) -> Self {
6858            Self {
6859                artifacts: Ok(value.artifacts),
6860                context_id: Ok(value.context_id),
6861                history: Ok(value.history),
6862                id: Ok(value.id),
6863                metadata: Ok(value.metadata),
6864                status: Ok(value.status),
6865            }
6866        }
6867    }
6868    #[derive(Clone, Debug)]
6869    pub struct TaskArtifactUpdateEvent {
6870        append: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
6871        artifact: ::std::result::Result<super::Artifact, ::std::string::String>,
6872        context_id: ::std::result::Result<::std::string::String, ::std::string::String>,
6873        last_chunk: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
6874        metadata:
6875            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
6876        task_id: ::std::result::Result<::std::string::String, ::std::string::String>,
6877    }
6878    impl ::std::default::Default for TaskArtifactUpdateEvent {
6879        fn default() -> Self {
6880            Self {
6881                append: Ok(Default::default()),
6882                artifact: Err("no value supplied for artifact".to_string()),
6883                context_id: Err("no value supplied for context_id".to_string()),
6884                last_chunk: Ok(Default::default()),
6885                metadata: Ok(Default::default()),
6886                task_id: Err("no value supplied for task_id".to_string()),
6887            }
6888        }
6889    }
6890    impl TaskArtifactUpdateEvent {
6891        pub fn append<T>(mut self, value: T) -> Self
6892        where
6893            T: ::std::convert::TryInto<::std::option::Option<bool>>,
6894            T::Error: ::std::fmt::Display,
6895        {
6896            self.append = value
6897                .try_into()
6898                .map_err(|e| format!("error converting supplied value for append: {e}"));
6899            self
6900        }
6901        pub fn artifact<T>(mut self, value: T) -> Self
6902        where
6903            T: ::std::convert::TryInto<super::Artifact>,
6904            T::Error: ::std::fmt::Display,
6905        {
6906            self.artifact = value
6907                .try_into()
6908                .map_err(|e| format!("error converting supplied value for artifact: {e}"));
6909            self
6910        }
6911        pub fn context_id<T>(mut self, value: T) -> Self
6912        where
6913            T: ::std::convert::TryInto<::std::string::String>,
6914            T::Error: ::std::fmt::Display,
6915        {
6916            self.context_id = value
6917                .try_into()
6918                .map_err(|e| format!("error converting supplied value for context_id: {e}"));
6919            self
6920        }
6921        pub fn last_chunk<T>(mut self, value: T) -> Self
6922        where
6923            T: ::std::convert::TryInto<::std::option::Option<bool>>,
6924            T::Error: ::std::fmt::Display,
6925        {
6926            self.last_chunk = value
6927                .try_into()
6928                .map_err(|e| format!("error converting supplied value for last_chunk: {e}"));
6929            self
6930        }
6931        pub fn metadata<T>(mut self, value: T) -> Self
6932        where
6933            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
6934            T::Error: ::std::fmt::Display,
6935        {
6936            self.metadata = value
6937                .try_into()
6938                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
6939            self
6940        }
6941        pub fn task_id<T>(mut self, value: T) -> Self
6942        where
6943            T: ::std::convert::TryInto<::std::string::String>,
6944            T::Error: ::std::fmt::Display,
6945        {
6946            self.task_id = value
6947                .try_into()
6948                .map_err(|e| format!("error converting supplied value for task_id: {e}"));
6949            self
6950        }
6951    }
6952    impl ::std::convert::TryFrom<TaskArtifactUpdateEvent> for super::TaskArtifactUpdateEvent {
6953        type Error = super::error::ConversionError;
6954        fn try_from(
6955            value: TaskArtifactUpdateEvent,
6956        ) -> ::std::result::Result<Self, super::error::ConversionError> {
6957            Ok(Self {
6958                append: value.append?,
6959                artifact: value.artifact?,
6960                context_id: value.context_id?,
6961                last_chunk: value.last_chunk?,
6962                metadata: value.metadata?,
6963                task_id: value.task_id?,
6964            })
6965        }
6966    }
6967    impl ::std::convert::From<super::TaskArtifactUpdateEvent> for TaskArtifactUpdateEvent {
6968        fn from(value: super::TaskArtifactUpdateEvent) -> Self {
6969            Self {
6970                append: Ok(value.append),
6971                artifact: Ok(value.artifact),
6972                context_id: Ok(value.context_id),
6973                last_chunk: Ok(value.last_chunk),
6974                metadata: Ok(value.metadata),
6975                task_id: Ok(value.task_id),
6976            }
6977        }
6978    }
6979    #[derive(Clone, Debug)]
6980    pub struct TaskPushNotificationConfig {
6981        name: ::std::result::Result<::std::string::String, ::std::string::String>,
6982        push_notification_config:
6983            ::std::result::Result<super::PushNotificationConfig, ::std::string::String>,
6984    }
6985    impl ::std::default::Default for TaskPushNotificationConfig {
6986        fn default() -> Self {
6987            Self {
6988                name: Err("no value supplied for name".to_string()),
6989                push_notification_config: Err(
6990                    "no value supplied for push_notification_config".to_string()
6991                ),
6992            }
6993        }
6994    }
6995    impl TaskPushNotificationConfig {
6996        pub fn name<T>(mut self, value: T) -> Self
6997        where
6998            T: ::std::convert::TryInto<::std::string::String>,
6999            T::Error: ::std::fmt::Display,
7000        {
7001            self.name = value
7002                .try_into()
7003                .map_err(|e| format!("error converting supplied value for name: {e}"));
7004            self
7005        }
7006        pub fn push_notification_config<T>(mut self, value: T) -> Self
7007        where
7008            T: ::std::convert::TryInto<super::PushNotificationConfig>,
7009            T::Error: ::std::fmt::Display,
7010        {
7011            self.push_notification_config = value.try_into().map_err(|e| {
7012                format!("error converting supplied value for push_notification_config: {e}")
7013            });
7014            self
7015        }
7016    }
7017    impl ::std::convert::TryFrom<TaskPushNotificationConfig> for super::TaskPushNotificationConfig {
7018        type Error = super::error::ConversionError;
7019        fn try_from(
7020            value: TaskPushNotificationConfig,
7021        ) -> ::std::result::Result<Self, super::error::ConversionError> {
7022            Ok(Self {
7023                name: value.name?,
7024                push_notification_config: value.push_notification_config?,
7025            })
7026        }
7027    }
7028    impl ::std::convert::From<super::TaskPushNotificationConfig> for TaskPushNotificationConfig {
7029        fn from(value: super::TaskPushNotificationConfig) -> Self {
7030            Self {
7031                name: Ok(value.name),
7032                push_notification_config: Ok(value.push_notification_config),
7033            }
7034        }
7035    }
7036    #[derive(Clone, Debug)]
7037    pub struct TaskStatus {
7038        message:
7039            ::std::result::Result<::std::option::Option<super::Message>, ::std::string::String>,
7040        state: ::std::result::Result<super::TaskState, ::std::string::String>,
7041        timestamp:
7042            ::std::result::Result<::std::option::Option<super::Timestamp>, ::std::string::String>,
7043    }
7044    impl ::std::default::Default for TaskStatus {
7045        fn default() -> Self {
7046            Self {
7047                message: Ok(Default::default()),
7048                state: Err("no value supplied for state".to_string()),
7049                timestamp: Ok(Default::default()),
7050            }
7051        }
7052    }
7053    impl TaskStatus {
7054        pub fn message<T>(mut self, value: T) -> Self
7055        where
7056            T: ::std::convert::TryInto<::std::option::Option<super::Message>>,
7057            T::Error: ::std::fmt::Display,
7058        {
7059            self.message = value
7060                .try_into()
7061                .map_err(|e| format!("error converting supplied value for message: {e}"));
7062            self
7063        }
7064        pub fn state<T>(mut self, value: T) -> Self
7065        where
7066            T: ::std::convert::TryInto<super::TaskState>,
7067            T::Error: ::std::fmt::Display,
7068        {
7069            self.state = value
7070                .try_into()
7071                .map_err(|e| format!("error converting supplied value for state: {e}"));
7072            self
7073        }
7074        pub fn timestamp<T>(mut self, value: T) -> Self
7075        where
7076            T: ::std::convert::TryInto<::std::option::Option<super::Timestamp>>,
7077            T::Error: ::std::fmt::Display,
7078        {
7079            self.timestamp = value
7080                .try_into()
7081                .map_err(|e| format!("error converting supplied value for timestamp: {e}"));
7082            self
7083        }
7084    }
7085    impl ::std::convert::TryFrom<TaskStatus> for super::TaskStatus {
7086        type Error = super::error::ConversionError;
7087        fn try_from(
7088            value: TaskStatus,
7089        ) -> ::std::result::Result<Self, super::error::ConversionError> {
7090            Ok(Self {
7091                message: value.message?,
7092                state: value.state?,
7093                timestamp: value.timestamp?,
7094            })
7095        }
7096    }
7097    impl ::std::convert::From<super::TaskStatus> for TaskStatus {
7098        fn from(value: super::TaskStatus) -> Self {
7099            Self {
7100                message: Ok(value.message),
7101                state: Ok(value.state),
7102                timestamp: Ok(value.timestamp),
7103            }
7104        }
7105    }
7106    #[derive(Clone, Debug)]
7107    pub struct TaskStatusUpdateEvent {
7108        context_id: ::std::result::Result<::std::string::String, ::std::string::String>,
7109        final_: ::std::result::Result<bool, ::std::string::String>,
7110        metadata:
7111            ::std::result::Result<::std::option::Option<super::Struct>, ::std::string::String>,
7112        status: ::std::result::Result<super::TaskStatus, ::std::string::String>,
7113        task_id: ::std::result::Result<::std::string::String, ::std::string::String>,
7114    }
7115    impl ::std::default::Default for TaskStatusUpdateEvent {
7116        fn default() -> Self {
7117            Self {
7118                context_id: Err("no value supplied for context_id".to_string()),
7119                final_: Err("no value supplied for final_".to_string()),
7120                metadata: Ok(Default::default()),
7121                status: Err("no value supplied for status".to_string()),
7122                task_id: Err("no value supplied for task_id".to_string()),
7123            }
7124        }
7125    }
7126    impl TaskStatusUpdateEvent {
7127        pub fn context_id<T>(mut self, value: T) -> Self
7128        where
7129            T: ::std::convert::TryInto<::std::string::String>,
7130            T::Error: ::std::fmt::Display,
7131        {
7132            self.context_id = value
7133                .try_into()
7134                .map_err(|e| format!("error converting supplied value for context_id: {e}"));
7135            self
7136        }
7137        pub fn final_<T>(mut self, value: T) -> Self
7138        where
7139            T: ::std::convert::TryInto<bool>,
7140            T::Error: ::std::fmt::Display,
7141        {
7142            self.final_ = value
7143                .try_into()
7144                .map_err(|e| format!("error converting supplied value for final_: {e}"));
7145            self
7146        }
7147        pub fn metadata<T>(mut self, value: T) -> Self
7148        where
7149            T: ::std::convert::TryInto<::std::option::Option<super::Struct>>,
7150            T::Error: ::std::fmt::Display,
7151        {
7152            self.metadata = value
7153                .try_into()
7154                .map_err(|e| format!("error converting supplied value for metadata: {e}"));
7155            self
7156        }
7157        pub fn status<T>(mut self, value: T) -> Self
7158        where
7159            T: ::std::convert::TryInto<super::TaskStatus>,
7160            T::Error: ::std::fmt::Display,
7161        {
7162            self.status = value
7163                .try_into()
7164                .map_err(|e| format!("error converting supplied value for status: {e}"));
7165            self
7166        }
7167        pub fn task_id<T>(mut self, value: T) -> Self
7168        where
7169            T: ::std::convert::TryInto<::std::string::String>,
7170            T::Error: ::std::fmt::Display,
7171        {
7172            self.task_id = value
7173                .try_into()
7174                .map_err(|e| format!("error converting supplied value for task_id: {e}"));
7175            self
7176        }
7177    }
7178    impl ::std::convert::TryFrom<TaskStatusUpdateEvent> for super::TaskStatusUpdateEvent {
7179        type Error = super::error::ConversionError;
7180        fn try_from(
7181            value: TaskStatusUpdateEvent,
7182        ) -> ::std::result::Result<Self, super::error::ConversionError> {
7183            Ok(Self {
7184                context_id: value.context_id?,
7185                final_: value.final_?,
7186                metadata: value.metadata?,
7187                status: value.status?,
7188                task_id: value.task_id?,
7189            })
7190        }
7191    }
7192    impl ::std::convert::From<super::TaskStatusUpdateEvent> for TaskStatusUpdateEvent {
7193        fn from(value: super::TaskStatusUpdateEvent) -> Self {
7194            Self {
7195                context_id: Ok(value.context_id),
7196                final_: Ok(value.final_),
7197                metadata: Ok(value.metadata),
7198                status: Ok(value.status),
7199                task_id: Ok(value.task_id),
7200            }
7201        }
7202    }
7203}