coda_api/lib.rs
1#![allow(unreachable_code)]
2#[allow(unused_imports)]
3pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
4#[allow(unused_imports)]
5use progenitor_client::{ClientHooks, OperationInfo, RequestBuilderExt, encode_path};
6/// Types used as operation parameters and responses.
7#[allow(clippy::all)]
8pub mod types {
9 /// Error types.
10 pub mod error {
11 /// Error from a `TryFrom` or `FromStr` implementation.
12 pub struct ConversionError(::std::borrow::Cow<'static, str>);
13 impl ::std::error::Error for ConversionError {}
14 impl ::std::fmt::Display for ConversionError {
15 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
16 ::std::fmt::Display::fmt(&self.0, f)
17 }
18 }
19
20 impl ::std::fmt::Debug for ConversionError {
21 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
22 ::std::fmt::Debug::fmt(&self.0, f)
23 }
24 }
25
26 impl From<&'static str> for ConversionError {
27 fn from(value: &'static str) -> Self {
28 Self(value.into())
29 }
30 }
31
32 impl From<String> for ConversionError {
33 fn from(value: String) -> Self {
34 Self(value.into())
35 }
36 }
37 }
38
39 ///Type of access.
40 ///
41 /// <details><summary>JSON schema</summary>
42 ///
43 /// ```json
44 ///{
45 /// "description": "Type of access.",
46 /// "type": "string",
47 /// "enum": [
48 /// "readonly",
49 /// "write",
50 /// "comment",
51 /// "none"
52 /// ],
53 /// "x-schema-name": "AccessType",
54 /// "x-tsEnumNames": [
55 /// "ReadOnly",
56 /// "Write",
57 /// "Comment",
58 /// "None"
59 /// ]
60 ///}
61 /// ```
62 /// </details>
63 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
64 pub enum AccessType {
65 #[serde(rename = "readonly")]
66 Readonly,
67 #[serde(rename = "write")]
68 Write,
69 #[serde(rename = "comment")]
70 Comment,
71 #[serde(rename = "none")]
72 None,
73 }
74
75 impl ::std::convert::From<&Self> for AccessType {
76 fn from(value: &AccessType) -> Self {
77 value.clone()
78 }
79 }
80
81 impl ::std::fmt::Display for AccessType {
82 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83 match *self {
84 Self::Readonly => f.write_str("readonly"),
85 Self::Write => f.write_str("write"),
86 Self::Comment => f.write_str("comment"),
87 Self::None => f.write_str("none"),
88 }
89 }
90 }
91
92 impl ::std::str::FromStr for AccessType {
93 type Err = self::error::ConversionError;
94 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
95 match value {
96 "readonly" => Ok(Self::Readonly),
97 "write" => Ok(Self::Write),
98 "comment" => Ok(Self::Comment),
99 "none" => Ok(Self::None),
100 _ => Err("invalid value".into()),
101 }
102 }
103 }
104
105 impl ::std::convert::TryFrom<&str> for AccessType {
106 type Error = self::error::ConversionError;
107 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
108 value.parse()
109 }
110 }
111
112 impl ::std::convert::TryFrom<&::std::string::String> for AccessType {
113 type Error = self::error::ConversionError;
114 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
115 value.parse()
116 }
117 }
118
119 impl ::std::convert::TryFrom<::std::string::String> for AccessType {
120 type Error = self::error::ConversionError;
121 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
122 value.parse()
123 }
124 }
125
126 ///Type of access (excluding none).
127 ///
128 /// <details><summary>JSON schema</summary>
129 ///
130 /// ```json
131 ///{
132 /// "description": "Type of access (excluding none).",
133 /// "type": "string",
134 /// "enum": [
135 /// "readonly",
136 /// "write",
137 /// "comment"
138 /// ],
139 /// "x-schema-name": "AccessTypeNotNone",
140 /// "x-tsEnumNames": [
141 /// "ReadOnly",
142 /// "Write",
143 /// "Comment"
144 /// ]
145 ///}
146 /// ```
147 /// </details>
148 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
149 pub enum AccessTypeNotNone {
150 #[serde(rename = "readonly")]
151 Readonly,
152 #[serde(rename = "write")]
153 Write,
154 #[serde(rename = "comment")]
155 Comment,
156 }
157
158 impl ::std::convert::From<&Self> for AccessTypeNotNone {
159 fn from(value: &AccessTypeNotNone) -> Self {
160 value.clone()
161 }
162 }
163
164 impl ::std::fmt::Display for AccessTypeNotNone {
165 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
166 match *self {
167 Self::Readonly => f.write_str("readonly"),
168 Self::Write => f.write_str("write"),
169 Self::Comment => f.write_str("comment"),
170 }
171 }
172 }
173
174 impl ::std::str::FromStr for AccessTypeNotNone {
175 type Err = self::error::ConversionError;
176 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
177 match value {
178 "readonly" => Ok(Self::Readonly),
179 "write" => Ok(Self::Write),
180 "comment" => Ok(Self::Comment),
181 _ => Err("invalid value".into()),
182 }
183 }
184 }
185
186 impl ::std::convert::TryFrom<&str> for AccessTypeNotNone {
187 type Error = self::error::ConversionError;
188 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
189 value.parse()
190 }
191 }
192
193 impl ::std::convert::TryFrom<&::std::string::String> for AccessTypeNotNone {
194 type Error = self::error::ConversionError;
195 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
196 value.parse()
197 }
198 }
199
200 impl ::std::convert::TryFrom<::std::string::String> for AccessTypeNotNone {
201 type Error = self::error::ConversionError;
202 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
203 value.parse()
204 }
205 }
206
207 ///List of Permissions.
208 ///
209 /// <details><summary>JSON schema</summary>
210 ///
211 /// ```json
212 ///{
213 /// "description": "List of Permissions.",
214 /// "type": "object",
215 /// "required": [
216 /// "href",
217 /// "items"
218 /// ],
219 /// "properties": {
220 /// "href": {
221 /// "description": "API link to these results",
222 /// "examples": [
223 /// "https://coda.io/apis/v1/docs/AbCDeFGH/acl?limit=20"
224 /// ],
225 /// "type": "string",
226 /// "format": "url"
227 /// },
228 /// "items": {
229 /// "type": "array",
230 /// "items": {
231 /// "$ref": "#/components/schemas/Permission"
232 /// }
233 /// },
234 /// "nextPageLink": {
235 /// "allOf": [
236 /// {
237 /// "$ref": "#/components/schemas/nextPageLink"
238 /// },
239 /// {
240 /// "examples": [
241 /// "https://coda.io/apis/v1/docs/AbCDeFGH/acl?pageToken=eyJsaW1pd"
242 /// ],
243 /// "type": "string"
244 /// }
245 /// ]
246 /// },
247 /// "nextPageToken": {
248 /// "$ref": "#/components/schemas/nextPageToken"
249 /// }
250 /// },
251 /// "additionalProperties": false,
252 /// "x-schema-name": "Acl"
253 ///}
254 /// ```
255 /// </details>
256 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
257 #[serde(deny_unknown_fields)]
258 pub struct Acl {
259 ///API link to these results
260 pub href: ::std::string::String,
261 pub items: ::std::vec::Vec<Permission>,
262 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
263 pub next_page_link: ::std::option::Option<NextPageLink>,
264 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
265 pub next_page_token: ::std::option::Option<NextPageToken>,
266 }
267
268 impl ::std::convert::From<&Acl> for Acl {
269 fn from(value: &Acl) -> Self {
270 value.clone()
271 }
272 }
273
274 ///Doc level metadata associated with ACL.
275 ///
276 /// <details><summary>JSON schema</summary>
277 ///
278 /// ```json
279 ///{
280 /// "description": "Doc level metadata associated with ACL.",
281 /// "type": "object",
282 /// "required": [
283 /// "canCopy",
284 /// "canShare",
285 /// "canShareWithOrg",
286 /// "canShareWithWorkspace"
287 /// ],
288 /// "properties": {
289 /// "canCopy": {
290 /// "description": "When true, the user of the api can copy the doc",
291 /// "type": "boolean"
292 /// },
293 /// "canShare": {
294 /// "description": "When true, the user of the api can share",
295 /// "type": "boolean"
296 /// },
297 /// "canShareWithOrg": {
298 /// "description": "When true, the user of the api can share with the
299 /// org",
300 /// "type": "boolean"
301 /// },
302 /// "canShareWithWorkspace": {
303 /// "description": "When true, the user of the api can share with the
304 /// workspace",
305 /// "type": "boolean"
306 /// }
307 /// },
308 /// "additionalProperties": false,
309 /// "x-schema-name": "Acl"
310 ///}
311 /// ```
312 /// </details>
313 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
314 #[serde(deny_unknown_fields)]
315 pub struct AclMetadata {
316 ///When true, the user of the api can copy the doc
317 #[serde(rename = "canCopy")]
318 pub can_copy: bool,
319 ///When true, the user of the api can share
320 #[serde(rename = "canShare")]
321 pub can_share: bool,
322 ///When true, the user of the api can share with the org
323 #[serde(rename = "canShareWithOrg")]
324 pub can_share_with_org: bool,
325 ///When true, the user of the api can share with the workspace
326 #[serde(rename = "canShareWithWorkspace")]
327 pub can_share_with_workspace: bool,
328 }
329
330 impl ::std::convert::From<&AclMetadata> for AclMetadata {
331 fn from(value: &AclMetadata) -> Self {
332 value.clone()
333 }
334 }
335
336 ///Sharing settings for the doc.
337 ///
338 /// <details><summary>JSON schema</summary>
339 ///
340 /// ```json
341 ///{
342 /// "description": "Sharing settings for the doc.",
343 /// "type": "object",
344 /// "required": [
345 /// "allowCopying",
346 /// "allowEditorsToChangePermissions",
347 /// "allowViewersToRequestEditing"
348 /// ],
349 /// "properties": {
350 /// "allowCopying": {
351 /// "description": "When true, allows doc viewers to copy the doc.",
352 /// "type": "boolean"
353 /// },
354 /// "allowEditorsToChangePermissions": {
355 /// "description": "When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions.\n",
356 /// "type": "boolean"
357 /// },
358 /// "allowViewersToRequestEditing": {
359 /// "description": "When true, allows doc viewers to request editing
360 /// permissions.",
361 /// "type": "boolean"
362 /// }
363 /// },
364 /// "additionalProperties": false,
365 /// "x-schema-name": "AclSettings"
366 ///}
367 /// ```
368 /// </details>
369 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
370 #[serde(deny_unknown_fields)]
371 pub struct AclSettings {
372 ///When true, allows doc viewers to copy the doc.
373 #[serde(rename = "allowCopying")]
374 pub allow_copying: bool,
375 ///When true, allows editors to change doc permissions. When false,
376 /// only doc owner can change doc permissions.
377 #[serde(rename = "allowEditorsToChangePermissions")]
378 pub allow_editors_to_change_permissions: bool,
379 ///When true, allows doc viewers to request editing permissions.
380 #[serde(rename = "allowViewersToRequestEditing")]
381 pub allow_viewers_to_request_editing: bool,
382 }
383
384 impl ::std::convert::From<&AclSettings> for AclSettings {
385 fn from(value: &AclSettings) -> Self {
386 value.clone()
387 }
388 }
389
390 ///Payload for adding a custom published doc domain.
391 ///
392 /// <details><summary>JSON schema</summary>
393 ///
394 /// ```json
395 ///{
396 /// "description": "Payload for adding a custom published doc domain.",
397 /// "type": "object",
398 /// "required": [
399 /// "customDocDomain"
400 /// ],
401 /// "properties": {
402 /// "customDocDomain": {
403 /// "description": "The custom domain.",
404 /// "examples": [
405 /// "example.com"
406 /// ],
407 /// "type": "string"
408 /// }
409 /// },
410 /// "additionalProperties": false,
411 /// "x-schema-name": "AddCustomDocDomainRequest"
412 ///}
413 /// ```
414 /// </details>
415 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
416 #[serde(deny_unknown_fields)]
417 pub struct AddCustomDocDomainRequest {
418 ///The custom domain.
419 #[serde(rename = "customDocDomain")]
420 pub custom_doc_domain: ::std::string::String,
421 }
422
423 impl ::std::convert::From<&AddCustomDocDomainRequest> for AddCustomDocDomainRequest {
424 fn from(value: &AddCustomDocDomainRequest) -> Self {
425 value.clone()
426 }
427 }
428
429 ///The result of adding a custom domain to a published doc.
430 ///
431 /// <details><summary>JSON schema</summary>
432 ///
433 /// ```json
434 ///{
435 /// "description": "The result of adding a custom domain to a published
436 /// doc.",
437 /// "type": "object",
438 /// "additionalProperties": false,
439 /// "x-schema-name": "AddCustomDocDomainResponse"
440 ///}
441 /// ```
442 /// </details>
443 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
444 #[serde(deny_unknown_fields)]
445 pub struct AddCustomDocDomainResponse {}
446 impl ::std::convert::From<&AddCustomDocDomainResponse> for AddCustomDocDomainResponse {
447 fn from(value: &AddCustomDocDomainResponse) -> Self {
448 value.clone()
449 }
450 }
451
452 impl ::std::default::Default for AddCustomDocDomainResponse {
453 fn default() -> Self {
454 Self {}
455 }
456 }
457
458 ///Payload for creating a Go Link
459 ///
460 /// <details><summary>JSON schema</summary>
461 ///
462 /// ```json
463 ///{
464 /// "description": "Payload for creating a Go Link",
465 /// "type": "object",
466 /// "required": [
467 /// "destinationUrl",
468 /// "name"
469 /// ],
470 /// "properties": {
471 /// "creatorEmail": {
472 /// "description": "Optional creator email for the Go Link. Only
473 /// organization admins can set this field.",
474 /// "examples": [
475 /// "foo@bar.com"
476 /// ],
477 /// "type": [
478 /// "string",
479 /// "null"
480 /// ],
481 /// "maxLength": 512
482 /// },
483 /// "description": {
484 /// "description": "Optional description for the Go Link.",
485 /// "type": "string",
486 /// "maxLength": 512
487 /// },
488 /// "destinationUrl": {
489 /// "description": "The URL that the Go Link redirects to.",
490 /// "type": "string",
491 /// "maxLength": 2048
492 /// },
493 /// "name": {
494 /// "description": "The name of the Go Link that comes after go/. Only
495 /// alphanumeric characters, dashes, and underscores are allowed.",
496 /// "type": "string",
497 /// "maxLength": 128,
498 /// "pattern": "^[a-zA-Z0-9\\-_]+$"
499 /// },
500 /// "urlPattern": {
501 /// "description": "Optional destination URL with {*} placeholders for
502 /// variables to be inserted. Variables are specified like
503 /// go/{name}/{var1}/{var2}.",
504 /// "examples": [
505 /// "https://example.com/{*}/{*}"
506 /// ],
507 /// "type": [
508 /// "string",
509 /// "null"
510 /// ],
511 /// "maxLength": 2048
512 /// }
513 /// },
514 /// "additionalProperties": false,
515 /// "x-schema-name": "AddGoLinkRequest"
516 ///}
517 /// ```
518 /// </details>
519 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
520 #[serde(deny_unknown_fields)]
521 pub struct AddGoLinkRequest {
522 ///Optional creator email for the Go Link. Only organization admins can
523 /// set this field.
524 #[serde(rename = "creatorEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
525 pub creator_email: ::std::option::Option<AddGoLinkRequestCreatorEmail>,
526 ///Optional description for the Go Link.
527 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
528 pub description: ::std::option::Option<AddGoLinkRequestDescription>,
529 ///The URL that the Go Link redirects to.
530 #[serde(rename = "destinationUrl")]
531 pub destination_url: AddGoLinkRequestDestinationUrl,
532 ///The name of the Go Link that comes after go/. Only alphanumeric
533 /// characters, dashes, and underscores are allowed.
534 pub name: AddGoLinkRequestName,
535 ///Optional destination URL with {*} placeholders for variables to be
536 /// inserted. Variables are specified like go/{name}/{var1}/{var2}.
537 #[serde(rename = "urlPattern", default, skip_serializing_if = "::std::option::Option::is_none")]
538 pub url_pattern: ::std::option::Option<AddGoLinkRequestUrlPattern>,
539 }
540
541 impl ::std::convert::From<&AddGoLinkRequest> for AddGoLinkRequest {
542 fn from(value: &AddGoLinkRequest) -> Self {
543 value.clone()
544 }
545 }
546
547 ///Optional creator email for the Go Link. Only organization admins can set
548 /// this field.
549 ///
550 /// <details><summary>JSON schema</summary>
551 ///
552 /// ```json
553 ///{
554 /// "description": "Optional creator email for the Go Link. Only
555 /// organization admins can set this field.",
556 /// "examples": [
557 /// "foo@bar.com"
558 /// ],
559 /// "type": "string",
560 /// "maxLength": 512
561 ///}
562 /// ```
563 /// </details>
564 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
565 #[serde(transparent)]
566 pub struct AddGoLinkRequestCreatorEmail(::std::string::String);
567 impl ::std::ops::Deref for AddGoLinkRequestCreatorEmail {
568 type Target = ::std::string::String;
569 fn deref(&self) -> &::std::string::String {
570 &self.0
571 }
572 }
573
574 impl ::std::convert::From<AddGoLinkRequestCreatorEmail> for ::std::string::String {
575 fn from(value: AddGoLinkRequestCreatorEmail) -> Self {
576 value.0
577 }
578 }
579
580 impl ::std::convert::From<&AddGoLinkRequestCreatorEmail> for AddGoLinkRequestCreatorEmail {
581 fn from(value: &AddGoLinkRequestCreatorEmail) -> Self {
582 value.clone()
583 }
584 }
585
586 impl ::std::str::FromStr for AddGoLinkRequestCreatorEmail {
587 type Err = self::error::ConversionError;
588 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
589 if value.chars().count() > 512usize {
590 return Err("longer than 512 characters".into());
591 }
592 Ok(Self(value.to_string()))
593 }
594 }
595
596 impl ::std::convert::TryFrom<&str> for AddGoLinkRequestCreatorEmail {
597 type Error = self::error::ConversionError;
598 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
599 value.parse()
600 }
601 }
602
603 impl ::std::convert::TryFrom<&::std::string::String> for AddGoLinkRequestCreatorEmail {
604 type Error = self::error::ConversionError;
605 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
606 value.parse()
607 }
608 }
609
610 impl ::std::convert::TryFrom<::std::string::String> for AddGoLinkRequestCreatorEmail {
611 type Error = self::error::ConversionError;
612 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
613 value.parse()
614 }
615 }
616
617 impl<'de> ::serde::Deserialize<'de> for AddGoLinkRequestCreatorEmail {
618 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
619 where
620 D: ::serde::Deserializer<'de>,
621 {
622 ::std::string::String::deserialize(deserializer)?
623 .parse()
624 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
625 }
626 }
627
628 ///Optional description for the Go Link.
629 ///
630 /// <details><summary>JSON schema</summary>
631 ///
632 /// ```json
633 ///{
634 /// "description": "Optional description for the Go Link.",
635 /// "type": "string",
636 /// "maxLength": 512
637 ///}
638 /// ```
639 /// </details>
640 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
641 #[serde(transparent)]
642 pub struct AddGoLinkRequestDescription(::std::string::String);
643 impl ::std::ops::Deref for AddGoLinkRequestDescription {
644 type Target = ::std::string::String;
645 fn deref(&self) -> &::std::string::String {
646 &self.0
647 }
648 }
649
650 impl ::std::convert::From<AddGoLinkRequestDescription> for ::std::string::String {
651 fn from(value: AddGoLinkRequestDescription) -> Self {
652 value.0
653 }
654 }
655
656 impl ::std::convert::From<&AddGoLinkRequestDescription> for AddGoLinkRequestDescription {
657 fn from(value: &AddGoLinkRequestDescription) -> Self {
658 value.clone()
659 }
660 }
661
662 impl ::std::str::FromStr for AddGoLinkRequestDescription {
663 type Err = self::error::ConversionError;
664 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
665 if value.chars().count() > 512usize {
666 return Err("longer than 512 characters".into());
667 }
668 Ok(Self(value.to_string()))
669 }
670 }
671
672 impl ::std::convert::TryFrom<&str> for AddGoLinkRequestDescription {
673 type Error = self::error::ConversionError;
674 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
675 value.parse()
676 }
677 }
678
679 impl ::std::convert::TryFrom<&::std::string::String> for AddGoLinkRequestDescription {
680 type Error = self::error::ConversionError;
681 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
682 value.parse()
683 }
684 }
685
686 impl ::std::convert::TryFrom<::std::string::String> for AddGoLinkRequestDescription {
687 type Error = self::error::ConversionError;
688 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
689 value.parse()
690 }
691 }
692
693 impl<'de> ::serde::Deserialize<'de> for AddGoLinkRequestDescription {
694 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
695 where
696 D: ::serde::Deserializer<'de>,
697 {
698 ::std::string::String::deserialize(deserializer)?
699 .parse()
700 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
701 }
702 }
703
704 ///The URL that the Go Link redirects to.
705 ///
706 /// <details><summary>JSON schema</summary>
707 ///
708 /// ```json
709 ///{
710 /// "description": "The URL that the Go Link redirects to.",
711 /// "type": "string",
712 /// "maxLength": 2048
713 ///}
714 /// ```
715 /// </details>
716 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
717 #[serde(transparent)]
718 pub struct AddGoLinkRequestDestinationUrl(::std::string::String);
719 impl ::std::ops::Deref for AddGoLinkRequestDestinationUrl {
720 type Target = ::std::string::String;
721 fn deref(&self) -> &::std::string::String {
722 &self.0
723 }
724 }
725
726 impl ::std::convert::From<AddGoLinkRequestDestinationUrl> for ::std::string::String {
727 fn from(value: AddGoLinkRequestDestinationUrl) -> Self {
728 value.0
729 }
730 }
731
732 impl ::std::convert::From<&AddGoLinkRequestDestinationUrl> for AddGoLinkRequestDestinationUrl {
733 fn from(value: &AddGoLinkRequestDestinationUrl) -> Self {
734 value.clone()
735 }
736 }
737
738 impl ::std::str::FromStr for AddGoLinkRequestDestinationUrl {
739 type Err = self::error::ConversionError;
740 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
741 if value.chars().count() > 2048usize {
742 return Err("longer than 2048 characters".into());
743 }
744 Ok(Self(value.to_string()))
745 }
746 }
747
748 impl ::std::convert::TryFrom<&str> for AddGoLinkRequestDestinationUrl {
749 type Error = self::error::ConversionError;
750 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
751 value.parse()
752 }
753 }
754
755 impl ::std::convert::TryFrom<&::std::string::String> for AddGoLinkRequestDestinationUrl {
756 type Error = self::error::ConversionError;
757 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
758 value.parse()
759 }
760 }
761
762 impl ::std::convert::TryFrom<::std::string::String> for AddGoLinkRequestDestinationUrl {
763 type Error = self::error::ConversionError;
764 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
765 value.parse()
766 }
767 }
768
769 impl<'de> ::serde::Deserialize<'de> for AddGoLinkRequestDestinationUrl {
770 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
771 where
772 D: ::serde::Deserializer<'de>,
773 {
774 ::std::string::String::deserialize(deserializer)?
775 .parse()
776 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
777 }
778 }
779
780 ///The name of the Go Link that comes after go/. Only alphanumeric
781 /// characters, dashes, and underscores are allowed.
782 ///
783 /// <details><summary>JSON schema</summary>
784 ///
785 /// ```json
786 ///{
787 /// "description": "The name of the Go Link that comes after go/. Only
788 /// alphanumeric characters, dashes, and underscores are allowed.",
789 /// "type": "string",
790 /// "maxLength": 128,
791 /// "pattern": "^[a-zA-Z0-9\\-_]+$"
792 ///}
793 /// ```
794 /// </details>
795 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
796 #[serde(transparent)]
797 pub struct AddGoLinkRequestName(::std::string::String);
798 impl ::std::ops::Deref for AddGoLinkRequestName {
799 type Target = ::std::string::String;
800 fn deref(&self) -> &::std::string::String {
801 &self.0
802 }
803 }
804
805 impl ::std::convert::From<AddGoLinkRequestName> for ::std::string::String {
806 fn from(value: AddGoLinkRequestName) -> Self {
807 value.0
808 }
809 }
810
811 impl ::std::convert::From<&AddGoLinkRequestName> for AddGoLinkRequestName {
812 fn from(value: &AddGoLinkRequestName) -> Self {
813 value.clone()
814 }
815 }
816
817 impl ::std::str::FromStr for AddGoLinkRequestName {
818 type Err = self::error::ConversionError;
819 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
820 if value.chars().count() > 128usize {
821 return Err("longer than 128 characters".into());
822 }
823 static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[a-zA-Z0-9\\-_]+$").unwrap());
824 if PATTERN.find(value).is_none() {
825 return Err("doesn't match pattern \"^[a-zA-Z0-9\\-_]+$\"".into());
826 }
827 Ok(Self(value.to_string()))
828 }
829 }
830
831 impl ::std::convert::TryFrom<&str> for AddGoLinkRequestName {
832 type Error = self::error::ConversionError;
833 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
834 value.parse()
835 }
836 }
837
838 impl ::std::convert::TryFrom<&::std::string::String> for AddGoLinkRequestName {
839 type Error = self::error::ConversionError;
840 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
841 value.parse()
842 }
843 }
844
845 impl ::std::convert::TryFrom<::std::string::String> for AddGoLinkRequestName {
846 type Error = self::error::ConversionError;
847 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
848 value.parse()
849 }
850 }
851
852 impl<'de> ::serde::Deserialize<'de> for AddGoLinkRequestName {
853 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
854 where
855 D: ::serde::Deserializer<'de>,
856 {
857 ::std::string::String::deserialize(deserializer)?
858 .parse()
859 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
860 }
861 }
862
863 ///Optional destination URL with {*} placeholders for variables to be
864 /// inserted. Variables are specified like go/{name}/{var1}/{var2}.
865 ///
866 /// <details><summary>JSON schema</summary>
867 ///
868 /// ```json
869 ///{
870 /// "description": "Optional destination URL with {*} placeholders for
871 /// variables to be inserted. Variables are specified like
872 /// go/{name}/{var1}/{var2}.",
873 /// "examples": [
874 /// "https://example.com/{*}/{*}"
875 /// ],
876 /// "type": "string",
877 /// "maxLength": 2048
878 ///}
879 /// ```
880 /// </details>
881 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
882 #[serde(transparent)]
883 pub struct AddGoLinkRequestUrlPattern(::std::string::String);
884 impl ::std::ops::Deref for AddGoLinkRequestUrlPattern {
885 type Target = ::std::string::String;
886 fn deref(&self) -> &::std::string::String {
887 &self.0
888 }
889 }
890
891 impl ::std::convert::From<AddGoLinkRequestUrlPattern> for ::std::string::String {
892 fn from(value: AddGoLinkRequestUrlPattern) -> Self {
893 value.0
894 }
895 }
896
897 impl ::std::convert::From<&AddGoLinkRequestUrlPattern> for AddGoLinkRequestUrlPattern {
898 fn from(value: &AddGoLinkRequestUrlPattern) -> Self {
899 value.clone()
900 }
901 }
902
903 impl ::std::str::FromStr for AddGoLinkRequestUrlPattern {
904 type Err = self::error::ConversionError;
905 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
906 if value.chars().count() > 2048usize {
907 return Err("longer than 2048 characters".into());
908 }
909 Ok(Self(value.to_string()))
910 }
911 }
912
913 impl ::std::convert::TryFrom<&str> for AddGoLinkRequestUrlPattern {
914 type Error = self::error::ConversionError;
915 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
916 value.parse()
917 }
918 }
919
920 impl ::std::convert::TryFrom<&::std::string::String> for AddGoLinkRequestUrlPattern {
921 type Error = self::error::ConversionError;
922 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
923 value.parse()
924 }
925 }
926
927 impl ::std::convert::TryFrom<::std::string::String> for AddGoLinkRequestUrlPattern {
928 type Error = self::error::ConversionError;
929 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
930 value.parse()
931 }
932 }
933
934 impl<'de> ::serde::Deserialize<'de> for AddGoLinkRequestUrlPattern {
935 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
936 where
937 D: ::serde::Deserializer<'de>,
938 {
939 ::std::string::String::deserialize(deserializer)?
940 .parse()
941 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
942 }
943 }
944
945 ///An HTTP error resulting from an unsuccessful request.
946 ///
947 /// <details><summary>JSON schema</summary>
948 ///
949 /// ```json
950 ///{
951 /// "description": "An HTTP error resulting from an unsuccessful request.",
952 /// "required": [
953 /// "message",
954 /// "statusCode",
955 /// "statusMessage"
956 /// ],
957 /// "properties": {
958 /// "message": {
959 /// "description": "Any additional context on the error, or the same as
960 /// `statusMessage` otherwise.",
961 /// "examples": [
962 /// "Bad Request"
963 /// ],
964 /// "type": "string"
965 /// },
966 /// "statusCode": {
967 /// "description": "HTTP status code of the error.",
968 /// "examples": [
969 /// 400
970 /// ],
971 /// "type": "number"
972 /// },
973 /// "statusMessage": {
974 /// "description": "HTTP status message of the error.",
975 /// "examples": [
976 /// "Bad Request"
977 /// ],
978 /// "type": "string"
979 /// }
980 /// },
981 /// "additionalProperties": false
982 ///}
983 /// ```
984 /// </details>
985 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
986 #[serde(deny_unknown_fields)]
987 pub struct AddGoLinkResponse {
988 ///Any additional context on the error, or the same as `statusMessage`
989 /// otherwise.
990 pub message: ::std::string::String,
991 #[serde(rename = "statusCode")]
992 pub status_code: f64,
993 ///HTTP status message of the error.
994 #[serde(rename = "statusMessage")]
995 pub status_message: ::std::string::String,
996 }
997
998 impl ::std::convert::From<&AddGoLinkResponse> for AddGoLinkResponse {
999 fn from(value: &AddGoLinkResponse) -> Self {
1000 value.clone()
1001 }
1002 }
1003
1004 ///The result of adding a Go Link.
1005 ///
1006 /// <details><summary>JSON schema</summary>
1007 ///
1008 /// ```json
1009 ///{
1010 /// "description": "The result of adding a Go Link.",
1011 /// "type": "object",
1012 /// "additionalProperties": false,
1013 /// "x-schema-name": "AddGoLinkResult"
1014 ///}
1015 /// ```
1016 /// </details>
1017 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1018 #[serde(deny_unknown_fields)]
1019 pub struct AddGoLinkResult {}
1020 impl ::std::convert::From<&AddGoLinkResult> for AddGoLinkResult {
1021 fn from(value: &AddGoLinkResult) -> Self {
1022 value.clone()
1023 }
1024 }
1025
1026 impl ::std::default::Default for AddGoLinkResult {
1027 fn default() -> Self {
1028 Self {}
1029 }
1030 }
1031
1032 ///Payload for adding a Pack Category.
1033 ///
1034 /// <details><summary>JSON schema</summary>
1035 ///
1036 /// ```json
1037 ///{
1038 /// "description": "Payload for adding a Pack Category.",
1039 /// "type": "object",
1040 /// "required": [
1041 /// "categoryName"
1042 /// ],
1043 /// "properties": {
1044 /// "categoryName": {
1045 /// "description": "Name of the publishing category.",
1046 /// "examples": [
1047 /// "Project management"
1048 /// ],
1049 /// "type": "string"
1050 /// }
1051 /// },
1052 /// "additionalProperties": false,
1053 /// "x-schema-name": "AddPackCategoryRequest"
1054 ///}
1055 /// ```
1056 /// </details>
1057 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1058 #[serde(deny_unknown_fields)]
1059 pub struct AddPackCategoryRequest {
1060 ///Name of the publishing category.
1061 #[serde(rename = "categoryName")]
1062 pub category_name: ::std::string::String,
1063 }
1064
1065 impl ::std::convert::From<&AddPackCategoryRequest> for AddPackCategoryRequest {
1066 fn from(value: &AddPackCategoryRequest) -> Self {
1067 value.clone()
1068 }
1069 }
1070
1071 ///Confirmation of successfully adding a Pack category.
1072 ///
1073 /// <details><summary>JSON schema</summary>
1074 ///
1075 /// ```json
1076 ///{
1077 /// "description": "Confirmation of successfully adding a Pack category.",
1078 /// "type": "object",
1079 /// "additionalProperties": false,
1080 /// "x-schema-name": "AddPackCategoryResponse"
1081 ///}
1082 /// ```
1083 /// </details>
1084 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1085 #[serde(deny_unknown_fields)]
1086 pub struct AddPackCategoryResponse {}
1087 impl ::std::convert::From<&AddPackCategoryResponse> for AddPackCategoryResponse {
1088 fn from(value: &AddPackCategoryResponse) -> Self {
1089 value.clone()
1090 }
1091 }
1092
1093 impl ::std::default::Default for AddPackCategoryResponse {
1094 fn default() -> Self {
1095 Self {}
1096 }
1097 }
1098
1099 ///Detail about why this request was rejected.
1100 ///
1101 /// <details><summary>JSON schema</summary>
1102 ///
1103 /// ```json
1104 ///{
1105 /// "description": "Detail about why this request was rejected.",
1106 /// "type": "object",
1107 /// "properties": {
1108 /// "validationErrors": {
1109 /// "type": "array",
1110 /// "items": {
1111 /// "$ref": "#/components/schemas/ValidationError"
1112 /// }
1113 /// }
1114 /// },
1115 /// "additionalProperties": false
1116 ///}
1117 /// ```
1118 /// </details>
1119 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1120 #[serde(deny_unknown_fields)]
1121 pub struct AddPackCategoryResponseCodaDetail {
1122 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1123 pub validation_errors: ::std::vec::Vec<ValidationError>,
1124 }
1125
1126 impl ::std::convert::From<&AddPackCategoryResponseCodaDetail> for AddPackCategoryResponseCodaDetail {
1127 fn from(value: &AddPackCategoryResponseCodaDetail) -> Self {
1128 value.clone()
1129 }
1130 }
1131
1132 impl ::std::default::Default for AddPackCategoryResponseCodaDetail {
1133 fn default() -> Self {
1134 Self {
1135 validation_errors: Default::default(),
1136 }
1137 }
1138 }
1139
1140 ///Payload for adding a Pack maker.
1141 ///
1142 /// <details><summary>JSON schema</summary>
1143 ///
1144 /// ```json
1145 ///{
1146 /// "description": "Payload for adding a Pack maker.",
1147 /// "type": "object",
1148 /// "required": [
1149 /// "loginId"
1150 /// ],
1151 /// "properties": {
1152 /// "loginId": {
1153 /// "description": "The email of the Pack maker.",
1154 /// "examples": [
1155 /// "api@coda.io"
1156 /// ],
1157 /// "type": "string"
1158 /// }
1159 /// },
1160 /// "additionalProperties": false,
1161 /// "x-schema-name": "AddPackMakerRequest"
1162 ///}
1163 /// ```
1164 /// </details>
1165 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1166 #[serde(deny_unknown_fields)]
1167 pub struct AddPackMakerRequest {
1168 ///The email of the Pack maker.
1169 #[serde(rename = "loginId")]
1170 pub login_id: ::std::string::String,
1171 }
1172
1173 impl ::std::convert::From<&AddPackMakerRequest> for AddPackMakerRequest {
1174 fn from(value: &AddPackMakerRequest) -> Self {
1175 value.clone()
1176 }
1177 }
1178
1179 ///Confirmation of successfully adding a Pack maker.
1180 ///
1181 /// <details><summary>JSON schema</summary>
1182 ///
1183 /// ```json
1184 ///{
1185 /// "description": "Confirmation of successfully adding a Pack maker.",
1186 /// "type": "object",
1187 /// "additionalProperties": false,
1188 /// "x-schema-name": "AddPackMakerResponse"
1189 ///}
1190 /// ```
1191 /// </details>
1192 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1193 #[serde(deny_unknown_fields)]
1194 pub struct AddPackMakerResponse {}
1195 impl ::std::convert::From<&AddPackMakerResponse> for AddPackMakerResponse {
1196 fn from(value: &AddPackMakerResponse) -> Self {
1197 value.clone()
1198 }
1199 }
1200
1201 impl ::std::default::Default for AddPackMakerResponse {
1202 fn default() -> Self {
1203 Self {}
1204 }
1205 }
1206
1207 ///Detail about why this request was rejected.
1208 ///
1209 /// <details><summary>JSON schema</summary>
1210 ///
1211 /// ```json
1212 ///{
1213 /// "description": "Detail about why this request was rejected.",
1214 /// "type": "object",
1215 /// "properties": {
1216 /// "validationErrors": {
1217 /// "type": "array",
1218 /// "items": {
1219 /// "$ref": "#/components/schemas/ValidationError"
1220 /// }
1221 /// }
1222 /// },
1223 /// "additionalProperties": false
1224 ///}
1225 /// ```
1226 /// </details>
1227 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1228 #[serde(deny_unknown_fields)]
1229 pub struct AddPackMakerResponseCodaDetail {
1230 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1231 pub validation_errors: ::std::vec::Vec<ValidationError>,
1232 }
1233
1234 impl ::std::convert::From<&AddPackMakerResponseCodaDetail> for AddPackMakerResponseCodaDetail {
1235 fn from(value: &AddPackMakerResponseCodaDetail) -> Self {
1236 value.clone()
1237 }
1238 }
1239
1240 impl ::std::default::Default for AddPackMakerResponseCodaDetail {
1241 fn default() -> Self {
1242 Self {
1243 validation_errors: Default::default(),
1244 }
1245 }
1246 }
1247
1248 ///Payload for upserting a Pack permission.
1249 ///
1250 /// <details><summary>JSON schema</summary>
1251 ///
1252 /// ```json
1253 ///{
1254 /// "description": "Payload for upserting a Pack permission.",
1255 /// "type": "object",
1256 /// "required": [
1257 /// "access",
1258 /// "principal"
1259 /// ],
1260 /// "properties": {
1261 /// "access": {
1262 /// "$ref": "#/components/schemas/PackAccessType"
1263 /// },
1264 /// "principal": {
1265 /// "$ref": "#/components/schemas/PackPrincipal"
1266 /// }
1267 /// },
1268 /// "additionalProperties": false,
1269 /// "x-schema-name": "AddPackPermissionRequest"
1270 ///}
1271 /// ```
1272 /// </details>
1273 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1274 #[serde(deny_unknown_fields)]
1275 pub struct AddPackPermissionRequest {
1276 pub access: PackAccessType,
1277 pub principal: PackPrincipal,
1278 }
1279
1280 impl ::std::convert::From<&AddPackPermissionRequest> for AddPackPermissionRequest {
1281 fn from(value: &AddPackPermissionRequest) -> Self {
1282 value.clone()
1283 }
1284 }
1285
1286 ///Confirmation of successfully upserting a Pack permission.
1287 ///
1288 /// <details><summary>JSON schema</summary>
1289 ///
1290 /// ```json
1291 ///{
1292 /// "description": "Confirmation of successfully upserting a Pack
1293 /// permission.",
1294 /// "type": "object",
1295 /// "required": [
1296 /// "permissionId"
1297 /// ],
1298 /// "properties": {
1299 /// "permissionId": {
1300 /// "description": "The ID of the permission created or updated.",
1301 /// "type": "string"
1302 /// }
1303 /// },
1304 /// "additionalProperties": false,
1305 /// "x-schema-name": "AddPackPermissionResponse"
1306 ///}
1307 /// ```
1308 /// </details>
1309 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1310 #[serde(deny_unknown_fields)]
1311 pub struct AddPackPermissionResponse {
1312 ///The ID of the permission created or updated.
1313 #[serde(rename = "permissionId")]
1314 pub permission_id: ::std::string::String,
1315 }
1316
1317 impl ::std::convert::From<&AddPackPermissionResponse> for AddPackPermissionResponse {
1318 fn from(value: &AddPackPermissionResponse) -> Self {
1319 value.clone()
1320 }
1321 }
1322
1323 ///Detail about why this request was rejected.
1324 ///
1325 /// <details><summary>JSON schema</summary>
1326 ///
1327 /// ```json
1328 ///{
1329 /// "description": "Detail about why this request was rejected.",
1330 /// "type": "object",
1331 /// "properties": {
1332 /// "validationErrors": {
1333 /// "type": "array",
1334 /// "items": {
1335 /// "$ref": "#/components/schemas/ValidationError"
1336 /// }
1337 /// }
1338 /// },
1339 /// "additionalProperties": false
1340 ///}
1341 /// ```
1342 /// </details>
1343 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1344 #[serde(deny_unknown_fields)]
1345 pub struct AddPackPermissionResponseCodaDetail {
1346 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1347 pub validation_errors: ::std::vec::Vec<ValidationError>,
1348 }
1349
1350 impl ::std::convert::From<&AddPackPermissionResponseCodaDetail> for AddPackPermissionResponseCodaDetail {
1351 fn from(value: &AddPackPermissionResponseCodaDetail) -> Self {
1352 value.clone()
1353 }
1354 }
1355
1356 impl ::std::default::Default for AddPackPermissionResponseCodaDetail {
1357 fn default() -> Self {
1358 Self {
1359 validation_errors: Default::default(),
1360 }
1361 }
1362 }
1363
1364 ///Payload for granting a new permission.
1365 ///
1366 /// <details><summary>JSON schema</summary>
1367 ///
1368 /// ```json
1369 ///{
1370 /// "description": "Payload for granting a new permission.",
1371 /// "type": "object",
1372 /// "required": [
1373 /// "access",
1374 /// "principal"
1375 /// ],
1376 /// "properties": {
1377 /// "access": {
1378 /// "$ref": "#/components/schemas/AccessTypeNotNone"
1379 /// },
1380 /// "principal": {
1381 /// "$ref": "#/components/schemas/AddedPrincipal"
1382 /// },
1383 /// "suppressEmail": {
1384 /// "description": "When true suppresses email notification",
1385 /// "type": "boolean"
1386 /// }
1387 /// },
1388 /// "additionalProperties": false,
1389 /// "x-schema-name": "AddPermissionRequest"
1390 ///}
1391 /// ```
1392 /// </details>
1393 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1394 #[serde(deny_unknown_fields)]
1395 pub struct AddPermissionRequest {
1396 pub access: AccessTypeNotNone,
1397 pub principal: AddedPrincipal,
1398 ///When true suppresses email notification
1399 #[serde(rename = "suppressEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
1400 pub suppress_email: ::std::option::Option<bool>,
1401 }
1402
1403 impl ::std::convert::From<&AddPermissionRequest> for AddPermissionRequest {
1404 fn from(value: &AddPermissionRequest) -> Self {
1405 value.clone()
1406 }
1407 }
1408
1409 ///An HTTP error resulting from an unsuccessful request.
1410 ///
1411 /// <details><summary>JSON schema</summary>
1412 ///
1413 /// ```json
1414 ///{
1415 /// "description": "An HTTP error resulting from an unsuccessful request.",
1416 /// "required": [
1417 /// "message",
1418 /// "statusCode",
1419 /// "statusMessage"
1420 /// ],
1421 /// "properties": {
1422 /// "message": {
1423 /// "description": "Any additional context on the error, or the same as
1424 /// `statusMessage` otherwise.",
1425 /// "examples": [
1426 /// "Bad Request"
1427 /// ],
1428 /// "type": "string"
1429 /// },
1430 /// "statusCode": {
1431 /// "description": "HTTP status code of the error.",
1432 /// "examples": [
1433 /// 400
1434 /// ],
1435 /// "type": "number"
1436 /// },
1437 /// "statusMessage": {
1438 /// "description": "HTTP status message of the error.",
1439 /// "examples": [
1440 /// "Bad Request"
1441 /// ],
1442 /// "type": "string"
1443 /// }
1444 /// },
1445 /// "additionalProperties": false
1446 ///}
1447 /// ```
1448 /// </details>
1449 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1450 #[serde(deny_unknown_fields)]
1451 pub struct AddPermissionResponse {
1452 ///Any additional context on the error, or the same as `statusMessage`
1453 /// otherwise.
1454 pub message: ::std::string::String,
1455 #[serde(rename = "statusCode")]
1456 pub status_code: f64,
1457 ///HTTP status message of the error.
1458 #[serde(rename = "statusMessage")]
1459 pub status_message: ::std::string::String,
1460 }
1461
1462 impl ::std::convert::From<&AddPermissionResponse> for AddPermissionResponse {
1463 fn from(value: &AddPermissionResponse) -> Self {
1464 value.clone()
1465 }
1466 }
1467
1468 ///The result of sharing a doc.
1469 ///
1470 /// <details><summary>JSON schema</summary>
1471 ///
1472 /// ```json
1473 ///{
1474 /// "description": "The result of sharing a doc.",
1475 /// "type": "object",
1476 /// "additionalProperties": false,
1477 /// "x-schema-name": "AddPermissionResult"
1478 ///}
1479 /// ```
1480 /// </details>
1481 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1482 #[serde(deny_unknown_fields)]
1483 pub struct AddPermissionResult {}
1484 impl ::std::convert::From<&AddPermissionResult> for AddPermissionResult {
1485 fn from(value: &AddPermissionResult) -> Self {
1486 value.clone()
1487 }
1488 }
1489
1490 impl ::std::default::Default for AddPermissionResult {
1491 fn default() -> Self {
1492 Self {}
1493 }
1494 }
1495
1496 ///`AddedAnyonePrincipal`
1497 ///
1498 /// <details><summary>JSON schema</summary>
1499 ///
1500 /// ```json
1501 ///{
1502 /// "type": "object",
1503 /// "required": [
1504 /// "type"
1505 /// ],
1506 /// "properties": {
1507 /// "type": {
1508 /// "description": "The type of this principal.",
1509 /// "type": "string",
1510 /// "enum": [
1511 /// "anyone"
1512 /// ],
1513 /// "x-tsType": "PrincipalType.Anyone"
1514 /// }
1515 /// },
1516 /// "additionalProperties": false
1517 ///}
1518 /// ```
1519 /// </details>
1520 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1521 #[serde(deny_unknown_fields)]
1522 pub struct AddedAnyonePrincipal {
1523 ///The type of this principal.
1524 #[serde(rename = "type")]
1525 pub type_: AddedAnyonePrincipalType,
1526 }
1527
1528 impl ::std::convert::From<&AddedAnyonePrincipal> for AddedAnyonePrincipal {
1529 fn from(value: &AddedAnyonePrincipal) -> Self {
1530 value.clone()
1531 }
1532 }
1533
1534 ///The type of this principal.
1535 ///
1536 /// <details><summary>JSON schema</summary>
1537 ///
1538 /// ```json
1539 ///{
1540 /// "description": "The type of this principal.",
1541 /// "type": "string",
1542 /// "enum": [
1543 /// "anyone"
1544 /// ],
1545 /// "x-tsType": "PrincipalType.Anyone"
1546 ///}
1547 /// ```
1548 /// </details>
1549 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1550 pub enum AddedAnyonePrincipalType {
1551 #[serde(rename = "anyone")]
1552 Anyone,
1553 }
1554
1555 impl ::std::convert::From<&Self> for AddedAnyonePrincipalType {
1556 fn from(value: &AddedAnyonePrincipalType) -> Self {
1557 value.clone()
1558 }
1559 }
1560
1561 impl ::std::fmt::Display for AddedAnyonePrincipalType {
1562 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1563 match *self {
1564 Self::Anyone => f.write_str("anyone"),
1565 }
1566 }
1567 }
1568
1569 impl ::std::str::FromStr for AddedAnyonePrincipalType {
1570 type Err = self::error::ConversionError;
1571 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1572 match value {
1573 "anyone" => Ok(Self::Anyone),
1574 _ => Err("invalid value".into()),
1575 }
1576 }
1577 }
1578
1579 impl ::std::convert::TryFrom<&str> for AddedAnyonePrincipalType {
1580 type Error = self::error::ConversionError;
1581 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1582 value.parse()
1583 }
1584 }
1585
1586 impl ::std::convert::TryFrom<&::std::string::String> for AddedAnyonePrincipalType {
1587 type Error = self::error::ConversionError;
1588 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1589 value.parse()
1590 }
1591 }
1592
1593 impl ::std::convert::TryFrom<::std::string::String> for AddedAnyonePrincipalType {
1594 type Error = self::error::ConversionError;
1595 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1596 value.parse()
1597 }
1598 }
1599
1600 ///`AddedDomainPrincipal`
1601 ///
1602 /// <details><summary>JSON schema</summary>
1603 ///
1604 /// ```json
1605 ///{
1606 /// "type": "object",
1607 /// "required": [
1608 /// "domain",
1609 /// "type"
1610 /// ],
1611 /// "properties": {
1612 /// "domain": {
1613 /// "description": "Domain for the principal.",
1614 /// "examples": [
1615 /// "domain.com"
1616 /// ],
1617 /// "type": "string"
1618 /// },
1619 /// "type": {
1620 /// "description": "The type of this principal.",
1621 /// "type": "string",
1622 /// "enum": [
1623 /// "domain"
1624 /// ],
1625 /// "x-tsType": "PrincipalType.Domain"
1626 /// }
1627 /// },
1628 /// "additionalProperties": false
1629 ///}
1630 /// ```
1631 /// </details>
1632 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1633 #[serde(deny_unknown_fields)]
1634 pub struct AddedDomainPrincipal {
1635 ///Domain for the principal.
1636 pub domain: ::std::string::String,
1637 ///The type of this principal.
1638 #[serde(rename = "type")]
1639 pub type_: AddedDomainPrincipalType,
1640 }
1641
1642 impl ::std::convert::From<&AddedDomainPrincipal> for AddedDomainPrincipal {
1643 fn from(value: &AddedDomainPrincipal) -> Self {
1644 value.clone()
1645 }
1646 }
1647
1648 ///The type of this principal.
1649 ///
1650 /// <details><summary>JSON schema</summary>
1651 ///
1652 /// ```json
1653 ///{
1654 /// "description": "The type of this principal.",
1655 /// "type": "string",
1656 /// "enum": [
1657 /// "domain"
1658 /// ],
1659 /// "x-tsType": "PrincipalType.Domain"
1660 ///}
1661 /// ```
1662 /// </details>
1663 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1664 pub enum AddedDomainPrincipalType {
1665 #[serde(rename = "domain")]
1666 Domain,
1667 }
1668
1669 impl ::std::convert::From<&Self> for AddedDomainPrincipalType {
1670 fn from(value: &AddedDomainPrincipalType) -> Self {
1671 value.clone()
1672 }
1673 }
1674
1675 impl ::std::fmt::Display for AddedDomainPrincipalType {
1676 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1677 match *self {
1678 Self::Domain => f.write_str("domain"),
1679 }
1680 }
1681 }
1682
1683 impl ::std::str::FromStr for AddedDomainPrincipalType {
1684 type Err = self::error::ConversionError;
1685 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1686 match value {
1687 "domain" => Ok(Self::Domain),
1688 _ => Err("invalid value".into()),
1689 }
1690 }
1691 }
1692
1693 impl ::std::convert::TryFrom<&str> for AddedDomainPrincipalType {
1694 type Error = self::error::ConversionError;
1695 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1696 value.parse()
1697 }
1698 }
1699
1700 impl ::std::convert::TryFrom<&::std::string::String> for AddedDomainPrincipalType {
1701 type Error = self::error::ConversionError;
1702 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1703 value.parse()
1704 }
1705 }
1706
1707 impl ::std::convert::TryFrom<::std::string::String> for AddedDomainPrincipalType {
1708 type Error = self::error::ConversionError;
1709 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1710 value.parse()
1711 }
1712 }
1713
1714 ///`AddedEmailPrincipal`
1715 ///
1716 /// <details><summary>JSON schema</summary>
1717 ///
1718 /// ```json
1719 ///{
1720 /// "type": "object",
1721 /// "required": [
1722 /// "email",
1723 /// "type"
1724 /// ],
1725 /// "properties": {
1726 /// "email": {
1727 /// "description": "Email for the principal.",
1728 /// "examples": [
1729 /// "example@domain.com"
1730 /// ],
1731 /// "type": "string"
1732 /// },
1733 /// "type": {
1734 /// "description": "The type of this principal.",
1735 /// "type": "string",
1736 /// "enum": [
1737 /// "email"
1738 /// ],
1739 /// "x-tsType": "PrincipalType.Email"
1740 /// }
1741 /// },
1742 /// "additionalProperties": false
1743 ///}
1744 /// ```
1745 /// </details>
1746 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1747 #[serde(deny_unknown_fields)]
1748 pub struct AddedEmailPrincipal {
1749 ///Email for the principal.
1750 pub email: ::std::string::String,
1751 ///The type of this principal.
1752 #[serde(rename = "type")]
1753 pub type_: AddedEmailPrincipalType,
1754 }
1755
1756 impl ::std::convert::From<&AddedEmailPrincipal> for AddedEmailPrincipal {
1757 fn from(value: &AddedEmailPrincipal) -> Self {
1758 value.clone()
1759 }
1760 }
1761
1762 ///The type of this principal.
1763 ///
1764 /// <details><summary>JSON schema</summary>
1765 ///
1766 /// ```json
1767 ///{
1768 /// "description": "The type of this principal.",
1769 /// "type": "string",
1770 /// "enum": [
1771 /// "email"
1772 /// ],
1773 /// "x-tsType": "PrincipalType.Email"
1774 ///}
1775 /// ```
1776 /// </details>
1777 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1778 pub enum AddedEmailPrincipalType {
1779 #[serde(rename = "email")]
1780 Email,
1781 }
1782
1783 impl ::std::convert::From<&Self> for AddedEmailPrincipalType {
1784 fn from(value: &AddedEmailPrincipalType) -> Self {
1785 value.clone()
1786 }
1787 }
1788
1789 impl ::std::fmt::Display for AddedEmailPrincipalType {
1790 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1791 match *self {
1792 Self::Email => f.write_str("email"),
1793 }
1794 }
1795 }
1796
1797 impl ::std::str::FromStr for AddedEmailPrincipalType {
1798 type Err = self::error::ConversionError;
1799 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1800 match value {
1801 "email" => Ok(Self::Email),
1802 _ => Err("invalid value".into()),
1803 }
1804 }
1805 }
1806
1807 impl ::std::convert::TryFrom<&str> for AddedEmailPrincipalType {
1808 type Error = self::error::ConversionError;
1809 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1810 value.parse()
1811 }
1812 }
1813
1814 impl ::std::convert::TryFrom<&::std::string::String> for AddedEmailPrincipalType {
1815 type Error = self::error::ConversionError;
1816 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1817 value.parse()
1818 }
1819 }
1820
1821 impl ::std::convert::TryFrom<::std::string::String> for AddedEmailPrincipalType {
1822 type Error = self::error::ConversionError;
1823 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1824 value.parse()
1825 }
1826 }
1827
1828 ///`AddedGroupPrincipal`
1829 ///
1830 /// <details><summary>JSON schema</summary>
1831 ///
1832 /// ```json
1833 ///{
1834 /// "type": "object",
1835 /// "required": [
1836 /// "groupId",
1837 /// "type"
1838 /// ],
1839 /// "properties": {
1840 /// "groupId": {
1841 /// "description": "Group ID for the principal.",
1842 /// "examples": [
1843 /// "grp-6SM9xrKcqW"
1844 /// ],
1845 /// "type": "string"
1846 /// },
1847 /// "type": {
1848 /// "description": "The type of this principal.",
1849 /// "type": "string",
1850 /// "enum": [
1851 /// "group"
1852 /// ],
1853 /// "x-tsType": "PrincipalType.Group"
1854 /// }
1855 /// },
1856 /// "additionalProperties": false
1857 ///}
1858 /// ```
1859 /// </details>
1860 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1861 #[serde(deny_unknown_fields)]
1862 pub struct AddedGroupPrincipal {
1863 ///Group ID for the principal.
1864 #[serde(rename = "groupId")]
1865 pub group_id: ::std::string::String,
1866 ///The type of this principal.
1867 #[serde(rename = "type")]
1868 pub type_: AddedGroupPrincipalType,
1869 }
1870
1871 impl ::std::convert::From<&AddedGroupPrincipal> for AddedGroupPrincipal {
1872 fn from(value: &AddedGroupPrincipal) -> Self {
1873 value.clone()
1874 }
1875 }
1876
1877 ///The type of this principal.
1878 ///
1879 /// <details><summary>JSON schema</summary>
1880 ///
1881 /// ```json
1882 ///{
1883 /// "description": "The type of this principal.",
1884 /// "type": "string",
1885 /// "enum": [
1886 /// "group"
1887 /// ],
1888 /// "x-tsType": "PrincipalType.Group"
1889 ///}
1890 /// ```
1891 /// </details>
1892 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1893 pub enum AddedGroupPrincipalType {
1894 #[serde(rename = "group")]
1895 Group,
1896 }
1897
1898 impl ::std::convert::From<&Self> for AddedGroupPrincipalType {
1899 fn from(value: &AddedGroupPrincipalType) -> Self {
1900 value.clone()
1901 }
1902 }
1903
1904 impl ::std::fmt::Display for AddedGroupPrincipalType {
1905 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1906 match *self {
1907 Self::Group => f.write_str("group"),
1908 }
1909 }
1910 }
1911
1912 impl ::std::str::FromStr for AddedGroupPrincipalType {
1913 type Err = self::error::ConversionError;
1914 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1915 match value {
1916 "group" => Ok(Self::Group),
1917 _ => Err("invalid value".into()),
1918 }
1919 }
1920 }
1921
1922 impl ::std::convert::TryFrom<&str> for AddedGroupPrincipalType {
1923 type Error = self::error::ConversionError;
1924 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1925 value.parse()
1926 }
1927 }
1928
1929 impl ::std::convert::TryFrom<&::std::string::String> for AddedGroupPrincipalType {
1930 type Error = self::error::ConversionError;
1931 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1932 value.parse()
1933 }
1934 }
1935
1936 impl ::std::convert::TryFrom<::std::string::String> for AddedGroupPrincipalType {
1937 type Error = self::error::ConversionError;
1938 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
1939 value.parse()
1940 }
1941 }
1942
1943 ///Metadata about a principal to add to a doc.
1944 ///
1945 /// <details><summary>JSON schema</summary>
1946 ///
1947 /// ```json
1948 ///{
1949 /// "description": "Metadata about a principal to add to a doc.",
1950 /// "oneOf": [
1951 /// {
1952 /// "$ref": "#/components/schemas/AddedEmailPrincipal"
1953 /// },
1954 /// {
1955 /// "$ref": "#/components/schemas/AddedGroupPrincipal"
1956 /// },
1957 /// {
1958 /// "$ref": "#/components/schemas/AddedDomainPrincipal"
1959 /// },
1960 /// {
1961 /// "$ref": "#/components/schemas/AddedWorkspacePrincipal"
1962 /// },
1963 /// {
1964 /// "$ref": "#/components/schemas/AddedAnyonePrincipal"
1965 /// }
1966 /// ],
1967 /// "x-schema-name": "AddedPrincipal"
1968 ///}
1969 /// ```
1970 /// </details>
1971 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1972 #[serde(untagged)]
1973 pub enum AddedPrincipal {
1974 EmailPrincipal(AddedEmailPrincipal),
1975 GroupPrincipal(AddedGroupPrincipal),
1976 DomainPrincipal(AddedDomainPrincipal),
1977 WorkspacePrincipal(AddedWorkspacePrincipal),
1978 AnyonePrincipal(AddedAnyonePrincipal),
1979 }
1980
1981 impl ::std::convert::From<&Self> for AddedPrincipal {
1982 fn from(value: &AddedPrincipal) -> Self {
1983 value.clone()
1984 }
1985 }
1986
1987 impl ::std::convert::From<AddedEmailPrincipal> for AddedPrincipal {
1988 fn from(value: AddedEmailPrincipal) -> Self {
1989 Self::EmailPrincipal(value)
1990 }
1991 }
1992
1993 impl ::std::convert::From<AddedGroupPrincipal> for AddedPrincipal {
1994 fn from(value: AddedGroupPrincipal) -> Self {
1995 Self::GroupPrincipal(value)
1996 }
1997 }
1998
1999 impl ::std::convert::From<AddedDomainPrincipal> for AddedPrincipal {
2000 fn from(value: AddedDomainPrincipal) -> Self {
2001 Self::DomainPrincipal(value)
2002 }
2003 }
2004
2005 impl ::std::convert::From<AddedWorkspacePrincipal> for AddedPrincipal {
2006 fn from(value: AddedWorkspacePrincipal) -> Self {
2007 Self::WorkspacePrincipal(value)
2008 }
2009 }
2010
2011 impl ::std::convert::From<AddedAnyonePrincipal> for AddedPrincipal {
2012 fn from(value: AddedAnyonePrincipal) -> Self {
2013 Self::AnyonePrincipal(value)
2014 }
2015 }
2016
2017 ///`AddedWorkspacePrincipal`
2018 ///
2019 /// <details><summary>JSON schema</summary>
2020 ///
2021 /// ```json
2022 ///{
2023 /// "type": "object",
2024 /// "required": [
2025 /// "type",
2026 /// "workspaceId"
2027 /// ],
2028 /// "properties": {
2029 /// "type": {
2030 /// "description": "The type of this principal.",
2031 /// "type": "string",
2032 /// "enum": [
2033 /// "workspace"
2034 /// ],
2035 /// "x-tsType": "PrincipalType.Workspace"
2036 /// },
2037 /// "workspaceId": {
2038 /// "description": "WorkspaceId for the principal.",
2039 /// "examples": [
2040 /// "ws-sdfmsdf9"
2041 /// ],
2042 /// "type": "string"
2043 /// }
2044 /// },
2045 /// "additionalProperties": false
2046 ///}
2047 /// ```
2048 /// </details>
2049 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2050 #[serde(deny_unknown_fields)]
2051 pub struct AddedWorkspacePrincipal {
2052 ///The type of this principal.
2053 #[serde(rename = "type")]
2054 pub type_: AddedWorkspacePrincipalType,
2055 ///WorkspaceId for the principal.
2056 #[serde(rename = "workspaceId")]
2057 pub workspace_id: ::std::string::String,
2058 }
2059
2060 impl ::std::convert::From<&AddedWorkspacePrincipal> for AddedWorkspacePrincipal {
2061 fn from(value: &AddedWorkspacePrincipal) -> Self {
2062 value.clone()
2063 }
2064 }
2065
2066 ///The type of this principal.
2067 ///
2068 /// <details><summary>JSON schema</summary>
2069 ///
2070 /// ```json
2071 ///{
2072 /// "description": "The type of this principal.",
2073 /// "type": "string",
2074 /// "enum": [
2075 /// "workspace"
2076 /// ],
2077 /// "x-tsType": "PrincipalType.Workspace"
2078 ///}
2079 /// ```
2080 /// </details>
2081 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2082 pub enum AddedWorkspacePrincipalType {
2083 #[serde(rename = "workspace")]
2084 Workspace,
2085 }
2086
2087 impl ::std::convert::From<&Self> for AddedWorkspacePrincipalType {
2088 fn from(value: &AddedWorkspacePrincipalType) -> Self {
2089 value.clone()
2090 }
2091 }
2092
2093 impl ::std::fmt::Display for AddedWorkspacePrincipalType {
2094 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2095 match *self {
2096 Self::Workspace => f.write_str("workspace"),
2097 }
2098 }
2099 }
2100
2101 impl ::std::str::FromStr for AddedWorkspacePrincipalType {
2102 type Err = self::error::ConversionError;
2103 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2104 match value {
2105 "workspace" => Ok(Self::Workspace),
2106 _ => Err("invalid value".into()),
2107 }
2108 }
2109 }
2110
2111 impl ::std::convert::TryFrom<&str> for AddedWorkspacePrincipalType {
2112 type Error = self::error::ConversionError;
2113 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2114 value.parse()
2115 }
2116 }
2117
2118 impl ::std::convert::TryFrom<&::std::string::String> for AddedWorkspacePrincipalType {
2119 type Error = self::error::ConversionError;
2120 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2121 value.parse()
2122 }
2123 }
2124
2125 impl ::std::convert::TryFrom<::std::string::String> for AddedWorkspacePrincipalType {
2126 type Error = self::error::ConversionError;
2127 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2128 value.parse()
2129 }
2130 }
2131
2132 ///Response representing the last day analytics were updated.
2133 ///
2134 /// <details><summary>JSON schema</summary>
2135 ///
2136 /// ```json
2137 ///{
2138 /// "description": "Response representing the last day analytics were
2139 /// updated.",
2140 /// "type": "object",
2141 /// "required": [
2142 /// "docAnalyticsLastUpdated",
2143 /// "packAnalyticsLastUpdated",
2144 /// "packFormulaAnalyticsLastUpdated"
2145 /// ],
2146 /// "properties": {
2147 /// "docAnalyticsLastUpdated": {
2148 /// "description": "Date that doc analytics were last updated.",
2149 /// "examples": [
2150 /// "2022-05-01"
2151 /// ],
2152 /// "type": "string",
2153 /// "format": "date"
2154 /// },
2155 /// "packAnalyticsLastUpdated": {
2156 /// "description": "Date that Pack analytics were last updated.",
2157 /// "examples": [
2158 /// "2022-05-01"
2159 /// ],
2160 /// "type": "string",
2161 /// "format": "date"
2162 /// },
2163 /// "packFormulaAnalyticsLastUpdated": {
2164 /// "description": "Date that Pack formula analytics were last
2165 /// updated.",
2166 /// "examples": [
2167 /// "2022-05-01"
2168 /// ],
2169 /// "type": "string",
2170 /// "format": "date"
2171 /// }
2172 /// },
2173 /// "additionalProperties": false,
2174 /// "x-schema-name": "AnalyticsLastUpdatedResponse"
2175 ///}
2176 /// ```
2177 /// </details>
2178 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2179 #[serde(deny_unknown_fields)]
2180 pub struct AnalyticsLastUpdatedResponse {
2181 ///Date that doc analytics were last updated.
2182 #[serde(rename = "docAnalyticsLastUpdated")]
2183 pub doc_analytics_last_updated: ::chrono::naive::NaiveDate,
2184 ///Date that Pack analytics were last updated.
2185 #[serde(rename = "packAnalyticsLastUpdated")]
2186 pub pack_analytics_last_updated: ::chrono::naive::NaiveDate,
2187 ///Date that Pack formula analytics were last updated.
2188 #[serde(rename = "packFormulaAnalyticsLastUpdated")]
2189 pub pack_formula_analytics_last_updated: ::chrono::naive::NaiveDate,
2190 }
2191
2192 impl ::std::convert::From<&AnalyticsLastUpdatedResponse> for AnalyticsLastUpdatedResponse {
2193 fn from(value: &AnalyticsLastUpdatedResponse) -> Self {
2194 value.clone()
2195 }
2196 }
2197
2198 ///Quantization period over which to view analytics.
2199 ///
2200 /// <details><summary>JSON schema</summary>
2201 ///
2202 /// ```json
2203 ///{
2204 /// "description": "Quantization period over which to view analytics.",
2205 /// "type": "string",
2206 /// "enum": [
2207 /// "daily",
2208 /// "cumulative"
2209 /// ],
2210 /// "x-schema-name": "AnalyticsScale",
2211 /// "x-tsEnumNames": [
2212 /// "Daily",
2213 /// "Cumulative"
2214 /// ]
2215 ///}
2216 /// ```
2217 /// </details>
2218 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2219 pub enum AnalyticsScale {
2220 #[serde(rename = "daily")]
2221 Daily,
2222 #[serde(rename = "cumulative")]
2223 Cumulative,
2224 }
2225
2226 impl ::std::convert::From<&Self> for AnalyticsScale {
2227 fn from(value: &AnalyticsScale) -> Self {
2228 value.clone()
2229 }
2230 }
2231
2232 impl ::std::fmt::Display for AnalyticsScale {
2233 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2234 match *self {
2235 Self::Daily => f.write_str("daily"),
2236 Self::Cumulative => f.write_str("cumulative"),
2237 }
2238 }
2239 }
2240
2241 impl ::std::str::FromStr for AnalyticsScale {
2242 type Err = self::error::ConversionError;
2243 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2244 match value {
2245 "daily" => Ok(Self::Daily),
2246 "cumulative" => Ok(Self::Cumulative),
2247 _ => Err("invalid value".into()),
2248 }
2249 }
2250 }
2251
2252 impl ::std::convert::TryFrom<&str> for AnalyticsScale {
2253 type Error = self::error::ConversionError;
2254 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2255 value.parse()
2256 }
2257 }
2258
2259 impl ::std::convert::TryFrom<&::std::string::String> for AnalyticsScale {
2260 type Error = self::error::ConversionError;
2261 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2262 value.parse()
2263 }
2264 }
2265
2266 impl ::std::convert::TryFrom<::std::string::String> for AnalyticsScale {
2267 type Error = self::error::ConversionError;
2268 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2269 value.parse()
2270 }
2271 }
2272
2273 ///`AnyonePrincipal`
2274 ///
2275 /// <details><summary>JSON schema</summary>
2276 ///
2277 /// ```json
2278 ///{
2279 /// "type": "object",
2280 /// "required": [
2281 /// "type"
2282 /// ],
2283 /// "properties": {
2284 /// "type": {
2285 /// "description": "The type of this principal.",
2286 /// "type": "string",
2287 /// "enum": [
2288 /// "anyone"
2289 /// ],
2290 /// "x-tsType": "PrincipalType.Anyone"
2291 /// }
2292 /// },
2293 /// "additionalProperties": false
2294 ///}
2295 /// ```
2296 /// </details>
2297 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2298 #[serde(deny_unknown_fields)]
2299 pub struct AnyonePrincipal {
2300 ///The type of this principal.
2301 #[serde(rename = "type")]
2302 pub type_: AnyonePrincipalType,
2303 }
2304
2305 impl ::std::convert::From<&AnyonePrincipal> for AnyonePrincipal {
2306 fn from(value: &AnyonePrincipal) -> Self {
2307 value.clone()
2308 }
2309 }
2310
2311 ///The type of this principal.
2312 ///
2313 /// <details><summary>JSON schema</summary>
2314 ///
2315 /// ```json
2316 ///{
2317 /// "description": "The type of this principal.",
2318 /// "type": "string",
2319 /// "enum": [
2320 /// "anyone"
2321 /// ],
2322 /// "x-tsType": "PrincipalType.Anyone"
2323 ///}
2324 /// ```
2325 /// </details>
2326 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2327 pub enum AnyonePrincipalType {
2328 #[serde(rename = "anyone")]
2329 Anyone,
2330 }
2331
2332 impl ::std::convert::From<&Self> for AnyonePrincipalType {
2333 fn from(value: &AnyonePrincipalType) -> Self {
2334 value.clone()
2335 }
2336 }
2337
2338 impl ::std::fmt::Display for AnyonePrincipalType {
2339 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2340 match *self {
2341 Self::Anyone => f.write_str("anyone"),
2342 }
2343 }
2344 }
2345
2346 impl ::std::str::FromStr for AnyonePrincipalType {
2347 type Err = self::error::ConversionError;
2348 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2349 match value {
2350 "anyone" => Ok(Self::Anyone),
2351 _ => Err("invalid value".into()),
2352 }
2353 }
2354 }
2355
2356 impl ::std::convert::TryFrom<&str> for AnyonePrincipalType {
2357 type Error = self::error::ConversionError;
2358 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2359 value.parse()
2360 }
2361 }
2362
2363 impl ::std::convert::TryFrom<&::std::string::String> for AnyonePrincipalType {
2364 type Error = self::error::ConversionError;
2365 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2366 value.parse()
2367 }
2368 }
2369
2370 impl ::std::convert::TryFrom<::std::string::String> for AnyonePrincipalType {
2371 type Error = self::error::ConversionError;
2372 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2373 value.parse()
2374 }
2375 }
2376
2377 ///Info about a resolved link to an API resource.
2378 ///
2379 /// <details><summary>JSON schema</summary>
2380 ///
2381 /// ```json
2382 ///{
2383 /// "description": "Info about a resolved link to an API resource.",
2384 /// "type": "object",
2385 /// "required": [
2386 /// "href",
2387 /// "resource",
2388 /// "type"
2389 /// ],
2390 /// "properties": {
2391 /// "browserLink": {
2392 /// "description": "Canonical browser-friendly link to the resolved
2393 /// resource.",
2394 /// "examples": [
2395 /// "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO"
2396 /// ],
2397 /// "type": "string",
2398 /// "format": "url"
2399 /// },
2400 /// "href": {
2401 /// "description": "Self link to this query.",
2402 /// "examples": [
2403 /// "https://coda.io/apis/v1/resolveBrowserLink?url=https%3A%2F%2Fcoda.io%2Fd%2F_dAbCDeFGH%2FLaunch-Status_sumnO"
2404 /// ],
2405 /// "type": "string",
2406 /// "format": "url"
2407 /// },
2408 /// "resource": {
2409 /// "$ref": "#/components/schemas/ApiLinkResolvedResource"
2410 /// },
2411 /// "type": {
2412 /// "description": "The type of this resource.",
2413 /// "type": "string",
2414 /// "enum": [
2415 /// "apiLink"
2416 /// ],
2417 /// "x-tsType": "Type.ApiLink"
2418 /// }
2419 /// },
2420 /// "additionalProperties": false,
2421 /// "x-schema-name": "ApiLink"
2422 ///}
2423 /// ```
2424 /// </details>
2425 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2426 #[serde(deny_unknown_fields)]
2427 pub struct ApiLink {
2428 ///Canonical browser-friendly link to the resolved resource.
2429 #[serde(rename = "browserLink", default, skip_serializing_if = "::std::option::Option::is_none")]
2430 pub browser_link: ::std::option::Option<::std::string::String>,
2431 ///Self link to this query.
2432 pub href: ::std::string::String,
2433 pub resource: ApiLinkResolvedResource,
2434 ///The type of this resource.
2435 #[serde(rename = "type")]
2436 pub type_: ApiLinkType,
2437 }
2438
2439 impl ::std::convert::From<&ApiLink> for ApiLink {
2440 fn from(value: &ApiLink) -> Self {
2441 value.clone()
2442 }
2443 }
2444
2445 ///Reference to the resolved resource.
2446 ///
2447 /// <details><summary>JSON schema</summary>
2448 ///
2449 /// ```json
2450 ///{
2451 /// "description": "Reference to the resolved resource.",
2452 /// "type": "object",
2453 /// "required": [
2454 /// "href",
2455 /// "id",
2456 /// "type"
2457 /// ],
2458 /// "properties": {
2459 /// "href": {
2460 /// "description": "API link to the resolved resource that can be
2461 /// queried to get further information.",
2462 /// "examples": [
2463 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO"
2464 /// ],
2465 /// "type": "string",
2466 /// "format": "url"
2467 /// },
2468 /// "id": {
2469 /// "description": "ID of the resolved resource.",
2470 /// "examples": [
2471 /// "canvas-IjkLmnO"
2472 /// ],
2473 /// "type": "string"
2474 /// },
2475 /// "name": {
2476 /// "description": "Name of the resource.",
2477 /// "examples": [
2478 /// "My Page"
2479 /// ],
2480 /// "type": "string"
2481 /// },
2482 /// "type": {
2483 /// "$ref": "#/components/schemas/Type"
2484 /// }
2485 /// },
2486 /// "additionalProperties": false,
2487 /// "x-schema-name": "ApiLinkResolvedResource"
2488 ///}
2489 /// ```
2490 /// </details>
2491 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2492 #[serde(deny_unknown_fields)]
2493 pub struct ApiLinkResolvedResource {
2494 ///API link to the resolved resource that can be queried to get further
2495 /// information.
2496 pub href: ::std::string::String,
2497 ///ID of the resolved resource.
2498 pub id: ::std::string::String,
2499 ///Name of the resource.
2500 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2501 pub name: ::std::option::Option<::std::string::String>,
2502 #[serde(rename = "type")]
2503 pub type_: Type,
2504 }
2505
2506 impl ::std::convert::From<&ApiLinkResolvedResource> for ApiLinkResolvedResource {
2507 fn from(value: &ApiLinkResolvedResource) -> Self {
2508 value.clone()
2509 }
2510 }
2511
2512 ///The type of this resource.
2513 ///
2514 /// <details><summary>JSON schema</summary>
2515 ///
2516 /// ```json
2517 ///{
2518 /// "description": "The type of this resource.",
2519 /// "type": "string",
2520 /// "enum": [
2521 /// "apiLink"
2522 /// ],
2523 /// "x-tsType": "Type.ApiLink"
2524 ///}
2525 /// ```
2526 /// </details>
2527 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2528 pub enum ApiLinkType {
2529 #[serde(rename = "apiLink")]
2530 ApiLink,
2531 }
2532
2533 impl ::std::convert::From<&Self> for ApiLinkType {
2534 fn from(value: &ApiLinkType) -> Self {
2535 value.clone()
2536 }
2537 }
2538
2539 impl ::std::fmt::Display for ApiLinkType {
2540 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2541 match *self {
2542 Self::ApiLink => f.write_str("apiLink"),
2543 }
2544 }
2545 }
2546
2547 impl ::std::str::FromStr for ApiLinkType {
2548 type Err = self::error::ConversionError;
2549 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2550 match value {
2551 "apiLink" => Ok(Self::ApiLink),
2552 _ => Err("invalid value".into()),
2553 }
2554 }
2555 }
2556
2557 impl ::std::convert::TryFrom<&str> for ApiLinkType {
2558 type Error = self::error::ConversionError;
2559 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2560 value.parse()
2561 }
2562 }
2563
2564 impl ::std::convert::TryFrom<&::std::string::String> for ApiLinkType {
2565 type Error = self::error::ConversionError;
2566 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2567 value.parse()
2568 }
2569 }
2570
2571 impl ::std::convert::TryFrom<::std::string::String> for ApiLinkType {
2572 type Error = self::error::ConversionError;
2573 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2574 value.parse()
2575 }
2576 }
2577
2578 ///Request for beginning an export of page content.
2579 ///
2580 /// <details><summary>JSON schema</summary>
2581 ///
2582 /// ```json
2583 ///{
2584 /// "description": "Request for beginning an export of page content.",
2585 /// "type": "object",
2586 /// "required": [
2587 /// "outputFormat"
2588 /// ],
2589 /// "properties": {
2590 /// "outputFormat": {
2591 /// "$ref": "#/components/schemas/PageContentOutputFormat"
2592 /// }
2593 /// },
2594 /// "additionalProperties": false,
2595 /// "x-schema-name": "BeginPageContentExportRequest"
2596 ///}
2597 /// ```
2598 /// </details>
2599 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2600 #[serde(deny_unknown_fields)]
2601 pub struct BeginPageContentExportRequest {
2602 #[serde(rename = "outputFormat")]
2603 pub output_format: PageContentOutputFormat,
2604 }
2605
2606 impl ::std::convert::From<&BeginPageContentExportRequest> for BeginPageContentExportRequest {
2607 fn from(value: &BeginPageContentExportRequest) -> Self {
2608 value.clone()
2609 }
2610 }
2611
2612 ///Response when beginning an export of page content.
2613 ///
2614 /// <details><summary>JSON schema</summary>
2615 ///
2616 /// ```json
2617 ///{
2618 /// "description": "Response when beginning an export of page content.",
2619 /// "type": "object",
2620 /// "required": [
2621 /// "href",
2622 /// "id",
2623 /// "status"
2624 /// ],
2625 /// "properties": {
2626 /// "href": {
2627 /// "description": "The URL that reports the status of this export. Poll this URL to get the content URL when the export has completed.",
2628 /// "examples": [
2629 /// "https://coda.io/apis/v1/docs/somedoc/pages/somepage/export/some-request-id"
2630 /// ],
2631 /// "type": "string"
2632 /// },
2633 /// "id": {
2634 /// "description": "The identifier of this export request.",
2635 /// "examples": [
2636 /// "AbCDeFGH"
2637 /// ],
2638 /// "type": "string"
2639 /// },
2640 /// "status": {
2641 /// "description": "The status of this export.",
2642 /// "examples": [
2643 /// "complete"
2644 /// ],
2645 /// "type": "string"
2646 /// }
2647 /// },
2648 /// "additionalProperties": false,
2649 /// "x-schema-name": "BeginPageContentExportResponse"
2650 ///}
2651 /// ```
2652 /// </details>
2653 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2654 #[serde(deny_unknown_fields)]
2655 pub struct BeginPageContentExportResponse {
2656 ///The URL that reports the status of this export. Poll this URL to get
2657 /// the content URL when the export has completed.
2658 pub href: ::std::string::String,
2659 ///The identifier of this export request.
2660 pub id: ::std::string::String,
2661 ///The status of this export.
2662 pub status: ::std::string::String,
2663 }
2664
2665 impl ::std::convert::From<&BeginPageContentExportResponse> for BeginPageContentExportResponse {
2666 fn from(value: &BeginPageContentExportResponse) -> Self {
2667 value.clone()
2668 }
2669 }
2670
2671 ///The Pack plan to show the Pack can be accessed if the workspace is at
2672 /// least the given tier.
2673 ///
2674 /// <details><summary>JSON schema</summary>
2675 ///
2676 /// ```json
2677 ///{
2678 /// "description": "The Pack plan to show the Pack can be accessed if the
2679 /// workspace is at least the given tier.",
2680 /// "type": "object",
2681 /// "required": [
2682 /// "createdAt",
2683 /// "packId",
2684 /// "packPlanId",
2685 /// "pricing"
2686 /// ],
2687 /// "properties": {
2688 /// "createdAt": {
2689 /// "description": "Timestamp for when the Pack plan was created.",
2690 /// "examples": [
2691 /// "2018-04-11T00:18:57.946Z"
2692 /// ],
2693 /// "type": "string",
2694 /// "format": "date-time"
2695 /// },
2696 /// "packId": {
2697 /// "type": "number"
2698 /// },
2699 /// "packPlanId": {
2700 /// "type": "string"
2701 /// },
2702 /// "pricing": {
2703 /// "$ref": "#/components/schemas/BundledPackPlanPricing"
2704 /// }
2705 /// },
2706 /// "additionalProperties": false,
2707 /// "x-schema-name": "BundledPackPlan"
2708 ///}
2709 /// ```
2710 /// </details>
2711 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2712 #[serde(deny_unknown_fields)]
2713 pub struct BundledPackPlan {
2714 ///Timestamp for when the Pack plan was created.
2715 #[serde(rename = "createdAt")]
2716 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
2717 #[serde(rename = "packId")]
2718 pub pack_id: f64,
2719 #[serde(rename = "packPlanId")]
2720 pub pack_plan_id: ::std::string::String,
2721 pub pricing: BundledPackPlanPricing,
2722 }
2723
2724 impl ::std::convert::From<&BundledPackPlan> for BundledPackPlan {
2725 fn from(value: &BundledPackPlan) -> Self {
2726 value.clone()
2727 }
2728 }
2729
2730 ///Pricing used when workspaces have access to the Pack for free if their
2731 /// workspace is at least the given tier.
2732 ///
2733 /// <details><summary>JSON schema</summary>
2734 ///
2735 /// ```json
2736 ///{
2737 /// "description": "Pricing used when workspaces have access to the Pack
2738 /// for free if their workspace is at least the given tier.",
2739 /// "type": "object",
2740 /// "required": [
2741 /// "minimumFeatureSet",
2742 /// "type"
2743 /// ],
2744 /// "properties": {
2745 /// "minimumFeatureSet": {
2746 /// "$ref": "#/components/schemas/PaidFeatureSet"
2747 /// },
2748 /// "type": {
2749 /// "type": "string",
2750 /// "enum": [
2751 /// "BundledWithTier"
2752 /// ],
2753 /// "x-tsType": "PackPlanPricingType.BundledWithTier"
2754 /// }
2755 /// },
2756 /// "additionalProperties": false,
2757 /// "x-schema-name": "BundledPackPlanPricing"
2758 ///}
2759 /// ```
2760 /// </details>
2761 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2762 #[serde(deny_unknown_fields)]
2763 pub struct BundledPackPlanPricing {
2764 #[serde(rename = "minimumFeatureSet")]
2765 pub minimum_feature_set: PaidFeatureSet,
2766 #[serde(rename = "type")]
2767 pub type_: BundledPackPlanPricingType,
2768 }
2769
2770 impl ::std::convert::From<&BundledPackPlanPricing> for BundledPackPlanPricing {
2771 fn from(value: &BundledPackPlanPricing) -> Self {
2772 value.clone()
2773 }
2774 }
2775
2776 ///`BundledPackPlanPricingType`
2777 ///
2778 /// <details><summary>JSON schema</summary>
2779 ///
2780 /// ```json
2781 ///{
2782 /// "type": "string",
2783 /// "enum": [
2784 /// "BundledWithTier"
2785 /// ],
2786 /// "x-tsType": "PackPlanPricingType.BundledWithTier"
2787 ///}
2788 /// ```
2789 /// </details>
2790 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2791 pub enum BundledPackPlanPricingType {
2792 BundledWithTier,
2793 }
2794
2795 impl ::std::convert::From<&Self> for BundledPackPlanPricingType {
2796 fn from(value: &BundledPackPlanPricingType) -> Self {
2797 value.clone()
2798 }
2799 }
2800
2801 impl ::std::fmt::Display for BundledPackPlanPricingType {
2802 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2803 match *self {
2804 Self::BundledWithTier => f.write_str("BundledWithTier"),
2805 }
2806 }
2807 }
2808
2809 impl ::std::str::FromStr for BundledPackPlanPricingType {
2810 type Err = self::error::ConversionError;
2811 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2812 match value {
2813 "BundledWithTier" => Ok(Self::BundledWithTier),
2814 _ => Err("invalid value".into()),
2815 }
2816 }
2817 }
2818
2819 impl ::std::convert::TryFrom<&str> for BundledPackPlanPricingType {
2820 type Error = self::error::ConversionError;
2821 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2822 value.parse()
2823 }
2824 }
2825
2826 impl ::std::convert::TryFrom<&::std::string::String> for BundledPackPlanPricingType {
2827 type Error = self::error::ConversionError;
2828 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2829 value.parse()
2830 }
2831 }
2832
2833 impl ::std::convert::TryFrom<::std::string::String> for BundledPackPlanPricingType {
2834 type Error = self::error::ConversionError;
2835 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
2836 value.parse()
2837 }
2838 }
2839
2840 ///`ButtonColumnFormat`
2841 ///
2842 /// <details><summary>JSON schema</summary>
2843 ///
2844 /// ```json
2845 ///{
2846 /// "description": "Format of a button column.",
2847 /// "allOf": [
2848 /// {
2849 /// "$ref": "#/components/schemas/SimpleColumnFormat"
2850 /// },
2851 /// {
2852 /// "type": "object",
2853 /// "properties": {
2854 /// "action": {
2855 /// "description": "Action formula for the button.",
2856 /// "examples": [
2857 /// "OpenUrl(\"www.google.com\")"
2858 /// ],
2859 /// "type": "string"
2860 /// },
2861 /// "disableIf": {
2862 /// "description": "DisableIf formula for the button.",
2863 /// "examples": [
2864 /// "False()"
2865 /// ],
2866 /// "type": "string"
2867 /// },
2868 /// "label": {
2869 /// "description": "Label formula for the button.",
2870 /// "examples": [
2871 /// "Click me"
2872 /// ],
2873 /// "type": "string"
2874 /// }
2875 /// },
2876 /// "additionalProperties": false
2877 /// }
2878 /// ],
2879 /// "x-schema-name": "ButtonColumnFormat"
2880 ///}
2881 /// ```
2882 /// </details>
2883 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2884 #[serde(deny_unknown_fields)]
2885 pub enum ButtonColumnFormat {}
2886 impl ::std::convert::From<&Self> for ButtonColumnFormat {
2887 fn from(value: &ButtonColumnFormat) -> Self {
2888 value.clone()
2889 }
2890 }
2891
2892 ///An edit made to a particular cell in a row.
2893 ///
2894 /// <details><summary>JSON schema</summary>
2895 ///
2896 /// ```json
2897 ///{
2898 /// "description": "An edit made to a particular cell in a row.",
2899 /// "type": "object",
2900 /// "required": [
2901 /// "column",
2902 /// "value"
2903 /// ],
2904 /// "properties": {
2905 /// "column": {
2906 /// "description": "Column ID, URL, or name (fragile and discouraged)
2907 /// associated with this edit.",
2908 /// "examples": [
2909 /// "c-tuVwxYz"
2910 /// ],
2911 /// "type": "string"
2912 /// },
2913 /// "value": {
2914 /// "$ref": "#/components/schemas/Value"
2915 /// }
2916 /// },
2917 /// "additionalProperties": false,
2918 /// "x-schema-name": "CellEdit"
2919 ///}
2920 /// ```
2921 /// </details>
2922 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2923 #[serde(deny_unknown_fields)]
2924 pub struct CellEdit {
2925 ///Column ID, URL, or name (fragile and discouraged) associated with
2926 /// this edit.
2927 pub column: ::std::string::String,
2928 pub value: Value,
2929 }
2930
2931 impl ::std::convert::From<&CellEdit> for CellEdit {
2932 fn from(value: &CellEdit) -> Self {
2933 value.clone()
2934 }
2935 }
2936
2937 ///All values that a row cell can contain.
2938 ///
2939 /// <details><summary>JSON schema</summary>
2940 ///
2941 /// ```json
2942 ///{
2943 /// "description": "All values that a row cell can contain.",
2944 /// "oneOf": [
2945 /// {
2946 /// "$ref": "#/components/schemas/Value"
2947 /// },
2948 /// {
2949 /// "$ref": "#/components/schemas/RichValue"
2950 /// }
2951 /// ],
2952 /// "x-schema-name": "CellValue"
2953 ///}
2954 /// ```
2955 /// </details>
2956 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2957 #[serde(untagged)]
2958 pub enum CellValue {
2959 Value(Value),
2960 RichValue(RichValue),
2961 }
2962
2963 impl ::std::convert::From<&Self> for CellValue {
2964 fn from(value: &CellValue) -> Self {
2965 value.clone()
2966 }
2967 }
2968
2969 impl ::std::convert::From<Value> for CellValue {
2970 fn from(value: Value) -> Self {
2971 Self::Value(value)
2972 }
2973 }
2974
2975 impl ::std::convert::From<RichValue> for CellValue {
2976 fn from(value: RichValue) -> Self {
2977 Self::RichValue(value)
2978 }
2979 }
2980
2981 ///Parameters for changing a workspace user role.
2982 ///
2983 /// <details><summary>JSON schema</summary>
2984 ///
2985 /// ```json
2986 ///{
2987 /// "description": "Parameters for changing a workspace user role.",
2988 /// "type": "object",
2989 /// "required": [
2990 /// "email",
2991 /// "newRole"
2992 /// ],
2993 /// "properties": {
2994 /// "email": {
2995 /// "description": "Email of the user.",
2996 /// "examples": [
2997 /// "hello@coda.io"
2998 /// ],
2999 /// "type": "string"
3000 /// },
3001 /// "newRole": {
3002 /// "$ref": "#/components/schemas/WorkspaceUserRole"
3003 /// }
3004 /// },
3005 /// "additionalProperties": false,
3006 /// "x-schema-name": "ChangeRole"
3007 ///}
3008 /// ```
3009 /// </details>
3010 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3011 #[serde(deny_unknown_fields)]
3012 pub struct ChangeRole {
3013 ///Email of the user.
3014 pub email: ::std::string::String,
3015 #[serde(rename = "newRole")]
3016 pub new_role: WorkspaceUserRole,
3017 }
3018
3019 impl ::std::convert::From<&ChangeRole> for ChangeRole {
3020 fn from(value: &ChangeRole) -> Self {
3021 value.clone()
3022 }
3023 }
3024
3025 ///The result of changing a user's workspace user role.
3026 ///
3027 /// <details><summary>JSON schema</summary>
3028 ///
3029 /// ```json
3030 ///{
3031 /// "description": "The result of changing a user's workspace user role.",
3032 /// "type": "object",
3033 /// "required": [
3034 /// "roleChangedAt"
3035 /// ],
3036 /// "properties": {
3037 /// "roleChangedAt": {
3038 /// "description": "Timestamp for when the user's role last changed in
3039 /// this workspace.",
3040 /// "examples": [
3041 /// "2018-04-11T00:18:57.946Z"
3042 /// ],
3043 /// "type": "string",
3044 /// "format": "date-time"
3045 /// }
3046 /// },
3047 /// "additionalProperties": false,
3048 /// "x-schema-name": "ChangeRoleResult"
3049 ///}
3050 /// ```
3051 /// </details>
3052 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3053 #[serde(deny_unknown_fields)]
3054 pub struct ChangeRoleResult {
3055 ///Timestamp for when the user's role last changed in this workspace.
3056 #[serde(rename = "roleChangedAt")]
3057 pub role_changed_at: ::chrono::DateTime<::chrono::offset::Utc>,
3058 }
3059
3060 impl ::std::convert::From<&ChangeRoleResult> for ChangeRoleResult {
3061 fn from(value: &ChangeRoleResult) -> Self {
3062 value.clone()
3063 }
3064 }
3065
3066 ///An HTTP error resulting from an unsuccessful request.
3067 ///
3068 /// <details><summary>JSON schema</summary>
3069 ///
3070 /// ```json
3071 ///{
3072 /// "description": "An HTTP error resulting from an unsuccessful request.",
3073 /// "required": [
3074 /// "message",
3075 /// "statusCode",
3076 /// "statusMessage"
3077 /// ],
3078 /// "properties": {
3079 /// "message": {
3080 /// "description": "Any additional context on the error, or the same as
3081 /// `statusMessage` otherwise.",
3082 /// "examples": [
3083 /// "Unauthorized"
3084 /// ],
3085 /// "type": "string"
3086 /// },
3087 /// "statusCode": {
3088 /// "description": "HTTP status code of the error.",
3089 /// "examples": [
3090 /// 401
3091 /// ],
3092 /// "type": "number"
3093 /// },
3094 /// "statusMessage": {
3095 /// "description": "HTTP status message of the error.",
3096 /// "examples": [
3097 /// "Unauthorized"
3098 /// ],
3099 /// "type": "string"
3100 /// }
3101 /// },
3102 /// "additionalProperties": false
3103 ///}
3104 /// ```
3105 /// </details>
3106 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3107 #[serde(deny_unknown_fields)]
3108 pub struct ChangeUserRoleResponse {
3109 ///Any additional context on the error, or the same as `statusMessage`
3110 /// otherwise.
3111 pub message: ::std::string::String,
3112 #[serde(rename = "statusCode")]
3113 pub status_code: f64,
3114 ///HTTP status message of the error.
3115 #[serde(rename = "statusMessage")]
3116 pub status_message: ::std::string::String,
3117 }
3118
3119 impl ::std::convert::From<&ChangeUserRoleResponse> for ChangeUserRoleResponse {
3120 fn from(value: &ChangeUserRoleResponse) -> Self {
3121 value.clone()
3122 }
3123 }
3124
3125 ///`CheckboxColumnFormat`
3126 ///
3127 /// <details><summary>JSON schema</summary>
3128 ///
3129 /// ```json
3130 ///{
3131 /// "description": "Format of a checkbox column.",
3132 /// "allOf": [
3133 /// {
3134 /// "$ref": "#/components/schemas/SimpleColumnFormat"
3135 /// },
3136 /// {
3137 /// "type": "object",
3138 /// "required": [
3139 /// "displayType"
3140 /// ],
3141 /// "properties": {
3142 /// "displayType": {
3143 /// "$ref": "#/components/schemas/CheckboxDisplayType"
3144 /// }
3145 /// },
3146 /// "additionalProperties": false
3147 /// }
3148 /// ],
3149 /// "x-schema-name": "CheckboxColumnFormat"
3150 ///}
3151 /// ```
3152 /// </details>
3153 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3154 #[serde(deny_unknown_fields)]
3155 pub enum CheckboxColumnFormat {}
3156 impl ::std::convert::From<&Self> for CheckboxColumnFormat {
3157 fn from(value: &CheckboxColumnFormat) -> Self {
3158 value.clone()
3159 }
3160 }
3161
3162 ///How a checkbox should be displayed.
3163 ///
3164 /// <details><summary>JSON schema</summary>
3165 ///
3166 /// ```json
3167 ///{
3168 /// "description": "How a checkbox should be displayed.",
3169 /// "type": "string",
3170 /// "enum": [
3171 /// "toggle",
3172 /// "check"
3173 /// ],
3174 /// "x-schema-name": "CheckboxDisplayType",
3175 /// "x-tsEnumNames": [
3176 /// "Toggle",
3177 /// "Check"
3178 /// ]
3179 ///}
3180 /// ```
3181 /// </details>
3182 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3183 pub enum CheckboxDisplayType {
3184 #[serde(rename = "toggle")]
3185 Toggle,
3186 #[serde(rename = "check")]
3187 Check,
3188 }
3189
3190 impl ::std::convert::From<&Self> for CheckboxDisplayType {
3191 fn from(value: &CheckboxDisplayType) -> Self {
3192 value.clone()
3193 }
3194 }
3195
3196 impl ::std::fmt::Display for CheckboxDisplayType {
3197 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3198 match *self {
3199 Self::Toggle => f.write_str("toggle"),
3200 Self::Check => f.write_str("check"),
3201 }
3202 }
3203 }
3204
3205 impl ::std::str::FromStr for CheckboxDisplayType {
3206 type Err = self::error::ConversionError;
3207 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3208 match value {
3209 "toggle" => Ok(Self::Toggle),
3210 "check" => Ok(Self::Check),
3211 _ => Err("invalid value".into()),
3212 }
3213 }
3214 }
3215
3216 impl ::std::convert::TryFrom<&str> for CheckboxDisplayType {
3217 type Error = self::error::ConversionError;
3218 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3219 value.parse()
3220 }
3221 }
3222
3223 impl ::std::convert::TryFrom<&::std::string::String> for CheckboxDisplayType {
3224 type Error = self::error::ConversionError;
3225 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3226 value.parse()
3227 }
3228 }
3229
3230 impl ::std::convert::TryFrom<::std::string::String> for CheckboxDisplayType {
3231 type Error = self::error::ConversionError;
3232 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3233 value.parse()
3234 }
3235 }
3236
3237 ///Info about a column.
3238 ///
3239 /// <details><summary>JSON schema</summary>
3240 ///
3241 /// ```json
3242 ///{
3243 /// "description": "Info about a column.",
3244 /// "type": "object",
3245 /// "required": [
3246 /// "format",
3247 /// "href",
3248 /// "id",
3249 /// "name",
3250 /// "type"
3251 /// ],
3252 /// "properties": {
3253 /// "calculated": {
3254 /// "description": "Whether the column has a formula set on it.",
3255 /// "examples": [
3256 /// true
3257 /// ],
3258 /// "type": "boolean"
3259 /// },
3260 /// "defaultValue": {
3261 /// "description": "Default value formula for the column.",
3262 /// "examples": [
3263 /// "Test"
3264 /// ],
3265 /// "type": "string"
3266 /// },
3267 /// "display": {
3268 /// "description": "Whether the column is the display column.",
3269 /// "examples": [
3270 /// true
3271 /// ],
3272 /// "type": "boolean"
3273 /// },
3274 /// "format": {
3275 /// "$ref": "#/components/schemas/ColumnFormat"
3276 /// },
3277 /// "formula": {
3278 /// "description": "Formula on the column.",
3279 /// "examples": [
3280 /// "thisRow.Created()"
3281 /// ],
3282 /// "type": "string"
3283 /// },
3284 /// "href": {
3285 /// "description": "API link to the column.",
3286 /// "examples": [
3287 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz"
3288 /// ],
3289 /// "type": "string",
3290 /// "format": "url"
3291 /// },
3292 /// "id": {
3293 /// "description": "ID of the column.",
3294 /// "examples": [
3295 /// "c-tuVwxYz"
3296 /// ],
3297 /// "type": "string"
3298 /// },
3299 /// "name": {
3300 /// "description": "Name of the column.",
3301 /// "examples": [
3302 /// "Completed"
3303 /// ],
3304 /// "type": "string"
3305 /// },
3306 /// "type": {
3307 /// "description": "The type of this resource.",
3308 /// "type": "string",
3309 /// "enum": [
3310 /// "column"
3311 /// ],
3312 /// "x-tsType": "Type.Column"
3313 /// }
3314 /// },
3315 /// "additionalProperties": false,
3316 /// "x-schema-name": "Column"
3317 ///}
3318 /// ```
3319 /// </details>
3320 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3321 #[serde(deny_unknown_fields)]
3322 pub struct Column {
3323 ///Whether the column has a formula set on it.
3324 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3325 pub calculated: ::std::option::Option<bool>,
3326 ///Default value formula for the column.
3327 #[serde(rename = "defaultValue", default, skip_serializing_if = "::std::option::Option::is_none")]
3328 pub default_value: ::std::option::Option<::std::string::String>,
3329 ///Whether the column is the display column.
3330 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3331 pub display: ::std::option::Option<bool>,
3332 pub format: ColumnFormat,
3333 ///Formula on the column.
3334 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3335 pub formula: ::std::option::Option<::std::string::String>,
3336 ///API link to the column.
3337 pub href: ::std::string::String,
3338 ///ID of the column.
3339 pub id: ::std::string::String,
3340 ///Name of the column.
3341 pub name: ::std::string::String,
3342 ///The type of this resource.
3343 #[serde(rename = "type")]
3344 pub type_: ColumnType,
3345 }
3346
3347 impl ::std::convert::From<&Column> for Column {
3348 fn from(value: &Column) -> Self {
3349 value.clone()
3350 }
3351 }
3352
3353 ///Info about a column.
3354 ///
3355 /// <details><summary>JSON schema</summary>
3356 ///
3357 /// ```json
3358 ///{
3359 /// "description": "Info about a column.",
3360 /// "type": "object",
3361 /// "required": [
3362 /// "format",
3363 /// "href",
3364 /// "id",
3365 /// "name",
3366 /// "parent",
3367 /// "type"
3368 /// ],
3369 /// "properties": {
3370 /// "calculated": {
3371 /// "description": "Whether the column has a formula set on it.",
3372 /// "examples": [
3373 /// true
3374 /// ],
3375 /// "type": "boolean"
3376 /// },
3377 /// "defaultValue": {
3378 /// "description": "Default value formula for the column.",
3379 /// "examples": [
3380 /// "Test"
3381 /// ],
3382 /// "type": "string"
3383 /// },
3384 /// "display": {
3385 /// "description": "Whether the column is the display column.",
3386 /// "examples": [
3387 /// true
3388 /// ],
3389 /// "type": "boolean"
3390 /// },
3391 /// "format": {
3392 /// "$ref": "#/components/schemas/ColumnFormat"
3393 /// },
3394 /// "formula": {
3395 /// "description": "Formula on the column.",
3396 /// "examples": [
3397 /// "thisRow.Created()"
3398 /// ],
3399 /// "type": "string"
3400 /// },
3401 /// "href": {
3402 /// "description": "API link to the column.",
3403 /// "examples": [
3404 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz"
3405 /// ],
3406 /// "type": "string",
3407 /// "format": "url"
3408 /// },
3409 /// "id": {
3410 /// "description": "ID of the column.",
3411 /// "examples": [
3412 /// "c-tuVwxYz"
3413 /// ],
3414 /// "type": "string"
3415 /// },
3416 /// "name": {
3417 /// "description": "Name of the column.",
3418 /// "examples": [
3419 /// "Completed"
3420 /// ],
3421 /// "type": "string"
3422 /// },
3423 /// "parent": {
3424 /// "$ref": "#/components/schemas/TableReference"
3425 /// },
3426 /// "type": {
3427 /// "description": "The type of this resource.",
3428 /// "type": "string",
3429 /// "enum": [
3430 /// "column"
3431 /// ],
3432 /// "x-tsType": "Type.Column"
3433 /// }
3434 /// },
3435 /// "additionalProperties": false,
3436 /// "x-schema-name": "ColumnDetail"
3437 ///}
3438 /// ```
3439 /// </details>
3440 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3441 #[serde(deny_unknown_fields)]
3442 pub struct ColumnDetail {
3443 ///Whether the column has a formula set on it.
3444 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3445 pub calculated: ::std::option::Option<bool>,
3446 ///Default value formula for the column.
3447 #[serde(rename = "defaultValue", default, skip_serializing_if = "::std::option::Option::is_none")]
3448 pub default_value: ::std::option::Option<::std::string::String>,
3449 ///Whether the column is the display column.
3450 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3451 pub display: ::std::option::Option<bool>,
3452 pub format: ColumnFormat,
3453 ///Formula on the column.
3454 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3455 pub formula: ::std::option::Option<::std::string::String>,
3456 ///API link to the column.
3457 pub href: ::std::string::String,
3458 ///ID of the column.
3459 pub id: ::std::string::String,
3460 ///Name of the column.
3461 pub name: ::std::string::String,
3462 pub parent: TableReference,
3463 ///The type of this resource.
3464 #[serde(rename = "type")]
3465 pub type_: ColumnDetailType,
3466 }
3467
3468 impl ::std::convert::From<&ColumnDetail> for ColumnDetail {
3469 fn from(value: &ColumnDetail) -> Self {
3470 value.clone()
3471 }
3472 }
3473
3474 ///The type of this resource.
3475 ///
3476 /// <details><summary>JSON schema</summary>
3477 ///
3478 /// ```json
3479 ///{
3480 /// "description": "The type of this resource.",
3481 /// "type": "string",
3482 /// "enum": [
3483 /// "column"
3484 /// ],
3485 /// "x-tsType": "Type.Column"
3486 ///}
3487 /// ```
3488 /// </details>
3489 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3490 pub enum ColumnDetailType {
3491 #[serde(rename = "column")]
3492 Column,
3493 }
3494
3495 impl ::std::convert::From<&Self> for ColumnDetailType {
3496 fn from(value: &ColumnDetailType) -> Self {
3497 value.clone()
3498 }
3499 }
3500
3501 impl ::std::fmt::Display for ColumnDetailType {
3502 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3503 match *self {
3504 Self::Column => f.write_str("column"),
3505 }
3506 }
3507 }
3508
3509 impl ::std::str::FromStr for ColumnDetailType {
3510 type Err = self::error::ConversionError;
3511 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3512 match value {
3513 "column" => Ok(Self::Column),
3514 _ => Err("invalid value".into()),
3515 }
3516 }
3517 }
3518
3519 impl ::std::convert::TryFrom<&str> for ColumnDetailType {
3520 type Error = self::error::ConversionError;
3521 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3522 value.parse()
3523 }
3524 }
3525
3526 impl ::std::convert::TryFrom<&::std::string::String> for ColumnDetailType {
3527 type Error = self::error::ConversionError;
3528 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3529 value.parse()
3530 }
3531 }
3532
3533 impl ::std::convert::TryFrom<::std::string::String> for ColumnDetailType {
3534 type Error = self::error::ConversionError;
3535 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3536 value.parse()
3537 }
3538 }
3539
3540 ///Format of a column.
3541 ///
3542 /// <details><summary>JSON schema</summary>
3543 ///
3544 /// ```json
3545 ///{
3546 /// "description": "Format of a column.",
3547 /// "oneOf": [
3548 /// {
3549 /// "$ref": "#/components/schemas/ButtonColumnFormat"
3550 /// },
3551 /// {
3552 /// "$ref": "#/components/schemas/CheckboxColumnFormat"
3553 /// },
3554 /// {
3555 /// "$ref": "#/components/schemas/DateColumnFormat"
3556 /// },
3557 /// {
3558 /// "$ref": "#/components/schemas/DateTimeColumnFormat"
3559 /// },
3560 /// {
3561 /// "$ref": "#/components/schemas/DurationColumnFormat"
3562 /// },
3563 /// {
3564 /// "$ref": "#/components/schemas/EmailColumnFormat"
3565 /// },
3566 /// {
3567 /// "$ref": "#/components/schemas/LinkColumnFormat"
3568 /// },
3569 /// {
3570 /// "$ref": "#/components/schemas/CurrencyColumnFormat"
3571 /// },
3572 /// {
3573 /// "$ref": "#/components/schemas/ImageReferenceColumnFormat"
3574 /// },
3575 /// {
3576 /// "$ref": "#/components/schemas/NumericColumnFormat"
3577 /// },
3578 /// {
3579 /// "$ref": "#/components/schemas/ReferenceColumnFormat"
3580 /// },
3581 /// {
3582 /// "$ref": "#/components/schemas/SelectColumnFormat"
3583 /// },
3584 /// {
3585 /// "$ref": "#/components/schemas/SimpleColumnFormat"
3586 /// },
3587 /// {
3588 /// "$ref": "#/components/schemas/ScaleColumnFormat"
3589 /// },
3590 /// {
3591 /// "$ref": "#/components/schemas/SliderColumnFormat"
3592 /// },
3593 /// {
3594 /// "$ref": "#/components/schemas/TimeColumnFormat"
3595 /// }
3596 /// ],
3597 /// "x-schema-name": "ColumnFormat"
3598 ///}
3599 /// ```
3600 /// </details>
3601 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3602 #[serde(untagged)]
3603 pub enum ColumnFormat {
3604 ButtonColumnFormat(ButtonColumnFormat),
3605 CheckboxColumnFormat(CheckboxColumnFormat),
3606 DateColumnFormat(DateColumnFormat),
3607 DateTimeColumnFormat(DateTimeColumnFormat),
3608 DurationColumnFormat(DurationColumnFormat),
3609 EmailColumnFormat(EmailColumnFormat),
3610 LinkColumnFormat(LinkColumnFormat),
3611 CurrencyColumnFormat(CurrencyColumnFormat),
3612 ImageReferenceColumnFormat(ImageReferenceColumnFormat),
3613 NumericColumnFormat(NumericColumnFormat),
3614 ReferenceColumnFormat(ReferenceColumnFormat),
3615 SelectColumnFormat(SelectColumnFormat),
3616 SimpleColumnFormat(SimpleColumnFormat),
3617 ScaleColumnFormat(ScaleColumnFormat),
3618 SliderColumnFormat(SliderColumnFormat),
3619 TimeColumnFormat(TimeColumnFormat),
3620 }
3621
3622 impl ::std::convert::From<&Self> for ColumnFormat {
3623 fn from(value: &ColumnFormat) -> Self {
3624 value.clone()
3625 }
3626 }
3627
3628 impl ::std::convert::From<ButtonColumnFormat> for ColumnFormat {
3629 fn from(value: ButtonColumnFormat) -> Self {
3630 Self::ButtonColumnFormat(value)
3631 }
3632 }
3633
3634 impl ::std::convert::From<CheckboxColumnFormat> for ColumnFormat {
3635 fn from(value: CheckboxColumnFormat) -> Self {
3636 Self::CheckboxColumnFormat(value)
3637 }
3638 }
3639
3640 impl ::std::convert::From<DateColumnFormat> for ColumnFormat {
3641 fn from(value: DateColumnFormat) -> Self {
3642 Self::DateColumnFormat(value)
3643 }
3644 }
3645
3646 impl ::std::convert::From<DateTimeColumnFormat> for ColumnFormat {
3647 fn from(value: DateTimeColumnFormat) -> Self {
3648 Self::DateTimeColumnFormat(value)
3649 }
3650 }
3651
3652 impl ::std::convert::From<DurationColumnFormat> for ColumnFormat {
3653 fn from(value: DurationColumnFormat) -> Self {
3654 Self::DurationColumnFormat(value)
3655 }
3656 }
3657
3658 impl ::std::convert::From<EmailColumnFormat> for ColumnFormat {
3659 fn from(value: EmailColumnFormat) -> Self {
3660 Self::EmailColumnFormat(value)
3661 }
3662 }
3663
3664 impl ::std::convert::From<LinkColumnFormat> for ColumnFormat {
3665 fn from(value: LinkColumnFormat) -> Self {
3666 Self::LinkColumnFormat(value)
3667 }
3668 }
3669
3670 impl ::std::convert::From<CurrencyColumnFormat> for ColumnFormat {
3671 fn from(value: CurrencyColumnFormat) -> Self {
3672 Self::CurrencyColumnFormat(value)
3673 }
3674 }
3675
3676 impl ::std::convert::From<ImageReferenceColumnFormat> for ColumnFormat {
3677 fn from(value: ImageReferenceColumnFormat) -> Self {
3678 Self::ImageReferenceColumnFormat(value)
3679 }
3680 }
3681
3682 impl ::std::convert::From<NumericColumnFormat> for ColumnFormat {
3683 fn from(value: NumericColumnFormat) -> Self {
3684 Self::NumericColumnFormat(value)
3685 }
3686 }
3687
3688 impl ::std::convert::From<ReferenceColumnFormat> for ColumnFormat {
3689 fn from(value: ReferenceColumnFormat) -> Self {
3690 Self::ReferenceColumnFormat(value)
3691 }
3692 }
3693
3694 impl ::std::convert::From<SelectColumnFormat> for ColumnFormat {
3695 fn from(value: SelectColumnFormat) -> Self {
3696 Self::SelectColumnFormat(value)
3697 }
3698 }
3699
3700 impl ::std::convert::From<SimpleColumnFormat> for ColumnFormat {
3701 fn from(value: SimpleColumnFormat) -> Self {
3702 Self::SimpleColumnFormat(value)
3703 }
3704 }
3705
3706 impl ::std::convert::From<ScaleColumnFormat> for ColumnFormat {
3707 fn from(value: ScaleColumnFormat) -> Self {
3708 Self::ScaleColumnFormat(value)
3709 }
3710 }
3711
3712 impl ::std::convert::From<SliderColumnFormat> for ColumnFormat {
3713 fn from(value: SliderColumnFormat) -> Self {
3714 Self::SliderColumnFormat(value)
3715 }
3716 }
3717
3718 impl ::std::convert::From<TimeColumnFormat> for ColumnFormat {
3719 fn from(value: TimeColumnFormat) -> Self {
3720 Self::TimeColumnFormat(value)
3721 }
3722 }
3723
3724 ///Format type of the column
3725 ///
3726 /// <details><summary>JSON schema</summary>
3727 ///
3728 /// ```json
3729 ///{
3730 /// "description": "Format type of the column",
3731 /// "type": "string",
3732 /// "enum": [
3733 /// "text",
3734 /// "person",
3735 /// "lookup",
3736 /// "number",
3737 /// "percent",
3738 /// "currency",
3739 /// "date",
3740 /// "dateTime",
3741 /// "time",
3742 /// "duration",
3743 /// "email",
3744 /// "link",
3745 /// "slider",
3746 /// "scale",
3747 /// "image",
3748 /// "imageReference",
3749 /// "attachments",
3750 /// "button",
3751 /// "checkbox",
3752 /// "select",
3753 /// "packObject",
3754 /// "reaction",
3755 /// "canvas",
3756 /// "other"
3757 /// ],
3758 /// "x-schema-name": "ColumnFormatType",
3759 /// "x-tsEnumNames": [
3760 /// "Text",
3761 /// "Person",
3762 /// "Lookup",
3763 /// "Number",
3764 /// "Percent",
3765 /// "Currency",
3766 /// "Date",
3767 /// "DateTime",
3768 /// "Time",
3769 /// "Duration",
3770 /// "Email",
3771 /// "Link",
3772 /// "Slider",
3773 /// "Scale",
3774 /// "Image",
3775 /// "ImageReference",
3776 /// "Attachments",
3777 /// "Button",
3778 /// "Checkbox",
3779 /// "Select",
3780 /// "PackObject",
3781 /// "Reaction",
3782 /// "Canvas",
3783 /// "Other"
3784 /// ]
3785 ///}
3786 /// ```
3787 /// </details>
3788 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3789 pub enum ColumnFormatType {
3790 #[serde(rename = "text")]
3791 Text,
3792 #[serde(rename = "person")]
3793 Person,
3794 #[serde(rename = "lookup")]
3795 Lookup,
3796 #[serde(rename = "number")]
3797 Number,
3798 #[serde(rename = "percent")]
3799 Percent,
3800 #[serde(rename = "currency")]
3801 Currency,
3802 #[serde(rename = "date")]
3803 Date,
3804 #[serde(rename = "dateTime")]
3805 DateTime,
3806 #[serde(rename = "time")]
3807 Time,
3808 #[serde(rename = "duration")]
3809 Duration,
3810 #[serde(rename = "email")]
3811 Email,
3812 #[serde(rename = "link")]
3813 Link,
3814 #[serde(rename = "slider")]
3815 Slider,
3816 #[serde(rename = "scale")]
3817 Scale,
3818 #[serde(rename = "image")]
3819 Image,
3820 #[serde(rename = "imageReference")]
3821 ImageReference,
3822 #[serde(rename = "attachments")]
3823 Attachments,
3824 #[serde(rename = "button")]
3825 Button,
3826 #[serde(rename = "checkbox")]
3827 Checkbox,
3828 #[serde(rename = "select")]
3829 Select,
3830 #[serde(rename = "packObject")]
3831 PackObject,
3832 #[serde(rename = "reaction")]
3833 Reaction,
3834 #[serde(rename = "canvas")]
3835 Canvas,
3836 #[serde(rename = "other")]
3837 Other,
3838 }
3839
3840 impl ::std::convert::From<&Self> for ColumnFormatType {
3841 fn from(value: &ColumnFormatType) -> Self {
3842 value.clone()
3843 }
3844 }
3845
3846 impl ::std::fmt::Display for ColumnFormatType {
3847 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3848 match *self {
3849 Self::Text => f.write_str("text"),
3850 Self::Person => f.write_str("person"),
3851 Self::Lookup => f.write_str("lookup"),
3852 Self::Number => f.write_str("number"),
3853 Self::Percent => f.write_str("percent"),
3854 Self::Currency => f.write_str("currency"),
3855 Self::Date => f.write_str("date"),
3856 Self::DateTime => f.write_str("dateTime"),
3857 Self::Time => f.write_str("time"),
3858 Self::Duration => f.write_str("duration"),
3859 Self::Email => f.write_str("email"),
3860 Self::Link => f.write_str("link"),
3861 Self::Slider => f.write_str("slider"),
3862 Self::Scale => f.write_str("scale"),
3863 Self::Image => f.write_str("image"),
3864 Self::ImageReference => f.write_str("imageReference"),
3865 Self::Attachments => f.write_str("attachments"),
3866 Self::Button => f.write_str("button"),
3867 Self::Checkbox => f.write_str("checkbox"),
3868 Self::Select => f.write_str("select"),
3869 Self::PackObject => f.write_str("packObject"),
3870 Self::Reaction => f.write_str("reaction"),
3871 Self::Canvas => f.write_str("canvas"),
3872 Self::Other => f.write_str("other"),
3873 }
3874 }
3875 }
3876
3877 impl ::std::str::FromStr for ColumnFormatType {
3878 type Err = self::error::ConversionError;
3879 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3880 match value {
3881 "text" => Ok(Self::Text),
3882 "person" => Ok(Self::Person),
3883 "lookup" => Ok(Self::Lookup),
3884 "number" => Ok(Self::Number),
3885 "percent" => Ok(Self::Percent),
3886 "currency" => Ok(Self::Currency),
3887 "date" => Ok(Self::Date),
3888 "dateTime" => Ok(Self::DateTime),
3889 "time" => Ok(Self::Time),
3890 "duration" => Ok(Self::Duration),
3891 "email" => Ok(Self::Email),
3892 "link" => Ok(Self::Link),
3893 "slider" => Ok(Self::Slider),
3894 "scale" => Ok(Self::Scale),
3895 "image" => Ok(Self::Image),
3896 "imageReference" => Ok(Self::ImageReference),
3897 "attachments" => Ok(Self::Attachments),
3898 "button" => Ok(Self::Button),
3899 "checkbox" => Ok(Self::Checkbox),
3900 "select" => Ok(Self::Select),
3901 "packObject" => Ok(Self::PackObject),
3902 "reaction" => Ok(Self::Reaction),
3903 "canvas" => Ok(Self::Canvas),
3904 "other" => Ok(Self::Other),
3905 _ => Err("invalid value".into()),
3906 }
3907 }
3908 }
3909
3910 impl ::std::convert::TryFrom<&str> for ColumnFormatType {
3911 type Error = self::error::ConversionError;
3912 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3913 value.parse()
3914 }
3915 }
3916
3917 impl ::std::convert::TryFrom<&::std::string::String> for ColumnFormatType {
3918 type Error = self::error::ConversionError;
3919 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3920 value.parse()
3921 }
3922 }
3923
3924 impl ::std::convert::TryFrom<::std::string::String> for ColumnFormatType {
3925 type Error = self::error::ConversionError;
3926 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
3927 value.parse()
3928 }
3929 }
3930
3931 ///List of columns.
3932 ///
3933 /// <details><summary>JSON schema</summary>
3934 ///
3935 /// ```json
3936 ///{
3937 /// "description": "List of columns.",
3938 /// "type": "object",
3939 /// "required": [
3940 /// "items"
3941 /// ],
3942 /// "properties": {
3943 /// "href": {
3944 /// "description": "API link to these results",
3945 /// "examples": [
3946 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns?limit=20"
3947 /// ],
3948 /// "type": "string",
3949 /// "format": "url"
3950 /// },
3951 /// "items": {
3952 /// "type": "array",
3953 /// "items": {
3954 /// "$ref": "#/components/schemas/Column"
3955 /// }
3956 /// },
3957 /// "nextPageLink": {
3958 /// "allOf": [
3959 /// {
3960 /// "$ref": "#/components/schemas/nextPageLink"
3961 /// },
3962 /// {
3963 /// "examples": [
3964 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns?pageToken=eyJsaW1pd"
3965 /// ],
3966 /// "type": "string"
3967 /// }
3968 /// ]
3969 /// },
3970 /// "nextPageToken": {
3971 /// "$ref": "#/components/schemas/nextPageToken"
3972 /// }
3973 /// },
3974 /// "additionalProperties": false,
3975 /// "x-schema-name": "ColumnList"
3976 ///}
3977 /// ```
3978 /// </details>
3979 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3980 #[serde(deny_unknown_fields)]
3981 pub struct ColumnList {
3982 ///API link to these results
3983 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3984 pub href: ::std::option::Option<::std::string::String>,
3985 pub items: ::std::vec::Vec<Column>,
3986 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
3987 pub next_page_link: ::std::option::Option<NextPageLink>,
3988 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
3989 pub next_page_token: ::std::option::Option<NextPageToken>,
3990 }
3991
3992 impl ::std::convert::From<&ColumnList> for ColumnList {
3993 fn from(value: &ColumnList) -> Self {
3994 value.clone()
3995 }
3996 }
3997
3998 ///Reference to a column.
3999 ///
4000 /// <details><summary>JSON schema</summary>
4001 ///
4002 /// ```json
4003 ///{
4004 /// "description": "Reference to a column.",
4005 /// "type": "object",
4006 /// "required": [
4007 /// "href",
4008 /// "id",
4009 /// "type"
4010 /// ],
4011 /// "properties": {
4012 /// "href": {
4013 /// "description": "API link to the column.",
4014 /// "examples": [
4015 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz"
4016 /// ],
4017 /// "type": "string",
4018 /// "format": "url"
4019 /// },
4020 /// "id": {
4021 /// "description": "ID of the column.",
4022 /// "examples": [
4023 /// "c-tuVwxYz"
4024 /// ],
4025 /// "type": "string"
4026 /// },
4027 /// "type": {
4028 /// "description": "The type of this resource.",
4029 /// "type": "string",
4030 /// "enum": [
4031 /// "column"
4032 /// ],
4033 /// "x-tsType": "Type.Column"
4034 /// }
4035 /// },
4036 /// "additionalProperties": false,
4037 /// "x-schema-name": "ColumnReference"
4038 ///}
4039 /// ```
4040 /// </details>
4041 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4042 #[serde(deny_unknown_fields)]
4043 pub struct ColumnReference {
4044 ///API link to the column.
4045 pub href: ::std::string::String,
4046 ///ID of the column.
4047 pub id: ::std::string::String,
4048 ///The type of this resource.
4049 #[serde(rename = "type")]
4050 pub type_: ColumnReferenceType,
4051 }
4052
4053 impl ::std::convert::From<&ColumnReference> for ColumnReference {
4054 fn from(value: &ColumnReference) -> Self {
4055 value.clone()
4056 }
4057 }
4058
4059 ///The type of this resource.
4060 ///
4061 /// <details><summary>JSON schema</summary>
4062 ///
4063 /// ```json
4064 ///{
4065 /// "description": "The type of this resource.",
4066 /// "type": "string",
4067 /// "enum": [
4068 /// "column"
4069 /// ],
4070 /// "x-tsType": "Type.Column"
4071 ///}
4072 /// ```
4073 /// </details>
4074 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4075 pub enum ColumnReferenceType {
4076 #[serde(rename = "column")]
4077 Column,
4078 }
4079
4080 impl ::std::convert::From<&Self> for ColumnReferenceType {
4081 fn from(value: &ColumnReferenceType) -> Self {
4082 value.clone()
4083 }
4084 }
4085
4086 impl ::std::fmt::Display for ColumnReferenceType {
4087 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4088 match *self {
4089 Self::Column => f.write_str("column"),
4090 }
4091 }
4092 }
4093
4094 impl ::std::str::FromStr for ColumnReferenceType {
4095 type Err = self::error::ConversionError;
4096 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4097 match value {
4098 "column" => Ok(Self::Column),
4099 _ => Err("invalid value".into()),
4100 }
4101 }
4102 }
4103
4104 impl ::std::convert::TryFrom<&str> for ColumnReferenceType {
4105 type Error = self::error::ConversionError;
4106 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4107 value.parse()
4108 }
4109 }
4110
4111 impl ::std::convert::TryFrom<&::std::string::String> for ColumnReferenceType {
4112 type Error = self::error::ConversionError;
4113 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4114 value.parse()
4115 }
4116 }
4117
4118 impl ::std::convert::TryFrom<::std::string::String> for ColumnReferenceType {
4119 type Error = self::error::ConversionError;
4120 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4121 value.parse()
4122 }
4123 }
4124
4125 ///The type of this resource.
4126 ///
4127 /// <details><summary>JSON schema</summary>
4128 ///
4129 /// ```json
4130 ///{
4131 /// "description": "The type of this resource.",
4132 /// "type": "string",
4133 /// "enum": [
4134 /// "column"
4135 /// ],
4136 /// "x-tsType": "Type.Column"
4137 ///}
4138 /// ```
4139 /// </details>
4140 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4141 pub enum ColumnType {
4142 #[serde(rename = "column")]
4143 Column,
4144 }
4145
4146 impl ::std::convert::From<&Self> for ColumnType {
4147 fn from(value: &ColumnType) -> Self {
4148 value.clone()
4149 }
4150 }
4151
4152 impl ::std::fmt::Display for ColumnType {
4153 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4154 match *self {
4155 Self::Column => f.write_str("column"),
4156 }
4157 }
4158 }
4159
4160 impl ::std::str::FromStr for ColumnType {
4161 type Err = self::error::ConversionError;
4162 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4163 match value {
4164 "column" => Ok(Self::Column),
4165 _ => Err("invalid value".into()),
4166 }
4167 }
4168 }
4169
4170 impl ::std::convert::TryFrom<&str> for ColumnType {
4171 type Error = self::error::ConversionError;
4172 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4173 value.parse()
4174 }
4175 }
4176
4177 impl ::std::convert::TryFrom<&::std::string::String> for ColumnType {
4178 type Error = self::error::ConversionError;
4179 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4180 value.parse()
4181 }
4182 }
4183
4184 impl ::std::convert::TryFrom<::std::string::String> for ColumnType {
4185 type Error = self::error::ConversionError;
4186 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4187 value.parse()
4188 }
4189 }
4190
4191 ///Details about a control.
4192 ///
4193 /// <details><summary>JSON schema</summary>
4194 ///
4195 /// ```json
4196 ///{
4197 /// "description": "Details about a control.",
4198 /// "type": "object",
4199 /// "required": [
4200 /// "controlType",
4201 /// "href",
4202 /// "id",
4203 /// "name",
4204 /// "type",
4205 /// "value"
4206 /// ],
4207 /// "properties": {
4208 /// "controlType": {
4209 /// "$ref": "#/components/schemas/ControlTypeEnum"
4210 /// },
4211 /// "href": {
4212 /// "description": "API link to the control.",
4213 /// "examples": [
4214 /// "https://coda.io/apis/v1/docs/AbCDeFGH/controls/ctrl-cDefGhij"
4215 /// ],
4216 /// "type": "string",
4217 /// "format": "url"
4218 /// },
4219 /// "id": {
4220 /// "description": "ID of the control.",
4221 /// "examples": [
4222 /// "ctrl-cDefGhij"
4223 /// ],
4224 /// "type": "string"
4225 /// },
4226 /// "name": {
4227 /// "description": "Name of the control.",
4228 /// "examples": [
4229 /// "Cost"
4230 /// ],
4231 /// "type": "string"
4232 /// },
4233 /// "parent": {
4234 /// "$ref": "#/components/schemas/PageReference"
4235 /// },
4236 /// "type": {
4237 /// "description": "The type of this resource.",
4238 /// "type": "string",
4239 /// "enum": [
4240 /// "control"
4241 /// ],
4242 /// "x-tsType": "Type.Control"
4243 /// },
4244 /// "value": {
4245 /// "$ref": "#/components/schemas/Value"
4246 /// }
4247 /// },
4248 /// "additionalProperties": false,
4249 /// "x-schema-name": "Control"
4250 ///}
4251 /// ```
4252 /// </details>
4253 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4254 #[serde(deny_unknown_fields)]
4255 pub struct Control {
4256 #[serde(rename = "controlType")]
4257 pub control_type: ControlTypeEnum,
4258 ///API link to the control.
4259 pub href: ::std::string::String,
4260 ///ID of the control.
4261 pub id: ::std::string::String,
4262 ///Name of the control.
4263 pub name: ::std::string::String,
4264 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4265 pub parent: ::std::option::Option<PageReference>,
4266 ///The type of this resource.
4267 #[serde(rename = "type")]
4268 pub type_: ControlType,
4269 pub value: Value,
4270 }
4271
4272 impl ::std::convert::From<&Control> for Control {
4273 fn from(value: &Control) -> Self {
4274 value.clone()
4275 }
4276 }
4277
4278 ///List of controls.
4279 ///
4280 /// <details><summary>JSON schema</summary>
4281 ///
4282 /// ```json
4283 ///{
4284 /// "description": "List of controls.",
4285 /// "type": "object",
4286 /// "required": [
4287 /// "items"
4288 /// ],
4289 /// "properties": {
4290 /// "href": {
4291 /// "description": "API link to these results",
4292 /// "examples": [
4293 /// "https://coda.io/apis/v1/docs/AbCDeFGH/controls?limit=20"
4294 /// ],
4295 /// "type": "string",
4296 /// "format": "url"
4297 /// },
4298 /// "items": {
4299 /// "type": "array",
4300 /// "items": {
4301 /// "$ref": "#/components/schemas/ControlReference"
4302 /// }
4303 /// },
4304 /// "nextPageLink": {
4305 /// "allOf": [
4306 /// {
4307 /// "$ref": "#/components/schemas/nextPageLink"
4308 /// },
4309 /// {
4310 /// "examples": [
4311 /// "https://coda.io/apis/v1/docs/AbCDeFGH/controls?pageToken=eyJsaW1pd"
4312 /// ],
4313 /// "type": "string"
4314 /// }
4315 /// ]
4316 /// },
4317 /// "nextPageToken": {
4318 /// "$ref": "#/components/schemas/nextPageToken"
4319 /// }
4320 /// },
4321 /// "additionalProperties": false,
4322 /// "x-schema-name": "ControlList"
4323 ///}
4324 /// ```
4325 /// </details>
4326 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4327 #[serde(deny_unknown_fields)]
4328 pub struct ControlList {
4329 ///API link to these results
4330 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4331 pub href: ::std::option::Option<::std::string::String>,
4332 pub items: ::std::vec::Vec<ControlReference>,
4333 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
4334 pub next_page_link: ::std::option::Option<NextPageLink>,
4335 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
4336 pub next_page_token: ::std::option::Option<NextPageToken>,
4337 }
4338
4339 impl ::std::convert::From<&ControlList> for ControlList {
4340 fn from(value: &ControlList) -> Self {
4341 value.clone()
4342 }
4343 }
4344
4345 ///Reference to a control.
4346 ///
4347 /// <details><summary>JSON schema</summary>
4348 ///
4349 /// ```json
4350 ///{
4351 /// "description": "Reference to a control.",
4352 /// "type": "object",
4353 /// "required": [
4354 /// "href",
4355 /// "id",
4356 /// "name",
4357 /// "type"
4358 /// ],
4359 /// "properties": {
4360 /// "href": {
4361 /// "description": "API link to the control.",
4362 /// "examples": [
4363 /// "https://coda.io/apis/v1/docs/AbCDeFGH/controls/ctrl-cDefGhij"
4364 /// ],
4365 /// "type": "string",
4366 /// "format": "url"
4367 /// },
4368 /// "id": {
4369 /// "description": "ID of the control.",
4370 /// "examples": [
4371 /// "ctrl-cDefGhij"
4372 /// ],
4373 /// "type": "string"
4374 /// },
4375 /// "name": {
4376 /// "description": "Name of the control.",
4377 /// "examples": [
4378 /// "Cost"
4379 /// ],
4380 /// "type": "string"
4381 /// },
4382 /// "parent": {
4383 /// "$ref": "#/components/schemas/PageReference"
4384 /// },
4385 /// "type": {
4386 /// "description": "The type of this resource.",
4387 /// "type": "string",
4388 /// "enum": [
4389 /// "control"
4390 /// ],
4391 /// "x-tsType": "Type.Control"
4392 /// }
4393 /// },
4394 /// "additionalProperties": false,
4395 /// "x-schema-name": "ControlReference"
4396 ///}
4397 /// ```
4398 /// </details>
4399 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4400 #[serde(deny_unknown_fields)]
4401 pub struct ControlReference {
4402 ///API link to the control.
4403 pub href: ::std::string::String,
4404 ///ID of the control.
4405 pub id: ::std::string::String,
4406 ///Name of the control.
4407 pub name: ::std::string::String,
4408 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4409 pub parent: ::std::option::Option<PageReference>,
4410 ///The type of this resource.
4411 #[serde(rename = "type")]
4412 pub type_: ControlReferenceType,
4413 }
4414
4415 impl ::std::convert::From<&ControlReference> for ControlReference {
4416 fn from(value: &ControlReference) -> Self {
4417 value.clone()
4418 }
4419 }
4420
4421 ///The type of this resource.
4422 ///
4423 /// <details><summary>JSON schema</summary>
4424 ///
4425 /// ```json
4426 ///{
4427 /// "description": "The type of this resource.",
4428 /// "type": "string",
4429 /// "enum": [
4430 /// "control"
4431 /// ],
4432 /// "x-tsType": "Type.Control"
4433 ///}
4434 /// ```
4435 /// </details>
4436 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4437 pub enum ControlReferenceType {
4438 #[serde(rename = "control")]
4439 Control,
4440 }
4441
4442 impl ::std::convert::From<&Self> for ControlReferenceType {
4443 fn from(value: &ControlReferenceType) -> Self {
4444 value.clone()
4445 }
4446 }
4447
4448 impl ::std::fmt::Display for ControlReferenceType {
4449 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4450 match *self {
4451 Self::Control => f.write_str("control"),
4452 }
4453 }
4454 }
4455
4456 impl ::std::str::FromStr for ControlReferenceType {
4457 type Err = self::error::ConversionError;
4458 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4459 match value {
4460 "control" => Ok(Self::Control),
4461 _ => Err("invalid value".into()),
4462 }
4463 }
4464 }
4465
4466 impl ::std::convert::TryFrom<&str> for ControlReferenceType {
4467 type Error = self::error::ConversionError;
4468 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4469 value.parse()
4470 }
4471 }
4472
4473 impl ::std::convert::TryFrom<&::std::string::String> for ControlReferenceType {
4474 type Error = self::error::ConversionError;
4475 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4476 value.parse()
4477 }
4478 }
4479
4480 impl ::std::convert::TryFrom<::std::string::String> for ControlReferenceType {
4481 type Error = self::error::ConversionError;
4482 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4483 value.parse()
4484 }
4485 }
4486
4487 ///The type of this resource.
4488 ///
4489 /// <details><summary>JSON schema</summary>
4490 ///
4491 /// ```json
4492 ///{
4493 /// "description": "The type of this resource.",
4494 /// "type": "string",
4495 /// "enum": [
4496 /// "control"
4497 /// ],
4498 /// "x-tsType": "Type.Control"
4499 ///}
4500 /// ```
4501 /// </details>
4502 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4503 pub enum ControlType {
4504 #[serde(rename = "control")]
4505 Control,
4506 }
4507
4508 impl ::std::convert::From<&Self> for ControlType {
4509 fn from(value: &ControlType) -> Self {
4510 value.clone()
4511 }
4512 }
4513
4514 impl ::std::fmt::Display for ControlType {
4515 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4516 match *self {
4517 Self::Control => f.write_str("control"),
4518 }
4519 }
4520 }
4521
4522 impl ::std::str::FromStr for ControlType {
4523 type Err = self::error::ConversionError;
4524 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4525 match value {
4526 "control" => Ok(Self::Control),
4527 _ => Err("invalid value".into()),
4528 }
4529 }
4530 }
4531
4532 impl ::std::convert::TryFrom<&str> for ControlType {
4533 type Error = self::error::ConversionError;
4534 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4535 value.parse()
4536 }
4537 }
4538
4539 impl ::std::convert::TryFrom<&::std::string::String> for ControlType {
4540 type Error = self::error::ConversionError;
4541 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4542 value.parse()
4543 }
4544 }
4545
4546 impl ::std::convert::TryFrom<::std::string::String> for ControlType {
4547 type Error = self::error::ConversionError;
4548 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4549 value.parse()
4550 }
4551 }
4552
4553 ///Type of the control.
4554 ///
4555 /// <details><summary>JSON schema</summary>
4556 ///
4557 /// ```json
4558 ///{
4559 /// "description": "Type of the control.",
4560 /// "examples": [
4561 /// "slider"
4562 /// ],
4563 /// "type": "string",
4564 /// "enum": [
4565 /// "aiBlock",
4566 /// "button",
4567 /// "checkbox",
4568 /// "datePicker",
4569 /// "dateRangePicker",
4570 /// "dateTimePicker",
4571 /// "lookup",
4572 /// "multiselect",
4573 /// "select",
4574 /// "scale",
4575 /// "slider",
4576 /// "reaction",
4577 /// "textbox",
4578 /// "timePicker"
4579 /// ],
4580 /// "x-schema-name": "ControlTypeEnum",
4581 /// "x-tsEnumNames": [
4582 /// "AIBlock",
4583 /// "Button",
4584 /// "Checkbox",
4585 /// "DatePicker",
4586 /// "DateRangePicker",
4587 /// "DateTimePicker",
4588 /// "Lookup",
4589 /// "Multiselect",
4590 /// "Select",
4591 /// "Scale",
4592 /// "Slider",
4593 /// "Reaction",
4594 /// "Textbox",
4595 /// "TimePicker"
4596 /// ]
4597 ///}
4598 /// ```
4599 /// </details>
4600 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4601 pub enum ControlTypeEnum {
4602 #[serde(rename = "aiBlock")]
4603 AiBlock,
4604 #[serde(rename = "button")]
4605 Button,
4606 #[serde(rename = "checkbox")]
4607 Checkbox,
4608 #[serde(rename = "datePicker")]
4609 DatePicker,
4610 #[serde(rename = "dateRangePicker")]
4611 DateRangePicker,
4612 #[serde(rename = "dateTimePicker")]
4613 DateTimePicker,
4614 #[serde(rename = "lookup")]
4615 Lookup,
4616 #[serde(rename = "multiselect")]
4617 Multiselect,
4618 #[serde(rename = "select")]
4619 Select,
4620 #[serde(rename = "scale")]
4621 Scale,
4622 #[serde(rename = "slider")]
4623 Slider,
4624 #[serde(rename = "reaction")]
4625 Reaction,
4626 #[serde(rename = "textbox")]
4627 Textbox,
4628 #[serde(rename = "timePicker")]
4629 TimePicker,
4630 }
4631
4632 impl ::std::convert::From<&Self> for ControlTypeEnum {
4633 fn from(value: &ControlTypeEnum) -> Self {
4634 value.clone()
4635 }
4636 }
4637
4638 impl ::std::fmt::Display for ControlTypeEnum {
4639 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4640 match *self {
4641 Self::AiBlock => f.write_str("aiBlock"),
4642 Self::Button => f.write_str("button"),
4643 Self::Checkbox => f.write_str("checkbox"),
4644 Self::DatePicker => f.write_str("datePicker"),
4645 Self::DateRangePicker => f.write_str("dateRangePicker"),
4646 Self::DateTimePicker => f.write_str("dateTimePicker"),
4647 Self::Lookup => f.write_str("lookup"),
4648 Self::Multiselect => f.write_str("multiselect"),
4649 Self::Select => f.write_str("select"),
4650 Self::Scale => f.write_str("scale"),
4651 Self::Slider => f.write_str("slider"),
4652 Self::Reaction => f.write_str("reaction"),
4653 Self::Textbox => f.write_str("textbox"),
4654 Self::TimePicker => f.write_str("timePicker"),
4655 }
4656 }
4657 }
4658
4659 impl ::std::str::FromStr for ControlTypeEnum {
4660 type Err = self::error::ConversionError;
4661 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4662 match value {
4663 "aiBlock" => Ok(Self::AiBlock),
4664 "button" => Ok(Self::Button),
4665 "checkbox" => Ok(Self::Checkbox),
4666 "datePicker" => Ok(Self::DatePicker),
4667 "dateRangePicker" => Ok(Self::DateRangePicker),
4668 "dateTimePicker" => Ok(Self::DateTimePicker),
4669 "lookup" => Ok(Self::Lookup),
4670 "multiselect" => Ok(Self::Multiselect),
4671 "select" => Ok(Self::Select),
4672 "scale" => Ok(Self::Scale),
4673 "slider" => Ok(Self::Slider),
4674 "reaction" => Ok(Self::Reaction),
4675 "textbox" => Ok(Self::Textbox),
4676 "timePicker" => Ok(Self::TimePicker),
4677 _ => Err("invalid value".into()),
4678 }
4679 }
4680 }
4681
4682 impl ::std::convert::TryFrom<&str> for ControlTypeEnum {
4683 type Error = self::error::ConversionError;
4684 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4685 value.parse()
4686 }
4687 }
4688
4689 impl ::std::convert::TryFrom<&::std::string::String> for ControlTypeEnum {
4690 type Error = self::error::ConversionError;
4691 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4692 value.parse()
4693 }
4694 }
4695
4696 impl ::std::convert::TryFrom<::std::string::String> for ControlTypeEnum {
4697 type Error = self::error::ConversionError;
4698 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
4699 value.parse()
4700 }
4701 }
4702
4703 ///An HTTP error resulting from an unsuccessful request.
4704 ///
4705 /// <details><summary>JSON schema</summary>
4706 ///
4707 /// ```json
4708 ///{
4709 /// "description": "An HTTP error resulting from an unsuccessful request.",
4710 /// "required": [
4711 /// "message",
4712 /// "statusCode",
4713 /// "statusMessage"
4714 /// ],
4715 /// "properties": {
4716 /// "message": {
4717 /// "description": "Any additional context on the error, or the same as
4718 /// `statusMessage` otherwise.",
4719 /// "examples": [
4720 /// "Bad Request"
4721 /// ],
4722 /// "type": "string"
4723 /// },
4724 /// "statusCode": {
4725 /// "description": "HTTP status code of the error.",
4726 /// "examples": [
4727 /// 400
4728 /// ],
4729 /// "type": "number"
4730 /// },
4731 /// "statusMessage": {
4732 /// "description": "HTTP status message of the error.",
4733 /// "examples": [
4734 /// "Bad Request"
4735 /// ],
4736 /// "type": "string"
4737 /// }
4738 /// },
4739 /// "additionalProperties": false
4740 ///}
4741 /// ```
4742 /// </details>
4743 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4744 #[serde(deny_unknown_fields)]
4745 pub struct CreateDocResponse {
4746 ///Any additional context on the error, or the same as `statusMessage`
4747 /// otherwise.
4748 pub message: ::std::string::String,
4749 #[serde(rename = "statusCode")]
4750 pub status_code: f64,
4751 ///HTTP status message of the error.
4752 #[serde(rename = "statusMessage")]
4753 pub status_message: ::std::string::String,
4754 }
4755
4756 impl ::std::convert::From<&CreateDocResponse> for CreateDocResponse {
4757 fn from(value: &CreateDocResponse) -> Self {
4758 value.clone()
4759 }
4760 }
4761
4762 ///Payload for creating a Pack invitation.
4763 ///
4764 /// <details><summary>JSON schema</summary>
4765 ///
4766 /// ```json
4767 ///{
4768 /// "description": "Payload for creating a Pack invitation.",
4769 /// "type": "object",
4770 /// "required": [
4771 /// "access",
4772 /// "email"
4773 /// ],
4774 /// "properties": {
4775 /// "access": {
4776 /// "$ref": "#/components/schemas/PackAccessType"
4777 /// },
4778 /// "email": {
4779 /// "description": "Email address of the user to invite",
4780 /// "examples": [
4781 /// "user@example.com"
4782 /// ],
4783 /// "type": "string"
4784 /// }
4785 /// },
4786 /// "additionalProperties": false,
4787 /// "x-schema-name": "CreatePackInvitationRequest"
4788 ///}
4789 /// ```
4790 /// </details>
4791 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4792 #[serde(deny_unknown_fields)]
4793 pub struct CreatePackInvitationRequest {
4794 pub access: PackAccessType,
4795 ///Email address of the user to invite
4796 pub email: ::std::string::String,
4797 }
4798
4799 impl ::std::convert::From<&CreatePackInvitationRequest> for CreatePackInvitationRequest {
4800 fn from(value: &CreatePackInvitationRequest) -> Self {
4801 value.clone()
4802 }
4803 }
4804
4805 ///Confirmation of successfully creating a Pack invitation.
4806 ///
4807 /// <details><summary>JSON schema</summary>
4808 ///
4809 /// ```json
4810 ///{
4811 /// "description": "Confirmation of successfully creating a Pack
4812 /// invitation.",
4813 /// "type": "object",
4814 /// "required": [
4815 /// "invitationId"
4816 /// ],
4817 /// "properties": {
4818 /// "invitationId": {
4819 /// "description": "The ID of the invitation created.",
4820 /// "examples": [
4821 /// "550e8400-e29b-41d4-a716-446655440000"
4822 /// ],
4823 /// "type": "string"
4824 /// }
4825 /// },
4826 /// "additionalProperties": false,
4827 /// "x-schema-name": "CreatePackInvitationResponse"
4828 ///}
4829 /// ```
4830 /// </details>
4831 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4832 #[serde(deny_unknown_fields)]
4833 pub struct CreatePackInvitationResponse {
4834 ///The ID of the invitation created.
4835 #[serde(rename = "invitationId")]
4836 pub invitation_id: ::std::string::String,
4837 }
4838
4839 impl ::std::convert::From<&CreatePackInvitationResponse> for CreatePackInvitationResponse {
4840 fn from(value: &CreatePackInvitationResponse) -> Self {
4841 value.clone()
4842 }
4843 }
4844
4845 ///Detail about why this request was rejected.
4846 ///
4847 /// <details><summary>JSON schema</summary>
4848 ///
4849 /// ```json
4850 ///{
4851 /// "description": "Detail about why this request was rejected.",
4852 /// "type": "object",
4853 /// "properties": {
4854 /// "validationErrors": {
4855 /// "type": "array",
4856 /// "items": {
4857 /// "$ref": "#/components/schemas/ValidationError"
4858 /// }
4859 /// }
4860 /// },
4861 /// "additionalProperties": false
4862 ///}
4863 /// ```
4864 /// </details>
4865 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4866 #[serde(deny_unknown_fields)]
4867 pub struct CreatePackInvitationResponseCodaDetail {
4868 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4869 pub validation_errors: ::std::vec::Vec<ValidationError>,
4870 }
4871
4872 impl ::std::convert::From<&CreatePackInvitationResponseCodaDetail> for CreatePackInvitationResponseCodaDetail {
4873 fn from(value: &CreatePackInvitationResponseCodaDetail) -> Self {
4874 value.clone()
4875 }
4876 }
4877
4878 impl ::std::default::Default for CreatePackInvitationResponseCodaDetail {
4879 fn default() -> Self {
4880 Self {
4881 validation_errors: Default::default(),
4882 }
4883 }
4884 }
4885
4886 ///Payload for creating a new Pack release.
4887 ///
4888 /// <details><summary>JSON schema</summary>
4889 ///
4890 /// ```json
4891 ///{
4892 /// "description": "Payload for creating a new Pack release.",
4893 /// "type": "object",
4894 /// "required": [
4895 /// "packVersion"
4896 /// ],
4897 /// "properties": {
4898 /// "packVersion": {
4899 /// "description": "Which semantic pack version that the release will
4900 /// be created on.",
4901 /// "examples": [
4902 /// "1.0.0"
4903 /// ],
4904 /// "type": "string"
4905 /// },
4906 /// "releaseNotes": {
4907 /// "description": "Developers notes.",
4908 /// "examples": [
4909 /// "The first release."
4910 /// ],
4911 /// "type": "string"
4912 /// }
4913 /// },
4914 /// "additionalProperties": false,
4915 /// "x-schema-name": "CreatePackReleaseRequest"
4916 ///}
4917 /// ```
4918 /// </details>
4919 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4920 #[serde(deny_unknown_fields)]
4921 pub struct CreatePackReleaseRequest {
4922 ///Which semantic pack version that the release will be created on.
4923 #[serde(rename = "packVersion")]
4924 pub pack_version: ::std::string::String,
4925 ///Developers notes.
4926 #[serde(rename = "releaseNotes", default, skip_serializing_if = "::std::option::Option::is_none")]
4927 pub release_notes: ::std::option::Option<::std::string::String>,
4928 }
4929
4930 impl ::std::convert::From<&CreatePackReleaseRequest> for CreatePackReleaseRequest {
4931 fn from(value: &CreatePackReleaseRequest) -> Self {
4932 value.clone()
4933 }
4934 }
4935
4936 ///An HTTP error resulting from an unsuccessful request.
4937 ///
4938 /// <details><summary>JSON schema</summary>
4939 ///
4940 /// ```json
4941 ///{
4942 /// "description": "An HTTP error resulting from an unsuccessful request.",
4943 /// "required": [
4944 /// "message",
4945 /// "statusCode",
4946 /// "statusMessage"
4947 /// ],
4948 /// "properties": {
4949 /// "codaDetail": {
4950 /// "description": "Detail about why this request was rejected.",
4951 /// "type": "object",
4952 /// "properties": {
4953 /// "validationErrors": {
4954 /// "type": "array",
4955 /// "items": {
4956 /// "$ref": "#/components/schemas/ValidationError"
4957 /// }
4958 /// }
4959 /// },
4960 /// "additionalProperties": false
4961 /// },
4962 /// "message": {
4963 /// "description": "Any additional context on the error, or the same as
4964 /// `statusMessage` otherwise.",
4965 /// "examples": [
4966 /// "Bad Request"
4967 /// ],
4968 /// "type": "string"
4969 /// },
4970 /// "statusCode": {
4971 /// "description": "HTTP status code of the error.",
4972 /// "examples": [
4973 /// 400
4974 /// ],
4975 /// "type": "number"
4976 /// },
4977 /// "statusMessage": {
4978 /// "description": "HTTP status message of the error.",
4979 /// "examples": [
4980 /// "Bad Request"
4981 /// ],
4982 /// "type": "string"
4983 /// }
4984 /// },
4985 /// "additionalProperties": false
4986 ///}
4987 /// ```
4988 /// </details>
4989 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4990 #[serde(deny_unknown_fields)]
4991 pub struct CreatePackReleaseResponse {
4992 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
4993 pub coda_detail: ::std::option::Option<CreatePackReleaseResponseCodaDetail>,
4994 ///Any additional context on the error, or the same as `statusMessage`
4995 /// otherwise.
4996 pub message: ::std::string::String,
4997 #[serde(rename = "statusCode")]
4998 pub status_code: f64,
4999 ///HTTP status message of the error.
5000 #[serde(rename = "statusMessage")]
5001 pub status_message: ::std::string::String,
5002 }
5003
5004 impl ::std::convert::From<&CreatePackReleaseResponse> for CreatePackReleaseResponse {
5005 fn from(value: &CreatePackReleaseResponse) -> Self {
5006 value.clone()
5007 }
5008 }
5009
5010 ///Detail about why this request was rejected.
5011 ///
5012 /// <details><summary>JSON schema</summary>
5013 ///
5014 /// ```json
5015 ///{
5016 /// "description": "Detail about why this request was rejected.",
5017 /// "type": "object",
5018 /// "properties": {
5019 /// "validationErrors": {
5020 /// "type": "array",
5021 /// "items": {
5022 /// "$ref": "#/components/schemas/ValidationError"
5023 /// }
5024 /// }
5025 /// },
5026 /// "additionalProperties": false
5027 ///}
5028 /// ```
5029 /// </details>
5030 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5031 #[serde(deny_unknown_fields)]
5032 pub struct CreatePackReleaseResponseCodaDetail {
5033 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5034 pub validation_errors: ::std::vec::Vec<ValidationError>,
5035 }
5036
5037 impl ::std::convert::From<&CreatePackReleaseResponseCodaDetail> for CreatePackReleaseResponseCodaDetail {
5038 fn from(value: &CreatePackReleaseResponseCodaDetail) -> Self {
5039 value.clone()
5040 }
5041 }
5042
5043 impl ::std::default::Default for CreatePackReleaseResponseCodaDetail {
5044 fn default() -> Self {
5045 Self {
5046 validation_errors: Default::default(),
5047 }
5048 }
5049 }
5050
5051 ///Payload for creating a Pack.
5052 ///
5053 /// <details><summary>JSON schema</summary>
5054 ///
5055 /// ```json
5056 ///{
5057 /// "description": "Payload for creating a Pack.",
5058 /// "type": "object",
5059 /// "properties": {
5060 /// "description": {
5061 /// "description": "A brief description of the Pack.",
5062 /// "examples": [
5063 /// "Common trigonometric functions."
5064 /// ],
5065 /// "type": "string"
5066 /// },
5067 /// "name": {
5068 /// "description": "The name for the Pack.",
5069 /// "examples": [
5070 /// "Trigonometry"
5071 /// ],
5072 /// "type": "string"
5073 /// },
5074 /// "sourcePackId": {
5075 /// "description": "The ID of the new Pack's source, if this new Pack
5076 /// was forked.",
5077 /// "examples": [
5078 /// 10029
5079 /// ],
5080 /// "type": [
5081 /// "number",
5082 /// "null"
5083 /// ]
5084 /// },
5085 /// "workspaceId": {
5086 /// "description": "The parent workspace for the Pack. If unspecified,
5087 /// the user's default workspace will be used.",
5088 /// "examples": [
5089 /// "ws-asdf"
5090 /// ],
5091 /// "type": "string"
5092 /// }
5093 /// },
5094 /// "additionalProperties": false,
5095 /// "x-schema-name": "CreatePackRequest"
5096 ///}
5097 /// ```
5098 /// </details>
5099 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5100 #[serde(deny_unknown_fields)]
5101 pub struct CreatePackRequest {
5102 ///A brief description of the Pack.
5103 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5104 pub description: ::std::option::Option<::std::string::String>,
5105 ///The name for the Pack.
5106 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5107 pub name: ::std::option::Option<::std::string::String>,
5108 ///The ID of the new Pack's source, if this new Pack was forked.
5109 #[serde(rename = "sourcePackId", default, skip_serializing_if = "::std::option::Option::is_none")]
5110 pub source_pack_id: ::std::option::Option<f64>,
5111 ///The parent workspace for the Pack. If unspecified, the user's
5112 /// default workspace will be used.
5113 #[serde(rename = "workspaceId", default, skip_serializing_if = "::std::option::Option::is_none")]
5114 pub workspace_id: ::std::option::Option<::std::string::String>,
5115 }
5116
5117 impl ::std::convert::From<&CreatePackRequest> for CreatePackRequest {
5118 fn from(value: &CreatePackRequest) -> Self {
5119 value.clone()
5120 }
5121 }
5122
5123 impl ::std::default::Default for CreatePackRequest {
5124 fn default() -> Self {
5125 Self {
5126 description: Default::default(),
5127 name: Default::default(),
5128 source_pack_id: Default::default(),
5129 workspace_id: Default::default(),
5130 }
5131 }
5132 }
5133
5134 ///Info about a Pack that was just created.
5135 ///
5136 /// <details><summary>JSON schema</summary>
5137 ///
5138 /// ```json
5139 ///{
5140 /// "description": "Info about a Pack that was just created.",
5141 /// "type": "object",
5142 /// "required": [
5143 /// "packId"
5144 /// ],
5145 /// "properties": {
5146 /// "packId": {
5147 /// "description": "The ID assigned to the newly-created Pack.",
5148 /// "examples": [
5149 /// 123
5150 /// ],
5151 /// "type": "number"
5152 /// }
5153 /// },
5154 /// "additionalProperties": false,
5155 /// "x-schema-name": "CreatePackResponse"
5156 ///}
5157 /// ```
5158 /// </details>
5159 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5160 #[serde(deny_unknown_fields)]
5161 pub struct CreatePackResponse {
5162 #[serde(rename = "packId")]
5163 pub pack_id: f64,
5164 }
5165
5166 impl ::std::convert::From<&CreatePackResponse> for CreatePackResponse {
5167 fn from(value: &CreatePackResponse) -> Self {
5168 value.clone()
5169 }
5170 }
5171
5172 ///Payload for Pack version upload complete.
5173 ///
5174 /// <details><summary>JSON schema</summary>
5175 ///
5176 /// ```json
5177 ///{
5178 /// "description": "Payload for Pack version upload complete.",
5179 /// "type": "object",
5180 /// "properties": {
5181 /// "allowOlderSdkVersion": {
5182 /// "description": "Bypass Coda's protection against SDK version
5183 /// regression when multiple makers build versions.",
5184 /// "type": "boolean"
5185 /// },
5186 /// "notes": {
5187 /// "description": "Developer notes of the new Pack version.",
5188 /// "examples": [
5189 /// "Adding a new formula HelloWorld."
5190 /// ],
5191 /// "type": "string"
5192 /// },
5193 /// "source": {
5194 /// "$ref": "#/components/schemas/PackSource"
5195 /// }
5196 /// },
5197 /// "additionalProperties": false,
5198 /// "x-schema-name": "CreatePackVersionRequest"
5199 ///}
5200 /// ```
5201 /// </details>
5202 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5203 #[serde(deny_unknown_fields)]
5204 pub struct CreatePackVersionRequest {
5205 ///Bypass Coda's protection against SDK version regression when
5206 /// multiple makers build versions.
5207 #[serde(rename = "allowOlderSdkVersion", default, skip_serializing_if = "::std::option::Option::is_none")]
5208 pub allow_older_sdk_version: ::std::option::Option<bool>,
5209 ///Developer notes of the new Pack version.
5210 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5211 pub notes: ::std::option::Option<::std::string::String>,
5212 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5213 pub source: ::std::option::Option<PackSource>,
5214 }
5215
5216 impl ::std::convert::From<&CreatePackVersionRequest> for CreatePackVersionRequest {
5217 fn from(value: &CreatePackVersionRequest) -> Self {
5218 value.clone()
5219 }
5220 }
5221
5222 impl ::std::default::Default for CreatePackVersionRequest {
5223 fn default() -> Self {
5224 Self {
5225 allow_older_sdk_version: Default::default(),
5226 notes: Default::default(),
5227 source: Default::default(),
5228 }
5229 }
5230 }
5231
5232 ///Confirmation of successful Pack version creation.
5233 ///
5234 /// <details><summary>JSON schema</summary>
5235 ///
5236 /// ```json
5237 ///{
5238 /// "description": "Confirmation of successful Pack version creation.",
5239 /// "type": "object",
5240 /// "properties": {
5241 /// "deprecationWarnings": {
5242 /// "type": "array",
5243 /// "items": {
5244 /// "$ref": "#/components/schemas/ValidationError"
5245 /// }
5246 /// }
5247 /// },
5248 /// "additionalProperties": false,
5249 /// "x-schema-name": "CreatePackVersionResponse"
5250 ///}
5251 /// ```
5252 /// </details>
5253 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5254 #[serde(deny_unknown_fields)]
5255 pub struct CreatePackVersionResponse {
5256 #[serde(rename = "deprecationWarnings", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5257 pub deprecation_warnings: ::std::vec::Vec<ValidationError>,
5258 }
5259
5260 impl ::std::convert::From<&CreatePackVersionResponse> for CreatePackVersionResponse {
5261 fn from(value: &CreatePackVersionResponse) -> Self {
5262 value.clone()
5263 }
5264 }
5265
5266 impl ::std::default::Default for CreatePackVersionResponse {
5267 fn default() -> Self {
5268 Self {
5269 deprecation_warnings: Default::default(),
5270 }
5271 }
5272 }
5273
5274 ///An HTTP error resulting from an unsuccessful request.
5275 ///
5276 /// <details><summary>JSON schema</summary>
5277 ///
5278 /// ```json
5279 ///{
5280 /// "description": "An HTTP error resulting from an unsuccessful request.",
5281 /// "required": [
5282 /// "message",
5283 /// "statusCode",
5284 /// "statusMessage"
5285 /// ],
5286 /// "properties": {
5287 /// "message": {
5288 /// "description": "Any additional context on the error, or the same as
5289 /// `statusMessage` otherwise.",
5290 /// "examples": [
5291 /// "Bad Request"
5292 /// ],
5293 /// "type": "string"
5294 /// },
5295 /// "statusCode": {
5296 /// "description": "HTTP status code of the error.",
5297 /// "examples": [
5298 /// 400
5299 /// ],
5300 /// "type": "number"
5301 /// },
5302 /// "statusMessage": {
5303 /// "description": "HTTP status message of the error.",
5304 /// "examples": [
5305 /// "Bad Request"
5306 /// ],
5307 /// "type": "string"
5308 /// }
5309 /// },
5310 /// "additionalProperties": false
5311 ///}
5312 /// ```
5313 /// </details>
5314 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5315 #[serde(deny_unknown_fields)]
5316 pub struct CreatePageResponse {
5317 ///Any additional context on the error, or the same as `statusMessage`
5318 /// otherwise.
5319 pub message: ::std::string::String,
5320 #[serde(rename = "statusCode")]
5321 pub status_code: f64,
5322 ///HTTP status message of the error.
5323 #[serde(rename = "statusMessage")]
5324 pub status_message: ::std::string::String,
5325 }
5326
5327 impl ::std::convert::From<&CreatePageResponse> for CreatePageResponse {
5328 fn from(value: &CreatePageResponse) -> Self {
5329 value.clone()
5330 }
5331 }
5332
5333 ///A numeric monetary amount as a string or number.
5334 ///
5335 /// <details><summary>JSON schema</summary>
5336 ///
5337 /// ```json
5338 ///{
5339 /// "description": "A numeric monetary amount as a string or number.",
5340 /// "oneOf": [
5341 /// {
5342 /// "examples": [
5343 /// "12.99"
5344 /// ],
5345 /// "type": "string"
5346 /// },
5347 /// {
5348 /// "examples": [
5349 /// 42
5350 /// ],
5351 /// "type": "number"
5352 /// }
5353 /// ],
5354 /// "x-schema-name": "CurrencyAmount"
5355 ///}
5356 /// ```
5357 /// </details>
5358 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5359 #[serde(untagged)]
5360 pub enum CurrencyAmount {
5361 Variant0(::std::string::String),
5362 Variant1(f64),
5363 }
5364
5365 impl ::std::convert::From<&Self> for CurrencyAmount {
5366 fn from(value: &CurrencyAmount) -> Self {
5367 value.clone()
5368 }
5369 }
5370
5371 impl ::std::fmt::Display for CurrencyAmount {
5372 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5373 match self {
5374 Self::Variant0(x) => x.fmt(f),
5375 Self::Variant1(x) => x.fmt(f),
5376 }
5377 }
5378 }
5379
5380 impl ::std::convert::From<f64> for CurrencyAmount {
5381 fn from(value: f64) -> Self {
5382 Self::Variant1(value)
5383 }
5384 }
5385
5386 ///`CurrencyColumnFormat`
5387 ///
5388 /// <details><summary>JSON schema</summary>
5389 ///
5390 /// ```json
5391 ///{
5392 /// "description": "Format of a currency column.",
5393 /// "allOf": [
5394 /// {
5395 /// "$ref": "#/components/schemas/SimpleColumnFormat"
5396 /// },
5397 /// {
5398 /// "type": "object",
5399 /// "properties": {
5400 /// "currencyCode": {
5401 /// "description": "The currency symbol",
5402 /// "examples": [
5403 /// "$"
5404 /// ],
5405 /// "type": "string"
5406 /// },
5407 /// "format": {
5408 /// "$ref": "#/components/schemas/CurrencyFormatType"
5409 /// },
5410 /// "precision": {
5411 /// "description": "The decimal precision.",
5412 /// "examples": [
5413 /// 2
5414 /// ],
5415 /// "type": "integer",
5416 /// "maximum": 10.0,
5417 /// "minimum": 0.0
5418 /// }
5419 /// },
5420 /// "additionalProperties": false
5421 /// }
5422 /// ],
5423 /// "x-schema-name": "CurrencyColumnFormat"
5424 ///}
5425 /// ```
5426 /// </details>
5427 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5428 #[serde(deny_unknown_fields)]
5429 pub enum CurrencyColumnFormat {}
5430 impl ::std::convert::From<&Self> for CurrencyColumnFormat {
5431 fn from(value: &CurrencyColumnFormat) -> Self {
5432 value.clone()
5433 }
5434 }
5435
5436 ///How the numeric value should be formatted (with or without symbol,
5437 /// negative numbers in parens).
5438 ///
5439 /// <details><summary>JSON schema</summary>
5440 ///
5441 /// ```json
5442 ///{
5443 /// "description": "How the numeric value should be formatted (with or
5444 /// without symbol, negative numbers in parens).",
5445 /// "type": "string",
5446 /// "enum": [
5447 /// "currency",
5448 /// "accounting",
5449 /// "financial"
5450 /// ],
5451 /// "x-schema-name": "CurrencyFormatType",
5452 /// "x-tsEnumNames": [
5453 /// "Currency",
5454 /// "Accounting",
5455 /// "Financial"
5456 /// ]
5457 ///}
5458 /// ```
5459 /// </details>
5460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5461 pub enum CurrencyFormatType {
5462 #[serde(rename = "currency")]
5463 Currency,
5464 #[serde(rename = "accounting")]
5465 Accounting,
5466 #[serde(rename = "financial")]
5467 Financial,
5468 }
5469
5470 impl ::std::convert::From<&Self> for CurrencyFormatType {
5471 fn from(value: &CurrencyFormatType) -> Self {
5472 value.clone()
5473 }
5474 }
5475
5476 impl ::std::fmt::Display for CurrencyFormatType {
5477 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5478 match *self {
5479 Self::Currency => f.write_str("currency"),
5480 Self::Accounting => f.write_str("accounting"),
5481 Self::Financial => f.write_str("financial"),
5482 }
5483 }
5484 }
5485
5486 impl ::std::str::FromStr for CurrencyFormatType {
5487 type Err = self::error::ConversionError;
5488 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5489 match value {
5490 "currency" => Ok(Self::Currency),
5491 "accounting" => Ok(Self::Accounting),
5492 "financial" => Ok(Self::Financial),
5493 _ => Err("invalid value".into()),
5494 }
5495 }
5496 }
5497
5498 impl ::std::convert::TryFrom<&str> for CurrencyFormatType {
5499 type Error = self::error::ConversionError;
5500 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5501 value.parse()
5502 }
5503 }
5504
5505 impl ::std::convert::TryFrom<&::std::string::String> for CurrencyFormatType {
5506 type Error = self::error::ConversionError;
5507 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5508 value.parse()
5509 }
5510 }
5511
5512 impl ::std::convert::TryFrom<::std::string::String> for CurrencyFormatType {
5513 type Error = self::error::ConversionError;
5514 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5515 value.parse()
5516 }
5517 }
5518
5519 ///`CurrencyValue`
5520 ///
5521 /// <details><summary>JSON schema</summary>
5522 ///
5523 /// ```json
5524 ///{
5525 /// "description": "A monetary value with its associated currency code.",
5526 /// "allOf": [
5527 /// {
5528 /// "$ref": "#/components/schemas/LinkedDataObject"
5529 /// },
5530 /// {
5531 /// "type": "object",
5532 /// "required": [
5533 /// "@type",
5534 /// "amount",
5535 /// "currency"
5536 /// ],
5537 /// "properties": {
5538 /// "@type": {
5539 /// "type": "string",
5540 /// "enum": [
5541 /// "MonetaryAmount"
5542 /// ],
5543 /// "x-tsType": "LinkedDataType.MonetaryAmount"
5544 /// },
5545 /// "amount": {
5546 /// "$ref": "#/components/schemas/CurrencyAmount"
5547 /// },
5548 /// "currency": {
5549 /// "description": "The 3-letter currency code.",
5550 /// "examples": [
5551 /// "USD"
5552 /// ],
5553 /// "type": "string"
5554 /// }
5555 /// },
5556 /// "additionalProperties": false
5557 /// }
5558 /// ],
5559 /// "x-schema-name": "CurrencyValue"
5560 ///}
5561 /// ```
5562 /// </details>
5563 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5564 #[serde(deny_unknown_fields)]
5565 pub enum CurrencyValue {}
5566 impl ::std::convert::From<&Self> for CurrencyValue {
5567 fn from(value: &CurrencyValue) -> Self {
5568 value.clone()
5569 }
5570 }
5571
5572 ///The custom domain added to a published doc.
5573 ///
5574 /// <details><summary>JSON schema</summary>
5575 ///
5576 /// ```json
5577 ///{
5578 /// "description": "The custom domain added to a published doc.",
5579 /// "type": "object",
5580 /// "required": [
5581 /// "customDocDomain",
5582 /// "domainStatus",
5583 /// "hasCertificate",
5584 /// "hasDnsDocId",
5585 /// "setupStatus"
5586 /// ],
5587 /// "properties": {
5588 /// "customDocDomain": {
5589 /// "description": "The custom domain.",
5590 /// "examples": [
5591 /// "example.com"
5592 /// ],
5593 /// "type": "string"
5594 /// },
5595 /// "domainStatus": {
5596 /// "$ref": "#/components/schemas/CustomDomainConnectedStatus"
5597 /// },
5598 /// "hasCertificate": {
5599 /// "description": "Whether the domain has a certificate",
5600 /// "examples": [
5601 /// true
5602 /// ],
5603 /// "type": "boolean"
5604 /// },
5605 /// "hasDnsDocId": {
5606 /// "description": "Whether the domain DNS points back to this doc.",
5607 /// "examples": [
5608 /// true
5609 /// ],
5610 /// "type": "boolean"
5611 /// },
5612 /// "lastVerifiedTimestamp": {
5613 /// "description": "When the domain DNS settings were last checked.",
5614 /// "examples": [
5615 /// "2018-04-11T00:18:57.946Z"
5616 /// ],
5617 /// "type": "string",
5618 /// "format": "date-time"
5619 /// },
5620 /// "setupStatus": {
5621 /// "$ref": "#/components/schemas/CustomDocDomainSetupStatus"
5622 /// }
5623 /// },
5624 /// "additionalProperties": false,
5625 /// "x-schema-name": "CustomDocDomain"
5626 ///}
5627 /// ```
5628 /// </details>
5629 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5630 #[serde(deny_unknown_fields)]
5631 pub struct CustomDocDomain {
5632 ///The custom domain.
5633 #[serde(rename = "customDocDomain")]
5634 pub custom_doc_domain: ::std::string::String,
5635 #[serde(rename = "domainStatus")]
5636 pub domain_status: CustomDomainConnectedStatus,
5637 ///Whether the domain has a certificate
5638 #[serde(rename = "hasCertificate")]
5639 pub has_certificate: bool,
5640 ///Whether the domain DNS points back to this doc.
5641 #[serde(rename = "hasDnsDocId")]
5642 pub has_dns_doc_id: bool,
5643 ///When the domain DNS settings were last checked.
5644 #[serde(rename = "lastVerifiedTimestamp", default, skip_serializing_if = "::std::option::Option::is_none")]
5645 pub last_verified_timestamp: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
5646 #[serde(rename = "setupStatus")]
5647 pub setup_status: CustomDocDomainSetupStatus,
5648 }
5649
5650 impl ::std::convert::From<&CustomDocDomain> for CustomDocDomain {
5651 fn from(value: &CustomDocDomain) -> Self {
5652 value.clone()
5653 }
5654 }
5655
5656 ///List of all custom domains added to a published doc.
5657 ///
5658 /// <details><summary>JSON schema</summary>
5659 ///
5660 /// ```json
5661 ///{
5662 /// "description": "List of all custom domains added to a published doc.",
5663 /// "type": "object",
5664 /// "required": [
5665 /// "customDocDomains"
5666 /// ],
5667 /// "properties": {
5668 /// "customDocDomains": {
5669 /// "description": "Custom domains for the published doc.",
5670 /// "type": "array",
5671 /// "items": {
5672 /// "$ref": "#/components/schemas/CustomDocDomain"
5673 /// }
5674 /// },
5675 /// "nextPageLink": {
5676 /// "allOf": [
5677 /// {
5678 /// "$ref": "#/components/schemas/nextPageLink"
5679 /// },
5680 /// {
5681 /// "examples": [
5682 /// "https://coda.io/apis/v1/docs/AbCDeFGH/domains?pageToken=eyJsaW1pd"
5683 /// ],
5684 /// "type": "string"
5685 /// }
5686 /// ]
5687 /// },
5688 /// "nextPageToken": {
5689 /// "$ref": "#/components/schemas/nextPageToken"
5690 /// }
5691 /// },
5692 /// "additionalProperties": false,
5693 /// "x-schema-name": "CustomDocDomainList"
5694 ///}
5695 /// ```
5696 /// </details>
5697 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5698 #[serde(deny_unknown_fields)]
5699 pub struct CustomDocDomainList {
5700 ///Custom domains for the published doc.
5701 #[serde(rename = "customDocDomains")]
5702 pub custom_doc_domains: ::std::vec::Vec<CustomDocDomain>,
5703 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
5704 pub next_page_link: ::std::option::Option<NextPageLink>,
5705 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
5706 pub next_page_token: ::std::option::Option<NextPageToken>,
5707 }
5708
5709 impl ::std::convert::From<&CustomDocDomainList> for CustomDocDomainList {
5710 fn from(value: &CustomDocDomainList) -> Self {
5711 value.clone()
5712 }
5713 }
5714
5715 ///`CustomDocDomainProvider`
5716 ///
5717 /// <details><summary>JSON schema</summary>
5718 ///
5719 /// ```json
5720 ///{
5721 /// "type": "string",
5722 /// "enum": [
5723 /// "GoDaddy",
5724 /// "Namecheap",
5725 /// "Hover (Tucows)",
5726 /// "Network Solutions",
5727 /// "Google Domains",
5728 /// "Other"
5729 /// ],
5730 /// "x-schema-name": "CustomDocDomainProvider",
5731 /// "x-tsEnumNames": [
5732 /// "GoDaddy",
5733 /// "Namecheap",
5734 /// "Hover",
5735 /// "NetworkSolutions",
5736 /// "GoogleDomains",
5737 /// "Other"
5738 /// ]
5739 ///}
5740 /// ```
5741 /// </details>
5742 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5743 pub enum CustomDocDomainProvider {
5744 GoDaddy,
5745 Namecheap,
5746 #[serde(rename = "Hover (Tucows)")]
5747 HoverTucows,
5748 #[serde(rename = "Network Solutions")]
5749 NetworkSolutions,
5750 #[serde(rename = "Google Domains")]
5751 GoogleDomains,
5752 Other,
5753 }
5754
5755 impl ::std::convert::From<&Self> for CustomDocDomainProvider {
5756 fn from(value: &CustomDocDomainProvider) -> Self {
5757 value.clone()
5758 }
5759 }
5760
5761 impl ::std::fmt::Display for CustomDocDomainProvider {
5762 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5763 match *self {
5764 Self::GoDaddy => f.write_str("GoDaddy"),
5765 Self::Namecheap => f.write_str("Namecheap"),
5766 Self::HoverTucows => f.write_str("Hover (Tucows)"),
5767 Self::NetworkSolutions => f.write_str("Network Solutions"),
5768 Self::GoogleDomains => f.write_str("Google Domains"),
5769 Self::Other => f.write_str("Other"),
5770 }
5771 }
5772 }
5773
5774 impl ::std::str::FromStr for CustomDocDomainProvider {
5775 type Err = self::error::ConversionError;
5776 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5777 match value {
5778 "GoDaddy" => Ok(Self::GoDaddy),
5779 "Namecheap" => Ok(Self::Namecheap),
5780 "Hover (Tucows)" => Ok(Self::HoverTucows),
5781 "Network Solutions" => Ok(Self::NetworkSolutions),
5782 "Google Domains" => Ok(Self::GoogleDomains),
5783 "Other" => Ok(Self::Other),
5784 _ => Err("invalid value".into()),
5785 }
5786 }
5787 }
5788
5789 impl ::std::convert::TryFrom<&str> for CustomDocDomainProvider {
5790 type Error = self::error::ConversionError;
5791 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5792 value.parse()
5793 }
5794 }
5795
5796 impl ::std::convert::TryFrom<&::std::string::String> for CustomDocDomainProvider {
5797 type Error = self::error::ConversionError;
5798 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5799 value.parse()
5800 }
5801 }
5802
5803 impl ::std::convert::TryFrom<::std::string::String> for CustomDocDomainProvider {
5804 type Error = self::error::ConversionError;
5805 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5806 value.parse()
5807 }
5808 }
5809
5810 ///The result of determining the domain provider for a custom doc domain.
5811 ///
5812 /// <details><summary>JSON schema</summary>
5813 ///
5814 /// ```json
5815 ///{
5816 /// "description": "The result of determining the domain provider for a
5817 /// custom doc domain.",
5818 /// "type": "object",
5819 /// "required": [
5820 /// "provider"
5821 /// ],
5822 /// "properties": {
5823 /// "provider": {
5824 /// "$ref": "#/components/schemas/CustomDocDomainProvider"
5825 /// }
5826 /// },
5827 /// "additionalProperties": false,
5828 /// "x-schema-name": "CustomDocDomainProviderResponse"
5829 ///}
5830 /// ```
5831 /// </details>
5832 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5833 #[serde(deny_unknown_fields)]
5834 pub struct CustomDocDomainProviderResponse {
5835 pub provider: CustomDocDomainProvider,
5836 }
5837
5838 impl ::std::convert::From<&CustomDocDomainProviderResponse> for CustomDocDomainProviderResponse {
5839 fn from(value: &CustomDocDomainProviderResponse) -> Self {
5840 value.clone()
5841 }
5842 }
5843
5844 ///`CustomDocDomainSetupStatus`
5845 ///
5846 /// <details><summary>JSON schema</summary>
5847 ///
5848 /// ```json
5849 ///{
5850 /// "type": "string",
5851 /// "enum": [
5852 /// "pending",
5853 /// "succeeded",
5854 /// "failed"
5855 /// ],
5856 /// "x-schema-name": "CustomDocDomainSetupStatus",
5857 /// "x-tsEnumNames": [
5858 /// "Pending",
5859 /// "Succeeded",
5860 /// "Failed"
5861 /// ]
5862 ///}
5863 /// ```
5864 /// </details>
5865 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5866 pub enum CustomDocDomainSetupStatus {
5867 #[serde(rename = "pending")]
5868 Pending,
5869 #[serde(rename = "succeeded")]
5870 Succeeded,
5871 #[serde(rename = "failed")]
5872 Failed,
5873 }
5874
5875 impl ::std::convert::From<&Self> for CustomDocDomainSetupStatus {
5876 fn from(value: &CustomDocDomainSetupStatus) -> Self {
5877 value.clone()
5878 }
5879 }
5880
5881 impl ::std::fmt::Display for CustomDocDomainSetupStatus {
5882 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5883 match *self {
5884 Self::Pending => f.write_str("pending"),
5885 Self::Succeeded => f.write_str("succeeded"),
5886 Self::Failed => f.write_str("failed"),
5887 }
5888 }
5889 }
5890
5891 impl ::std::str::FromStr for CustomDocDomainSetupStatus {
5892 type Err = self::error::ConversionError;
5893 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5894 match value {
5895 "pending" => Ok(Self::Pending),
5896 "succeeded" => Ok(Self::Succeeded),
5897 "failed" => Ok(Self::Failed),
5898 _ => Err("invalid value".into()),
5899 }
5900 }
5901 }
5902
5903 impl ::std::convert::TryFrom<&str> for CustomDocDomainSetupStatus {
5904 type Error = self::error::ConversionError;
5905 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5906 value.parse()
5907 }
5908 }
5909
5910 impl ::std::convert::TryFrom<&::std::string::String> for CustomDocDomainSetupStatus {
5911 type Error = self::error::ConversionError;
5912 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5913 value.parse()
5914 }
5915 }
5916
5917 impl ::std::convert::TryFrom<::std::string::String> for CustomDocDomainSetupStatus {
5918 type Error = self::error::ConversionError;
5919 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5920 value.parse()
5921 }
5922 }
5923
5924 ///`CustomDomainConnectedStatus`
5925 ///
5926 /// <details><summary>JSON schema</summary>
5927 ///
5928 /// ```json
5929 ///{
5930 /// "type": "string",
5931 /// "enum": [
5932 /// "connected",
5933 /// "notConnected"
5934 /// ],
5935 /// "x-schema-name": "CustomDomainConnectedStatus",
5936 /// "x-tsEnumNames": [
5937 /// "Connected",
5938 /// "NotConnected"
5939 /// ]
5940 ///}
5941 /// ```
5942 /// </details>
5943 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5944 pub enum CustomDomainConnectedStatus {
5945 #[serde(rename = "connected")]
5946 Connected,
5947 #[serde(rename = "notConnected")]
5948 NotConnected,
5949 }
5950
5951 impl ::std::convert::From<&Self> for CustomDomainConnectedStatus {
5952 fn from(value: &CustomDomainConnectedStatus) -> Self {
5953 value.clone()
5954 }
5955 }
5956
5957 impl ::std::fmt::Display for CustomDomainConnectedStatus {
5958 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5959 match *self {
5960 Self::Connected => f.write_str("connected"),
5961 Self::NotConnected => f.write_str("notConnected"),
5962 }
5963 }
5964 }
5965
5966 impl ::std::str::FromStr for CustomDomainConnectedStatus {
5967 type Err = self::error::ConversionError;
5968 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5969 match value {
5970 "connected" => Ok(Self::Connected),
5971 "notConnected" => Ok(Self::NotConnected),
5972 _ => Err("invalid value".into()),
5973 }
5974 }
5975 }
5976
5977 impl ::std::convert::TryFrom<&str> for CustomDomainConnectedStatus {
5978 type Error = self::error::ConversionError;
5979 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5980 value.parse()
5981 }
5982 }
5983
5984 impl ::std::convert::TryFrom<&::std::string::String> for CustomDomainConnectedStatus {
5985 type Error = self::error::ConversionError;
5986 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5987 value.parse()
5988 }
5989 }
5990
5991 impl ::std::convert::TryFrom<::std::string::String> for CustomDomainConnectedStatus {
5992 type Error = self::error::ConversionError;
5993 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
5994 value.parse()
5995 }
5996 }
5997
5998 ///`DateColumnFormat`
5999 ///
6000 /// <details><summary>JSON schema</summary>
6001 ///
6002 /// ```json
6003 ///{
6004 /// "description": "Format of a date column.",
6005 /// "allOf": [
6006 /// {
6007 /// "$ref": "#/components/schemas/SimpleColumnFormat"
6008 /// },
6009 /// {
6010 /// "type": "object",
6011 /// "properties": {
6012 /// "format": {
6013 /// "description": "A format string using Moment syntax: https://momentjs.com/docs/#/displaying/",
6014 /// "examples": [
6015 /// "YYYY-MM-DD"
6016 /// ],
6017 /// "type": "string"
6018 /// }
6019 /// },
6020 /// "additionalProperties": false
6021 /// }
6022 /// ],
6023 /// "x-schema-name": "DateColumnFormat"
6024 ///}
6025 /// ```
6026 /// </details>
6027 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6028 #[serde(deny_unknown_fields)]
6029 pub enum DateColumnFormat {}
6030 impl ::std::convert::From<&Self> for DateColumnFormat {
6031 fn from(value: &DateColumnFormat) -> Self {
6032 value.clone()
6033 }
6034 }
6035
6036 ///`DateTimeColumnFormat`
6037 ///
6038 /// <details><summary>JSON schema</summary>
6039 ///
6040 /// ```json
6041 ///{
6042 /// "description": "Format of a date column.",
6043 /// "allOf": [
6044 /// {
6045 /// "$ref": "#/components/schemas/SimpleColumnFormat"
6046 /// },
6047 /// {
6048 /// "type": "object",
6049 /// "properties": {
6050 /// "dateFormat": {
6051 /// "description": "A format string using Moment syntax: https://momentjs.com/docs/#/displaying/",
6052 /// "examples": [
6053 /// "YYYY-MM-DD"
6054 /// ],
6055 /// "type": "string"
6056 /// },
6057 /// "timeFormat": {
6058 /// "description": "A format string using Moment syntax: https://momentjs.com/docs/#/displaying/",
6059 /// "examples": [
6060 /// "h:mm:ss A"
6061 /// ],
6062 /// "type": "string"
6063 /// }
6064 /// },
6065 /// "additionalProperties": false
6066 /// }
6067 /// ],
6068 /// "x-schema-name": "DateTimeColumnFormat"
6069 ///}
6070 /// ```
6071 /// </details>
6072 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6073 #[serde(deny_unknown_fields)]
6074 pub enum DateTimeColumnFormat {}
6075 impl ::std::convert::From<&Self> for DateTimeColumnFormat {
6076 fn from(value: &DateTimeColumnFormat) -> Self {
6077 value.clone()
6078 }
6079 }
6080
6081 ///The result of deleting a custom domain from a published doc.
6082 ///
6083 /// <details><summary>JSON schema</summary>
6084 ///
6085 /// ```json
6086 ///{
6087 /// "description": "The result of deleting a custom domain from a published
6088 /// doc.",
6089 /// "type": "object",
6090 /// "additionalProperties": false,
6091 /// "x-schema-name": "DeleteCustomDocDomainResponse"
6092 ///}
6093 /// ```
6094 /// </details>
6095 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6096 #[serde(deny_unknown_fields)]
6097 pub struct DeleteCustomDocDomainResponse {}
6098 impl ::std::convert::From<&DeleteCustomDocDomainResponse> for DeleteCustomDocDomainResponse {
6099 fn from(value: &DeleteCustomDocDomainResponse) -> Self {
6100 value.clone()
6101 }
6102 }
6103
6104 impl ::std::default::Default for DeleteCustomDocDomainResponse {
6105 fn default() -> Self {
6106 Self {}
6107 }
6108 }
6109
6110 ///An HTTP error resulting from an unsuccessful request.
6111 ///
6112 /// <details><summary>JSON schema</summary>
6113 ///
6114 /// ```json
6115 ///{
6116 /// "description": "An HTTP error resulting from an unsuccessful request.",
6117 /// "required": [
6118 /// "message",
6119 /// "statusCode",
6120 /// "statusMessage"
6121 /// ],
6122 /// "properties": {
6123 /// "message": {
6124 /// "description": "Any additional context on the error, or the same as
6125 /// `statusMessage` otherwise.",
6126 /// "examples": [
6127 /// "Unauthorized"
6128 /// ],
6129 /// "type": "string"
6130 /// },
6131 /// "statusCode": {
6132 /// "description": "HTTP status code of the error.",
6133 /// "examples": [
6134 /// 401
6135 /// ],
6136 /// "type": "number"
6137 /// },
6138 /// "statusMessage": {
6139 /// "description": "HTTP status message of the error.",
6140 /// "examples": [
6141 /// "Unauthorized"
6142 /// ],
6143 /// "type": "string"
6144 /// }
6145 /// },
6146 /// "additionalProperties": false
6147 ///}
6148 /// ```
6149 /// </details>
6150 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6151 #[serde(deny_unknown_fields)]
6152 pub struct DeleteDocResponse {
6153 ///Any additional context on the error, or the same as `statusMessage`
6154 /// otherwise.
6155 pub message: ::std::string::String,
6156 #[serde(rename = "statusCode")]
6157 pub status_code: f64,
6158 ///HTTP status message of the error.
6159 #[serde(rename = "statusMessage")]
6160 pub status_message: ::std::string::String,
6161 }
6162
6163 impl ::std::convert::From<&DeleteDocResponse> for DeleteDocResponse {
6164 fn from(value: &DeleteDocResponse) -> Self {
6165 value.clone()
6166 }
6167 }
6168
6169 ///Confirmation of successfully deleting a Pack category.
6170 ///
6171 /// <details><summary>JSON schema</summary>
6172 ///
6173 /// ```json
6174 ///{
6175 /// "description": "Confirmation of successfully deleting a Pack
6176 /// category.",
6177 /// "type": "object",
6178 /// "additionalProperties": false,
6179 /// "x-schema-name": "DeletePackCategoryResponse"
6180 ///}
6181 /// ```
6182 /// </details>
6183 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6184 #[serde(deny_unknown_fields)]
6185 pub struct DeletePackCategoryResponse {}
6186 impl ::std::convert::From<&DeletePackCategoryResponse> for DeletePackCategoryResponse {
6187 fn from(value: &DeletePackCategoryResponse) -> Self {
6188 value.clone()
6189 }
6190 }
6191
6192 impl ::std::default::Default for DeletePackCategoryResponse {
6193 fn default() -> Self {
6194 Self {}
6195 }
6196 }
6197
6198 ///Detail about why this request was rejected.
6199 ///
6200 /// <details><summary>JSON schema</summary>
6201 ///
6202 /// ```json
6203 ///{
6204 /// "description": "Detail about why this request was rejected.",
6205 /// "type": "object",
6206 /// "properties": {
6207 /// "validationErrors": {
6208 /// "type": "array",
6209 /// "items": {
6210 /// "$ref": "#/components/schemas/ValidationError"
6211 /// }
6212 /// }
6213 /// },
6214 /// "additionalProperties": false
6215 ///}
6216 /// ```
6217 /// </details>
6218 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6219 #[serde(deny_unknown_fields)]
6220 pub struct DeletePackCategoryResponseCodaDetail {
6221 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6222 pub validation_errors: ::std::vec::Vec<ValidationError>,
6223 }
6224
6225 impl ::std::convert::From<&DeletePackCategoryResponseCodaDetail> for DeletePackCategoryResponseCodaDetail {
6226 fn from(value: &DeletePackCategoryResponseCodaDetail) -> Self {
6227 value.clone()
6228 }
6229 }
6230
6231 impl ::std::default::Default for DeletePackCategoryResponseCodaDetail {
6232 fn default() -> Self {
6233 Self {
6234 validation_errors: Default::default(),
6235 }
6236 }
6237 }
6238
6239 ///Confirmation of successfully deleting a Pack invitation.
6240 ///
6241 /// <details><summary>JSON schema</summary>
6242 ///
6243 /// ```json
6244 ///{
6245 /// "description": "Confirmation of successfully deleting a Pack
6246 /// invitation.",
6247 /// "type": "object",
6248 /// "additionalProperties": false,
6249 /// "x-schema-name": "DeletePackInvitationResponse"
6250 ///}
6251 /// ```
6252 /// </details>
6253 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6254 #[serde(deny_unknown_fields)]
6255 pub struct DeletePackInvitationResponse {}
6256 impl ::std::convert::From<&DeletePackInvitationResponse> for DeletePackInvitationResponse {
6257 fn from(value: &DeletePackInvitationResponse) -> Self {
6258 value.clone()
6259 }
6260 }
6261
6262 impl ::std::default::Default for DeletePackInvitationResponse {
6263 fn default() -> Self {
6264 Self {}
6265 }
6266 }
6267
6268 ///Detail about why this request was rejected.
6269 ///
6270 /// <details><summary>JSON schema</summary>
6271 ///
6272 /// ```json
6273 ///{
6274 /// "description": "Detail about why this request was rejected.",
6275 /// "type": "object",
6276 /// "properties": {
6277 /// "validationErrors": {
6278 /// "type": "array",
6279 /// "items": {
6280 /// "$ref": "#/components/schemas/ValidationError"
6281 /// }
6282 /// }
6283 /// },
6284 /// "additionalProperties": false
6285 ///}
6286 /// ```
6287 /// </details>
6288 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6289 #[serde(deny_unknown_fields)]
6290 pub struct DeletePackInvitationResponseCodaDetail {
6291 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6292 pub validation_errors: ::std::vec::Vec<ValidationError>,
6293 }
6294
6295 impl ::std::convert::From<&DeletePackInvitationResponseCodaDetail> for DeletePackInvitationResponseCodaDetail {
6296 fn from(value: &DeletePackInvitationResponseCodaDetail) -> Self {
6297 value.clone()
6298 }
6299 }
6300
6301 impl ::std::default::Default for DeletePackInvitationResponseCodaDetail {
6302 fn default() -> Self {
6303 Self {
6304 validation_errors: Default::default(),
6305 }
6306 }
6307 }
6308
6309 ///Confirmation of successfully deleting a Pack maker.
6310 ///
6311 /// <details><summary>JSON schema</summary>
6312 ///
6313 /// ```json
6314 ///{
6315 /// "description": "Confirmation of successfully deleting a Pack maker.",
6316 /// "type": "object",
6317 /// "additionalProperties": false,
6318 /// "x-schema-name": "AddPackMakerResponse"
6319 ///}
6320 /// ```
6321 /// </details>
6322 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6323 #[serde(deny_unknown_fields)]
6324 pub struct DeletePackMakerResponse {}
6325 impl ::std::convert::From<&DeletePackMakerResponse> for DeletePackMakerResponse {
6326 fn from(value: &DeletePackMakerResponse) -> Self {
6327 value.clone()
6328 }
6329 }
6330
6331 impl ::std::default::Default for DeletePackMakerResponse {
6332 fn default() -> Self {
6333 Self {}
6334 }
6335 }
6336
6337 ///Detail about why this request was rejected.
6338 ///
6339 /// <details><summary>JSON schema</summary>
6340 ///
6341 /// ```json
6342 ///{
6343 /// "description": "Detail about why this request was rejected.",
6344 /// "type": "object",
6345 /// "properties": {
6346 /// "validationErrors": {
6347 /// "type": "array",
6348 /// "items": {
6349 /// "$ref": "#/components/schemas/ValidationError"
6350 /// }
6351 /// }
6352 /// },
6353 /// "additionalProperties": false
6354 ///}
6355 /// ```
6356 /// </details>
6357 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6358 #[serde(deny_unknown_fields)]
6359 pub struct DeletePackMakerResponseCodaDetail {
6360 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6361 pub validation_errors: ::std::vec::Vec<ValidationError>,
6362 }
6363
6364 impl ::std::convert::From<&DeletePackMakerResponseCodaDetail> for DeletePackMakerResponseCodaDetail {
6365 fn from(value: &DeletePackMakerResponseCodaDetail) -> Self {
6366 value.clone()
6367 }
6368 }
6369
6370 impl ::std::default::Default for DeletePackMakerResponseCodaDetail {
6371 fn default() -> Self {
6372 Self {
6373 validation_errors: Default::default(),
6374 }
6375 }
6376 }
6377
6378 ///Confirmation of successfully deleting a Pack permission.
6379 ///
6380 /// <details><summary>JSON schema</summary>
6381 ///
6382 /// ```json
6383 ///{
6384 /// "description": "Confirmation of successfully deleting a Pack
6385 /// permission.",
6386 /// "type": "object",
6387 /// "additionalProperties": false,
6388 /// "x-schema-name": "DeletePackPermissionResponse"
6389 ///}
6390 /// ```
6391 /// </details>
6392 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6393 #[serde(deny_unknown_fields)]
6394 pub struct DeletePackPermissionResponse {}
6395 impl ::std::convert::From<&DeletePackPermissionResponse> for DeletePackPermissionResponse {
6396 fn from(value: &DeletePackPermissionResponse) -> Self {
6397 value.clone()
6398 }
6399 }
6400
6401 impl ::std::default::Default for DeletePackPermissionResponse {
6402 fn default() -> Self {
6403 Self {}
6404 }
6405 }
6406
6407 ///Detail about why this request was rejected.
6408 ///
6409 /// <details><summary>JSON schema</summary>
6410 ///
6411 /// ```json
6412 ///{
6413 /// "description": "Detail about why this request was rejected.",
6414 /// "type": "object",
6415 /// "properties": {
6416 /// "validationErrors": {
6417 /// "type": "array",
6418 /// "items": {
6419 /// "$ref": "#/components/schemas/ValidationError"
6420 /// }
6421 /// }
6422 /// },
6423 /// "additionalProperties": false
6424 ///}
6425 /// ```
6426 /// </details>
6427 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6428 #[serde(deny_unknown_fields)]
6429 pub struct DeletePackPermissionResponseCodaDetail {
6430 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6431 pub validation_errors: ::std::vec::Vec<ValidationError>,
6432 }
6433
6434 impl ::std::convert::From<&DeletePackPermissionResponseCodaDetail> for DeletePackPermissionResponseCodaDetail {
6435 fn from(value: &DeletePackPermissionResponseCodaDetail) -> Self {
6436 value.clone()
6437 }
6438 }
6439
6440 impl ::std::default::Default for DeletePackPermissionResponseCodaDetail {
6441 fn default() -> Self {
6442 Self {
6443 validation_errors: Default::default(),
6444 }
6445 }
6446 }
6447
6448 ///Confirmation of successful Pack deletion.
6449 ///
6450 /// <details><summary>JSON schema</summary>
6451 ///
6452 /// ```json
6453 ///{
6454 /// "description": "Confirmation of successful Pack deletion.",
6455 /// "type": "object",
6456 /// "additionalProperties": false,
6457 /// "x-schema-name": "DeletePackResponse"
6458 ///}
6459 /// ```
6460 /// </details>
6461 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6462 #[serde(deny_unknown_fields)]
6463 pub struct DeletePackResponse {}
6464 impl ::std::convert::From<&DeletePackResponse> for DeletePackResponse {
6465 fn from(value: &DeletePackResponse) -> Self {
6466 value.clone()
6467 }
6468 }
6469
6470 impl ::std::default::Default for DeletePackResponse {
6471 fn default() -> Self {
6472 Self {}
6473 }
6474 }
6475
6476 ///An HTTP error resulting from an unsuccessful request.
6477 ///
6478 /// <details><summary>JSON schema</summary>
6479 ///
6480 /// ```json
6481 ///{
6482 /// "description": "An HTTP error resulting from an unsuccessful request.",
6483 /// "required": [
6484 /// "message",
6485 /// "statusCode",
6486 /// "statusMessage"
6487 /// ],
6488 /// "properties": {
6489 /// "message": {
6490 /// "description": "Any additional context on the error, or the same as
6491 /// `statusMessage` otherwise.",
6492 /// "examples": [
6493 /// "Bad Request"
6494 /// ],
6495 /// "type": "string"
6496 /// },
6497 /// "statusCode": {
6498 /// "description": "HTTP status code of the error.",
6499 /// "examples": [
6500 /// 400
6501 /// ],
6502 /// "type": "number"
6503 /// },
6504 /// "statusMessage": {
6505 /// "description": "HTTP status message of the error.",
6506 /// "examples": [
6507 /// "Bad Request"
6508 /// ],
6509 /// "type": "string"
6510 /// }
6511 /// },
6512 /// "additionalProperties": false
6513 ///}
6514 /// ```
6515 /// </details>
6516 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6517 #[serde(deny_unknown_fields)]
6518 pub struct DeletePageContentResponse {
6519 ///Any additional context on the error, or the same as `statusMessage`
6520 /// otherwise.
6521 pub message: ::std::string::String,
6522 #[serde(rename = "statusCode")]
6523 pub status_code: f64,
6524 ///HTTP status message of the error.
6525 #[serde(rename = "statusMessage")]
6526 pub status_message: ::std::string::String,
6527 }
6528
6529 impl ::std::convert::From<&DeletePageContentResponse> for DeletePageContentResponse {
6530 fn from(value: &DeletePageContentResponse) -> Self {
6531 value.clone()
6532 }
6533 }
6534
6535 ///An HTTP error resulting from an unsuccessful request.
6536 ///
6537 /// <details><summary>JSON schema</summary>
6538 ///
6539 /// ```json
6540 ///{
6541 /// "description": "An HTTP error resulting from an unsuccessful request.",
6542 /// "required": [
6543 /// "message",
6544 /// "statusCode",
6545 /// "statusMessage"
6546 /// ],
6547 /// "properties": {
6548 /// "message": {
6549 /// "description": "Any additional context on the error, or the same as
6550 /// `statusMessage` otherwise.",
6551 /// "examples": [
6552 /// "Bad Request"
6553 /// ],
6554 /// "type": "string"
6555 /// },
6556 /// "statusCode": {
6557 /// "description": "HTTP status code of the error.",
6558 /// "examples": [
6559 /// 400
6560 /// ],
6561 /// "type": "number"
6562 /// },
6563 /// "statusMessage": {
6564 /// "description": "HTTP status message of the error.",
6565 /// "examples": [
6566 /// "Bad Request"
6567 /// ],
6568 /// "type": "string"
6569 /// }
6570 /// },
6571 /// "additionalProperties": false
6572 ///}
6573 /// ```
6574 /// </details>
6575 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6576 #[serde(deny_unknown_fields)]
6577 pub struct DeletePageResponse {
6578 ///Any additional context on the error, or the same as `statusMessage`
6579 /// otherwise.
6580 pub message: ::std::string::String,
6581 #[serde(rename = "statusCode")]
6582 pub status_code: f64,
6583 ///HTTP status message of the error.
6584 #[serde(rename = "statusMessage")]
6585 pub status_message: ::std::string::String,
6586 }
6587
6588 impl ::std::convert::From<&DeletePageResponse> for DeletePageResponse {
6589 fn from(value: &DeletePageResponse) -> Self {
6590 value.clone()
6591 }
6592 }
6593
6594 ///An HTTP error resulting from an unsuccessful request.
6595 ///
6596 /// <details><summary>JSON schema</summary>
6597 ///
6598 /// ```json
6599 ///{
6600 /// "description": "An HTTP error resulting from an unsuccessful request.",
6601 /// "required": [
6602 /// "message",
6603 /// "statusCode",
6604 /// "statusMessage"
6605 /// ],
6606 /// "properties": {
6607 /// "message": {
6608 /// "description": "Any additional context on the error, or the same as
6609 /// `statusMessage` otherwise.",
6610 /// "examples": [
6611 /// "Bad Request"
6612 /// ],
6613 /// "type": "string"
6614 /// },
6615 /// "statusCode": {
6616 /// "description": "HTTP status code of the error.",
6617 /// "examples": [
6618 /// 400
6619 /// ],
6620 /// "type": "number"
6621 /// },
6622 /// "statusMessage": {
6623 /// "description": "HTTP status message of the error.",
6624 /// "examples": [
6625 /// "Bad Request"
6626 /// ],
6627 /// "type": "string"
6628 /// }
6629 /// },
6630 /// "additionalProperties": false
6631 ///}
6632 /// ```
6633 /// </details>
6634 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6635 #[serde(deny_unknown_fields)]
6636 pub struct DeletePermissionResponse {
6637 ///Any additional context on the error, or the same as `statusMessage`
6638 /// otherwise.
6639 pub message: ::std::string::String,
6640 #[serde(rename = "statusCode")]
6641 pub status_code: f64,
6642 ///HTTP status message of the error.
6643 #[serde(rename = "statusMessage")]
6644 pub status_message: ::std::string::String,
6645 }
6646
6647 impl ::std::convert::From<&DeletePermissionResponse> for DeletePermissionResponse {
6648 fn from(value: &DeletePermissionResponse) -> Self {
6649 value.clone()
6650 }
6651 }
6652
6653 ///The result of deleting a permission.
6654 ///
6655 /// <details><summary>JSON schema</summary>
6656 ///
6657 /// ```json
6658 ///{
6659 /// "description": "The result of deleting a permission.",
6660 /// "type": "object",
6661 /// "additionalProperties": false,
6662 /// "x-schema-name": "DeletePermissionResult"
6663 ///}
6664 /// ```
6665 /// </details>
6666 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6667 #[serde(deny_unknown_fields)]
6668 pub struct DeletePermissionResult {}
6669 impl ::std::convert::From<&DeletePermissionResult> for DeletePermissionResult {
6670 fn from(value: &DeletePermissionResult) -> Self {
6671 value.clone()
6672 }
6673 }
6674
6675 impl ::std::default::Default for DeletePermissionResult {
6676 fn default() -> Self {
6677 Self {}
6678 }
6679 }
6680
6681 ///An HTTP error resulting from an unsuccessful request.
6682 ///
6683 /// <details><summary>JSON schema</summary>
6684 ///
6685 /// ```json
6686 ///{
6687 /// "description": "An HTTP error resulting from an unsuccessful request.",
6688 /// "required": [
6689 /// "message",
6690 /// "statusCode",
6691 /// "statusMessage"
6692 /// ],
6693 /// "properties": {
6694 /// "message": {
6695 /// "description": "Any additional context on the error, or the same as
6696 /// `statusMessage` otherwise.",
6697 /// "examples": [
6698 /// "Unauthorized"
6699 /// ],
6700 /// "type": "string"
6701 /// },
6702 /// "statusCode": {
6703 /// "description": "HTTP status code of the error.",
6704 /// "examples": [
6705 /// 401
6706 /// ],
6707 /// "type": "number"
6708 /// },
6709 /// "statusMessage": {
6710 /// "description": "HTTP status message of the error.",
6711 /// "examples": [
6712 /// "Unauthorized"
6713 /// ],
6714 /// "type": "string"
6715 /// }
6716 /// },
6717 /// "additionalProperties": false
6718 ///}
6719 /// ```
6720 /// </details>
6721 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6722 #[serde(deny_unknown_fields)]
6723 pub struct DeleteRowResponse {
6724 ///Any additional context on the error, or the same as `statusMessage`
6725 /// otherwise.
6726 pub message: ::std::string::String,
6727 #[serde(rename = "statusCode")]
6728 pub status_code: f64,
6729 ///HTTP status message of the error.
6730 #[serde(rename = "statusMessage")]
6731 pub status_message: ::std::string::String,
6732 }
6733
6734 impl ::std::convert::From<&DeleteRowResponse> for DeleteRowResponse {
6735 fn from(value: &DeleteRowResponse) -> Self {
6736 value.clone()
6737 }
6738 }
6739
6740 ///An HTTP error resulting from an unsuccessful request.
6741 ///
6742 /// <details><summary>JSON schema</summary>
6743 ///
6744 /// ```json
6745 ///{
6746 /// "description": "An HTTP error resulting from an unsuccessful request.",
6747 /// "required": [
6748 /// "message",
6749 /// "statusCode",
6750 /// "statusMessage"
6751 /// ],
6752 /// "properties": {
6753 /// "message": {
6754 /// "description": "Any additional context on the error, or the same as
6755 /// `statusMessage` otherwise.",
6756 /// "examples": [
6757 /// "Bad Request"
6758 /// ],
6759 /// "type": "string"
6760 /// },
6761 /// "statusCode": {
6762 /// "description": "HTTP status code of the error.",
6763 /// "examples": [
6764 /// 400
6765 /// ],
6766 /// "type": "number"
6767 /// },
6768 /// "statusMessage": {
6769 /// "description": "HTTP status message of the error.",
6770 /// "examples": [
6771 /// "Bad Request"
6772 /// ],
6773 /// "type": "string"
6774 /// }
6775 /// },
6776 /// "additionalProperties": false
6777 ///}
6778 /// ```
6779 /// </details>
6780 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6781 #[serde(deny_unknown_fields)]
6782 pub struct DeleteRowsResponse {
6783 ///Any additional context on the error, or the same as `statusMessage`
6784 /// otherwise.
6785 pub message: ::std::string::String,
6786 #[serde(rename = "statusCode")]
6787 pub status_code: f64,
6788 ///HTTP status message of the error.
6789 #[serde(rename = "statusMessage")]
6790 pub status_message: ::std::string::String,
6791 }
6792
6793 impl ::std::convert::From<&DeleteRowsResponse> for DeleteRowsResponse {
6794 fn from(value: &DeleteRowsResponse) -> Self {
6795 value.clone()
6796 }
6797 }
6798
6799 ///An HTTP error resulting from an unsuccessful request.
6800 ///
6801 /// <details><summary>JSON schema</summary>
6802 ///
6803 /// ```json
6804 ///{
6805 /// "description": "An HTTP error resulting from an unsuccessful request.",
6806 /// "required": [
6807 /// "message",
6808 /// "statusCode",
6809 /// "statusMessage"
6810 /// ],
6811 /// "properties": {
6812 /// "codaDetail": {
6813 /// "description": "Detail about why this request was rejected.",
6814 /// "type": "object",
6815 /// "properties": {
6816 /// "validationErrors": {
6817 /// "type": "array",
6818 /// "items": {
6819 /// "$ref": "#/components/schemas/ValidationError"
6820 /// }
6821 /// }
6822 /// },
6823 /// "additionalProperties": false
6824 /// },
6825 /// "message": {
6826 /// "description": "Any additional context on the error, or the same as
6827 /// `statusMessage` otherwise.",
6828 /// "examples": [
6829 /// "Bad Request"
6830 /// ],
6831 /// "type": "string"
6832 /// },
6833 /// "statusCode": {
6834 /// "description": "HTTP status code of the error.",
6835 /// "examples": [
6836 /// 400
6837 /// ],
6838 /// "type": "number"
6839 /// },
6840 /// "statusMessage": {
6841 /// "description": "HTTP status message of the error.",
6842 /// "examples": [
6843 /// "Bad Request"
6844 /// ],
6845 /// "type": "string"
6846 /// }
6847 /// },
6848 /// "additionalProperties": false
6849 ///}
6850 /// ```
6851 /// </details>
6852 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6853 #[serde(deny_unknown_fields)]
6854 pub struct DeleteUserPackPermissionResponse {
6855 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
6856 pub coda_detail: ::std::option::Option<DeleteUserPackPermissionResponseCodaDetail>,
6857 ///Any additional context on the error, or the same as `statusMessage`
6858 /// otherwise.
6859 pub message: ::std::string::String,
6860 #[serde(rename = "statusCode")]
6861 pub status_code: f64,
6862 ///HTTP status message of the error.
6863 #[serde(rename = "statusMessage")]
6864 pub status_message: ::std::string::String,
6865 }
6866
6867 impl ::std::convert::From<&DeleteUserPackPermissionResponse> for DeleteUserPackPermissionResponse {
6868 fn from(value: &DeleteUserPackPermissionResponse) -> Self {
6869 value.clone()
6870 }
6871 }
6872
6873 ///Detail about why this request was rejected.
6874 ///
6875 /// <details><summary>JSON schema</summary>
6876 ///
6877 /// ```json
6878 ///{
6879 /// "description": "Detail about why this request was rejected.",
6880 /// "type": "object",
6881 /// "properties": {
6882 /// "validationErrors": {
6883 /// "type": "array",
6884 /// "items": {
6885 /// "$ref": "#/components/schemas/ValidationError"
6886 /// }
6887 /// }
6888 /// },
6889 /// "additionalProperties": false
6890 ///}
6891 /// ```
6892 /// </details>
6893 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6894 #[serde(deny_unknown_fields)]
6895 pub struct DeleteUserPackPermissionResponseCodaDetail {
6896 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6897 pub validation_errors: ::std::vec::Vec<ValidationError>,
6898 }
6899
6900 impl ::std::convert::From<&DeleteUserPackPermissionResponseCodaDetail> for DeleteUserPackPermissionResponseCodaDetail {
6901 fn from(value: &DeleteUserPackPermissionResponseCodaDetail) -> Self {
6902 value.clone()
6903 }
6904 }
6905
6906 impl ::std::default::Default for DeleteUserPackPermissionResponseCodaDetail {
6907 fn default() -> Self {
6908 Self {
6909 validation_errors: Default::default(),
6910 }
6911 }
6912 }
6913
6914 ///Confirmation of successfully deleting a user's permissions for a Pack.
6915 ///
6916 /// <details><summary>JSON schema</summary>
6917 ///
6918 /// ```json
6919 ///{
6920 /// "description": "Confirmation of successfully deleting a user's
6921 /// permissions for a Pack.",
6922 /// "type": "object",
6923 /// "additionalProperties": false,
6924 /// "x-schema-name": "DeleteUserPackPermissionsResponse"
6925 ///}
6926 /// ```
6927 /// </details>
6928 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6929 #[serde(deny_unknown_fields)]
6930 pub struct DeleteUserPackPermissionsResponse {}
6931 impl ::std::convert::From<&DeleteUserPackPermissionsResponse> for DeleteUserPackPermissionsResponse {
6932 fn from(value: &DeleteUserPackPermissionsResponse) -> Self {
6933 value.clone()
6934 }
6935 }
6936
6937 impl ::std::default::Default for DeleteUserPackPermissionsResponse {
6938 fn default() -> Self {
6939 Self {}
6940 }
6941 }
6942
6943 ///Metadata about a Coda doc.
6944 ///
6945 /// <details><summary>JSON schema</summary>
6946 ///
6947 /// ```json
6948 ///{
6949 /// "description": "Metadata about a Coda doc.",
6950 /// "type": "object",
6951 /// "required": [
6952 /// "browserLink",
6953 /// "createdAt",
6954 /// "folder",
6955 /// "folderId",
6956 /// "href",
6957 /// "id",
6958 /// "name",
6959 /// "owner",
6960 /// "ownerName",
6961 /// "type",
6962 /// "updatedAt",
6963 /// "workspace",
6964 /// "workspaceId"
6965 /// ],
6966 /// "properties": {
6967 /// "browserLink": {
6968 /// "description": "Browser-friendly link to the Coda doc.",
6969 /// "examples": [
6970 /// "https://coda.io/d/_dAbCDeFGH"
6971 /// ],
6972 /// "type": "string",
6973 /// "format": "url"
6974 /// },
6975 /// "createdAt": {
6976 /// "description": "Timestamp for when the doc was created.",
6977 /// "examples": [
6978 /// "2018-04-11T00:18:57.946Z"
6979 /// ],
6980 /// "type": "string",
6981 /// "format": "date-time"
6982 /// },
6983 /// "docSize": {
6984 /// "$ref": "#/components/schemas/DocSize"
6985 /// },
6986 /// "folder": {
6987 /// "$ref": "#/components/schemas/FolderReference"
6988 /// },
6989 /// "folderId": {
6990 /// "description": "ID of the Coda folder containing this doc.",
6991 /// "deprecated": true,
6992 /// "examples": [
6993 /// "fl-1Ab234"
6994 /// ],
6995 /// "type": "string"
6996 /// },
6997 /// "href": {
6998 /// "description": "API link to the Coda doc.",
6999 /// "examples": [
7000 /// "https://coda.io/apis/v1/docs/AbCDeFGH"
7001 /// ],
7002 /// "type": "string",
7003 /// "format": "url"
7004 /// },
7005 /// "icon": {
7006 /// "$ref": "#/components/schemas/Icon"
7007 /// },
7008 /// "id": {
7009 /// "description": "ID of the Coda doc.",
7010 /// "examples": [
7011 /// "AbCDeFGH"
7012 /// ],
7013 /// "type": "string"
7014 /// },
7015 /// "name": {
7016 /// "description": "Name of the doc.",
7017 /// "examples": [
7018 /// "Product Launch Hub"
7019 /// ],
7020 /// "type": "string"
7021 /// },
7022 /// "owner": {
7023 /// "description": "Email address of the doc owner.",
7024 /// "examples": [
7025 /// "user@example.com"
7026 /// ],
7027 /// "type": "string",
7028 /// "format": "email"
7029 /// },
7030 /// "ownerName": {
7031 /// "description": "Name of the doc owner.",
7032 /// "examples": [
7033 /// "Some User"
7034 /// ],
7035 /// "type": "string"
7036 /// },
7037 /// "published": {
7038 /// "$ref": "#/components/schemas/DocPublished"
7039 /// },
7040 /// "sourceDoc": {
7041 /// "allOf": [
7042 /// {
7043 /// "description": "Reference to a Coda doc from which this doc was
7044 /// copied, if any.",
7045 /// "type": "object",
7046 /// "additionalProperties": false
7047 /// },
7048 /// {
7049 /// "$ref": "#/components/schemas/DocReference"
7050 /// }
7051 /// ]
7052 /// },
7053 /// "type": {
7054 /// "description": "The type of this resource.",
7055 /// "type": "string",
7056 /// "enum": [
7057 /// "doc"
7058 /// ],
7059 /// "x-tsType": "Type.Doc"
7060 /// },
7061 /// "updatedAt": {
7062 /// "description": "Timestamp for when the doc was last modified.",
7063 /// "examples": [
7064 /// "2018-04-11T00:18:57.946Z"
7065 /// ],
7066 /// "type": "string",
7067 /// "format": "date-time"
7068 /// },
7069 /// "workspace": {
7070 /// "$ref": "#/components/schemas/WorkspaceReference"
7071 /// },
7072 /// "workspaceId": {
7073 /// "description": "ID of the Coda workspace containing this doc.",
7074 /// "deprecated": true,
7075 /// "examples": [
7076 /// "ws-1Ab234"
7077 /// ],
7078 /// "type": "string"
7079 /// }
7080 /// },
7081 /// "additionalProperties": false,
7082 /// "x-schema-name": "Doc"
7083 ///}
7084 /// ```
7085 /// </details>
7086 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7087 #[serde(deny_unknown_fields)]
7088 pub struct Doc {
7089 ///Browser-friendly link to the Coda doc.
7090 #[serde(rename = "browserLink")]
7091 pub browser_link: ::std::string::String,
7092 ///Timestamp for when the doc was created.
7093 #[serde(rename = "createdAt")]
7094 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
7095 #[serde(rename = "docSize", default, skip_serializing_if = "::std::option::Option::is_none")]
7096 pub doc_size: ::std::option::Option<DocSize>,
7097 pub folder: FolderReference,
7098 ///ID of the Coda folder containing this doc.
7099 #[serde(rename = "folderId")]
7100 pub folder_id: ::std::string::String,
7101 ///API link to the Coda doc.
7102 pub href: ::std::string::String,
7103 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7104 pub icon: ::std::option::Option<Icon>,
7105 ///ID of the Coda doc.
7106 pub id: ::std::string::String,
7107 ///Name of the doc.
7108 pub name: ::std::string::String,
7109 ///Email address of the doc owner.
7110 pub owner: ::std::string::String,
7111 ///Name of the doc owner.
7112 #[serde(rename = "ownerName")]
7113 pub owner_name: ::std::string::String,
7114 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7115 pub published: ::std::option::Option<DocPublished>,
7116 #[serde(rename = "sourceDoc", default, skip_serializing_if = "::std::option::Option::is_none")]
7117 pub source_doc: ::std::option::Option<DocSourceDoc>,
7118 ///The type of this resource.
7119 #[serde(rename = "type")]
7120 pub type_: DocType,
7121 ///Timestamp for when the doc was last modified.
7122 #[serde(rename = "updatedAt")]
7123 pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
7124 pub workspace: WorkspaceReference,
7125 ///ID of the Coda workspace containing this doc.
7126 #[serde(rename = "workspaceId")]
7127 pub workspace_id: ::std::string::String,
7128 }
7129
7130 impl ::std::convert::From<&Doc> for Doc {
7131 fn from(value: &Doc) -> Self {
7132 value.clone()
7133 }
7134 }
7135
7136 ///List of analytics for Coda docs over a date range.
7137 ///
7138 /// <details><summary>JSON schema</summary>
7139 ///
7140 /// ```json
7141 ///{
7142 /// "description": "List of analytics for Coda docs over a date range.",
7143 /// "type": "object",
7144 /// "required": [
7145 /// "items"
7146 /// ],
7147 /// "properties": {
7148 /// "items": {
7149 /// "type": "array",
7150 /// "items": {
7151 /// "$ref": "#/components/schemas/DocAnalyticsItem"
7152 /// }
7153 /// },
7154 /// "nextPageLink": {
7155 /// "allOf": [
7156 /// {
7157 /// "$ref": "#/components/schemas/nextPageLink"
7158 /// },
7159 /// {
7160 /// "examples": [
7161 /// "https://coda.io/apis/v1/analytics/docs?pageToken=xyz"
7162 /// ],
7163 /// "type": "string"
7164 /// }
7165 /// ]
7166 /// },
7167 /// "nextPageToken": {
7168 /// "$ref": "#/components/schemas/nextPageToken"
7169 /// }
7170 /// },
7171 /// "additionalProperties": false,
7172 /// "x-schema-name": "DocAnalyticsCollection"
7173 ///}
7174 /// ```
7175 /// </details>
7176 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7177 #[serde(deny_unknown_fields)]
7178 pub struct DocAnalyticsCollection {
7179 pub items: ::std::vec::Vec<DocAnalyticsItem>,
7180 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
7181 pub next_page_link: ::std::option::Option<NextPageLink>,
7182 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
7183 pub next_page_token: ::std::option::Option<NextPageToken>,
7184 }
7185
7186 impl ::std::convert::From<&DocAnalyticsCollection> for DocAnalyticsCollection {
7187 fn from(value: &DocAnalyticsCollection) -> Self {
7188 value.clone()
7189 }
7190 }
7191
7192 ///`DocAnalyticsDetails`
7193 ///
7194 /// <details><summary>JSON schema</summary>
7195 ///
7196 /// ```json
7197 ///{
7198 /// "allOf": [
7199 /// {
7200 /// "$ref": "#/components/schemas/DocReference"
7201 /// },
7202 /// {
7203 /// "description": "Metadata about a doc relevant to analytics.",
7204 /// "type": "object",
7205 /// "required": [
7206 /// "createdAt",
7207 /// "title"
7208 /// ],
7209 /// "properties": {
7210 /// "createdAt": {
7211 /// "description": "Creation time of the doc.",
7212 /// "examples": [
7213 /// "2022-04-11T00:18:57.946Z"
7214 /// ],
7215 /// "type": "string",
7216 /// "format": "date-time"
7217 /// },
7218 /// "icon": {
7219 /// "$ref": "#/components/schemas/Icon"
7220 /// },
7221 /// "publishedAt": {
7222 /// "description": "Published time of the doc.",
7223 /// "examples": [
7224 /// "2022-04-12T00:18:57.946Z"
7225 /// ],
7226 /// "type": "string",
7227 /// "format": "date-time"
7228 /// },
7229 /// "title": {
7230 /// "description": "The name of the doc.",
7231 /// "examples": [
7232 /// "Cool Geometry Formulas"
7233 /// ],
7234 /// "type": "string"
7235 /// }
7236 /// },
7237 /// "additionalProperties": false
7238 /// }
7239 /// ]
7240 ///}
7241 /// ```
7242 /// </details>
7243 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7244 #[serde(deny_unknown_fields)]
7245 pub enum DocAnalyticsDetails {}
7246 impl ::std::convert::From<&Self> for DocAnalyticsDetails {
7247 fn from(value: &DocAnalyticsDetails) -> Self {
7248 value.clone()
7249 }
7250 }
7251
7252 ///Analytics data for a Coda doc.
7253 ///
7254 /// <details><summary>JSON schema</summary>
7255 ///
7256 /// ```json
7257 ///{
7258 /// "description": "Analytics data for a Coda doc.",
7259 /// "type": "object",
7260 /// "required": [
7261 /// "doc",
7262 /// "metrics"
7263 /// ],
7264 /// "properties": {
7265 /// "doc": {
7266 /// "$ref": "#/components/schemas/DocAnalyticsDetails"
7267 /// },
7268 /// "metrics": {
7269 /// "type": "array",
7270 /// "items": {
7271 /// "$ref": "#/components/schemas/DocAnalyticsMetrics"
7272 /// }
7273 /// }
7274 /// },
7275 /// "additionalProperties": false,
7276 /// "x-schema-name": "DocAnalyticsItem"
7277 ///}
7278 /// ```
7279 /// </details>
7280 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7281 #[serde(deny_unknown_fields)]
7282 pub struct DocAnalyticsItem {
7283 pub doc: DocAnalyticsDetails,
7284 pub metrics: ::std::vec::Vec<DocAnalyticsMetrics>,
7285 }
7286
7287 impl ::std::convert::From<&DocAnalyticsItem> for DocAnalyticsItem {
7288 fn from(value: &DocAnalyticsItem) -> Self {
7289 value.clone()
7290 }
7291 }
7292
7293 ///Analytics metrics for a Coda Doc.
7294 ///
7295 /// <details><summary>JSON schema</summary>
7296 ///
7297 /// ```json
7298 ///{
7299 /// "description": "Analytics metrics for a Coda Doc.",
7300 /// "type": "object",
7301 /// "required": [
7302 /// "aiCredits",
7303 /// "aiCreditsAssistant",
7304 /// "aiCreditsBlock",
7305 /// "aiCreditsChat",
7306 /// "aiCreditsColumn",
7307 /// "aiCreditsReviewer",
7308 /// "copies",
7309 /// "date",
7310 /// "likes",
7311 /// "sessionsDesktop",
7312 /// "sessionsMobile",
7313 /// "sessionsOther",
7314 /// "totalSessions",
7315 /// "views"
7316 /// ],
7317 /// "properties": {
7318 /// "aiCredits": {
7319 /// "description": "Total number of AI credits used.",
7320 /// "examples": [
7321 /// 50
7322 /// ],
7323 /// "type": "integer"
7324 /// },
7325 /// "aiCreditsAssistant": {
7326 /// "description": "Number of credits used for AI assistant.",
7327 /// "examples": [
7328 /// 10
7329 /// ],
7330 /// "type": "integer"
7331 /// },
7332 /// "aiCreditsBlock": {
7333 /// "description": "Number of credits used for AI block.",
7334 /// "examples": [
7335 /// 10
7336 /// ],
7337 /// "type": "integer"
7338 /// },
7339 /// "aiCreditsChat": {
7340 /// "description": "Number of credits used for AI chat.",
7341 /// "examples": [
7342 /// 10
7343 /// ],
7344 /// "type": "integer"
7345 /// },
7346 /// "aiCreditsColumn": {
7347 /// "description": "Number of credits used for AI column.",
7348 /// "examples": [
7349 /// 10
7350 /// ],
7351 /// "type": "integer"
7352 /// },
7353 /// "aiCreditsReviewer": {
7354 /// "description": "Number of credits used for AI reviewer.",
7355 /// "examples": [
7356 /// 10
7357 /// ],
7358 /// "type": "integer"
7359 /// },
7360 /// "copies": {
7361 /// "description": "Number of times the doc was copied.",
7362 /// "examples": [
7363 /// 24
7364 /// ],
7365 /// "type": "integer"
7366 /// },
7367 /// "date": {
7368 /// "description": "Date of the analytics data.",
7369 /// "examples": [
7370 /// "2020-09-02"
7371 /// ],
7372 /// "type": "string",
7373 /// "format": "date"
7374 /// },
7375 /// "likes": {
7376 /// "description": "Number of times the doc was liked.",
7377 /// "examples": [
7378 /// 342
7379 /// ],
7380 /// "type": "integer"
7381 /// },
7382 /// "sessionsDesktop": {
7383 /// "description": "Number of unique visitors to this doc from a
7384 /// desktop device.",
7385 /// "examples": [
7386 /// 212
7387 /// ],
7388 /// "type": "integer"
7389 /// },
7390 /// "sessionsMobile": {
7391 /// "description": "Number of unique visitors to this doc from a mobile
7392 /// device.",
7393 /// "examples": [
7394 /// 530
7395 /// ],
7396 /// "type": "integer"
7397 /// },
7398 /// "sessionsOther": {
7399 /// "description": "Number of unique visitors to this doc from an
7400 /// unknown device type.",
7401 /// "examples": [
7402 /// 10
7403 /// ],
7404 /// "type": "integer"
7405 /// },
7406 /// "totalSessions": {
7407 /// "description": "Sum of the total sessions from any device.",
7408 /// "examples": [
7409 /// 1000
7410 /// ],
7411 /// "type": "integer"
7412 /// },
7413 /// "views": {
7414 /// "description": "Number of times the doc was viewed.",
7415 /// "examples": [
7416 /// 980
7417 /// ],
7418 /// "type": "integer"
7419 /// }
7420 /// },
7421 /// "additionalProperties": false,
7422 /// "x-schema-name": "DocAnalyticsMetrics"
7423 ///}
7424 /// ```
7425 /// </details>
7426 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7427 #[serde(deny_unknown_fields)]
7428 pub struct DocAnalyticsMetrics {
7429 ///Total number of AI credits used.
7430 #[serde(rename = "aiCredits")]
7431 pub ai_credits: i64,
7432 ///Number of credits used for AI assistant.
7433 #[serde(rename = "aiCreditsAssistant")]
7434 pub ai_credits_assistant: i64,
7435 ///Number of credits used for AI block.
7436 #[serde(rename = "aiCreditsBlock")]
7437 pub ai_credits_block: i64,
7438 ///Number of credits used for AI chat.
7439 #[serde(rename = "aiCreditsChat")]
7440 pub ai_credits_chat: i64,
7441 ///Number of credits used for AI column.
7442 #[serde(rename = "aiCreditsColumn")]
7443 pub ai_credits_column: i64,
7444 ///Number of credits used for AI reviewer.
7445 #[serde(rename = "aiCreditsReviewer")]
7446 pub ai_credits_reviewer: i64,
7447 ///Number of times the doc was copied.
7448 pub copies: i64,
7449 ///Date of the analytics data.
7450 pub date: ::chrono::naive::NaiveDate,
7451 ///Number of times the doc was liked.
7452 pub likes: i64,
7453 ///Number of unique visitors to this doc from a desktop device.
7454 #[serde(rename = "sessionsDesktop")]
7455 pub sessions_desktop: i64,
7456 ///Number of unique visitors to this doc from a mobile device.
7457 #[serde(rename = "sessionsMobile")]
7458 pub sessions_mobile: i64,
7459 ///Number of unique visitors to this doc from an unknown device type.
7460 #[serde(rename = "sessionsOther")]
7461 pub sessions_other: i64,
7462 ///Sum of the total sessions from any device.
7463 #[serde(rename = "totalSessions")]
7464 pub total_sessions: i64,
7465 ///Number of times the doc was viewed.
7466 pub views: i64,
7467 }
7468
7469 impl ::std::convert::From<&DocAnalyticsMetrics> for DocAnalyticsMetrics {
7470 fn from(value: &DocAnalyticsMetrics) -> Self {
7471 value.clone()
7472 }
7473 }
7474
7475 ///Determines how the Doc analytics returned are sorted.
7476 ///
7477 /// <details><summary>JSON schema</summary>
7478 ///
7479 /// ```json
7480 ///{
7481 /// "description": "Determines how the Doc analytics returned are sorted.",
7482 /// "type": "string",
7483 /// "enum": [
7484 /// "date",
7485 /// "docId",
7486 /// "title",
7487 /// "createdAt",
7488 /// "publishedAt",
7489 /// "likes",
7490 /// "copies",
7491 /// "views",
7492 /// "sessionsDesktop",
7493 /// "sessionsMobile",
7494 /// "sessionsOther",
7495 /// "totalSessions",
7496 /// "aiCreditsChat",
7497 /// "aiCreditsBlock",
7498 /// "aiCreditsColumn",
7499 /// "aiCreditsAssistant",
7500 /// "aiCreditsReviewer",
7501 /// "aiCredits"
7502 /// ],
7503 /// "x-schema-name": "DocAnalyticsOrderBy",
7504 /// "x-tsEnumNames": [
7505 /// "AnalyticsDate",
7506 /// "DocId",
7507 /// "Title",
7508 /// "CreatedAt",
7509 /// "PublishedAt",
7510 /// "Likes",
7511 /// "Copies",
7512 /// "Views",
7513 /// "SessionsDesktop",
7514 /// "SessionsMobile",
7515 /// "SessionsOther",
7516 /// "TotalSessions",
7517 /// "AiCreditsChat",
7518 /// "AiCreditsBlock",
7519 /// "AiCreditsColumn",
7520 /// "AiCreditsAssistant",
7521 /// "AiCreditsReviewer",
7522 /// "AiCredits"
7523 /// ]
7524 ///}
7525 /// ```
7526 /// </details>
7527 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7528 pub enum DocAnalyticsOrderBy {
7529 #[serde(rename = "date")]
7530 Date,
7531 #[serde(rename = "docId")]
7532 DocId,
7533 #[serde(rename = "title")]
7534 Title,
7535 #[serde(rename = "createdAt")]
7536 CreatedAt,
7537 #[serde(rename = "publishedAt")]
7538 PublishedAt,
7539 #[serde(rename = "likes")]
7540 Likes,
7541 #[serde(rename = "copies")]
7542 Copies,
7543 #[serde(rename = "views")]
7544 Views,
7545 #[serde(rename = "sessionsDesktop")]
7546 SessionsDesktop,
7547 #[serde(rename = "sessionsMobile")]
7548 SessionsMobile,
7549 #[serde(rename = "sessionsOther")]
7550 SessionsOther,
7551 #[serde(rename = "totalSessions")]
7552 TotalSessions,
7553 #[serde(rename = "aiCreditsChat")]
7554 AiCreditsChat,
7555 #[serde(rename = "aiCreditsBlock")]
7556 AiCreditsBlock,
7557 #[serde(rename = "aiCreditsColumn")]
7558 AiCreditsColumn,
7559 #[serde(rename = "aiCreditsAssistant")]
7560 AiCreditsAssistant,
7561 #[serde(rename = "aiCreditsReviewer")]
7562 AiCreditsReviewer,
7563 #[serde(rename = "aiCredits")]
7564 AiCredits,
7565 }
7566
7567 impl ::std::convert::From<&Self> for DocAnalyticsOrderBy {
7568 fn from(value: &DocAnalyticsOrderBy) -> Self {
7569 value.clone()
7570 }
7571 }
7572
7573 impl ::std::fmt::Display for DocAnalyticsOrderBy {
7574 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7575 match *self {
7576 Self::Date => f.write_str("date"),
7577 Self::DocId => f.write_str("docId"),
7578 Self::Title => f.write_str("title"),
7579 Self::CreatedAt => f.write_str("createdAt"),
7580 Self::PublishedAt => f.write_str("publishedAt"),
7581 Self::Likes => f.write_str("likes"),
7582 Self::Copies => f.write_str("copies"),
7583 Self::Views => f.write_str("views"),
7584 Self::SessionsDesktop => f.write_str("sessionsDesktop"),
7585 Self::SessionsMobile => f.write_str("sessionsMobile"),
7586 Self::SessionsOther => f.write_str("sessionsOther"),
7587 Self::TotalSessions => f.write_str("totalSessions"),
7588 Self::AiCreditsChat => f.write_str("aiCreditsChat"),
7589 Self::AiCreditsBlock => f.write_str("aiCreditsBlock"),
7590 Self::AiCreditsColumn => f.write_str("aiCreditsColumn"),
7591 Self::AiCreditsAssistant => f.write_str("aiCreditsAssistant"),
7592 Self::AiCreditsReviewer => f.write_str("aiCreditsReviewer"),
7593 Self::AiCredits => f.write_str("aiCredits"),
7594 }
7595 }
7596 }
7597
7598 impl ::std::str::FromStr for DocAnalyticsOrderBy {
7599 type Err = self::error::ConversionError;
7600 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7601 match value {
7602 "date" => Ok(Self::Date),
7603 "docId" => Ok(Self::DocId),
7604 "title" => Ok(Self::Title),
7605 "createdAt" => Ok(Self::CreatedAt),
7606 "publishedAt" => Ok(Self::PublishedAt),
7607 "likes" => Ok(Self::Likes),
7608 "copies" => Ok(Self::Copies),
7609 "views" => Ok(Self::Views),
7610 "sessionsDesktop" => Ok(Self::SessionsDesktop),
7611 "sessionsMobile" => Ok(Self::SessionsMobile),
7612 "sessionsOther" => Ok(Self::SessionsOther),
7613 "totalSessions" => Ok(Self::TotalSessions),
7614 "aiCreditsChat" => Ok(Self::AiCreditsChat),
7615 "aiCreditsBlock" => Ok(Self::AiCreditsBlock),
7616 "aiCreditsColumn" => Ok(Self::AiCreditsColumn),
7617 "aiCreditsAssistant" => Ok(Self::AiCreditsAssistant),
7618 "aiCreditsReviewer" => Ok(Self::AiCreditsReviewer),
7619 "aiCredits" => Ok(Self::AiCredits),
7620 _ => Err("invalid value".into()),
7621 }
7622 }
7623 }
7624
7625 impl ::std::convert::TryFrom<&str> for DocAnalyticsOrderBy {
7626 type Error = self::error::ConversionError;
7627 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7628 value.parse()
7629 }
7630 }
7631
7632 impl ::std::convert::TryFrom<&::std::string::String> for DocAnalyticsOrderBy {
7633 type Error = self::error::ConversionError;
7634 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
7635 value.parse()
7636 }
7637 }
7638
7639 impl ::std::convert::TryFrom<::std::string::String> for DocAnalyticsOrderBy {
7640 type Error = self::error::ConversionError;
7641 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
7642 value.parse()
7643 }
7644 }
7645
7646 ///Summarized metrics for Coda docs.
7647 ///
7648 /// <details><summary>JSON schema</summary>
7649 ///
7650 /// ```json
7651 ///{
7652 /// "description": "Summarized metrics for Coda docs.",
7653 /// "type": "object",
7654 /// "required": [
7655 /// "totalSessions"
7656 /// ],
7657 /// "properties": {
7658 /// "totalSessions": {
7659 /// "description": "Total number of sessions across all docs.",
7660 /// "examples": [
7661 /// 1337
7662 /// ],
7663 /// "type": "integer"
7664 /// }
7665 /// },
7666 /// "additionalProperties": false,
7667 /// "x-schema-name": "DocAnalyticsSummary"
7668 ///}
7669 /// ```
7670 /// </details>
7671 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7672 #[serde(deny_unknown_fields)]
7673 pub struct DocAnalyticsSummary {
7674 ///Total number of sessions across all docs.
7675 #[serde(rename = "totalSessions")]
7676 pub total_sessions: i64,
7677 }
7678
7679 impl ::std::convert::From<&DocAnalyticsSummary> for DocAnalyticsSummary {
7680 fn from(value: &DocAnalyticsSummary) -> Self {
7681 value.clone()
7682 }
7683 }
7684
7685 ///The category applied to a doc.
7686 ///
7687 /// <details><summary>JSON schema</summary>
7688 ///
7689 /// ```json
7690 ///{
7691 /// "description": "The category applied to a doc.",
7692 /// "type": "object",
7693 /// "required": [
7694 /// "name"
7695 /// ],
7696 /// "properties": {
7697 /// "name": {
7698 /// "description": "Name of the category.",
7699 /// "examples": [
7700 /// "Project Management"
7701 /// ],
7702 /// "type": "string"
7703 /// }
7704 /// },
7705 /// "additionalProperties": false,
7706 /// "x-schema-name": "DocCategory"
7707 ///}
7708 /// ```
7709 /// </details>
7710 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7711 #[serde(deny_unknown_fields)]
7712 pub struct DocCategory {
7713 ///Name of the category.
7714 pub name: ::std::string::String,
7715 }
7716
7717 impl ::std::convert::From<&DocCategory> for DocCategory {
7718 fn from(value: &DocCategory) -> Self {
7719 value.clone()
7720 }
7721 }
7722
7723 ///A list of categories that can be applied to a doc.
7724 ///
7725 /// <details><summary>JSON schema</summary>
7726 ///
7727 /// ```json
7728 ///{
7729 /// "description": "A list of categories that can be applied to a doc.",
7730 /// "type": "object",
7731 /// "required": [
7732 /// "items"
7733 /// ],
7734 /// "properties": {
7735 /// "items": {
7736 /// "description": "Categories for the doc.",
7737 /// "type": "array",
7738 /// "items": {
7739 /// "$ref": "#/components/schemas/DocCategory"
7740 /// }
7741 /// }
7742 /// },
7743 /// "additionalProperties": false,
7744 /// "x-schema-name": "DocCategoryList"
7745 ///}
7746 /// ```
7747 /// </details>
7748 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7749 #[serde(deny_unknown_fields)]
7750 pub struct DocCategoryList {
7751 ///Categories for the doc.
7752 pub items: ::std::vec::Vec<DocCategory>,
7753 }
7754
7755 impl ::std::convert::From<&DocCategoryList> for DocCategoryList {
7756 fn from(value: &DocCategoryList) -> Self {
7757 value.clone()
7758 }
7759 }
7760
7761 ///Payload for creating a new doc.
7762 ///
7763 /// <details><summary>JSON schema</summary>
7764 ///
7765 /// ```json
7766 ///{
7767 /// "description": "Payload for creating a new doc.",
7768 /// "type": "object",
7769 /// "properties": {
7770 /// "folderId": {
7771 /// "description": "The ID of the folder within which to create this
7772 /// doc. Defaults to your \"My docs\" folder in the oldest workspace you
7773 /// joined; this is subject to change. You can get this ID by opening the
7774 /// folder in the docs list on your computer and grabbing the `folderId`
7775 /// query parameter.\n",
7776 /// "examples": [
7777 /// "fl-ABcdEFgHJi"
7778 /// ],
7779 /// "type": "string"
7780 /// },
7781 /// "initialPage": {
7782 /// "allOf": [
7783 /// {
7784 /// "description": "The contents of the initial page of the doc.",
7785 /// "type": "object",
7786 /// "additionalProperties": false
7787 /// },
7788 /// {
7789 /// "$ref": "#/components/schemas/PageCreate"
7790 /// }
7791 /// ]
7792 /// },
7793 /// "sourceDoc": {
7794 /// "description": "An optional doc ID from which to create a copy.",
7795 /// "examples": [
7796 /// "iJKlm_noPq"
7797 /// ],
7798 /// "type": "string"
7799 /// },
7800 /// "timezone": {
7801 /// "description": "The timezone to use for the newly created doc.",
7802 /// "examples": [
7803 /// "America/Los_Angeles"
7804 /// ],
7805 /// "type": "string"
7806 /// },
7807 /// "title": {
7808 /// "description": "Title of the new doc. Defaults to 'Untitled'.",
7809 /// "examples": [
7810 /// "Project Tracker"
7811 /// ],
7812 /// "type": "string"
7813 /// }
7814 /// },
7815 /// "additionalProperties": false,
7816 /// "x-schema-name": "DocCreate"
7817 ///}
7818 /// ```
7819 /// </details>
7820 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7821 #[serde(deny_unknown_fields)]
7822 pub struct DocCreate {
7823 ///The ID of the folder within which to create this doc. Defaults to
7824 /// your "My docs" folder in the oldest workspace you joined; this is
7825 /// subject to change. You can get this ID by opening the folder in the
7826 /// docs list on your computer and grabbing the `folderId` query
7827 /// parameter.
7828 #[serde(rename = "folderId", default, skip_serializing_if = "::std::option::Option::is_none")]
7829 pub folder_id: ::std::option::Option<::std::string::String>,
7830 #[serde(rename = "initialPage", default, skip_serializing_if = "::std::option::Option::is_none")]
7831 pub initial_page: ::std::option::Option<DocCreateInitialPage>,
7832 ///An optional doc ID from which to create a copy.
7833 #[serde(rename = "sourceDoc", default, skip_serializing_if = "::std::option::Option::is_none")]
7834 pub source_doc: ::std::option::Option<::std::string::String>,
7835 ///The timezone to use for the newly created doc.
7836 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7837 pub timezone: ::std::option::Option<::std::string::String>,
7838 ///Title of the new doc. Defaults to 'Untitled'.
7839 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7840 pub title: ::std::option::Option<::std::string::String>,
7841 }
7842
7843 impl ::std::convert::From<&DocCreate> for DocCreate {
7844 fn from(value: &DocCreate) -> Self {
7845 value.clone()
7846 }
7847 }
7848
7849 impl ::std::default::Default for DocCreate {
7850 fn default() -> Self {
7851 Self {
7852 folder_id: Default::default(),
7853 initial_page: Default::default(),
7854 source_doc: Default::default(),
7855 timezone: Default::default(),
7856 title: Default::default(),
7857 }
7858 }
7859 }
7860
7861 ///`DocCreateInitialPage`
7862 ///
7863 /// <details><summary>JSON schema</summary>
7864 ///
7865 /// ```json
7866 ///{
7867 /// "allOf": [
7868 /// {
7869 /// "description": "The contents of the initial page of the doc.",
7870 /// "type": "object",
7871 /// "additionalProperties": false
7872 /// },
7873 /// {
7874 /// "$ref": "#/components/schemas/PageCreate"
7875 /// }
7876 /// ]
7877 ///}
7878 /// ```
7879 /// </details>
7880 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7881 #[serde(deny_unknown_fields)]
7882 pub struct DocCreateInitialPage {}
7883 impl ::std::convert::From<&DocCreateInitialPage> for DocCreateInitialPage {
7884 fn from(value: &DocCreateInitialPage) -> Self {
7885 value.clone()
7886 }
7887 }
7888
7889 impl ::std::default::Default for DocCreateInitialPage {
7890 fn default() -> Self {
7891 Self {}
7892 }
7893 }
7894
7895 ///The result of a doc deletion.
7896 ///
7897 /// <details><summary>JSON schema</summary>
7898 ///
7899 /// ```json
7900 ///{
7901 /// "description": "The result of a doc deletion.",
7902 /// "type": "object",
7903 /// "additionalProperties": false,
7904 /// "x-schema-name": "DocDelete"
7905 ///}
7906 /// ```
7907 /// </details>
7908 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7909 #[serde(deny_unknown_fields)]
7910 pub struct DocDelete {}
7911 impl ::std::convert::From<&DocDelete> for DocDelete {
7912 fn from(value: &DocDelete) -> Self {
7913 value.clone()
7914 }
7915 }
7916
7917 impl ::std::default::Default for DocDelete {
7918 fn default() -> Self {
7919 Self {}
7920 }
7921 }
7922
7923 ///List of Coda docs.
7924 ///
7925 /// <details><summary>JSON schema</summary>
7926 ///
7927 /// ```json
7928 ///{
7929 /// "description": "List of Coda docs.",
7930 /// "type": "object",
7931 /// "required": [
7932 /// "items"
7933 /// ],
7934 /// "properties": {
7935 /// "href": {
7936 /// "description": "API link to these results",
7937 /// "examples": [
7938 /// "https://coda.io/apis/v1/docs?limit=20"
7939 /// ],
7940 /// "type": "string",
7941 /// "format": "url"
7942 /// },
7943 /// "items": {
7944 /// "type": "array",
7945 /// "items": {
7946 /// "$ref": "#/components/schemas/Doc"
7947 /// }
7948 /// },
7949 /// "nextPageLink": {
7950 /// "allOf": [
7951 /// {
7952 /// "$ref": "#/components/schemas/nextPageLink"
7953 /// },
7954 /// {
7955 /// "examples": [
7956 /// "https://coda.io/apis/v1/docs?pageToken=eyJsaW1pd"
7957 /// ],
7958 /// "type": "string"
7959 /// }
7960 /// ]
7961 /// },
7962 /// "nextPageToken": {
7963 /// "$ref": "#/components/schemas/nextPageToken"
7964 /// }
7965 /// },
7966 /// "additionalProperties": false,
7967 /// "x-schema-name": "DocList"
7968 ///}
7969 /// ```
7970 /// </details>
7971 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7972 #[serde(deny_unknown_fields)]
7973 pub struct DocList {
7974 ///API link to these results
7975 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7976 pub href: ::std::option::Option<::std::string::String>,
7977 pub items: ::std::vec::Vec<Doc>,
7978 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
7979 pub next_page_link: ::std::option::Option<NextPageLink>,
7980 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
7981 pub next_page_token: ::std::option::Option<NextPageToken>,
7982 }
7983
7984 impl ::std::convert::From<&DocList> for DocList {
7985 fn from(value: &DocList) -> Self {
7986 value.clone()
7987 }
7988 }
7989
7990 ///Payload for publishing a doc or or updating its publishing information.
7991 ///
7992 /// <details><summary>JSON schema</summary>
7993 ///
7994 /// ```json
7995 ///{
7996 /// "description": "Payload for publishing a doc or or updating its
7997 /// publishing information.",
7998 /// "type": "object",
7999 /// "properties": {
8000 /// "categoryNames": {
8001 /// "description": "The names of categories to apply to the document.",
8002 /// "examples": [
8003 /// [
8004 /// "Project management"
8005 /// ]
8006 /// ],
8007 /// "type": "array",
8008 /// "items": {
8009 /// "type": "string"
8010 /// }
8011 /// },
8012 /// "discoverable": {
8013 /// "description": "If true, indicates that the doc is discoverable.",
8014 /// "examples": [
8015 /// true
8016 /// ],
8017 /// "type": "boolean"
8018 /// },
8019 /// "earnCredit": {
8020 /// "description": "If true, new users may be required to sign in to
8021 /// view content within this document. You will receive Coda credit for each
8022 /// user who signs up via your doc.\n",
8023 /// "examples": [
8024 /// true
8025 /// ],
8026 /// "type": "boolean"
8027 /// },
8028 /// "mode": {
8029 /// "$ref": "#/components/schemas/DocPublishMode"
8030 /// },
8031 /// "slug": {
8032 /// "description": "Slug for the published doc.",
8033 /// "examples": [
8034 /// "my-doc"
8035 /// ],
8036 /// "type": "string"
8037 /// }
8038 /// },
8039 /// "additionalProperties": false,
8040 /// "x-schema-name": "DocPublish"
8041 ///}
8042 /// ```
8043 /// </details>
8044 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8045 #[serde(deny_unknown_fields)]
8046 pub struct DocPublish {
8047 ///The names of categories to apply to the document.
8048 #[serde(rename = "categoryNames", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8049 pub category_names: ::std::vec::Vec<::std::string::String>,
8050 ///If true, indicates that the doc is discoverable.
8051 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8052 pub discoverable: ::std::option::Option<bool>,
8053 ///If true, new users may be required to sign in to view content within
8054 /// this document. You will receive Coda credit for each user who signs
8055 /// up via your doc.
8056 #[serde(rename = "earnCredit", default, skip_serializing_if = "::std::option::Option::is_none")]
8057 pub earn_credit: ::std::option::Option<bool>,
8058 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8059 pub mode: ::std::option::Option<DocPublishMode>,
8060 ///Slug for the published doc.
8061 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8062 pub slug: ::std::option::Option<::std::string::String>,
8063 }
8064
8065 impl ::std::convert::From<&DocPublish> for DocPublish {
8066 fn from(value: &DocPublish) -> Self {
8067 value.clone()
8068 }
8069 }
8070
8071 impl ::std::default::Default for DocPublish {
8072 fn default() -> Self {
8073 Self {
8074 category_names: Default::default(),
8075 discoverable: Default::default(),
8076 earn_credit: Default::default(),
8077 mode: Default::default(),
8078 slug: Default::default(),
8079 }
8080 }
8081 }
8082
8083 ///Which interaction mode the published doc should use.
8084 ///
8085 /// <details><summary>JSON schema</summary>
8086 ///
8087 /// ```json
8088 ///{
8089 /// "description": "Which interaction mode the published doc should use.",
8090 /// "type": "string",
8091 /// "enum": [
8092 /// "view",
8093 /// "play",
8094 /// "edit"
8095 /// ],
8096 /// "x-schema-name": "DocPublishMode",
8097 /// "x-tsEnumNames": [
8098 /// "View",
8099 /// "Play",
8100 /// "Edit"
8101 /// ]
8102 ///}
8103 /// ```
8104 /// </details>
8105 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8106 pub enum DocPublishMode {
8107 #[serde(rename = "view")]
8108 View,
8109 #[serde(rename = "play")]
8110 Play,
8111 #[serde(rename = "edit")]
8112 Edit,
8113 }
8114
8115 impl ::std::convert::From<&Self> for DocPublishMode {
8116 fn from(value: &DocPublishMode) -> Self {
8117 value.clone()
8118 }
8119 }
8120
8121 impl ::std::fmt::Display for DocPublishMode {
8122 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8123 match *self {
8124 Self::View => f.write_str("view"),
8125 Self::Play => f.write_str("play"),
8126 Self::Edit => f.write_str("edit"),
8127 }
8128 }
8129 }
8130
8131 impl ::std::str::FromStr for DocPublishMode {
8132 type Err = self::error::ConversionError;
8133 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8134 match value {
8135 "view" => Ok(Self::View),
8136 "play" => Ok(Self::Play),
8137 "edit" => Ok(Self::Edit),
8138 _ => Err("invalid value".into()),
8139 }
8140 }
8141 }
8142
8143 impl ::std::convert::TryFrom<&str> for DocPublishMode {
8144 type Error = self::error::ConversionError;
8145 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8146 value.parse()
8147 }
8148 }
8149
8150 impl ::std::convert::TryFrom<&::std::string::String> for DocPublishMode {
8151 type Error = self::error::ConversionError;
8152 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8153 value.parse()
8154 }
8155 }
8156
8157 impl ::std::convert::TryFrom<::std::string::String> for DocPublishMode {
8158 type Error = self::error::ConversionError;
8159 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8160 value.parse()
8161 }
8162 }
8163
8164 ///Information about the publishing state of the document.
8165 ///
8166 /// <details><summary>JSON schema</summary>
8167 ///
8168 /// ```json
8169 ///{
8170 /// "description": "Information about the publishing state of the
8171 /// document.",
8172 /// "type": "object",
8173 /// "required": [
8174 /// "browserLink",
8175 /// "categories",
8176 /// "discoverable",
8177 /// "earnCredit",
8178 /// "mode"
8179 /// ],
8180 /// "properties": {
8181 /// "browserLink": {
8182 /// "description": "URL to the published doc.",
8183 /// "examples": [
8184 /// "https://coda.io/@coda/hello-world"
8185 /// ],
8186 /// "type": "string"
8187 /// },
8188 /// "categories": {
8189 /// "description": "Categories applied to the doc.",
8190 /// "examples": [
8191 /// [
8192 /// "Project Management"
8193 /// ]
8194 /// ],
8195 /// "type": "array",
8196 /// "items": {
8197 /// "$ref": "#/components/schemas/DocCategory"
8198 /// }
8199 /// },
8200 /// "description": {
8201 /// "description": "Description of the published doc.",
8202 /// "examples": [
8203 /// "Hello World!"
8204 /// ],
8205 /// "type": "string"
8206 /// },
8207 /// "discoverable": {
8208 /// "description": "If true, indicates that the doc is discoverable.",
8209 /// "examples": [
8210 /// true
8211 /// ],
8212 /// "type": "boolean"
8213 /// },
8214 /// "earnCredit": {
8215 /// "description": "If true, new users may be required to sign in to
8216 /// view content within this document. You will receive Coda credit for each
8217 /// user who signs up via your doc.\n",
8218 /// "examples": [
8219 /// true
8220 /// ],
8221 /// "type": "boolean"
8222 /// },
8223 /// "imageLink": {
8224 /// "description": "URL to the cover image for the published doc.",
8225 /// "type": "string"
8226 /// },
8227 /// "mode": {
8228 /// "$ref": "#/components/schemas/DocPublishMode"
8229 /// }
8230 /// },
8231 /// "additionalProperties": false,
8232 /// "x-schema-name": "DocPublished"
8233 ///}
8234 /// ```
8235 /// </details>
8236 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8237 #[serde(deny_unknown_fields)]
8238 pub struct DocPublished {
8239 ///URL to the published doc.
8240 #[serde(rename = "browserLink")]
8241 pub browser_link: ::std::string::String,
8242 ///Categories applied to the doc.
8243 pub categories: ::std::vec::Vec<DocCategory>,
8244 ///Description of the published doc.
8245 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8246 pub description: ::std::option::Option<::std::string::String>,
8247 ///If true, indicates that the doc is discoverable.
8248 pub discoverable: bool,
8249 ///If true, new users may be required to sign in to view content within
8250 /// this document. You will receive Coda credit for each user who signs
8251 /// up via your doc.
8252 #[serde(rename = "earnCredit")]
8253 pub earn_credit: bool,
8254 ///URL to the cover image for the published doc.
8255 #[serde(rename = "imageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
8256 pub image_link: ::std::option::Option<::std::string::String>,
8257 pub mode: DocPublishMode,
8258 }
8259
8260 impl ::std::convert::From<&DocPublished> for DocPublished {
8261 fn from(value: &DocPublished) -> Self {
8262 value.clone()
8263 }
8264 }
8265
8266 ///Reference to a Coda doc.
8267 ///
8268 /// <details><summary>JSON schema</summary>
8269 ///
8270 /// ```json
8271 ///{
8272 /// "description": "Reference to a Coda doc.",
8273 /// "type": "object",
8274 /// "required": [
8275 /// "browserLink",
8276 /// "href",
8277 /// "id",
8278 /// "type"
8279 /// ],
8280 /// "properties": {
8281 /// "browserLink": {
8282 /// "description": "Browser-friendly link to the Coda doc.",
8283 /// "examples": [
8284 /// "https://coda.io/d/_dAbCDeFGH"
8285 /// ],
8286 /// "type": "string",
8287 /// "format": "url"
8288 /// },
8289 /// "href": {
8290 /// "description": "API link to the Coda doc.",
8291 /// "examples": [
8292 /// "https://coda.io/apis/v1/docs/AbCDeFGH"
8293 /// ],
8294 /// "type": "string",
8295 /// "format": "url"
8296 /// },
8297 /// "id": {
8298 /// "description": "ID of the Coda doc.",
8299 /// "examples": [
8300 /// "AbCDeFGH"
8301 /// ],
8302 /// "type": "string"
8303 /// },
8304 /// "type": {
8305 /// "description": "The type of this resource.",
8306 /// "type": "string",
8307 /// "enum": [
8308 /// "doc"
8309 /// ],
8310 /// "x-tsType": "Type.Doc"
8311 /// }
8312 /// },
8313 /// "additionalProperties": false,
8314 /// "x-schema-name": "DocReference"
8315 ///}
8316 /// ```
8317 /// </details>
8318 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8319 #[serde(deny_unknown_fields)]
8320 pub struct DocReference {
8321 ///Browser-friendly link to the Coda doc.
8322 #[serde(rename = "browserLink")]
8323 pub browser_link: ::std::string::String,
8324 ///API link to the Coda doc.
8325 pub href: ::std::string::String,
8326 ///ID of the Coda doc.
8327 pub id: ::std::string::String,
8328 ///The type of this resource.
8329 #[serde(rename = "type")]
8330 pub type_: DocReferenceType,
8331 }
8332
8333 impl ::std::convert::From<&DocReference> for DocReference {
8334 fn from(value: &DocReference) -> Self {
8335 value.clone()
8336 }
8337 }
8338
8339 ///The type of this resource.
8340 ///
8341 /// <details><summary>JSON schema</summary>
8342 ///
8343 /// ```json
8344 ///{
8345 /// "description": "The type of this resource.",
8346 /// "type": "string",
8347 /// "enum": [
8348 /// "doc"
8349 /// ],
8350 /// "x-tsType": "Type.Doc"
8351 ///}
8352 /// ```
8353 /// </details>
8354 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8355 pub enum DocReferenceType {
8356 #[serde(rename = "doc")]
8357 Doc,
8358 }
8359
8360 impl ::std::convert::From<&Self> for DocReferenceType {
8361 fn from(value: &DocReferenceType) -> Self {
8362 value.clone()
8363 }
8364 }
8365
8366 impl ::std::fmt::Display for DocReferenceType {
8367 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8368 match *self {
8369 Self::Doc => f.write_str("doc"),
8370 }
8371 }
8372 }
8373
8374 impl ::std::str::FromStr for DocReferenceType {
8375 type Err = self::error::ConversionError;
8376 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8377 match value {
8378 "doc" => Ok(Self::Doc),
8379 _ => Err("invalid value".into()),
8380 }
8381 }
8382 }
8383
8384 impl ::std::convert::TryFrom<&str> for DocReferenceType {
8385 type Error = self::error::ConversionError;
8386 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8387 value.parse()
8388 }
8389 }
8390
8391 impl ::std::convert::TryFrom<&::std::string::String> for DocReferenceType {
8392 type Error = self::error::ConversionError;
8393 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8394 value.parse()
8395 }
8396 }
8397
8398 impl ::std::convert::TryFrom<::std::string::String> for DocReferenceType {
8399 type Error = self::error::ConversionError;
8400 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8401 value.parse()
8402 }
8403 }
8404
8405 ///The number of components within a Coda doc.
8406 ///
8407 /// <details><summary>JSON schema</summary>
8408 ///
8409 /// ```json
8410 ///{
8411 /// "description": "The number of components within a Coda doc.",
8412 /// "type": "object",
8413 /// "required": [
8414 /// "overApiSizeLimit",
8415 /// "pageCount",
8416 /// "tableAndViewCount",
8417 /// "totalRowCount"
8418 /// ],
8419 /// "properties": {
8420 /// "overApiSizeLimit": {
8421 /// "description": "If true, indicates that the doc is over the API
8422 /// size limit.",
8423 /// "examples": [
8424 /// false
8425 /// ],
8426 /// "type": "boolean"
8427 /// },
8428 /// "pageCount": {
8429 /// "description": "The total number of page contained within the
8430 /// doc.",
8431 /// "examples": [
8432 /// 10
8433 /// ],
8434 /// "type": "number"
8435 /// },
8436 /// "tableAndViewCount": {
8437 /// "description": "The total number of tables and views contained
8438 /// within the doc.",
8439 /// "examples": [
8440 /// 42
8441 /// ],
8442 /// "type": "number"
8443 /// },
8444 /// "totalRowCount": {
8445 /// "description": "The number of rows contained within all tables of
8446 /// the doc.",
8447 /// "examples": [
8448 /// 31337
8449 /// ],
8450 /// "type": "number"
8451 /// }
8452 /// },
8453 /// "additionalProperties": false,
8454 /// "x-schema-name": "DocSize"
8455 ///}
8456 /// ```
8457 /// </details>
8458 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8459 #[serde(deny_unknown_fields)]
8460 pub struct DocSize {
8461 ///If true, indicates that the doc is over the API size limit.
8462 #[serde(rename = "overApiSizeLimit")]
8463 pub over_api_size_limit: bool,
8464 #[serde(rename = "pageCount")]
8465 pub page_count: f64,
8466 #[serde(rename = "tableAndViewCount")]
8467 pub table_and_view_count: f64,
8468 #[serde(rename = "totalRowCount")]
8469 pub total_row_count: f64,
8470 }
8471
8472 impl ::std::convert::From<&DocSize> for DocSize {
8473 fn from(value: &DocSize) -> Self {
8474 value.clone()
8475 }
8476 }
8477
8478 ///`DocSourceDoc`
8479 ///
8480 /// <details><summary>JSON schema</summary>
8481 ///
8482 /// ```json
8483 ///{
8484 /// "allOf": [
8485 /// {
8486 /// "description": "Reference to a Coda doc from which this doc was
8487 /// copied, if any.",
8488 /// "type": "object",
8489 /// "additionalProperties": false
8490 /// },
8491 /// {
8492 /// "$ref": "#/components/schemas/DocReference"
8493 /// }
8494 /// ]
8495 ///}
8496 /// ```
8497 /// </details>
8498 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8499 #[serde(deny_unknown_fields)]
8500 pub enum DocSourceDoc {}
8501 impl ::std::convert::From<&Self> for DocSourceDoc {
8502 fn from(value: &DocSourceDoc) -> Self {
8503 value.clone()
8504 }
8505 }
8506
8507 ///The type of this resource.
8508 ///
8509 /// <details><summary>JSON schema</summary>
8510 ///
8511 /// ```json
8512 ///{
8513 /// "description": "The type of this resource.",
8514 /// "type": "string",
8515 /// "enum": [
8516 /// "doc"
8517 /// ],
8518 /// "x-tsType": "Type.Doc"
8519 ///}
8520 /// ```
8521 /// </details>
8522 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8523 pub enum DocType {
8524 #[serde(rename = "doc")]
8525 Doc,
8526 }
8527
8528 impl ::std::convert::From<&Self> for DocType {
8529 fn from(value: &DocType) -> Self {
8530 value.clone()
8531 }
8532 }
8533
8534 impl ::std::fmt::Display for DocType {
8535 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8536 match *self {
8537 Self::Doc => f.write_str("doc"),
8538 }
8539 }
8540 }
8541
8542 impl ::std::str::FromStr for DocType {
8543 type Err = self::error::ConversionError;
8544 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8545 match value {
8546 "doc" => Ok(Self::Doc),
8547 _ => Err("invalid value".into()),
8548 }
8549 }
8550 }
8551
8552 impl ::std::convert::TryFrom<&str> for DocType {
8553 type Error = self::error::ConversionError;
8554 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8555 value.parse()
8556 }
8557 }
8558
8559 impl ::std::convert::TryFrom<&::std::string::String> for DocType {
8560 type Error = self::error::ConversionError;
8561 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8562 value.parse()
8563 }
8564 }
8565
8566 impl ::std::convert::TryFrom<::std::string::String> for DocType {
8567 type Error = self::error::ConversionError;
8568 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8569 value.parse()
8570 }
8571 }
8572
8573 ///Payload for updating a doc.
8574 ///
8575 /// <details><summary>JSON schema</summary>
8576 ///
8577 /// ```json
8578 ///{
8579 /// "description": "Payload for updating a doc.",
8580 /// "type": "object",
8581 /// "properties": {
8582 /// "iconName": {
8583 /// "description": "Name of the icon.",
8584 /// "examples": [
8585 /// "rocket"
8586 /// ],
8587 /// "type": "string"
8588 /// },
8589 /// "title": {
8590 /// "description": "Title of the doc.",
8591 /// "examples": [
8592 /// "Project Tracker"
8593 /// ],
8594 /// "type": "string"
8595 /// }
8596 /// },
8597 /// "additionalProperties": false,
8598 /// "x-schema-name": "DocUpdate"
8599 ///}
8600 /// ```
8601 /// </details>
8602 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8603 #[serde(deny_unknown_fields)]
8604 pub struct DocUpdate {
8605 ///Name of the icon.
8606 #[serde(rename = "iconName", default, skip_serializing_if = "::std::option::Option::is_none")]
8607 pub icon_name: ::std::option::Option<::std::string::String>,
8608 ///Title of the doc.
8609 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8610 pub title: ::std::option::Option<::std::string::String>,
8611 }
8612
8613 impl ::std::convert::From<&DocUpdate> for DocUpdate {
8614 fn from(value: &DocUpdate) -> Self {
8615 value.clone()
8616 }
8617 }
8618
8619 impl ::std::default::Default for DocUpdate {
8620 fn default() -> Self {
8621 Self {
8622 icon_name: Default::default(),
8623 title: Default::default(),
8624 }
8625 }
8626 }
8627
8628 ///The result of a doc update
8629 ///
8630 /// <details><summary>JSON schema</summary>
8631 ///
8632 /// ```json
8633 ///{
8634 /// "description": "The result of a doc update",
8635 /// "type": "object",
8636 /// "additionalProperties": false,
8637 /// "x-schema-name": "DocUpdate"
8638 ///}
8639 /// ```
8640 /// </details>
8641 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8642 #[serde(deny_unknown_fields)]
8643 pub struct DocUpdateResult {}
8644 impl ::std::convert::From<&DocUpdateResult> for DocUpdateResult {
8645 fn from(value: &DocUpdateResult) -> Self {
8646 value.clone()
8647 }
8648 }
8649
8650 impl ::std::default::Default for DocUpdateResult {
8651 fn default() -> Self {
8652 Self {}
8653 }
8654 }
8655
8656 ///The result of a doc creation.
8657 ///
8658 /// <details><summary>JSON schema</summary>
8659 ///
8660 /// ```json
8661 ///{
8662 /// "description": "The result of a doc creation.",
8663 /// "type": "object",
8664 /// "required": [
8665 /// "browserLink",
8666 /// "createdAt",
8667 /// "folder",
8668 /// "folderId",
8669 /// "href",
8670 /// "id",
8671 /// "name",
8672 /// "owner",
8673 /// "ownerName",
8674 /// "type",
8675 /// "updatedAt",
8676 /// "workspace",
8677 /// "workspaceId"
8678 /// ],
8679 /// "properties": {
8680 /// "browserLink": {
8681 /// "description": "Browser-friendly link to the Coda doc.",
8682 /// "examples": [
8683 /// "https://coda.io/d/_dAbCDeFGH"
8684 /// ],
8685 /// "type": "string",
8686 /// "format": "url"
8687 /// },
8688 /// "createdAt": {
8689 /// "description": "Timestamp for when the doc was created.",
8690 /// "examples": [
8691 /// "2018-04-11T00:18:57.946Z"
8692 /// ],
8693 /// "type": "string",
8694 /// "format": "date-time"
8695 /// },
8696 /// "docSize": {
8697 /// "$ref": "#/components/schemas/DocSize"
8698 /// },
8699 /// "folder": {
8700 /// "$ref": "#/components/schemas/FolderReference"
8701 /// },
8702 /// "folderId": {
8703 /// "description": "ID of the Coda folder containing this doc.",
8704 /// "deprecated": true,
8705 /// "examples": [
8706 /// "fl-1Ab234"
8707 /// ],
8708 /// "type": "string"
8709 /// },
8710 /// "href": {
8711 /// "description": "API link to the Coda doc.",
8712 /// "examples": [
8713 /// "https://coda.io/apis/v1/docs/AbCDeFGH"
8714 /// ],
8715 /// "type": "string",
8716 /// "format": "url"
8717 /// },
8718 /// "icon": {
8719 /// "$ref": "#/components/schemas/Icon"
8720 /// },
8721 /// "id": {
8722 /// "description": "ID of the Coda doc.",
8723 /// "examples": [
8724 /// "AbCDeFGH"
8725 /// ],
8726 /// "type": "string"
8727 /// },
8728 /// "name": {
8729 /// "description": "Name of the doc.",
8730 /// "examples": [
8731 /// "Product Launch Hub"
8732 /// ],
8733 /// "type": "string"
8734 /// },
8735 /// "owner": {
8736 /// "description": "Email address of the doc owner.",
8737 /// "examples": [
8738 /// "user@example.com"
8739 /// ],
8740 /// "type": "string",
8741 /// "format": "email"
8742 /// },
8743 /// "ownerName": {
8744 /// "description": "Name of the doc owner.",
8745 /// "examples": [
8746 /// "Some User"
8747 /// ],
8748 /// "type": "string"
8749 /// },
8750 /// "published": {
8751 /// "$ref": "#/components/schemas/DocPublished"
8752 /// },
8753 /// "requestId": {
8754 /// "description": "An arbitrary unique identifier for this request.",
8755 /// "examples": [
8756 /// "abc-123-def-456"
8757 /// ],
8758 /// "type": "string"
8759 /// },
8760 /// "sourceDoc": {
8761 /// "allOf": [
8762 /// {
8763 /// "description": "Reference to a Coda doc from which this doc was
8764 /// copied, if any.",
8765 /// "type": "object",
8766 /// "additionalProperties": false
8767 /// },
8768 /// {
8769 /// "$ref": "#/components/schemas/DocReference"
8770 /// }
8771 /// ]
8772 /// },
8773 /// "type": {
8774 /// "description": "The type of this resource.",
8775 /// "type": "string",
8776 /// "enum": [
8777 /// "doc"
8778 /// ],
8779 /// "x-tsType": "Type.Doc"
8780 /// },
8781 /// "updatedAt": {
8782 /// "description": "Timestamp for when the doc was last modified.",
8783 /// "examples": [
8784 /// "2018-04-11T00:18:57.946Z"
8785 /// ],
8786 /// "type": "string",
8787 /// "format": "date-time"
8788 /// },
8789 /// "workspace": {
8790 /// "$ref": "#/components/schemas/WorkspaceReference"
8791 /// },
8792 /// "workspaceId": {
8793 /// "description": "ID of the Coda workspace containing this doc.",
8794 /// "deprecated": true,
8795 /// "examples": [
8796 /// "ws-1Ab234"
8797 /// ],
8798 /// "type": "string"
8799 /// }
8800 /// },
8801 /// "additionalProperties": false,
8802 /// "x-schema-name": "Doc"
8803 ///}
8804 /// ```
8805 /// </details>
8806 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8807 #[serde(deny_unknown_fields)]
8808 pub struct DocumentCreationResult {
8809 ///Browser-friendly link to the Coda doc.
8810 #[serde(rename = "browserLink")]
8811 pub browser_link: ::std::string::String,
8812 ///Timestamp for when the doc was created.
8813 #[serde(rename = "createdAt")]
8814 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
8815 #[serde(rename = "docSize", default, skip_serializing_if = "::std::option::Option::is_none")]
8816 pub doc_size: ::std::option::Option<DocSize>,
8817 pub folder: FolderReference,
8818 ///ID of the Coda folder containing this doc.
8819 #[serde(rename = "folderId")]
8820 pub folder_id: ::std::string::String,
8821 ///API link to the Coda doc.
8822 pub href: ::std::string::String,
8823 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8824 pub icon: ::std::option::Option<Icon>,
8825 ///ID of the Coda doc.
8826 pub id: ::std::string::String,
8827 ///Name of the doc.
8828 pub name: ::std::string::String,
8829 ///Email address of the doc owner.
8830 pub owner: ::std::string::String,
8831 ///Name of the doc owner.
8832 #[serde(rename = "ownerName")]
8833 pub owner_name: ::std::string::String,
8834 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8835 pub published: ::std::option::Option<DocPublished>,
8836 ///An arbitrary unique identifier for this request.
8837 #[serde(rename = "requestId", default, skip_serializing_if = "::std::option::Option::is_none")]
8838 pub request_id: ::std::option::Option<::std::string::String>,
8839 #[serde(rename = "sourceDoc", default, skip_serializing_if = "::std::option::Option::is_none")]
8840 pub source_doc: ::std::option::Option<DocumentCreationResultSourceDoc>,
8841 ///The type of this resource.
8842 #[serde(rename = "type")]
8843 pub type_: DocumentCreationResultType,
8844 ///Timestamp for when the doc was last modified.
8845 #[serde(rename = "updatedAt")]
8846 pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
8847 pub workspace: WorkspaceReference,
8848 ///ID of the Coda workspace containing this doc.
8849 #[serde(rename = "workspaceId")]
8850 pub workspace_id: ::std::string::String,
8851 }
8852
8853 impl ::std::convert::From<&DocumentCreationResult> for DocumentCreationResult {
8854 fn from(value: &DocumentCreationResult) -> Self {
8855 value.clone()
8856 }
8857 }
8858
8859 ///`DocumentCreationResultSourceDoc`
8860 ///
8861 /// <details><summary>JSON schema</summary>
8862 ///
8863 /// ```json
8864 ///{
8865 /// "allOf": [
8866 /// {
8867 /// "description": "Reference to a Coda doc from which this doc was
8868 /// copied, if any.",
8869 /// "type": "object",
8870 /// "additionalProperties": false
8871 /// },
8872 /// {
8873 /// "$ref": "#/components/schemas/DocReference"
8874 /// }
8875 /// ]
8876 ///}
8877 /// ```
8878 /// </details>
8879 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8880 #[serde(deny_unknown_fields)]
8881 pub enum DocumentCreationResultSourceDoc {}
8882 impl ::std::convert::From<&Self> for DocumentCreationResultSourceDoc {
8883 fn from(value: &DocumentCreationResultSourceDoc) -> Self {
8884 value.clone()
8885 }
8886 }
8887
8888 ///The type of this resource.
8889 ///
8890 /// <details><summary>JSON schema</summary>
8891 ///
8892 /// ```json
8893 ///{
8894 /// "description": "The type of this resource.",
8895 /// "type": "string",
8896 /// "enum": [
8897 /// "doc"
8898 /// ],
8899 /// "x-tsType": "Type.Doc"
8900 ///}
8901 /// ```
8902 /// </details>
8903 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8904 pub enum DocumentCreationResultType {
8905 #[serde(rename = "doc")]
8906 Doc,
8907 }
8908
8909 impl ::std::convert::From<&Self> for DocumentCreationResultType {
8910 fn from(value: &DocumentCreationResultType) -> Self {
8911 value.clone()
8912 }
8913 }
8914
8915 impl ::std::fmt::Display for DocumentCreationResultType {
8916 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8917 match *self {
8918 Self::Doc => f.write_str("doc"),
8919 }
8920 }
8921 }
8922
8923 impl ::std::str::FromStr for DocumentCreationResultType {
8924 type Err = self::error::ConversionError;
8925 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8926 match value {
8927 "doc" => Ok(Self::Doc),
8928 _ => Err("invalid value".into()),
8929 }
8930 }
8931 }
8932
8933 impl ::std::convert::TryFrom<&str> for DocumentCreationResultType {
8934 type Error = self::error::ConversionError;
8935 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8936 value.parse()
8937 }
8938 }
8939
8940 impl ::std::convert::TryFrom<&::std::string::String> for DocumentCreationResultType {
8941 type Error = self::error::ConversionError;
8942 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8943 value.parse()
8944 }
8945 }
8946
8947 impl ::std::convert::TryFrom<::std::string::String> for DocumentCreationResultType {
8948 type Error = self::error::ConversionError;
8949 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
8950 value.parse()
8951 }
8952 }
8953
8954 ///Base response type for an operation that mutates a document.
8955 ///
8956 /// <details><summary>JSON schema</summary>
8957 ///
8958 /// ```json
8959 ///{
8960 /// "description": "Base response type for an operation that mutates a
8961 /// document.",
8962 /// "type": "object",
8963 /// "required": [
8964 /// "requestId"
8965 /// ],
8966 /// "properties": {
8967 /// "requestId": {
8968 /// "description": "An arbitrary unique identifier for this request.",
8969 /// "examples": [
8970 /// "abc-123-def-456"
8971 /// ],
8972 /// "type": "string"
8973 /// }
8974 /// },
8975 /// "additionalProperties": false,
8976 /// "x-schema-name": "DocumentMutateResponse"
8977 ///}
8978 /// ```
8979 /// </details>
8980 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8981 #[serde(deny_unknown_fields)]
8982 pub struct DocumentMutateResponse {
8983 ///An arbitrary unique identifier for this request.
8984 #[serde(rename = "requestId")]
8985 pub request_id: ::std::string::String,
8986 }
8987
8988 impl ::std::convert::From<&DocumentMutateResponse> for DocumentMutateResponse {
8989 fn from(value: &DocumentMutateResponse) -> Self {
8990 value.clone()
8991 }
8992 }
8993
8994 ///`DomainPrincipal`
8995 ///
8996 /// <details><summary>JSON schema</summary>
8997 ///
8998 /// ```json
8999 ///{
9000 /// "type": "object",
9001 /// "required": [
9002 /// "domain",
9003 /// "type"
9004 /// ],
9005 /// "properties": {
9006 /// "domain": {
9007 /// "description": "Domain for the principal.",
9008 /// "examples": [
9009 /// "domain.com"
9010 /// ],
9011 /// "type": "string"
9012 /// },
9013 /// "type": {
9014 /// "description": "The type of this principal.",
9015 /// "type": "string",
9016 /// "enum": [
9017 /// "domain"
9018 /// ],
9019 /// "x-tsType": "PrincipalType.Domain"
9020 /// }
9021 /// },
9022 /// "additionalProperties": false
9023 ///}
9024 /// ```
9025 /// </details>
9026 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9027 #[serde(deny_unknown_fields)]
9028 pub struct DomainPrincipal {
9029 ///Domain for the principal.
9030 pub domain: ::std::string::String,
9031 ///The type of this principal.
9032 #[serde(rename = "type")]
9033 pub type_: DomainPrincipalType,
9034 }
9035
9036 impl ::std::convert::From<&DomainPrincipal> for DomainPrincipal {
9037 fn from(value: &DomainPrincipal) -> Self {
9038 value.clone()
9039 }
9040 }
9041
9042 ///The type of this principal.
9043 ///
9044 /// <details><summary>JSON schema</summary>
9045 ///
9046 /// ```json
9047 ///{
9048 /// "description": "The type of this principal.",
9049 /// "type": "string",
9050 /// "enum": [
9051 /// "domain"
9052 /// ],
9053 /// "x-tsType": "PrincipalType.Domain"
9054 ///}
9055 /// ```
9056 /// </details>
9057 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9058 pub enum DomainPrincipalType {
9059 #[serde(rename = "domain")]
9060 Domain,
9061 }
9062
9063 impl ::std::convert::From<&Self> for DomainPrincipalType {
9064 fn from(value: &DomainPrincipalType) -> Self {
9065 value.clone()
9066 }
9067 }
9068
9069 impl ::std::fmt::Display for DomainPrincipalType {
9070 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9071 match *self {
9072 Self::Domain => f.write_str("domain"),
9073 }
9074 }
9075 }
9076
9077 impl ::std::str::FromStr for DomainPrincipalType {
9078 type Err = self::error::ConversionError;
9079 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9080 match value {
9081 "domain" => Ok(Self::Domain),
9082 _ => Err("invalid value".into()),
9083 }
9084 }
9085 }
9086
9087 impl ::std::convert::TryFrom<&str> for DomainPrincipalType {
9088 type Error = self::error::ConversionError;
9089 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9090 value.parse()
9091 }
9092 }
9093
9094 impl ::std::convert::TryFrom<&::std::string::String> for DomainPrincipalType {
9095 type Error = self::error::ConversionError;
9096 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9097 value.parse()
9098 }
9099 }
9100
9101 impl ::std::convert::TryFrom<::std::string::String> for DomainPrincipalType {
9102 type Error = self::error::ConversionError;
9103 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9104 value.parse()
9105 }
9106 }
9107
9108 ///`DurationColumnFormat`
9109 ///
9110 /// <details><summary>JSON schema</summary>
9111 ///
9112 /// ```json
9113 ///{
9114 /// "description": "Format of a duration column.",
9115 /// "allOf": [
9116 /// {
9117 /// "$ref": "#/components/schemas/SimpleColumnFormat"
9118 /// },
9119 /// {
9120 /// "type": "object",
9121 /// "properties": {
9122 /// "maxUnit": {
9123 /// "allOf": [
9124 /// {
9125 /// "description": "The maximum unit of precision, e.g.
9126 /// \"hours\" if this duration need not include minutes.",
9127 /// "additionalProperties": false
9128 /// },
9129 /// {
9130 /// "$ref": "#/components/schemas/DurationUnit"
9131 /// }
9132 /// ]
9133 /// },
9134 /// "precision": {
9135 /// "examples": [
9136 /// 2
9137 /// ],
9138 /// "type": "integer"
9139 /// }
9140 /// },
9141 /// "additionalProperties": false
9142 /// }
9143 /// ],
9144 /// "x-schema-name": "DurationColumnFormat"
9145 ///}
9146 /// ```
9147 /// </details>
9148 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9149 #[serde(deny_unknown_fields)]
9150 pub enum DurationColumnFormat {}
9151 impl ::std::convert::From<&Self> for DurationColumnFormat {
9152 fn from(value: &DurationColumnFormat) -> Self {
9153 value.clone()
9154 }
9155 }
9156
9157 ///A time unit used as part of a duration value.
9158 ///
9159 /// <details><summary>JSON schema</summary>
9160 ///
9161 /// ```json
9162 ///{
9163 /// "description": "A time unit used as part of a duration value.",
9164 /// "type": "string",
9165 /// "enum": [
9166 /// "days",
9167 /// "hours",
9168 /// "minutes",
9169 /// "seconds"
9170 /// ],
9171 /// "x-schema-name": "DurationUnit",
9172 /// "x-tsEnumNames": [
9173 /// "Days",
9174 /// "Hours",
9175 /// "Minutes",
9176 /// "Seconds"
9177 /// ]
9178 ///}
9179 /// ```
9180 /// </details>
9181 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9182 pub enum DurationUnit {
9183 #[serde(rename = "days")]
9184 Days,
9185 #[serde(rename = "hours")]
9186 Hours,
9187 #[serde(rename = "minutes")]
9188 Minutes,
9189 #[serde(rename = "seconds")]
9190 Seconds,
9191 }
9192
9193 impl ::std::convert::From<&Self> for DurationUnit {
9194 fn from(value: &DurationUnit) -> Self {
9195 value.clone()
9196 }
9197 }
9198
9199 impl ::std::fmt::Display for DurationUnit {
9200 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9201 match *self {
9202 Self::Days => f.write_str("days"),
9203 Self::Hours => f.write_str("hours"),
9204 Self::Minutes => f.write_str("minutes"),
9205 Self::Seconds => f.write_str("seconds"),
9206 }
9207 }
9208 }
9209
9210 impl ::std::str::FromStr for DurationUnit {
9211 type Err = self::error::ConversionError;
9212 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9213 match value {
9214 "days" => Ok(Self::Days),
9215 "hours" => Ok(Self::Hours),
9216 "minutes" => Ok(Self::Minutes),
9217 "seconds" => Ok(Self::Seconds),
9218 _ => Err("invalid value".into()),
9219 }
9220 }
9221 }
9222
9223 impl ::std::convert::TryFrom<&str> for DurationUnit {
9224 type Error = self::error::ConversionError;
9225 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9226 value.parse()
9227 }
9228 }
9229
9230 impl ::std::convert::TryFrom<&::std::string::String> for DurationUnit {
9231 type Error = self::error::ConversionError;
9232 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9233 value.parse()
9234 }
9235 }
9236
9237 impl ::std::convert::TryFrom<::std::string::String> for DurationUnit {
9238 type Error = self::error::ConversionError;
9239 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9240 value.parse()
9241 }
9242 }
9243
9244 ///`EmailColumnFormat`
9245 ///
9246 /// <details><summary>JSON schema</summary>
9247 ///
9248 /// ```json
9249 ///{
9250 /// "description": "Format of an email column.",
9251 /// "allOf": [
9252 /// {
9253 /// "$ref": "#/components/schemas/SimpleColumnFormat"
9254 /// },
9255 /// {
9256 /// "type": "object",
9257 /// "properties": {
9258 /// "autocomplete": {
9259 /// "type": "boolean"
9260 /// },
9261 /// "display": {
9262 /// "$ref": "#/components/schemas/EmailDisplayType"
9263 /// }
9264 /// },
9265 /// "additionalProperties": false
9266 /// }
9267 /// ],
9268 /// "x-schema-name": "EmailColumnFormat"
9269 ///}
9270 /// ```
9271 /// </details>
9272 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9273 #[serde(deny_unknown_fields)]
9274 pub enum EmailColumnFormat {}
9275 impl ::std::convert::From<&Self> for EmailColumnFormat {
9276 fn from(value: &EmailColumnFormat) -> Self {
9277 value.clone()
9278 }
9279 }
9280
9281 ///How an email address should be displayed in the user interface.
9282 ///
9283 /// <details><summary>JSON schema</summary>
9284 ///
9285 /// ```json
9286 ///{
9287 /// "description": "How an email address should be displayed in the user
9288 /// interface.",
9289 /// "type": "string",
9290 /// "enum": [
9291 /// "iconAndEmail",
9292 /// "iconOnly",
9293 /// "emailOnly"
9294 /// ],
9295 /// "x-schema-name": "EmailDisplayType",
9296 /// "x-tsEnumNames": [
9297 /// "IconAndEmail",
9298 /// "IconOnly",
9299 /// "EmailOnly"
9300 /// ]
9301 ///}
9302 /// ```
9303 /// </details>
9304 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9305 pub enum EmailDisplayType {
9306 #[serde(rename = "iconAndEmail")]
9307 IconAndEmail,
9308 #[serde(rename = "iconOnly")]
9309 IconOnly,
9310 #[serde(rename = "emailOnly")]
9311 EmailOnly,
9312 }
9313
9314 impl ::std::convert::From<&Self> for EmailDisplayType {
9315 fn from(value: &EmailDisplayType) -> Self {
9316 value.clone()
9317 }
9318 }
9319
9320 impl ::std::fmt::Display for EmailDisplayType {
9321 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9322 match *self {
9323 Self::IconAndEmail => f.write_str("iconAndEmail"),
9324 Self::IconOnly => f.write_str("iconOnly"),
9325 Self::EmailOnly => f.write_str("emailOnly"),
9326 }
9327 }
9328 }
9329
9330 impl ::std::str::FromStr for EmailDisplayType {
9331 type Err = self::error::ConversionError;
9332 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9333 match value {
9334 "iconAndEmail" => Ok(Self::IconAndEmail),
9335 "iconOnly" => Ok(Self::IconOnly),
9336 "emailOnly" => Ok(Self::EmailOnly),
9337 _ => Err("invalid value".into()),
9338 }
9339 }
9340 }
9341
9342 impl ::std::convert::TryFrom<&str> for EmailDisplayType {
9343 type Error = self::error::ConversionError;
9344 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9345 value.parse()
9346 }
9347 }
9348
9349 impl ::std::convert::TryFrom<&::std::string::String> for EmailDisplayType {
9350 type Error = self::error::ConversionError;
9351 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9352 value.parse()
9353 }
9354 }
9355
9356 impl ::std::convert::TryFrom<::std::string::String> for EmailDisplayType {
9357 type Error = self::error::ConversionError;
9358 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9359 value.parse()
9360 }
9361 }
9362
9363 ///`EmailPrincipal`
9364 ///
9365 /// <details><summary>JSON schema</summary>
9366 ///
9367 /// ```json
9368 ///{
9369 /// "type": "object",
9370 /// "required": [
9371 /// "email",
9372 /// "type"
9373 /// ],
9374 /// "properties": {
9375 /// "email": {
9376 /// "description": "Email for the principal.",
9377 /// "examples": [
9378 /// "example@domain.com"
9379 /// ],
9380 /// "type": "string"
9381 /// },
9382 /// "type": {
9383 /// "description": "The type of this principal.",
9384 /// "type": "string",
9385 /// "enum": [
9386 /// "email"
9387 /// ],
9388 /// "x-tsType": "PrincipalType.Email"
9389 /// }
9390 /// },
9391 /// "additionalProperties": false
9392 ///}
9393 /// ```
9394 /// </details>
9395 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9396 #[serde(deny_unknown_fields)]
9397 pub struct EmailPrincipal {
9398 ///Email for the principal.
9399 pub email: ::std::string::String,
9400 ///The type of this principal.
9401 #[serde(rename = "type")]
9402 pub type_: EmailPrincipalType,
9403 }
9404
9405 impl ::std::convert::From<&EmailPrincipal> for EmailPrincipal {
9406 fn from(value: &EmailPrincipal) -> Self {
9407 value.clone()
9408 }
9409 }
9410
9411 ///The type of this principal.
9412 ///
9413 /// <details><summary>JSON schema</summary>
9414 ///
9415 /// ```json
9416 ///{
9417 /// "description": "The type of this principal.",
9418 /// "type": "string",
9419 /// "enum": [
9420 /// "email"
9421 /// ],
9422 /// "x-tsType": "PrincipalType.Email"
9423 ///}
9424 /// ```
9425 /// </details>
9426 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9427 pub enum EmailPrincipalType {
9428 #[serde(rename = "email")]
9429 Email,
9430 }
9431
9432 impl ::std::convert::From<&Self> for EmailPrincipalType {
9433 fn from(value: &EmailPrincipalType) -> Self {
9434 value.clone()
9435 }
9436 }
9437
9438 impl ::std::fmt::Display for EmailPrincipalType {
9439 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9440 match *self {
9441 Self::Email => f.write_str("email"),
9442 }
9443 }
9444 }
9445
9446 impl ::std::str::FromStr for EmailPrincipalType {
9447 type Err = self::error::ConversionError;
9448 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9449 match value {
9450 "email" => Ok(Self::Email),
9451 _ => Err("invalid value".into()),
9452 }
9453 }
9454 }
9455
9456 impl ::std::convert::TryFrom<&str> for EmailPrincipalType {
9457 type Error = self::error::ConversionError;
9458 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9459 value.parse()
9460 }
9461 }
9462
9463 impl ::std::convert::TryFrom<&::std::string::String> for EmailPrincipalType {
9464 type Error = self::error::ConversionError;
9465 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9466 value.parse()
9467 }
9468 }
9469
9470 impl ::std::convert::TryFrom<::std::string::String> for EmailPrincipalType {
9471 type Error = self::error::ConversionError;
9472 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9473 value.parse()
9474 }
9475 }
9476
9477 ///Only relevant for original Coda packs.
9478 ///
9479 /// <details><summary>JSON schema</summary>
9480 ///
9481 /// ```json
9482 ///{
9483 /// "description": "Only relevant for original Coda packs.",
9484 /// "deprecated": true,
9485 /// "type": "string",
9486 /// "enum": [
9487 /// "Basic",
9488 /// "Pro",
9489 /// "Team",
9490 /// "Enterprise"
9491 /// ],
9492 /// "x-schema-name": "FeatureSet",
9493 /// "x-tsEnumNames": [
9494 /// "Basic",
9495 /// "Pro",
9496 /// "Team",
9497 /// "Enterprise"
9498 /// ]
9499 ///}
9500 /// ```
9501 /// </details>
9502 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9503 pub enum FeatureSet {
9504 Basic,
9505 Pro,
9506 Team,
9507 Enterprise,
9508 }
9509
9510 impl ::std::convert::From<&Self> for FeatureSet {
9511 fn from(value: &FeatureSet) -> Self {
9512 value.clone()
9513 }
9514 }
9515
9516 impl ::std::fmt::Display for FeatureSet {
9517 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9518 match *self {
9519 Self::Basic => f.write_str("Basic"),
9520 Self::Pro => f.write_str("Pro"),
9521 Self::Team => f.write_str("Team"),
9522 Self::Enterprise => f.write_str("Enterprise"),
9523 }
9524 }
9525 }
9526
9527 impl ::std::str::FromStr for FeatureSet {
9528 type Err = self::error::ConversionError;
9529 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9530 match value {
9531 "Basic" => Ok(Self::Basic),
9532 "Pro" => Ok(Self::Pro),
9533 "Team" => Ok(Self::Team),
9534 "Enterprise" => Ok(Self::Enterprise),
9535 _ => Err("invalid value".into()),
9536 }
9537 }
9538 }
9539
9540 impl ::std::convert::TryFrom<&str> for FeatureSet {
9541 type Error = self::error::ConversionError;
9542 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9543 value.parse()
9544 }
9545 }
9546
9547 impl ::std::convert::TryFrom<&::std::string::String> for FeatureSet {
9548 type Error = self::error::ConversionError;
9549 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9550 value.parse()
9551 }
9552 }
9553
9554 impl ::std::convert::TryFrom<::std::string::String> for FeatureSet {
9555 type Error = self::error::ConversionError;
9556 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9557 value.parse()
9558 }
9559 }
9560
9561 ///Status of featured doc in pack listing.
9562 ///
9563 /// <details><summary>JSON schema</summary>
9564 ///
9565 /// ```json
9566 ///{
9567 /// "description": "Status of featured doc in pack listing.",
9568 /// "type": "string",
9569 /// "enum": [
9570 /// "docInaccessibleOrDoesNotExist",
9571 /// "invalidPublishedDocUrl"
9572 /// ],
9573 /// "x-schema-name": "FeaturedDocStatus",
9574 /// "x-tsEnumNames": [
9575 /// "DocInaccessibleOrDoesNotExist",
9576 /// "InvalidPublishedDocUrl"
9577 /// ]
9578 ///}
9579 /// ```
9580 /// </details>
9581 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9582 pub enum FeaturedDocStatus {
9583 #[serde(rename = "docInaccessibleOrDoesNotExist")]
9584 DocInaccessibleOrDoesNotExist,
9585 #[serde(rename = "invalidPublishedDocUrl")]
9586 InvalidPublishedDocUrl,
9587 }
9588
9589 impl ::std::convert::From<&Self> for FeaturedDocStatus {
9590 fn from(value: &FeaturedDocStatus) -> Self {
9591 value.clone()
9592 }
9593 }
9594
9595 impl ::std::fmt::Display for FeaturedDocStatus {
9596 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9597 match *self {
9598 Self::DocInaccessibleOrDoesNotExist => f.write_str("docInaccessibleOrDoesNotExist"),
9599 Self::InvalidPublishedDocUrl => f.write_str("invalidPublishedDocUrl"),
9600 }
9601 }
9602 }
9603
9604 impl ::std::str::FromStr for FeaturedDocStatus {
9605 type Err = self::error::ConversionError;
9606 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9607 match value {
9608 "docInaccessibleOrDoesNotExist" => Ok(Self::DocInaccessibleOrDoesNotExist),
9609 "invalidPublishedDocUrl" => Ok(Self::InvalidPublishedDocUrl),
9610 _ => Err("invalid value".into()),
9611 }
9612 }
9613 }
9614
9615 impl ::std::convert::TryFrom<&str> for FeaturedDocStatus {
9616 type Error = self::error::ConversionError;
9617 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9618 value.parse()
9619 }
9620 }
9621
9622 impl ::std::convert::TryFrom<&::std::string::String> for FeaturedDocStatus {
9623 type Error = self::error::ConversionError;
9624 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9625 value.parse()
9626 }
9627 }
9628
9629 impl ::std::convert::TryFrom<::std::string::String> for FeaturedDocStatus {
9630 type Error = self::error::ConversionError;
9631 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9632 value.parse()
9633 }
9634 }
9635
9636 ///A Coda folder.
9637 ///
9638 /// <details><summary>JSON schema</summary>
9639 ///
9640 /// ```json
9641 ///{
9642 /// "description": "A Coda folder.",
9643 /// "type": "object",
9644 /// "required": [
9645 /// "createdAt",
9646 /// "id",
9647 /// "name",
9648 /// "type",
9649 /// "workspaceId"
9650 /// ],
9651 /// "properties": {
9652 /// "createdAt": {
9653 /// "description": "Timestamp for when the folder was created.",
9654 /// "examples": [
9655 /// "2018-04-11T00:18:57.946Z"
9656 /// ],
9657 /// "type": "string",
9658 /// "format": "date-time"
9659 /// },
9660 /// "description": {
9661 /// "description": "The description of the folder.",
9662 /// "examples": [
9663 /// "A collection of project docs."
9664 /// ],
9665 /// "type": "string"
9666 /// },
9667 /// "icon": {
9668 /// "$ref": "#/components/schemas/Icon"
9669 /// },
9670 /// "id": {
9671 /// "description": "ID of the Coda folder.",
9672 /// "examples": [
9673 /// "fl-1Ab234"
9674 /// ],
9675 /// "type": "string"
9676 /// },
9677 /// "name": {
9678 /// "description": "The name of the folder.",
9679 /// "examples": [
9680 /// "Projects"
9681 /// ],
9682 /// "type": "string"
9683 /// },
9684 /// "type": {
9685 /// "description": "The type of this resource.",
9686 /// "type": "string",
9687 /// "enum": [
9688 /// "folder"
9689 /// ],
9690 /// "x-tsType": "Type.Folder"
9691 /// },
9692 /// "workspaceId": {
9693 /// "description": "ID of the Coda workspace.",
9694 /// "examples": [
9695 /// "ws-1Ab234"
9696 /// ],
9697 /// "type": "string"
9698 /// }
9699 /// },
9700 /// "additionalProperties": false,
9701 /// "x-schema-name": "Folder"
9702 ///}
9703 /// ```
9704 /// </details>
9705 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9706 #[serde(deny_unknown_fields)]
9707 pub struct Folder {
9708 ///Timestamp for when the folder was created.
9709 #[serde(rename = "createdAt")]
9710 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
9711 ///The description of the folder.
9712 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9713 pub description: ::std::option::Option<::std::string::String>,
9714 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9715 pub icon: ::std::option::Option<Icon>,
9716 ///ID of the Coda folder.
9717 pub id: ::std::string::String,
9718 ///The name of the folder.
9719 pub name: ::std::string::String,
9720 ///The type of this resource.
9721 #[serde(rename = "type")]
9722 pub type_: FolderType,
9723 ///ID of the Coda workspace.
9724 #[serde(rename = "workspaceId")]
9725 pub workspace_id: ::std::string::String,
9726 }
9727
9728 impl ::std::convert::From<&Folder> for Folder {
9729 fn from(value: &Folder) -> Self {
9730 value.clone()
9731 }
9732 }
9733
9734 ///Reference to a Coda folder.
9735 ///
9736 /// <details><summary>JSON schema</summary>
9737 ///
9738 /// ```json
9739 ///{
9740 /// "description": "Reference to a Coda folder.",
9741 /// "type": "object",
9742 /// "required": [
9743 /// "browserLink",
9744 /// "id",
9745 /// "type"
9746 /// ],
9747 /// "properties": {
9748 /// "browserLink": {
9749 /// "description": "Browser-friendly link to the folder.",
9750 /// "examples": [
9751 /// "https://coda.io/docs?folderId=fl-1Ab234"
9752 /// ],
9753 /// "type": "string",
9754 /// "format": "url"
9755 /// },
9756 /// "id": {
9757 /// "description": "ID of the Coda folder.",
9758 /// "examples": [
9759 /// "fl-1Ab234"
9760 /// ],
9761 /// "type": "string"
9762 /// },
9763 /// "name": {
9764 /// "description": "Name of the folder; included if the user has access
9765 /// to the folder.",
9766 /// "examples": [
9767 /// "My docs"
9768 /// ],
9769 /// "type": "string"
9770 /// },
9771 /// "type": {
9772 /// "description": "The type of this resource.",
9773 /// "type": "string",
9774 /// "enum": [
9775 /// "folder"
9776 /// ],
9777 /// "x-tsType": "Type.Folder"
9778 /// }
9779 /// },
9780 /// "additionalProperties": false,
9781 /// "x-schema-name": "FolderReference"
9782 ///}
9783 /// ```
9784 /// </details>
9785 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9786 #[serde(deny_unknown_fields)]
9787 pub struct FolderReference {
9788 ///Browser-friendly link to the folder.
9789 #[serde(rename = "browserLink")]
9790 pub browser_link: ::std::string::String,
9791 ///ID of the Coda folder.
9792 pub id: ::std::string::String,
9793 ///Name of the folder; included if the user has access to the folder.
9794 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9795 pub name: ::std::option::Option<::std::string::String>,
9796 ///The type of this resource.
9797 #[serde(rename = "type")]
9798 pub type_: FolderReferenceType,
9799 }
9800
9801 impl ::std::convert::From<&FolderReference> for FolderReference {
9802 fn from(value: &FolderReference) -> Self {
9803 value.clone()
9804 }
9805 }
9806
9807 ///The type of this resource.
9808 ///
9809 /// <details><summary>JSON schema</summary>
9810 ///
9811 /// ```json
9812 ///{
9813 /// "description": "The type of this resource.",
9814 /// "type": "string",
9815 /// "enum": [
9816 /// "folder"
9817 /// ],
9818 /// "x-tsType": "Type.Folder"
9819 ///}
9820 /// ```
9821 /// </details>
9822 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9823 pub enum FolderReferenceType {
9824 #[serde(rename = "folder")]
9825 Folder,
9826 }
9827
9828 impl ::std::convert::From<&Self> for FolderReferenceType {
9829 fn from(value: &FolderReferenceType) -> Self {
9830 value.clone()
9831 }
9832 }
9833
9834 impl ::std::fmt::Display for FolderReferenceType {
9835 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9836 match *self {
9837 Self::Folder => f.write_str("folder"),
9838 }
9839 }
9840 }
9841
9842 impl ::std::str::FromStr for FolderReferenceType {
9843 type Err = self::error::ConversionError;
9844 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9845 match value {
9846 "folder" => Ok(Self::Folder),
9847 _ => Err("invalid value".into()),
9848 }
9849 }
9850 }
9851
9852 impl ::std::convert::TryFrom<&str> for FolderReferenceType {
9853 type Error = self::error::ConversionError;
9854 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9855 value.parse()
9856 }
9857 }
9858
9859 impl ::std::convert::TryFrom<&::std::string::String> for FolderReferenceType {
9860 type Error = self::error::ConversionError;
9861 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9862 value.parse()
9863 }
9864 }
9865
9866 impl ::std::convert::TryFrom<::std::string::String> for FolderReferenceType {
9867 type Error = self::error::ConversionError;
9868 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9869 value.parse()
9870 }
9871 }
9872
9873 ///The type of this resource.
9874 ///
9875 /// <details><summary>JSON schema</summary>
9876 ///
9877 /// ```json
9878 ///{
9879 /// "description": "The type of this resource.",
9880 /// "type": "string",
9881 /// "enum": [
9882 /// "folder"
9883 /// ],
9884 /// "x-tsType": "Type.Folder"
9885 ///}
9886 /// ```
9887 /// </details>
9888 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9889 pub enum FolderType {
9890 #[serde(rename = "folder")]
9891 Folder,
9892 }
9893
9894 impl ::std::convert::From<&Self> for FolderType {
9895 fn from(value: &FolderType) -> Self {
9896 value.clone()
9897 }
9898 }
9899
9900 impl ::std::fmt::Display for FolderType {
9901 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9902 match *self {
9903 Self::Folder => f.write_str("folder"),
9904 }
9905 }
9906 }
9907
9908 impl ::std::str::FromStr for FolderType {
9909 type Err = self::error::ConversionError;
9910 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9911 match value {
9912 "folder" => Ok(Self::Folder),
9913 _ => Err("invalid value".into()),
9914 }
9915 }
9916 }
9917
9918 impl ::std::convert::TryFrom<&str> for FolderType {
9919 type Error = self::error::ConversionError;
9920 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9921 value.parse()
9922 }
9923 }
9924
9925 impl ::std::convert::TryFrom<&::std::string::String> for FolderType {
9926 type Error = self::error::ConversionError;
9927 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9928 value.parse()
9929 }
9930 }
9931
9932 impl ::std::convert::TryFrom<::std::string::String> for FolderType {
9933 type Error = self::error::ConversionError;
9934 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
9935 value.parse()
9936 }
9937 }
9938
9939 ///Details about a formula.
9940 ///
9941 /// <details><summary>JSON schema</summary>
9942 ///
9943 /// ```json
9944 ///{
9945 /// "description": "Details about a formula.",
9946 /// "type": "object",
9947 /// "required": [
9948 /// "href",
9949 /// "id",
9950 /// "name",
9951 /// "type",
9952 /// "value"
9953 /// ],
9954 /// "properties": {
9955 /// "href": {
9956 /// "description": "API link to the formula.",
9957 /// "examples": [
9958 /// "https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm"
9959 /// ],
9960 /// "type": "string",
9961 /// "format": "url"
9962 /// },
9963 /// "id": {
9964 /// "description": "ID of the formula.",
9965 /// "examples": [
9966 /// "f-fgHijkLm"
9967 /// ],
9968 /// "type": "string"
9969 /// },
9970 /// "name": {
9971 /// "description": "Name of the formula.",
9972 /// "examples": [
9973 /// "Sum of expenses"
9974 /// ],
9975 /// "type": "string"
9976 /// },
9977 /// "parent": {
9978 /// "$ref": "#/components/schemas/PageReference"
9979 /// },
9980 /// "type": {
9981 /// "description": "The type of this resource.",
9982 /// "type": "string",
9983 /// "enum": [
9984 /// "formula"
9985 /// ],
9986 /// "x-tsType": "Type.Formula"
9987 /// },
9988 /// "value": {
9989 /// "$ref": "#/components/schemas/Value"
9990 /// }
9991 /// },
9992 /// "additionalProperties": false,
9993 /// "x-schema-name": "Formula"
9994 ///}
9995 /// ```
9996 /// </details>
9997 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9998 #[serde(deny_unknown_fields)]
9999 pub struct Formula {
10000 ///API link to the formula.
10001 pub href: ::std::string::String,
10002 ///ID of the formula.
10003 pub id: ::std::string::String,
10004 ///Name of the formula.
10005 pub name: ::std::string::String,
10006 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10007 pub parent: ::std::option::Option<PageReference>,
10008 ///The type of this resource.
10009 #[serde(rename = "type")]
10010 pub type_: FormulaType,
10011 pub value: Value,
10012 }
10013
10014 impl ::std::convert::From<&Formula> for Formula {
10015 fn from(value: &Formula) -> Self {
10016 value.clone()
10017 }
10018 }
10019
10020 ///Detailed information about a formula.
10021 ///
10022 /// <details><summary>JSON schema</summary>
10023 ///
10024 /// ```json
10025 ///{
10026 /// "description": "Detailed information about a formula.",
10027 /// "type": "object",
10028 /// "required": [
10029 /// "valid"
10030 /// ],
10031 /// "properties": {
10032 /// "hasNowFormula": {
10033 /// "description": "Returns whether or not the given formula has a
10034 /// Now() formula within it.",
10035 /// "examples": [
10036 /// false
10037 /// ],
10038 /// "type": "boolean"
10039 /// },
10040 /// "hasTodayFormula": {
10041 /// "description": "Returns whether or not the given formula has a
10042 /// Today() formula within it.",
10043 /// "examples": [
10044 /// false
10045 /// ],
10046 /// "type": "boolean"
10047 /// },
10048 /// "hasUserFormula": {
10049 /// "description": "Returns whether or not the given formula has a
10050 /// User() formula within it.",
10051 /// "examples": [
10052 /// false
10053 /// ],
10054 /// "type": "boolean"
10055 /// },
10056 /// "isVolatile": {
10057 /// "description": "Returns whether or not the given formula can return
10058 /// different results in different contexts (for example, for different
10059 /// users).\n",
10060 /// "examples": [
10061 /// false
10062 /// ],
10063 /// "type": "boolean"
10064 /// },
10065 /// "valid": {
10066 /// "description": "Returns whether or not the given formula is
10067 /// valid.",
10068 /// "examples": [
10069 /// true
10070 /// ],
10071 /// "type": "boolean"
10072 /// }
10073 /// },
10074 /// "additionalProperties": false,
10075 /// "x-schema-name": "FormulaDetail"
10076 ///}
10077 /// ```
10078 /// </details>
10079 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10080 #[serde(deny_unknown_fields)]
10081 pub struct FormulaDetail {
10082 ///Returns whether or not the given formula has a Now() formula within
10083 /// it.
10084 #[serde(rename = "hasNowFormula", default, skip_serializing_if = "::std::option::Option::is_none")]
10085 pub has_now_formula: ::std::option::Option<bool>,
10086 ///Returns whether or not the given formula has a Today() formula
10087 /// within it.
10088 #[serde(rename = "hasTodayFormula", default, skip_serializing_if = "::std::option::Option::is_none")]
10089 pub has_today_formula: ::std::option::Option<bool>,
10090 ///Returns whether or not the given formula has a User() formula within
10091 /// it.
10092 #[serde(rename = "hasUserFormula", default, skip_serializing_if = "::std::option::Option::is_none")]
10093 pub has_user_formula: ::std::option::Option<bool>,
10094 ///Returns whether or not the given formula can return different
10095 /// results in different contexts (for example, for different users).
10096 #[serde(rename = "isVolatile", default, skip_serializing_if = "::std::option::Option::is_none")]
10097 pub is_volatile: ::std::option::Option<bool>,
10098 ///Returns whether or not the given formula is valid.
10099 pub valid: bool,
10100 }
10101
10102 impl ::std::convert::From<&FormulaDetail> for FormulaDetail {
10103 fn from(value: &FormulaDetail) -> Self {
10104 value.clone()
10105 }
10106 }
10107
10108 ///List of formulas.
10109 ///
10110 /// <details><summary>JSON schema</summary>
10111 ///
10112 /// ```json
10113 ///{
10114 /// "description": "List of formulas.",
10115 /// "type": "object",
10116 /// "required": [
10117 /// "items"
10118 /// ],
10119 /// "properties": {
10120 /// "href": {
10121 /// "description": "API link to these results",
10122 /// "examples": [
10123 /// "https://coda.io/apis/v1/docs/AbCDeFGH/formulas?limit=20"
10124 /// ],
10125 /// "type": "string",
10126 /// "format": "url"
10127 /// },
10128 /// "items": {
10129 /// "type": "array",
10130 /// "items": {
10131 /// "$ref": "#/components/schemas/FormulaReference"
10132 /// }
10133 /// },
10134 /// "nextPageLink": {
10135 /// "allOf": [
10136 /// {
10137 /// "$ref": "#/components/schemas/nextPageLink"
10138 /// },
10139 /// {
10140 /// "examples": [
10141 /// "https://coda.io/apis/v1/docs/AbCDeFGH/formulas?pageToken=eyJsaW1pd"
10142 /// ],
10143 /// "type": "string"
10144 /// }
10145 /// ]
10146 /// },
10147 /// "nextPageToken": {
10148 /// "$ref": "#/components/schemas/nextPageToken"
10149 /// }
10150 /// },
10151 /// "additionalProperties": false,
10152 /// "x-schema-name": "FormulaList"
10153 ///}
10154 /// ```
10155 /// </details>
10156 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10157 #[serde(deny_unknown_fields)]
10158 pub struct FormulaList {
10159 ///API link to these results
10160 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10161 pub href: ::std::option::Option<::std::string::String>,
10162 pub items: ::std::vec::Vec<FormulaReference>,
10163 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
10164 pub next_page_link: ::std::option::Option<NextPageLink>,
10165 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
10166 pub next_page_token: ::std::option::Option<NextPageToken>,
10167 }
10168
10169 impl ::std::convert::From<&FormulaList> for FormulaList {
10170 fn from(value: &FormulaList) -> Self {
10171 value.clone()
10172 }
10173 }
10174
10175 ///Reference to a formula.
10176 ///
10177 /// <details><summary>JSON schema</summary>
10178 ///
10179 /// ```json
10180 ///{
10181 /// "description": "Reference to a formula.",
10182 /// "type": "object",
10183 /// "required": [
10184 /// "href",
10185 /// "id",
10186 /// "name",
10187 /// "type"
10188 /// ],
10189 /// "properties": {
10190 /// "href": {
10191 /// "description": "API link to the formula.",
10192 /// "examples": [
10193 /// "https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm"
10194 /// ],
10195 /// "type": "string",
10196 /// "format": "url"
10197 /// },
10198 /// "id": {
10199 /// "description": "ID of the formula.",
10200 /// "examples": [
10201 /// "f-fgHijkLm"
10202 /// ],
10203 /// "type": "string"
10204 /// },
10205 /// "name": {
10206 /// "description": "Name of the formula.",
10207 /// "examples": [
10208 /// "Sum of expenses"
10209 /// ],
10210 /// "type": "string"
10211 /// },
10212 /// "parent": {
10213 /// "$ref": "#/components/schemas/PageReference"
10214 /// },
10215 /// "type": {
10216 /// "description": "The type of this resource.",
10217 /// "type": "string",
10218 /// "enum": [
10219 /// "formula"
10220 /// ],
10221 /// "x-tsType": "Type.Formula"
10222 /// }
10223 /// },
10224 /// "additionalProperties": false,
10225 /// "x-schema-name": "FormulaReference"
10226 ///}
10227 /// ```
10228 /// </details>
10229 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10230 #[serde(deny_unknown_fields)]
10231 pub struct FormulaReference {
10232 ///API link to the formula.
10233 pub href: ::std::string::String,
10234 ///ID of the formula.
10235 pub id: ::std::string::String,
10236 ///Name of the formula.
10237 pub name: ::std::string::String,
10238 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10239 pub parent: ::std::option::Option<PageReference>,
10240 ///The type of this resource.
10241 #[serde(rename = "type")]
10242 pub type_: FormulaReferenceType,
10243 }
10244
10245 impl ::std::convert::From<&FormulaReference> for FormulaReference {
10246 fn from(value: &FormulaReference) -> Self {
10247 value.clone()
10248 }
10249 }
10250
10251 ///The type of this resource.
10252 ///
10253 /// <details><summary>JSON schema</summary>
10254 ///
10255 /// ```json
10256 ///{
10257 /// "description": "The type of this resource.",
10258 /// "type": "string",
10259 /// "enum": [
10260 /// "formula"
10261 /// ],
10262 /// "x-tsType": "Type.Formula"
10263 ///}
10264 /// ```
10265 /// </details>
10266 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10267 pub enum FormulaReferenceType {
10268 #[serde(rename = "formula")]
10269 Formula,
10270 }
10271
10272 impl ::std::convert::From<&Self> for FormulaReferenceType {
10273 fn from(value: &FormulaReferenceType) -> Self {
10274 value.clone()
10275 }
10276 }
10277
10278 impl ::std::fmt::Display for FormulaReferenceType {
10279 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10280 match *self {
10281 Self::Formula => f.write_str("formula"),
10282 }
10283 }
10284 }
10285
10286 impl ::std::str::FromStr for FormulaReferenceType {
10287 type Err = self::error::ConversionError;
10288 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10289 match value {
10290 "formula" => Ok(Self::Formula),
10291 _ => Err("invalid value".into()),
10292 }
10293 }
10294 }
10295
10296 impl ::std::convert::TryFrom<&str> for FormulaReferenceType {
10297 type Error = self::error::ConversionError;
10298 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10299 value.parse()
10300 }
10301 }
10302
10303 impl ::std::convert::TryFrom<&::std::string::String> for FormulaReferenceType {
10304 type Error = self::error::ConversionError;
10305 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10306 value.parse()
10307 }
10308 }
10309
10310 impl ::std::convert::TryFrom<::std::string::String> for FormulaReferenceType {
10311 type Error = self::error::ConversionError;
10312 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10313 value.parse()
10314 }
10315 }
10316
10317 ///The type of this resource.
10318 ///
10319 /// <details><summary>JSON schema</summary>
10320 ///
10321 /// ```json
10322 ///{
10323 /// "description": "The type of this resource.",
10324 /// "type": "string",
10325 /// "enum": [
10326 /// "formula"
10327 /// ],
10328 /// "x-tsType": "Type.Formula"
10329 ///}
10330 /// ```
10331 /// </details>
10332 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10333 pub enum FormulaType {
10334 #[serde(rename = "formula")]
10335 Formula,
10336 }
10337
10338 impl ::std::convert::From<&Self> for FormulaType {
10339 fn from(value: &FormulaType) -> Self {
10340 value.clone()
10341 }
10342 }
10343
10344 impl ::std::fmt::Display for FormulaType {
10345 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10346 match *self {
10347 Self::Formula => f.write_str("formula"),
10348 }
10349 }
10350 }
10351
10352 impl ::std::str::FromStr for FormulaType {
10353 type Err = self::error::ConversionError;
10354 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10355 match value {
10356 "formula" => Ok(Self::Formula),
10357 _ => Err("invalid value".into()),
10358 }
10359 }
10360 }
10361
10362 impl ::std::convert::TryFrom<&str> for FormulaType {
10363 type Error = self::error::ConversionError;
10364 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10365 value.parse()
10366 }
10367 }
10368
10369 impl ::std::convert::TryFrom<&::std::string::String> for FormulaType {
10370 type Error = self::error::ConversionError;
10371 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10372 value.parse()
10373 }
10374 }
10375
10376 impl ::std::convert::TryFrom<::std::string::String> for FormulaType {
10377 type Error = self::error::ConversionError;
10378 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10379 value.parse()
10380 }
10381 }
10382
10383 ///Pricing used when workspaces can subscribe to the Pack for free.
10384 ///
10385 /// <details><summary>JSON schema</summary>
10386 ///
10387 /// ```json
10388 ///{
10389 /// "description": "Pricing used when workspaces can subscribe to the Pack
10390 /// for free.",
10391 /// "type": "object",
10392 /// "required": [
10393 /// "type"
10394 /// ],
10395 /// "properties": {
10396 /// "type": {
10397 /// "type": "string",
10398 /// "enum": [
10399 /// "Free"
10400 /// ],
10401 /// "x-tsType": "PackPlanPricingType.Free"
10402 /// }
10403 /// },
10404 /// "additionalProperties": false,
10405 /// "x-schema-name": "FreePackPlanPricing"
10406 ///}
10407 /// ```
10408 /// </details>
10409 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10410 #[serde(deny_unknown_fields)]
10411 pub struct FreePackPlanPricing {
10412 #[serde(rename = "type")]
10413 pub type_: FreePackPlanPricingType,
10414 }
10415
10416 impl ::std::convert::From<&FreePackPlanPricing> for FreePackPlanPricing {
10417 fn from(value: &FreePackPlanPricing) -> Self {
10418 value.clone()
10419 }
10420 }
10421
10422 ///`FreePackPlanPricingType`
10423 ///
10424 /// <details><summary>JSON schema</summary>
10425 ///
10426 /// ```json
10427 ///{
10428 /// "type": "string",
10429 /// "enum": [
10430 /// "Free"
10431 /// ],
10432 /// "x-tsType": "PackPlanPricingType.Free"
10433 ///}
10434 /// ```
10435 /// </details>
10436 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10437 pub enum FreePackPlanPricingType {
10438 Free,
10439 }
10440
10441 impl ::std::convert::From<&Self> for FreePackPlanPricingType {
10442 fn from(value: &FreePackPlanPricingType) -> Self {
10443 value.clone()
10444 }
10445 }
10446
10447 impl ::std::fmt::Display for FreePackPlanPricingType {
10448 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10449 match *self {
10450 Self::Free => f.write_str("Free"),
10451 }
10452 }
10453 }
10454
10455 impl ::std::str::FromStr for FreePackPlanPricingType {
10456 type Err = self::error::ConversionError;
10457 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10458 match value {
10459 "Free" => Ok(Self::Free),
10460 _ => Err("invalid value".into()),
10461 }
10462 }
10463 }
10464
10465 impl ::std::convert::TryFrom<&str> for FreePackPlanPricingType {
10466 type Error = self::error::ConversionError;
10467 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10468 value.parse()
10469 }
10470 }
10471
10472 impl ::std::convert::TryFrom<&::std::string::String> for FreePackPlanPricingType {
10473 type Error = self::error::ConversionError;
10474 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10475 value.parse()
10476 }
10477 }
10478
10479 impl ::std::convert::TryFrom<::std::string::String> for FreePackPlanPricingType {
10480 type Error = self::error::ConversionError;
10481 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
10482 value.parse()
10483 }
10484 }
10485
10486 ///An HTTP error resulting from an unsuccessful request.
10487 ///
10488 /// <details><summary>JSON schema</summary>
10489 ///
10490 /// ```json
10491 ///{
10492 /// "description": "An HTTP error resulting from an unsuccessful request.",
10493 /// "required": [
10494 /// "message",
10495 /// "statusCode",
10496 /// "statusMessage"
10497 /// ],
10498 /// "properties": {
10499 /// "message": {
10500 /// "description": "Any additional context on the error, or the same as
10501 /// `statusMessage` otherwise.",
10502 /// "examples": [
10503 /// "Unauthorized"
10504 /// ],
10505 /// "type": "string"
10506 /// },
10507 /// "statusCode": {
10508 /// "description": "HTTP status code of the error.",
10509 /// "examples": [
10510 /// 401
10511 /// ],
10512 /// "type": "number"
10513 /// },
10514 /// "statusMessage": {
10515 /// "description": "HTTP status message of the error.",
10516 /// "examples": [
10517 /// "Unauthorized"
10518 /// ],
10519 /// "type": "string"
10520 /// }
10521 /// },
10522 /// "additionalProperties": false
10523 ///}
10524 /// ```
10525 /// </details>
10526 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10527 #[serde(deny_unknown_fields)]
10528 pub struct GetAclSettingsResponse {
10529 ///Any additional context on the error, or the same as `statusMessage`
10530 /// otherwise.
10531 pub message: ::std::string::String,
10532 #[serde(rename = "statusCode")]
10533 pub status_code: f64,
10534 ///HTTP status message of the error.
10535 #[serde(rename = "statusMessage")]
10536 pub status_message: ::std::string::String,
10537 }
10538
10539 impl ::std::convert::From<&GetAclSettingsResponse> for GetAclSettingsResponse {
10540 fn from(value: &GetAclSettingsResponse) -> Self {
10541 value.clone()
10542 }
10543 }
10544
10545 ///An HTTP error resulting from an unsuccessful request.
10546 ///
10547 /// <details><summary>JSON schema</summary>
10548 ///
10549 /// ```json
10550 ///{
10551 /// "description": "An HTTP error resulting from an unsuccessful request.",
10552 /// "required": [
10553 /// "message",
10554 /// "statusCode",
10555 /// "statusMessage"
10556 /// ],
10557 /// "properties": {
10558 /// "codaDetail": {
10559 /// "description": "Detail about why this request was rejected.",
10560 /// "type": "object",
10561 /// "properties": {
10562 /// "validationErrors": {
10563 /// "type": "array",
10564 /// "items": {
10565 /// "$ref": "#/components/schemas/ValidationError"
10566 /// }
10567 /// }
10568 /// },
10569 /// "additionalProperties": false
10570 /// },
10571 /// "message": {
10572 /// "description": "Any additional context on the error, or the same as
10573 /// `statusMessage` otherwise.",
10574 /// "examples": [
10575 /// "Bad Request"
10576 /// ],
10577 /// "type": "string"
10578 /// },
10579 /// "statusCode": {
10580 /// "description": "HTTP status code of the error.",
10581 /// "examples": [
10582 /// 400
10583 /// ],
10584 /// "type": "number"
10585 /// },
10586 /// "statusMessage": {
10587 /// "description": "HTTP status message of the error.",
10588 /// "examples": [
10589 /// "Bad Request"
10590 /// ],
10591 /// "type": "string"
10592 /// }
10593 /// },
10594 /// "additionalProperties": false
10595 ///}
10596 /// ```
10597 /// </details>
10598 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10599 #[serde(deny_unknown_fields)]
10600 pub struct GetAgentPackLogDetailsResponse {
10601 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
10602 pub coda_detail: ::std::option::Option<GetAgentPackLogDetailsResponseCodaDetail>,
10603 ///Any additional context on the error, or the same as `statusMessage`
10604 /// otherwise.
10605 pub message: ::std::string::String,
10606 #[serde(rename = "statusCode")]
10607 pub status_code: f64,
10608 ///HTTP status message of the error.
10609 #[serde(rename = "statusMessage")]
10610 pub status_message: ::std::string::String,
10611 }
10612
10613 impl ::std::convert::From<&GetAgentPackLogDetailsResponse> for GetAgentPackLogDetailsResponse {
10614 fn from(value: &GetAgentPackLogDetailsResponse) -> Self {
10615 value.clone()
10616 }
10617 }
10618
10619 ///Detail about why this request was rejected.
10620 ///
10621 /// <details><summary>JSON schema</summary>
10622 ///
10623 /// ```json
10624 ///{
10625 /// "description": "Detail about why this request was rejected.",
10626 /// "type": "object",
10627 /// "properties": {
10628 /// "validationErrors": {
10629 /// "type": "array",
10630 /// "items": {
10631 /// "$ref": "#/components/schemas/ValidationError"
10632 /// }
10633 /// }
10634 /// },
10635 /// "additionalProperties": false
10636 ///}
10637 /// ```
10638 /// </details>
10639 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10640 #[serde(deny_unknown_fields)]
10641 pub struct GetAgentPackLogDetailsResponseCodaDetail {
10642 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
10643 pub validation_errors: ::std::vec::Vec<ValidationError>,
10644 }
10645
10646 impl ::std::convert::From<&GetAgentPackLogDetailsResponseCodaDetail> for GetAgentPackLogDetailsResponseCodaDetail {
10647 fn from(value: &GetAgentPackLogDetailsResponseCodaDetail) -> Self {
10648 value.clone()
10649 }
10650 }
10651
10652 impl ::std::default::Default for GetAgentPackLogDetailsResponseCodaDetail {
10653 fn default() -> Self {
10654 Self {
10655 validation_errors: Default::default(),
10656 }
10657 }
10658 }
10659
10660 ///An HTTP error resulting from an unsuccessful request.
10661 ///
10662 /// <details><summary>JSON schema</summary>
10663 ///
10664 /// ```json
10665 ///{
10666 /// "description": "An HTTP error resulting from an unsuccessful request.",
10667 /// "required": [
10668 /// "message",
10669 /// "statusCode",
10670 /// "statusMessage"
10671 /// ],
10672 /// "properties": {
10673 /// "message": {
10674 /// "description": "Any additional context on the error, or the same as
10675 /// `statusMessage` otherwise.",
10676 /// "examples": [
10677 /// "Too Many Requests"
10678 /// ],
10679 /// "type": "string"
10680 /// },
10681 /// "statusCode": {
10682 /// "description": "HTTP status code of the error.",
10683 /// "examples": [
10684 /// 429
10685 /// ],
10686 /// "type": "number"
10687 /// },
10688 /// "statusMessage": {
10689 /// "description": "HTTP status message of the error.",
10690 /// "examples": [
10691 /// "Too Many Requests"
10692 /// ],
10693 /// "type": "string"
10694 /// }
10695 /// },
10696 /// "additionalProperties": false
10697 ///}
10698 /// ```
10699 /// </details>
10700 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10701 #[serde(deny_unknown_fields)]
10702 pub struct GetAnalyticsLastUpdatedResponse {
10703 ///Any additional context on the error, or the same as `statusMessage`
10704 /// otherwise.
10705 pub message: ::std::string::String,
10706 #[serde(rename = "statusCode")]
10707 pub status_code: f64,
10708 ///HTTP status message of the error.
10709 #[serde(rename = "statusMessage")]
10710 pub status_message: ::std::string::String,
10711 }
10712
10713 impl ::std::convert::From<&GetAnalyticsLastUpdatedResponse> for GetAnalyticsLastUpdatedResponse {
10714 fn from(value: &GetAnalyticsLastUpdatedResponse) -> Self {
10715 value.clone()
10716 }
10717 }
10718
10719 ///An HTTP error resulting from an unsuccessful request.
10720 ///
10721 /// <details><summary>JSON schema</summary>
10722 ///
10723 /// ```json
10724 ///{
10725 /// "description": "An HTTP error resulting from an unsuccessful request.",
10726 /// "required": [
10727 /// "message",
10728 /// "statusCode",
10729 /// "statusMessage"
10730 /// ],
10731 /// "properties": {
10732 /// "message": {
10733 /// "description": "Any additional context on the error, or the same as
10734 /// `statusMessage` otherwise.",
10735 /// "examples": [
10736 /// "Unauthorized"
10737 /// ],
10738 /// "type": "string"
10739 /// },
10740 /// "statusCode": {
10741 /// "description": "HTTP status code of the error.",
10742 /// "examples": [
10743 /// 401
10744 /// ],
10745 /// "type": "number"
10746 /// },
10747 /// "statusMessage": {
10748 /// "description": "HTTP status message of the error.",
10749 /// "examples": [
10750 /// "Unauthorized"
10751 /// ],
10752 /// "type": "string"
10753 /// }
10754 /// },
10755 /// "additionalProperties": false
10756 ///}
10757 /// ```
10758 /// </details>
10759 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10760 #[serde(deny_unknown_fields)]
10761 pub struct GetColumnResponse {
10762 ///Any additional context on the error, or the same as `statusMessage`
10763 /// otherwise.
10764 pub message: ::std::string::String,
10765 #[serde(rename = "statusCode")]
10766 pub status_code: f64,
10767 ///HTTP status message of the error.
10768 #[serde(rename = "statusMessage")]
10769 pub status_message: ::std::string::String,
10770 }
10771
10772 impl ::std::convert::From<&GetColumnResponse> for GetColumnResponse {
10773 fn from(value: &GetColumnResponse) -> Self {
10774 value.clone()
10775 }
10776 }
10777
10778 ///An HTTP error resulting from an unsuccessful request.
10779 ///
10780 /// <details><summary>JSON schema</summary>
10781 ///
10782 /// ```json
10783 ///{
10784 /// "description": "An HTTP error resulting from an unsuccessful request.",
10785 /// "required": [
10786 /// "message",
10787 /// "statusCode",
10788 /// "statusMessage"
10789 /// ],
10790 /// "properties": {
10791 /// "message": {
10792 /// "description": "Any additional context on the error, or the same as
10793 /// `statusMessage` otherwise.",
10794 /// "examples": [
10795 /// "Unauthorized"
10796 /// ],
10797 /// "type": "string"
10798 /// },
10799 /// "statusCode": {
10800 /// "description": "HTTP status code of the error.",
10801 /// "examples": [
10802 /// 401
10803 /// ],
10804 /// "type": "number"
10805 /// },
10806 /// "statusMessage": {
10807 /// "description": "HTTP status message of the error.",
10808 /// "examples": [
10809 /// "Unauthorized"
10810 /// ],
10811 /// "type": "string"
10812 /// }
10813 /// },
10814 /// "additionalProperties": false
10815 ///}
10816 /// ```
10817 /// </details>
10818 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10819 #[serde(deny_unknown_fields)]
10820 pub struct GetControlResponse {
10821 ///Any additional context on the error, or the same as `statusMessage`
10822 /// otherwise.
10823 pub message: ::std::string::String,
10824 #[serde(rename = "statusCode")]
10825 pub status_code: f64,
10826 ///HTTP status message of the error.
10827 #[serde(rename = "statusMessage")]
10828 pub status_message: ::std::string::String,
10829 }
10830
10831 impl ::std::convert::From<&GetControlResponse> for GetControlResponse {
10832 fn from(value: &GetControlResponse) -> Self {
10833 value.clone()
10834 }
10835 }
10836
10837 ///An HTTP error resulting from an unsuccessful request.
10838 ///
10839 /// <details><summary>JSON schema</summary>
10840 ///
10841 /// ```json
10842 ///{
10843 /// "description": "An HTTP error resulting from an unsuccessful request.",
10844 /// "required": [
10845 /// "message",
10846 /// "statusCode",
10847 /// "statusMessage"
10848 /// ],
10849 /// "properties": {
10850 /// "message": {
10851 /// "description": "Any additional context on the error, or the same as
10852 /// `statusMessage` otherwise.",
10853 /// "examples": [
10854 /// "Unauthorized"
10855 /// ],
10856 /// "type": "string"
10857 /// },
10858 /// "statusCode": {
10859 /// "description": "HTTP status code of the error.",
10860 /// "examples": [
10861 /// 401
10862 /// ],
10863 /// "type": "number"
10864 /// },
10865 /// "statusMessage": {
10866 /// "description": "HTTP status message of the error.",
10867 /// "examples": [
10868 /// "Unauthorized"
10869 /// ],
10870 /// "type": "string"
10871 /// }
10872 /// },
10873 /// "additionalProperties": false
10874 ///}
10875 /// ```
10876 /// </details>
10877 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10878 #[serde(deny_unknown_fields)]
10879 pub struct GetCustomDocDomainProviderResponse {
10880 ///Any additional context on the error, or the same as `statusMessage`
10881 /// otherwise.
10882 pub message: ::std::string::String,
10883 #[serde(rename = "statusCode")]
10884 pub status_code: f64,
10885 ///HTTP status message of the error.
10886 #[serde(rename = "statusMessage")]
10887 pub status_message: ::std::string::String,
10888 }
10889
10890 impl ::std::convert::From<&GetCustomDocDomainProviderResponse> for GetCustomDocDomainProviderResponse {
10891 fn from(value: &GetCustomDocDomainProviderResponse) -> Self {
10892 value.clone()
10893 }
10894 }
10895
10896 ///An HTTP error resulting from an unsuccessful request.
10897 ///
10898 /// <details><summary>JSON schema</summary>
10899 ///
10900 /// ```json
10901 ///{
10902 /// "description": "An HTTP error resulting from an unsuccessful request.",
10903 /// "required": [
10904 /// "message",
10905 /// "statusCode",
10906 /// "statusMessage"
10907 /// ],
10908 /// "properties": {
10909 /// "message": {
10910 /// "description": "Any additional context on the error, or the same as
10911 /// `statusMessage` otherwise.",
10912 /// "examples": [
10913 /// "Unauthorized"
10914 /// ],
10915 /// "type": "string"
10916 /// },
10917 /// "statusCode": {
10918 /// "description": "HTTP status code of the error.",
10919 /// "examples": [
10920 /// 401
10921 /// ],
10922 /// "type": "number"
10923 /// },
10924 /// "statusMessage": {
10925 /// "description": "HTTP status message of the error.",
10926 /// "examples": [
10927 /// "Unauthorized"
10928 /// ],
10929 /// "type": "string"
10930 /// }
10931 /// },
10932 /// "additionalProperties": false
10933 ///}
10934 /// ```
10935 /// </details>
10936 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10937 #[serde(deny_unknown_fields)]
10938 pub struct GetDocResponse {
10939 ///Any additional context on the error, or the same as `statusMessage`
10940 /// otherwise.
10941 pub message: ::std::string::String,
10942 #[serde(rename = "statusCode")]
10943 pub status_code: f64,
10944 ///HTTP status message of the error.
10945 #[serde(rename = "statusMessage")]
10946 pub status_message: ::std::string::String,
10947 }
10948
10949 impl ::std::convert::From<&GetDocResponse> for GetDocResponse {
10950 fn from(value: &GetDocResponse) -> Self {
10951 value.clone()
10952 }
10953 }
10954
10955 ///An HTTP error resulting from an unsuccessful request.
10956 ///
10957 /// <details><summary>JSON schema</summary>
10958 ///
10959 /// ```json
10960 ///{
10961 /// "description": "An HTTP error resulting from an unsuccessful request.",
10962 /// "required": [
10963 /// "message",
10964 /// "statusCode",
10965 /// "statusMessage"
10966 /// ],
10967 /// "properties": {
10968 /// "message": {
10969 /// "description": "Any additional context on the error, or the same as
10970 /// `statusMessage` otherwise.",
10971 /// "examples": [
10972 /// "Bad Request"
10973 /// ],
10974 /// "type": "string"
10975 /// },
10976 /// "statusCode": {
10977 /// "description": "HTTP status code of the error.",
10978 /// "examples": [
10979 /// 400
10980 /// ],
10981 /// "type": "number"
10982 /// },
10983 /// "statusMessage": {
10984 /// "description": "HTTP status message of the error.",
10985 /// "examples": [
10986 /// "Bad Request"
10987 /// ],
10988 /// "type": "string"
10989 /// }
10990 /// },
10991 /// "additionalProperties": false
10992 ///}
10993 /// ```
10994 /// </details>
10995 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10996 #[serde(deny_unknown_fields)]
10997 pub struct GetFolderResponse {
10998 ///Any additional context on the error, or the same as `statusMessage`
10999 /// otherwise.
11000 pub message: ::std::string::String,
11001 #[serde(rename = "statusCode")]
11002 pub status_code: f64,
11003 ///HTTP status message of the error.
11004 #[serde(rename = "statusMessage")]
11005 pub status_message: ::std::string::String,
11006 }
11007
11008 impl ::std::convert::From<&GetFolderResponse> for GetFolderResponse {
11009 fn from(value: &GetFolderResponse) -> Self {
11010 value.clone()
11011 }
11012 }
11013
11014 ///An HTTP error resulting from an unsuccessful request.
11015 ///
11016 /// <details><summary>JSON schema</summary>
11017 ///
11018 /// ```json
11019 ///{
11020 /// "description": "An HTTP error resulting from an unsuccessful request.",
11021 /// "required": [
11022 /// "message",
11023 /// "statusCode",
11024 /// "statusMessage"
11025 /// ],
11026 /// "properties": {
11027 /// "message": {
11028 /// "description": "Any additional context on the error, or the same as
11029 /// `statusMessage` otherwise.",
11030 /// "examples": [
11031 /// "Unauthorized"
11032 /// ],
11033 /// "type": "string"
11034 /// },
11035 /// "statusCode": {
11036 /// "description": "HTTP status code of the error.",
11037 /// "examples": [
11038 /// 401
11039 /// ],
11040 /// "type": "number"
11041 /// },
11042 /// "statusMessage": {
11043 /// "description": "HTTP status message of the error.",
11044 /// "examples": [
11045 /// "Unauthorized"
11046 /// ],
11047 /// "type": "string"
11048 /// }
11049 /// },
11050 /// "additionalProperties": false
11051 ///}
11052 /// ```
11053 /// </details>
11054 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11055 #[serde(deny_unknown_fields)]
11056 pub struct GetFormulaResponse {
11057 ///Any additional context on the error, or the same as `statusMessage`
11058 /// otherwise.
11059 pub message: ::std::string::String,
11060 #[serde(rename = "statusCode")]
11061 pub status_code: f64,
11062 ///HTTP status message of the error.
11063 #[serde(rename = "statusMessage")]
11064 pub status_message: ::std::string::String,
11065 }
11066
11067 impl ::std::convert::From<&GetFormulaResponse> for GetFormulaResponse {
11068 fn from(value: &GetFormulaResponse) -> Self {
11069 value.clone()
11070 }
11071 }
11072
11073 ///An HTTP error resulting from an unsuccessful request.
11074 ///
11075 /// <details><summary>JSON schema</summary>
11076 ///
11077 /// ```json
11078 ///{
11079 /// "description": "An HTTP error resulting from an unsuccessful request.",
11080 /// "required": [
11081 /// "message",
11082 /// "statusCode",
11083 /// "statusMessage"
11084 /// ],
11085 /// "properties": {
11086 /// "message": {
11087 /// "description": "Any additional context on the error, or the same as
11088 /// `statusMessage` otherwise.",
11089 /// "examples": [
11090 /// "Unauthorized"
11091 /// ],
11092 /// "type": "string"
11093 /// },
11094 /// "statusCode": {
11095 /// "description": "HTTP status code of the error.",
11096 /// "examples": [
11097 /// 401
11098 /// ],
11099 /// "type": "number"
11100 /// },
11101 /// "statusMessage": {
11102 /// "description": "HTTP status message of the error.",
11103 /// "examples": [
11104 /// "Unauthorized"
11105 /// ],
11106 /// "type": "string"
11107 /// }
11108 /// },
11109 /// "additionalProperties": false
11110 ///}
11111 /// ```
11112 /// </details>
11113 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11114 #[serde(deny_unknown_fields)]
11115 pub struct GetMutationStatusResponse {
11116 ///Any additional context on the error, or the same as `statusMessage`
11117 /// otherwise.
11118 pub message: ::std::string::String,
11119 #[serde(rename = "statusCode")]
11120 pub status_code: f64,
11121 ///HTTP status message of the error.
11122 #[serde(rename = "statusMessage")]
11123 pub status_message: ::std::string::String,
11124 }
11125
11126 impl ::std::convert::From<&GetMutationStatusResponse> for GetMutationStatusResponse {
11127 fn from(value: &GetMutationStatusResponse) -> Self {
11128 value.clone()
11129 }
11130 }
11131
11132 ///Payload for getting the next version of a Pack.
11133 ///
11134 /// <details><summary>JSON schema</summary>
11135 ///
11136 /// ```json
11137 ///{
11138 /// "description": "Payload for getting the next version of a Pack.",
11139 /// "type": "object",
11140 /// "required": [
11141 /// "proposedMetadata"
11142 /// ],
11143 /// "properties": {
11144 /// "proposedMetadata": {
11145 /// "description": "The metadata for the next version of the Pack.",
11146 /// "examples": [
11147 /// "{\"formulas\": [{\"description\": \"my formula\", \"name\":
11148 /// \"foo\", \"parameters\": [], \"resultType\": 0}]}"
11149 /// ],
11150 /// "type": "string"
11151 /// },
11152 /// "sdkVersion": {
11153 /// "description": "The SDK version the metadata was built on.",
11154 /// "examples": [
11155 /// "1.0.0"
11156 /// ],
11157 /// "type": "string"
11158 /// }
11159 /// },
11160 /// "additionalProperties": false,
11161 /// "x-schema-name": "GetNextPackVersionRequest"
11162 ///}
11163 /// ```
11164 /// </details>
11165 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11166 #[serde(deny_unknown_fields)]
11167 pub struct GetNextPackVersionRequest {
11168 ///The metadata for the next version of the Pack.
11169 #[serde(rename = "proposedMetadata")]
11170 pub proposed_metadata: ::std::string::String,
11171 ///The SDK version the metadata was built on.
11172 #[serde(rename = "sdkVersion", default, skip_serializing_if = "::std::option::Option::is_none")]
11173 pub sdk_version: ::std::option::Option<::std::string::String>,
11174 }
11175
11176 impl ::std::convert::From<&GetNextPackVersionRequest> for GetNextPackVersionRequest {
11177 fn from(value: &GetNextPackVersionRequest) -> Self {
11178 value.clone()
11179 }
11180 }
11181
11182 ///An HTTP error resulting from an unsuccessful request.
11183 ///
11184 /// <details><summary>JSON schema</summary>
11185 ///
11186 /// ```json
11187 ///{
11188 /// "description": "An HTTP error resulting from an unsuccessful request.",
11189 /// "required": [
11190 /// "message",
11191 /// "statusCode",
11192 /// "statusMessage"
11193 /// ],
11194 /// "properties": {
11195 /// "codaDetail": {
11196 /// "description": "Detail about why this request was rejected.",
11197 /// "type": "object",
11198 /// "properties": {
11199 /// "validationErrors": {
11200 /// "type": "array",
11201 /// "items": {
11202 /// "$ref": "#/components/schemas/ValidationError"
11203 /// }
11204 /// }
11205 /// },
11206 /// "additionalProperties": false
11207 /// },
11208 /// "message": {
11209 /// "description": "Any additional context on the error, or the same as
11210 /// `statusMessage` otherwise.",
11211 /// "examples": [
11212 /// "Bad Request"
11213 /// ],
11214 /// "type": "string"
11215 /// },
11216 /// "statusCode": {
11217 /// "description": "HTTP status code of the error.",
11218 /// "examples": [
11219 /// 400
11220 /// ],
11221 /// "type": "number"
11222 /// },
11223 /// "statusMessage": {
11224 /// "description": "HTTP status message of the error.",
11225 /// "examples": [
11226 /// "Bad Request"
11227 /// ],
11228 /// "type": "string"
11229 /// }
11230 /// },
11231 /// "additionalProperties": false
11232 ///}
11233 /// ```
11234 /// </details>
11235 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11236 #[serde(deny_unknown_fields)]
11237 pub struct GetNextPackVersionResponse {
11238 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11239 pub coda_detail: ::std::option::Option<GetNextPackVersionResponseCodaDetail>,
11240 ///Any additional context on the error, or the same as `statusMessage`
11241 /// otherwise.
11242 pub message: ::std::string::String,
11243 #[serde(rename = "statusCode")]
11244 pub status_code: f64,
11245 ///HTTP status message of the error.
11246 #[serde(rename = "statusMessage")]
11247 pub status_message: ::std::string::String,
11248 }
11249
11250 impl ::std::convert::From<&GetNextPackVersionResponse> for GetNextPackVersionResponse {
11251 fn from(value: &GetNextPackVersionResponse) -> Self {
11252 value.clone()
11253 }
11254 }
11255
11256 ///Detail about why this request was rejected.
11257 ///
11258 /// <details><summary>JSON schema</summary>
11259 ///
11260 /// ```json
11261 ///{
11262 /// "description": "Detail about why this request was rejected.",
11263 /// "type": "object",
11264 /// "properties": {
11265 /// "validationErrors": {
11266 /// "type": "array",
11267 /// "items": {
11268 /// "$ref": "#/components/schemas/ValidationError"
11269 /// }
11270 /// }
11271 /// },
11272 /// "additionalProperties": false
11273 ///}
11274 /// ```
11275 /// </details>
11276 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11277 #[serde(deny_unknown_fields)]
11278 pub struct GetNextPackVersionResponseCodaDetail {
11279 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11280 pub validation_errors: ::std::vec::Vec<ValidationError>,
11281 }
11282
11283 impl ::std::convert::From<&GetNextPackVersionResponseCodaDetail> for GetNextPackVersionResponseCodaDetail {
11284 fn from(value: &GetNextPackVersionResponseCodaDetail) -> Self {
11285 value.clone()
11286 }
11287 }
11288
11289 impl ::std::default::Default for GetNextPackVersionResponseCodaDetail {
11290 fn default() -> Self {
11291 Self {
11292 validation_errors: Default::default(),
11293 }
11294 }
11295 }
11296
11297 ///JSON schema response.
11298 ///
11299 /// <details><summary>JSON schema</summary>
11300 ///
11301 /// ```json
11302 ///{
11303 /// "description": "JSON schema response.",
11304 /// "type": "object",
11305 /// "additionalProperties": true,
11306 /// "x-schema-name": "GetPackConfigurationJsonSchemaResponse"
11307 ///}
11308 /// ```
11309 /// </details>
11310 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11311 #[serde(transparent)]
11312 pub struct GetPackConfigurationJsonSchemaResponse(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
11313 impl ::std::ops::Deref for GetPackConfigurationJsonSchemaResponse {
11314 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
11315 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
11316 &self.0
11317 }
11318 }
11319
11320 impl ::std::convert::From<GetPackConfigurationJsonSchemaResponse> for ::serde_json::Map<::std::string::String, ::serde_json::Value> {
11321 fn from(value: GetPackConfigurationJsonSchemaResponse) -> Self {
11322 value.0
11323 }
11324 }
11325
11326 impl ::std::convert::From<&GetPackConfigurationJsonSchemaResponse> for GetPackConfigurationJsonSchemaResponse {
11327 fn from(value: &GetPackConfigurationJsonSchemaResponse) -> Self {
11328 value.clone()
11329 }
11330 }
11331
11332 impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>> for GetPackConfigurationJsonSchemaResponse {
11333 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
11334 Self(value)
11335 }
11336 }
11337
11338 ///An HTTP error resulting from an unsuccessful request.
11339 ///
11340 /// <details><summary>JSON schema</summary>
11341 ///
11342 /// ```json
11343 ///{
11344 /// "description": "An HTTP error resulting from an unsuccessful request.",
11345 /// "required": [
11346 /// "message",
11347 /// "statusCode",
11348 /// "statusMessage"
11349 /// ],
11350 /// "properties": {
11351 /// "codaDetail": {
11352 /// "description": "Detail about why this request was rejected.",
11353 /// "type": "object",
11354 /// "properties": {
11355 /// "validationErrors": {
11356 /// "type": "array",
11357 /// "items": {
11358 /// "$ref": "#/components/schemas/ValidationError"
11359 /// }
11360 /// }
11361 /// },
11362 /// "additionalProperties": false
11363 /// },
11364 /// "message": {
11365 /// "description": "Any additional context on the error, or the same as
11366 /// `statusMessage` otherwise.",
11367 /// "examples": [
11368 /// "Bad Request"
11369 /// ],
11370 /// "type": "string"
11371 /// },
11372 /// "statusCode": {
11373 /// "description": "HTTP status code of the error.",
11374 /// "examples": [
11375 /// 400
11376 /// ],
11377 /// "type": "number"
11378 /// },
11379 /// "statusMessage": {
11380 /// "description": "HTTP status message of the error.",
11381 /// "examples": [
11382 /// "Bad Request"
11383 /// ],
11384 /// "type": "string"
11385 /// }
11386 /// },
11387 /// "additionalProperties": false
11388 ///}
11389 /// ```
11390 /// </details>
11391 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11392 #[serde(deny_unknown_fields)]
11393 pub struct GetPackConfigurationSchemaResponse {
11394 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11395 pub coda_detail: ::std::option::Option<GetPackConfigurationSchemaResponseCodaDetail>,
11396 ///Any additional context on the error, or the same as `statusMessage`
11397 /// otherwise.
11398 pub message: ::std::string::String,
11399 #[serde(rename = "statusCode")]
11400 pub status_code: f64,
11401 ///HTTP status message of the error.
11402 #[serde(rename = "statusMessage")]
11403 pub status_message: ::std::string::String,
11404 }
11405
11406 impl ::std::convert::From<&GetPackConfigurationSchemaResponse> for GetPackConfigurationSchemaResponse {
11407 fn from(value: &GetPackConfigurationSchemaResponse) -> Self {
11408 value.clone()
11409 }
11410 }
11411
11412 ///Detail about why this request was rejected.
11413 ///
11414 /// <details><summary>JSON schema</summary>
11415 ///
11416 /// ```json
11417 ///{
11418 /// "description": "Detail about why this request was rejected.",
11419 /// "type": "object",
11420 /// "properties": {
11421 /// "validationErrors": {
11422 /// "type": "array",
11423 /// "items": {
11424 /// "$ref": "#/components/schemas/ValidationError"
11425 /// }
11426 /// }
11427 /// },
11428 /// "additionalProperties": false
11429 ///}
11430 /// ```
11431 /// </details>
11432 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11433 #[serde(deny_unknown_fields)]
11434 pub struct GetPackConfigurationSchemaResponseCodaDetail {
11435 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11436 pub validation_errors: ::std::vec::Vec<ValidationError>,
11437 }
11438
11439 impl ::std::convert::From<&GetPackConfigurationSchemaResponseCodaDetail> for GetPackConfigurationSchemaResponseCodaDetail {
11440 fn from(value: &GetPackConfigurationSchemaResponseCodaDetail) -> Self {
11441 value.clone()
11442 }
11443 }
11444
11445 impl ::std::default::Default for GetPackConfigurationSchemaResponseCodaDetail {
11446 fn default() -> Self {
11447 Self {
11448 validation_errors: Default::default(),
11449 }
11450 }
11451 }
11452
11453 ///An HTTP error resulting from an unsuccessful request.
11454 ///
11455 /// <details><summary>JSON schema</summary>
11456 ///
11457 /// ```json
11458 ///{
11459 /// "description": "An HTTP error resulting from an unsuccessful request.",
11460 /// "required": [
11461 /// "message",
11462 /// "statusCode",
11463 /// "statusMessage"
11464 /// ],
11465 /// "properties": {
11466 /// "codaDetail": {
11467 /// "description": "Detail about why this request was rejected.",
11468 /// "type": "object",
11469 /// "properties": {
11470 /// "validationErrors": {
11471 /// "type": "array",
11472 /// "items": {
11473 /// "$ref": "#/components/schemas/ValidationError"
11474 /// }
11475 /// }
11476 /// },
11477 /// "additionalProperties": false
11478 /// },
11479 /// "message": {
11480 /// "description": "Any additional context on the error, or the same as
11481 /// `statusMessage` otherwise.",
11482 /// "examples": [
11483 /// "Bad Request"
11484 /// ],
11485 /// "type": "string"
11486 /// },
11487 /// "statusCode": {
11488 /// "description": "HTTP status code of the error.",
11489 /// "examples": [
11490 /// 400
11491 /// ],
11492 /// "type": "number"
11493 /// },
11494 /// "statusMessage": {
11495 /// "description": "HTTP status message of the error.",
11496 /// "examples": [
11497 /// "Bad Request"
11498 /// ],
11499 /// "type": "string"
11500 /// }
11501 /// },
11502 /// "additionalProperties": false
11503 ///}
11504 /// ```
11505 /// </details>
11506 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11507 #[serde(deny_unknown_fields)]
11508 pub struct GetPackListingResponse {
11509 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11510 pub coda_detail: ::std::option::Option<GetPackListingResponseCodaDetail>,
11511 ///Any additional context on the error, or the same as `statusMessage`
11512 /// otherwise.
11513 pub message: ::std::string::String,
11514 #[serde(rename = "statusCode")]
11515 pub status_code: f64,
11516 ///HTTP status message of the error.
11517 #[serde(rename = "statusMessage")]
11518 pub status_message: ::std::string::String,
11519 }
11520
11521 impl ::std::convert::From<&GetPackListingResponse> for GetPackListingResponse {
11522 fn from(value: &GetPackListingResponse) -> Self {
11523 value.clone()
11524 }
11525 }
11526
11527 ///Detail about why this request was rejected.
11528 ///
11529 /// <details><summary>JSON schema</summary>
11530 ///
11531 /// ```json
11532 ///{
11533 /// "description": "Detail about why this request was rejected.",
11534 /// "type": "object",
11535 /// "properties": {
11536 /// "validationErrors": {
11537 /// "type": "array",
11538 /// "items": {
11539 /// "$ref": "#/components/schemas/ValidationError"
11540 /// }
11541 /// }
11542 /// },
11543 /// "additionalProperties": false
11544 ///}
11545 /// ```
11546 /// </details>
11547 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11548 #[serde(deny_unknown_fields)]
11549 pub struct GetPackListingResponseCodaDetail {
11550 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11551 pub validation_errors: ::std::vec::Vec<ValidationError>,
11552 }
11553
11554 impl ::std::convert::From<&GetPackListingResponseCodaDetail> for GetPackListingResponseCodaDetail {
11555 fn from(value: &GetPackListingResponseCodaDetail) -> Self {
11556 value.clone()
11557 }
11558 }
11559
11560 impl ::std::default::Default for GetPackListingResponseCodaDetail {
11561 fn default() -> Self {
11562 Self {
11563 validation_errors: Default::default(),
11564 }
11565 }
11566 }
11567
11568 ///An HTTP error resulting from an unsuccessful request.
11569 ///
11570 /// <details><summary>JSON schema</summary>
11571 ///
11572 /// ```json
11573 ///{
11574 /// "description": "An HTTP error resulting from an unsuccessful request.",
11575 /// "required": [
11576 /// "message",
11577 /// "statusCode",
11578 /// "statusMessage"
11579 /// ],
11580 /// "properties": {
11581 /// "codaDetail": {
11582 /// "description": "Detail about why this request was rejected.",
11583 /// "type": "object",
11584 /// "properties": {
11585 /// "validationErrors": {
11586 /// "type": "array",
11587 /// "items": {
11588 /// "$ref": "#/components/schemas/ValidationError"
11589 /// }
11590 /// }
11591 /// },
11592 /// "additionalProperties": false
11593 /// },
11594 /// "message": {
11595 /// "description": "Any additional context on the error, or the same as
11596 /// `statusMessage` otherwise.",
11597 /// "examples": [
11598 /// "Bad Request"
11599 /// ],
11600 /// "type": "string"
11601 /// },
11602 /// "statusCode": {
11603 /// "description": "HTTP status code of the error.",
11604 /// "examples": [
11605 /// 400
11606 /// ],
11607 /// "type": "number"
11608 /// },
11609 /// "statusMessage": {
11610 /// "description": "HTTP status message of the error.",
11611 /// "examples": [
11612 /// "Bad Request"
11613 /// ],
11614 /// "type": "string"
11615 /// }
11616 /// },
11617 /// "additionalProperties": false
11618 ///}
11619 /// ```
11620 /// </details>
11621 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11622 #[serde(deny_unknown_fields)]
11623 pub struct GetPackLogDetailsResponse {
11624 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11625 pub coda_detail: ::std::option::Option<GetPackLogDetailsResponseCodaDetail>,
11626 ///Any additional context on the error, or the same as `statusMessage`
11627 /// otherwise.
11628 pub message: ::std::string::String,
11629 #[serde(rename = "statusCode")]
11630 pub status_code: f64,
11631 ///HTTP status message of the error.
11632 #[serde(rename = "statusMessage")]
11633 pub status_message: ::std::string::String,
11634 }
11635
11636 impl ::std::convert::From<&GetPackLogDetailsResponse> for GetPackLogDetailsResponse {
11637 fn from(value: &GetPackLogDetailsResponse) -> Self {
11638 value.clone()
11639 }
11640 }
11641
11642 ///Detail about why this request was rejected.
11643 ///
11644 /// <details><summary>JSON schema</summary>
11645 ///
11646 /// ```json
11647 ///{
11648 /// "description": "Detail about why this request was rejected.",
11649 /// "type": "object",
11650 /// "properties": {
11651 /// "validationErrors": {
11652 /// "type": "array",
11653 /// "items": {
11654 /// "$ref": "#/components/schemas/ValidationError"
11655 /// }
11656 /// }
11657 /// },
11658 /// "additionalProperties": false
11659 ///}
11660 /// ```
11661 /// </details>
11662 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11663 #[serde(deny_unknown_fields)]
11664 pub struct GetPackLogDetailsResponseCodaDetail {
11665 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11666 pub validation_errors: ::std::vec::Vec<ValidationError>,
11667 }
11668
11669 impl ::std::convert::From<&GetPackLogDetailsResponseCodaDetail> for GetPackLogDetailsResponseCodaDetail {
11670 fn from(value: &GetPackLogDetailsResponseCodaDetail) -> Self {
11671 value.clone()
11672 }
11673 }
11674
11675 impl ::std::default::Default for GetPackLogDetailsResponseCodaDetail {
11676 fn default() -> Self {
11677 Self {
11678 validation_errors: Default::default(),
11679 }
11680 }
11681 }
11682
11683 ///An HTTP error resulting from an unsuccessful request.
11684 ///
11685 /// <details><summary>JSON schema</summary>
11686 ///
11687 /// ```json
11688 ///{
11689 /// "description": "An HTTP error resulting from an unsuccessful request.",
11690 /// "required": [
11691 /// "message",
11692 /// "statusCode",
11693 /// "statusMessage"
11694 /// ],
11695 /// "properties": {
11696 /// "codaDetail": {
11697 /// "description": "Detail about why this request was rejected.",
11698 /// "type": "object",
11699 /// "properties": {
11700 /// "validationErrors": {
11701 /// "type": "array",
11702 /// "items": {
11703 /// "$ref": "#/components/schemas/ValidationError"
11704 /// }
11705 /// }
11706 /// },
11707 /// "additionalProperties": false
11708 /// },
11709 /// "message": {
11710 /// "description": "Any additional context on the error, or the same as
11711 /// `statusMessage` otherwise.",
11712 /// "examples": [
11713 /// "Bad Request"
11714 /// ],
11715 /// "type": "string"
11716 /// },
11717 /// "statusCode": {
11718 /// "description": "HTTP status code of the error.",
11719 /// "examples": [
11720 /// 400
11721 /// ],
11722 /// "type": "number"
11723 /// },
11724 /// "statusMessage": {
11725 /// "description": "HTTP status message of the error.",
11726 /// "examples": [
11727 /// "Bad Request"
11728 /// ],
11729 /// "type": "string"
11730 /// }
11731 /// },
11732 /// "additionalProperties": false
11733 ///}
11734 /// ```
11735 /// </details>
11736 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11737 #[serde(deny_unknown_fields)]
11738 pub struct GetPackOauthConfigResponse {
11739 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11740 pub coda_detail: ::std::option::Option<GetPackOauthConfigResponseCodaDetail>,
11741 ///Any additional context on the error, or the same as `statusMessage`
11742 /// otherwise.
11743 pub message: ::std::string::String,
11744 #[serde(rename = "statusCode")]
11745 pub status_code: f64,
11746 ///HTTP status message of the error.
11747 #[serde(rename = "statusMessage")]
11748 pub status_message: ::std::string::String,
11749 }
11750
11751 impl ::std::convert::From<&GetPackOauthConfigResponse> for GetPackOauthConfigResponse {
11752 fn from(value: &GetPackOauthConfigResponse) -> Self {
11753 value.clone()
11754 }
11755 }
11756
11757 ///Detail about why this request was rejected.
11758 ///
11759 /// <details><summary>JSON schema</summary>
11760 ///
11761 /// ```json
11762 ///{
11763 /// "description": "Detail about why this request was rejected.",
11764 /// "type": "object",
11765 /// "properties": {
11766 /// "validationErrors": {
11767 /// "type": "array",
11768 /// "items": {
11769 /// "$ref": "#/components/schemas/ValidationError"
11770 /// }
11771 /// }
11772 /// },
11773 /// "additionalProperties": false
11774 ///}
11775 /// ```
11776 /// </details>
11777 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11778 #[serde(deny_unknown_fields)]
11779 pub struct GetPackOauthConfigResponseCodaDetail {
11780 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11781 pub validation_errors: ::std::vec::Vec<ValidationError>,
11782 }
11783
11784 impl ::std::convert::From<&GetPackOauthConfigResponseCodaDetail> for GetPackOauthConfigResponseCodaDetail {
11785 fn from(value: &GetPackOauthConfigResponseCodaDetail) -> Self {
11786 value.clone()
11787 }
11788 }
11789
11790 impl ::std::default::Default for GetPackOauthConfigResponseCodaDetail {
11791 fn default() -> Self {
11792 Self {
11793 validation_errors: Default::default(),
11794 }
11795 }
11796 }
11797
11798 ///An HTTP error resulting from an unsuccessful request.
11799 ///
11800 /// <details><summary>JSON schema</summary>
11801 ///
11802 /// ```json
11803 ///{
11804 /// "description": "An HTTP error resulting from an unsuccessful request.",
11805 /// "required": [
11806 /// "message",
11807 /// "statusCode",
11808 /// "statusMessage"
11809 /// ],
11810 /// "properties": {
11811 /// "codaDetail": {
11812 /// "description": "Detail about why this request was rejected.",
11813 /// "type": "object",
11814 /// "properties": {
11815 /// "validationErrors": {
11816 /// "type": "array",
11817 /// "items": {
11818 /// "$ref": "#/components/schemas/ValidationError"
11819 /// }
11820 /// }
11821 /// },
11822 /// "additionalProperties": false
11823 /// },
11824 /// "message": {
11825 /// "description": "Any additional context on the error, or the same as
11826 /// `statusMessage` otherwise.",
11827 /// "examples": [
11828 /// "Bad Request"
11829 /// ],
11830 /// "type": "string"
11831 /// },
11832 /// "statusCode": {
11833 /// "description": "HTTP status code of the error.",
11834 /// "examples": [
11835 /// 400
11836 /// ],
11837 /// "type": "number"
11838 /// },
11839 /// "statusMessage": {
11840 /// "description": "HTTP status message of the error.",
11841 /// "examples": [
11842 /// "Bad Request"
11843 /// ],
11844 /// "type": "string"
11845 /// }
11846 /// },
11847 /// "additionalProperties": false
11848 ///}
11849 /// ```
11850 /// </details>
11851 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11852 #[serde(deny_unknown_fields)]
11853 pub struct GetPackPermissionsResponse {
11854 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
11855 pub coda_detail: ::std::option::Option<GetPackPermissionsResponseCodaDetail>,
11856 ///Any additional context on the error, or the same as `statusMessage`
11857 /// otherwise.
11858 pub message: ::std::string::String,
11859 #[serde(rename = "statusCode")]
11860 pub status_code: f64,
11861 ///HTTP status message of the error.
11862 #[serde(rename = "statusMessage")]
11863 pub status_message: ::std::string::String,
11864 }
11865
11866 impl ::std::convert::From<&GetPackPermissionsResponse> for GetPackPermissionsResponse {
11867 fn from(value: &GetPackPermissionsResponse) -> Self {
11868 value.clone()
11869 }
11870 }
11871
11872 ///Detail about why this request was rejected.
11873 ///
11874 /// <details><summary>JSON schema</summary>
11875 ///
11876 /// ```json
11877 ///{
11878 /// "description": "Detail about why this request was rejected.",
11879 /// "type": "object",
11880 /// "properties": {
11881 /// "validationErrors": {
11882 /// "type": "array",
11883 /// "items": {
11884 /// "$ref": "#/components/schemas/ValidationError"
11885 /// }
11886 /// }
11887 /// },
11888 /// "additionalProperties": false
11889 ///}
11890 /// ```
11891 /// </details>
11892 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11893 #[serde(deny_unknown_fields)]
11894 pub struct GetPackPermissionsResponseCodaDetail {
11895 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11896 pub validation_errors: ::std::vec::Vec<ValidationError>,
11897 }
11898
11899 impl ::std::convert::From<&GetPackPermissionsResponseCodaDetail> for GetPackPermissionsResponseCodaDetail {
11900 fn from(value: &GetPackPermissionsResponseCodaDetail) -> Self {
11901 value.clone()
11902 }
11903 }
11904
11905 impl ::std::default::Default for GetPackPermissionsResponseCodaDetail {
11906 fn default() -> Self {
11907 Self {
11908 validation_errors: Default::default(),
11909 }
11910 }
11911 }
11912
11913 ///An HTTP error resulting from an unsuccessful request.
11914 ///
11915 /// <details><summary>JSON schema</summary>
11916 ///
11917 /// ```json
11918 ///{
11919 /// "description": "An HTTP error resulting from an unsuccessful request.",
11920 /// "required": [
11921 /// "message",
11922 /// "statusCode",
11923 /// "statusMessage"
11924 /// ],
11925 /// "properties": {
11926 /// "message": {
11927 /// "description": "Any additional context on the error, or the same as
11928 /// `statusMessage` otherwise.",
11929 /// "examples": [
11930 /// "Bad Request"
11931 /// ],
11932 /// "type": "string"
11933 /// },
11934 /// "statusCode": {
11935 /// "description": "HTTP status code of the error.",
11936 /// "examples": [
11937 /// 400
11938 /// ],
11939 /// "type": "number"
11940 /// },
11941 /// "statusMessage": {
11942 /// "description": "HTTP status message of the error.",
11943 /// "examples": [
11944 /// "Bad Request"
11945 /// ],
11946 /// "type": "string"
11947 /// }
11948 /// },
11949 /// "additionalProperties": false
11950 ///}
11951 /// ```
11952 /// </details>
11953 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11954 #[serde(deny_unknown_fields)]
11955 pub struct GetPackResponse {
11956 ///Any additional context on the error, or the same as `statusMessage`
11957 /// otherwise.
11958 pub message: ::std::string::String,
11959 #[serde(rename = "statusCode")]
11960 pub status_code: f64,
11961 ///HTTP status message of the error.
11962 #[serde(rename = "statusMessage")]
11963 pub status_message: ::std::string::String,
11964 }
11965
11966 impl ::std::convert::From<&GetPackResponse> for GetPackResponse {
11967 fn from(value: &GetPackResponse) -> Self {
11968 value.clone()
11969 }
11970 }
11971
11972 ///An HTTP error resulting from an unsuccessful request.
11973 ///
11974 /// <details><summary>JSON schema</summary>
11975 ///
11976 /// ```json
11977 ///{
11978 /// "description": "An HTTP error resulting from an unsuccessful request.",
11979 /// "required": [
11980 /// "message",
11981 /// "statusCode",
11982 /// "statusMessage"
11983 /// ],
11984 /// "properties": {
11985 /// "codaDetail": {
11986 /// "description": "Detail about why this request was rejected.",
11987 /// "type": "object",
11988 /// "properties": {
11989 /// "validationErrors": {
11990 /// "type": "array",
11991 /// "items": {
11992 /// "$ref": "#/components/schemas/ValidationError"
11993 /// }
11994 /// }
11995 /// },
11996 /// "additionalProperties": false
11997 /// },
11998 /// "message": {
11999 /// "description": "Any additional context on the error, or the same as
12000 /// `statusMessage` otherwise.",
12001 /// "examples": [
12002 /// "Bad Request"
12003 /// ],
12004 /// "type": "string"
12005 /// },
12006 /// "statusCode": {
12007 /// "description": "HTTP status code of the error.",
12008 /// "examples": [
12009 /// 400
12010 /// ],
12011 /// "type": "number"
12012 /// },
12013 /// "statusMessage": {
12014 /// "description": "HTTP status message of the error.",
12015 /// "examples": [
12016 /// "Bad Request"
12017 /// ],
12018 /// "type": "string"
12019 /// }
12020 /// },
12021 /// "additionalProperties": false
12022 ///}
12023 /// ```
12024 /// </details>
12025 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12026 #[serde(deny_unknown_fields)]
12027 pub struct GetPackSourceCodeResponse {
12028 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
12029 pub coda_detail: ::std::option::Option<GetPackSourceCodeResponseCodaDetail>,
12030 ///Any additional context on the error, or the same as `statusMessage`
12031 /// otherwise.
12032 pub message: ::std::string::String,
12033 #[serde(rename = "statusCode")]
12034 pub status_code: f64,
12035 ///HTTP status message of the error.
12036 #[serde(rename = "statusMessage")]
12037 pub status_message: ::std::string::String,
12038 }
12039
12040 impl ::std::convert::From<&GetPackSourceCodeResponse> for GetPackSourceCodeResponse {
12041 fn from(value: &GetPackSourceCodeResponse) -> Self {
12042 value.clone()
12043 }
12044 }
12045
12046 ///Detail about why this request was rejected.
12047 ///
12048 /// <details><summary>JSON schema</summary>
12049 ///
12050 /// ```json
12051 ///{
12052 /// "description": "Detail about why this request was rejected.",
12053 /// "type": "object",
12054 /// "properties": {
12055 /// "validationErrors": {
12056 /// "type": "array",
12057 /// "items": {
12058 /// "$ref": "#/components/schemas/ValidationError"
12059 /// }
12060 /// }
12061 /// },
12062 /// "additionalProperties": false
12063 ///}
12064 /// ```
12065 /// </details>
12066 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12067 #[serde(deny_unknown_fields)]
12068 pub struct GetPackSourceCodeResponseCodaDetail {
12069 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12070 pub validation_errors: ::std::vec::Vec<ValidationError>,
12071 }
12072
12073 impl ::std::convert::From<&GetPackSourceCodeResponseCodaDetail> for GetPackSourceCodeResponseCodaDetail {
12074 fn from(value: &GetPackSourceCodeResponseCodaDetail) -> Self {
12075 value.clone()
12076 }
12077 }
12078
12079 impl ::std::default::Default for GetPackSourceCodeResponseCodaDetail {
12080 fn default() -> Self {
12081 Self {
12082 validation_errors: Default::default(),
12083 }
12084 }
12085 }
12086
12087 ///An HTTP error resulting from an unsuccessful request.
12088 ///
12089 /// <details><summary>JSON schema</summary>
12090 ///
12091 /// ```json
12092 ///{
12093 /// "description": "An HTTP error resulting from an unsuccessful request.",
12094 /// "required": [
12095 /// "message",
12096 /// "statusCode",
12097 /// "statusMessage"
12098 /// ],
12099 /// "properties": {
12100 /// "codaDetail": {
12101 /// "description": "Detail about why this request was rejected.",
12102 /// "type": "object",
12103 /// "properties": {
12104 /// "validationErrors": {
12105 /// "type": "array",
12106 /// "items": {
12107 /// "$ref": "#/components/schemas/ValidationError"
12108 /// }
12109 /// }
12110 /// },
12111 /// "additionalProperties": false
12112 /// },
12113 /// "message": {
12114 /// "description": "Any additional context on the error, or the same as
12115 /// `statusMessage` otherwise.",
12116 /// "examples": [
12117 /// "Bad Request"
12118 /// ],
12119 /// "type": "string"
12120 /// },
12121 /// "statusCode": {
12122 /// "description": "HTTP status code of the error.",
12123 /// "examples": [
12124 /// 400
12125 /// ],
12126 /// "type": "number"
12127 /// },
12128 /// "statusMessage": {
12129 /// "description": "HTTP status message of the error.",
12130 /// "examples": [
12131 /// "Bad Request"
12132 /// ],
12133 /// "type": "string"
12134 /// }
12135 /// },
12136 /// "additionalProperties": false
12137 ///}
12138 /// ```
12139 /// </details>
12140 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12141 #[serde(deny_unknown_fields)]
12142 pub struct GetPackSystemConnectionResponse {
12143 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
12144 pub coda_detail: ::std::option::Option<GetPackSystemConnectionResponseCodaDetail>,
12145 ///Any additional context on the error, or the same as `statusMessage`
12146 /// otherwise.
12147 pub message: ::std::string::String,
12148 #[serde(rename = "statusCode")]
12149 pub status_code: f64,
12150 ///HTTP status message of the error.
12151 #[serde(rename = "statusMessage")]
12152 pub status_message: ::std::string::String,
12153 }
12154
12155 impl ::std::convert::From<&GetPackSystemConnectionResponse> for GetPackSystemConnectionResponse {
12156 fn from(value: &GetPackSystemConnectionResponse) -> Self {
12157 value.clone()
12158 }
12159 }
12160
12161 ///Detail about why this request was rejected.
12162 ///
12163 /// <details><summary>JSON schema</summary>
12164 ///
12165 /// ```json
12166 ///{
12167 /// "description": "Detail about why this request was rejected.",
12168 /// "type": "object",
12169 /// "properties": {
12170 /// "validationErrors": {
12171 /// "type": "array",
12172 /// "items": {
12173 /// "$ref": "#/components/schemas/ValidationError"
12174 /// }
12175 /// }
12176 /// },
12177 /// "additionalProperties": false
12178 ///}
12179 /// ```
12180 /// </details>
12181 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12182 #[serde(deny_unknown_fields)]
12183 pub struct GetPackSystemConnectionResponseCodaDetail {
12184 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12185 pub validation_errors: ::std::vec::Vec<ValidationError>,
12186 }
12187
12188 impl ::std::convert::From<&GetPackSystemConnectionResponseCodaDetail> for GetPackSystemConnectionResponseCodaDetail {
12189 fn from(value: &GetPackSystemConnectionResponseCodaDetail) -> Self {
12190 value.clone()
12191 }
12192 }
12193
12194 impl ::std::default::Default for GetPackSystemConnectionResponseCodaDetail {
12195 fn default() -> Self {
12196 Self {
12197 validation_errors: Default::default(),
12198 }
12199 }
12200 }
12201
12202 ///An HTTP error resulting from an unsuccessful request.
12203 ///
12204 /// <details><summary>JSON schema</summary>
12205 ///
12206 /// ```json
12207 ///{
12208 /// "description": "An HTTP error resulting from an unsuccessful request.",
12209 /// "required": [
12210 /// "message",
12211 /// "statusCode",
12212 /// "statusMessage"
12213 /// ],
12214 /// "properties": {
12215 /// "codaDetail": {
12216 /// "description": "Detail about why this request was rejected.",
12217 /// "type": "object",
12218 /// "properties": {
12219 /// "validationErrors": {
12220 /// "type": "array",
12221 /// "items": {
12222 /// "$ref": "#/components/schemas/ValidationError"
12223 /// }
12224 /// }
12225 /// },
12226 /// "additionalProperties": false
12227 /// },
12228 /// "message": {
12229 /// "description": "Any additional context on the error, or the same as
12230 /// `statusMessage` otherwise.",
12231 /// "examples": [
12232 /// "Bad Request"
12233 /// ],
12234 /// "type": "string"
12235 /// },
12236 /// "statusCode": {
12237 /// "description": "HTTP status code of the error.",
12238 /// "examples": [
12239 /// 400
12240 /// ],
12241 /// "type": "number"
12242 /// },
12243 /// "statusMessage": {
12244 /// "description": "HTTP status message of the error.",
12245 /// "examples": [
12246 /// "Bad Request"
12247 /// ],
12248 /// "type": "string"
12249 /// }
12250 /// },
12251 /// "additionalProperties": false
12252 ///}
12253 /// ```
12254 /// </details>
12255 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12256 #[serde(deny_unknown_fields)]
12257 pub struct GetPackVersionDiffsResponse {
12258 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
12259 pub coda_detail: ::std::option::Option<GetPackVersionDiffsResponseCodaDetail>,
12260 ///Any additional context on the error, or the same as `statusMessage`
12261 /// otherwise.
12262 pub message: ::std::string::String,
12263 #[serde(rename = "statusCode")]
12264 pub status_code: f64,
12265 ///HTTP status message of the error.
12266 #[serde(rename = "statusMessage")]
12267 pub status_message: ::std::string::String,
12268 }
12269
12270 impl ::std::convert::From<&GetPackVersionDiffsResponse> for GetPackVersionDiffsResponse {
12271 fn from(value: &GetPackVersionDiffsResponse) -> Self {
12272 value.clone()
12273 }
12274 }
12275
12276 ///Detail about why this request was rejected.
12277 ///
12278 /// <details><summary>JSON schema</summary>
12279 ///
12280 /// ```json
12281 ///{
12282 /// "description": "Detail about why this request was rejected.",
12283 /// "type": "object",
12284 /// "properties": {
12285 /// "validationErrors": {
12286 /// "type": "array",
12287 /// "items": {
12288 /// "$ref": "#/components/schemas/ValidationError"
12289 /// }
12290 /// }
12291 /// },
12292 /// "additionalProperties": false
12293 ///}
12294 /// ```
12295 /// </details>
12296 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12297 #[serde(deny_unknown_fields)]
12298 pub struct GetPackVersionDiffsResponseCodaDetail {
12299 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12300 pub validation_errors: ::std::vec::Vec<ValidationError>,
12301 }
12302
12303 impl ::std::convert::From<&GetPackVersionDiffsResponseCodaDetail> for GetPackVersionDiffsResponseCodaDetail {
12304 fn from(value: &GetPackVersionDiffsResponseCodaDetail) -> Self {
12305 value.clone()
12306 }
12307 }
12308
12309 impl ::std::default::Default for GetPackVersionDiffsResponseCodaDetail {
12310 fn default() -> Self {
12311 Self {
12312 validation_errors: Default::default(),
12313 }
12314 }
12315 }
12316
12317 ///An HTTP error resulting from an unsuccessful request.
12318 ///
12319 /// <details><summary>JSON schema</summary>
12320 ///
12321 /// ```json
12322 ///{
12323 /// "description": "An HTTP error resulting from an unsuccessful request.",
12324 /// "required": [
12325 /// "message",
12326 /// "statusCode",
12327 /// "statusMessage"
12328 /// ],
12329 /// "properties": {
12330 /// "message": {
12331 /// "description": "Any additional context on the error, or the same as
12332 /// `statusMessage` otherwise.",
12333 /// "examples": [
12334 /// "Unauthorized"
12335 /// ],
12336 /// "type": "string"
12337 /// },
12338 /// "statusCode": {
12339 /// "description": "HTTP status code of the error.",
12340 /// "examples": [
12341 /// 401
12342 /// ],
12343 /// "type": "number"
12344 /// },
12345 /// "statusMessage": {
12346 /// "description": "HTTP status message of the error.",
12347 /// "examples": [
12348 /// "Unauthorized"
12349 /// ],
12350 /// "type": "string"
12351 /// }
12352 /// },
12353 /// "additionalProperties": false
12354 ///}
12355 /// ```
12356 /// </details>
12357 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12358 #[serde(deny_unknown_fields)]
12359 pub struct GetPageContentExportStatusResponse {
12360 ///Any additional context on the error, or the same as `statusMessage`
12361 /// otherwise.
12362 pub message: ::std::string::String,
12363 #[serde(rename = "statusCode")]
12364 pub status_code: f64,
12365 ///HTTP status message of the error.
12366 #[serde(rename = "statusMessage")]
12367 pub status_message: ::std::string::String,
12368 }
12369
12370 impl ::std::convert::From<&GetPageContentExportStatusResponse> for GetPageContentExportStatusResponse {
12371 fn from(value: &GetPageContentExportStatusResponse) -> Self {
12372 value.clone()
12373 }
12374 }
12375
12376 ///An HTTP error resulting from an unsuccessful request.
12377 ///
12378 /// <details><summary>JSON schema</summary>
12379 ///
12380 /// ```json
12381 ///{
12382 /// "description": "An HTTP error resulting from an unsuccessful request.",
12383 /// "required": [
12384 /// "message",
12385 /// "statusCode",
12386 /// "statusMessage"
12387 /// ],
12388 /// "properties": {
12389 /// "message": {
12390 /// "description": "Any additional context on the error, or the same as
12391 /// `statusMessage` otherwise.",
12392 /// "examples": [
12393 /// "Unauthorized"
12394 /// ],
12395 /// "type": "string"
12396 /// },
12397 /// "statusCode": {
12398 /// "description": "HTTP status code of the error.",
12399 /// "examples": [
12400 /// 401
12401 /// ],
12402 /// "type": "number"
12403 /// },
12404 /// "statusMessage": {
12405 /// "description": "HTTP status message of the error.",
12406 /// "examples": [
12407 /// "Unauthorized"
12408 /// ],
12409 /// "type": "string"
12410 /// }
12411 /// },
12412 /// "additionalProperties": false
12413 ///}
12414 /// ```
12415 /// </details>
12416 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12417 #[serde(deny_unknown_fields)]
12418 pub struct GetPageResponse {
12419 ///Any additional context on the error, or the same as `statusMessage`
12420 /// otherwise.
12421 pub message: ::std::string::String,
12422 #[serde(rename = "statusCode")]
12423 pub status_code: f64,
12424 ///HTTP status message of the error.
12425 #[serde(rename = "statusMessage")]
12426 pub status_message: ::std::string::String,
12427 }
12428
12429 impl ::std::convert::From<&GetPageResponse> for GetPageResponse {
12430 fn from(value: &GetPageResponse) -> Self {
12431 value.clone()
12432 }
12433 }
12434
12435 ///An HTTP error resulting from an unsuccessful request.
12436 ///
12437 /// <details><summary>JSON schema</summary>
12438 ///
12439 /// ```json
12440 ///{
12441 /// "description": "An HTTP error resulting from an unsuccessful request.",
12442 /// "required": [
12443 /// "message",
12444 /// "statusCode",
12445 /// "statusMessage"
12446 /// ],
12447 /// "properties": {
12448 /// "message": {
12449 /// "description": "Any additional context on the error, or the same as
12450 /// `statusMessage` otherwise.",
12451 /// "examples": [
12452 /// "Unauthorized"
12453 /// ],
12454 /// "type": "string"
12455 /// },
12456 /// "statusCode": {
12457 /// "description": "HTTP status code of the error.",
12458 /// "examples": [
12459 /// 401
12460 /// ],
12461 /// "type": "number"
12462 /// },
12463 /// "statusMessage": {
12464 /// "description": "HTTP status message of the error.",
12465 /// "examples": [
12466 /// "Unauthorized"
12467 /// ],
12468 /// "type": "string"
12469 /// }
12470 /// },
12471 /// "additionalProperties": false
12472 ///}
12473 /// ```
12474 /// </details>
12475 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12476 #[serde(deny_unknown_fields)]
12477 pub struct GetPermissionsResponse {
12478 ///Any additional context on the error, or the same as `statusMessage`
12479 /// otherwise.
12480 pub message: ::std::string::String,
12481 #[serde(rename = "statusCode")]
12482 pub status_code: f64,
12483 ///HTTP status message of the error.
12484 #[serde(rename = "statusMessage")]
12485 pub status_message: ::std::string::String,
12486 }
12487
12488 impl ::std::convert::From<&GetPermissionsResponse> for GetPermissionsResponse {
12489 fn from(value: &GetPermissionsResponse) -> Self {
12490 value.clone()
12491 }
12492 }
12493
12494 ///An HTTP error resulting from an unsuccessful request.
12495 ///
12496 /// <details><summary>JSON schema</summary>
12497 ///
12498 /// ```json
12499 ///{
12500 /// "description": "An HTTP error resulting from an unsuccessful request.",
12501 /// "required": [
12502 /// "message",
12503 /// "statusCode",
12504 /// "statusMessage"
12505 /// ],
12506 /// "properties": {
12507 /// "message": {
12508 /// "description": "Any additional context on the error, or the same as
12509 /// `statusMessage` otherwise.",
12510 /// "examples": [
12511 /// "Unauthorized"
12512 /// ],
12513 /// "type": "string"
12514 /// },
12515 /// "statusCode": {
12516 /// "description": "HTTP status code of the error.",
12517 /// "examples": [
12518 /// 401
12519 /// ],
12520 /// "type": "number"
12521 /// },
12522 /// "statusMessage": {
12523 /// "description": "HTTP status message of the error.",
12524 /// "examples": [
12525 /// "Unauthorized"
12526 /// ],
12527 /// "type": "string"
12528 /// }
12529 /// },
12530 /// "additionalProperties": false
12531 ///}
12532 /// ```
12533 /// </details>
12534 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12535 #[serde(deny_unknown_fields)]
12536 pub struct GetRowResponse {
12537 ///Any additional context on the error, or the same as `statusMessage`
12538 /// otherwise.
12539 pub message: ::std::string::String,
12540 #[serde(rename = "statusCode")]
12541 pub status_code: f64,
12542 ///HTTP status message of the error.
12543 #[serde(rename = "statusMessage")]
12544 pub status_message: ::std::string::String,
12545 }
12546
12547 impl ::std::convert::From<&GetRowResponse> for GetRowResponse {
12548 fn from(value: &GetRowResponse) -> Self {
12549 value.clone()
12550 }
12551 }
12552
12553 ///An HTTP error resulting from an unsuccessful request.
12554 ///
12555 /// <details><summary>JSON schema</summary>
12556 ///
12557 /// ```json
12558 ///{
12559 /// "description": "An HTTP error resulting from an unsuccessful request.",
12560 /// "required": [
12561 /// "message",
12562 /// "statusCode",
12563 /// "statusMessage"
12564 /// ],
12565 /// "properties": {
12566 /// "message": {
12567 /// "description": "Any additional context on the error, or the same as
12568 /// `statusMessage` otherwise.",
12569 /// "examples": [
12570 /// "Unauthorized"
12571 /// ],
12572 /// "type": "string"
12573 /// },
12574 /// "statusCode": {
12575 /// "description": "HTTP status code of the error.",
12576 /// "examples": [
12577 /// 401
12578 /// ],
12579 /// "type": "number"
12580 /// },
12581 /// "statusMessage": {
12582 /// "description": "HTTP status message of the error.",
12583 /// "examples": [
12584 /// "Unauthorized"
12585 /// ],
12586 /// "type": "string"
12587 /// }
12588 /// },
12589 /// "additionalProperties": false
12590 ///}
12591 /// ```
12592 /// </details>
12593 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12594 #[serde(deny_unknown_fields)]
12595 pub struct GetSharingMetadataResponse {
12596 ///Any additional context on the error, or the same as `statusMessage`
12597 /// otherwise.
12598 pub message: ::std::string::String,
12599 #[serde(rename = "statusCode")]
12600 pub status_code: f64,
12601 ///HTTP status message of the error.
12602 #[serde(rename = "statusMessage")]
12603 pub status_message: ::std::string::String,
12604 }
12605
12606 impl ::std::convert::From<&GetSharingMetadataResponse> for GetSharingMetadataResponse {
12607 fn from(value: &GetSharingMetadataResponse) -> Self {
12608 value.clone()
12609 }
12610 }
12611
12612 ///An HTTP error resulting from an unsuccessful request.
12613 ///
12614 /// <details><summary>JSON schema</summary>
12615 ///
12616 /// ```json
12617 ///{
12618 /// "description": "An HTTP error resulting from an unsuccessful request.",
12619 /// "required": [
12620 /// "message",
12621 /// "statusCode",
12622 /// "statusMessage"
12623 /// ],
12624 /// "properties": {
12625 /// "message": {
12626 /// "description": "Any additional context on the error, or the same as
12627 /// `statusMessage` otherwise.",
12628 /// "examples": [
12629 /// "Unauthorized"
12630 /// ],
12631 /// "type": "string"
12632 /// },
12633 /// "statusCode": {
12634 /// "description": "HTTP status code of the error.",
12635 /// "examples": [
12636 /// 401
12637 /// ],
12638 /// "type": "number"
12639 /// },
12640 /// "statusMessage": {
12641 /// "description": "HTTP status message of the error.",
12642 /// "examples": [
12643 /// "Unauthorized"
12644 /// ],
12645 /// "type": "string"
12646 /// }
12647 /// },
12648 /// "additionalProperties": false
12649 ///}
12650 /// ```
12651 /// </details>
12652 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12653 #[serde(deny_unknown_fields)]
12654 pub struct GetTableResponse {
12655 ///Any additional context on the error, or the same as `statusMessage`
12656 /// otherwise.
12657 pub message: ::std::string::String,
12658 #[serde(rename = "statusCode")]
12659 pub status_code: f64,
12660 ///HTTP status message of the error.
12661 #[serde(rename = "statusMessage")]
12662 pub status_message: ::std::string::String,
12663 }
12664
12665 impl ::std::convert::From<&GetTableResponse> for GetTableResponse {
12666 fn from(value: &GetTableResponse) -> Self {
12667 value.clone()
12668 }
12669 }
12670
12671 ///Response for getting workspace role activity.
12672 ///
12673 /// <details><summary>JSON schema</summary>
12674 ///
12675 /// ```json
12676 ///{
12677 /// "description": "Response for getting workspace role activity.",
12678 /// "type": "object",
12679 /// "required": [
12680 /// "items"
12681 /// ],
12682 /// "properties": {
12683 /// "items": {
12684 /// "type": "array",
12685 /// "items": {
12686 /// "$ref": "#/components/schemas/WorkspaceRoleActivity"
12687 /// }
12688 /// }
12689 /// },
12690 /// "additionalProperties": false,
12691 /// "x-schema-name": "GetWorkspaceRoleActivity"
12692 ///}
12693 /// ```
12694 /// </details>
12695 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12696 #[serde(deny_unknown_fields)]
12697 pub struct GetWorkspaceRoleActivity {
12698 pub items: ::std::vec::Vec<WorkspaceRoleActivity>,
12699 }
12700
12701 impl ::std::convert::From<&GetWorkspaceRoleActivity> for GetWorkspaceRoleActivity {
12702 fn from(value: &GetWorkspaceRoleActivity) -> Self {
12703 value.clone()
12704 }
12705 }
12706
12707 ///`GroupPrincipal`
12708 ///
12709 /// <details><summary>JSON schema</summary>
12710 ///
12711 /// ```json
12712 ///{
12713 /// "type": "object",
12714 /// "required": [
12715 /// "groupId",
12716 /// "groupName",
12717 /// "type"
12718 /// ],
12719 /// "properties": {
12720 /// "groupId": {
12721 /// "description": "Group ID for the principal.",
12722 /// "examples": [
12723 /// "grp-6SM9xrKcqW"
12724 /// ],
12725 /// "type": "string"
12726 /// },
12727 /// "groupName": {
12728 /// "description": "Name of the group.",
12729 /// "examples": [
12730 /// "Marketing team"
12731 /// ],
12732 /// "type": "string"
12733 /// },
12734 /// "type": {
12735 /// "description": "The type of this principal.",
12736 /// "type": "string",
12737 /// "enum": [
12738 /// "group"
12739 /// ],
12740 /// "x-tsType": "PrincipalType.Group"
12741 /// }
12742 /// },
12743 /// "additionalProperties": false
12744 ///}
12745 /// ```
12746 /// </details>
12747 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12748 #[serde(deny_unknown_fields)]
12749 pub struct GroupPrincipal {
12750 ///Group ID for the principal.
12751 #[serde(rename = "groupId")]
12752 pub group_id: ::std::string::String,
12753 ///Name of the group.
12754 #[serde(rename = "groupName")]
12755 pub group_name: ::std::string::String,
12756 ///The type of this principal.
12757 #[serde(rename = "type")]
12758 pub type_: GroupPrincipalType,
12759 }
12760
12761 impl ::std::convert::From<&GroupPrincipal> for GroupPrincipal {
12762 fn from(value: &GroupPrincipal) -> Self {
12763 value.clone()
12764 }
12765 }
12766
12767 ///The type of this principal.
12768 ///
12769 /// <details><summary>JSON schema</summary>
12770 ///
12771 /// ```json
12772 ///{
12773 /// "description": "The type of this principal.",
12774 /// "type": "string",
12775 /// "enum": [
12776 /// "group"
12777 /// ],
12778 /// "x-tsType": "PrincipalType.Group"
12779 ///}
12780 /// ```
12781 /// </details>
12782 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12783 pub enum GroupPrincipalType {
12784 #[serde(rename = "group")]
12785 Group,
12786 }
12787
12788 impl ::std::convert::From<&Self> for GroupPrincipalType {
12789 fn from(value: &GroupPrincipalType) -> Self {
12790 value.clone()
12791 }
12792 }
12793
12794 impl ::std::fmt::Display for GroupPrincipalType {
12795 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12796 match *self {
12797 Self::Group => f.write_str("group"),
12798 }
12799 }
12800 }
12801
12802 impl ::std::str::FromStr for GroupPrincipalType {
12803 type Err = self::error::ConversionError;
12804 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12805 match value {
12806 "group" => Ok(Self::Group),
12807 _ => Err("invalid value".into()),
12808 }
12809 }
12810 }
12811
12812 impl ::std::convert::TryFrom<&str> for GroupPrincipalType {
12813 type Error = self::error::ConversionError;
12814 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12815 value.parse()
12816 }
12817 }
12818
12819 impl ::std::convert::TryFrom<&::std::string::String> for GroupPrincipalType {
12820 type Error = self::error::ConversionError;
12821 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
12822 value.parse()
12823 }
12824 }
12825
12826 impl ::std::convert::TryFrom<::std::string::String> for GroupPrincipalType {
12827 type Error = self::error::ConversionError;
12828 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
12829 value.parse()
12830 }
12831 }
12832
12833 ///Grouped logs of the Pack's auth requests.
12834 ///
12835 /// <details><summary>JSON schema</summary>
12836 ///
12837 /// ```json
12838 ///{
12839 /// "description": "Grouped logs of the Pack's auth requests.",
12840 /// "type": "object",
12841 /// "required": [
12842 /// "authLog",
12843 /// "relatedLogs",
12844 /// "type"
12845 /// ],
12846 /// "properties": {
12847 /// "authLog": {
12848 /// "$ref": "#/components/schemas/PackAuthLog"
12849 /// },
12850 /// "relatedLogs": {
12851 /// "type": "array",
12852 /// "items": {
12853 /// "$ref": "#/components/schemas/PackLog"
12854 /// }
12855 /// },
12856 /// "type": {
12857 /// "type": "string",
12858 /// "enum": [
12859 /// "auth"
12860 /// ],
12861 /// "x-tsType": "PackLogType.Auth"
12862 /// }
12863 /// },
12864 /// "additionalProperties": false,
12865 /// "x-schema-name": "GroupedPackAuthLog"
12866 ///}
12867 /// ```
12868 /// </details>
12869 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12870 #[serde(deny_unknown_fields)]
12871 pub struct GroupedPackAuthLog {
12872 #[serde(rename = "authLog")]
12873 pub auth_log: PackAuthLog,
12874 #[serde(rename = "relatedLogs")]
12875 pub related_logs: ::std::vec::Vec<PackLog>,
12876 #[serde(rename = "type")]
12877 pub type_: GroupedPackAuthLogType,
12878 }
12879
12880 impl ::std::convert::From<&GroupedPackAuthLog> for GroupedPackAuthLog {
12881 fn from(value: &GroupedPackAuthLog) -> Self {
12882 value.clone()
12883 }
12884 }
12885
12886 ///`GroupedPackAuthLogType`
12887 ///
12888 /// <details><summary>JSON schema</summary>
12889 ///
12890 /// ```json
12891 ///{
12892 /// "type": "string",
12893 /// "enum": [
12894 /// "auth"
12895 /// ],
12896 /// "x-tsType": "PackLogType.Auth"
12897 ///}
12898 /// ```
12899 /// </details>
12900 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12901 pub enum GroupedPackAuthLogType {
12902 #[serde(rename = "auth")]
12903 Auth,
12904 }
12905
12906 impl ::std::convert::From<&Self> for GroupedPackAuthLogType {
12907 fn from(value: &GroupedPackAuthLogType) -> Self {
12908 value.clone()
12909 }
12910 }
12911
12912 impl ::std::fmt::Display for GroupedPackAuthLogType {
12913 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12914 match *self {
12915 Self::Auth => f.write_str("auth"),
12916 }
12917 }
12918 }
12919
12920 impl ::std::str::FromStr for GroupedPackAuthLogType {
12921 type Err = self::error::ConversionError;
12922 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12923 match value {
12924 "auth" => Ok(Self::Auth),
12925 _ => Err("invalid value".into()),
12926 }
12927 }
12928 }
12929
12930 impl ::std::convert::TryFrom<&str> for GroupedPackAuthLogType {
12931 type Error = self::error::ConversionError;
12932 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12933 value.parse()
12934 }
12935 }
12936
12937 impl ::std::convert::TryFrom<&::std::string::String> for GroupedPackAuthLogType {
12938 type Error = self::error::ConversionError;
12939 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
12940 value.parse()
12941 }
12942 }
12943
12944 impl ::std::convert::TryFrom<::std::string::String> for GroupedPackAuthLogType {
12945 type Error = self::error::ConversionError;
12946 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
12947 value.parse()
12948 }
12949 }
12950
12951 ///Grouped logs of the invocations of the Pack.
12952 ///
12953 /// <details><summary>JSON schema</summary>
12954 ///
12955 /// ```json
12956 ///{
12957 /// "description": "Grouped logs of the invocations of the Pack.",
12958 /// "type": "object",
12959 /// "required": [
12960 /// "invocationLog",
12961 /// "relatedLogs",
12962 /// "type"
12963 /// ],
12964 /// "properties": {
12965 /// "invocationLog": {
12966 /// "$ref": "#/components/schemas/PackInvocationLog"
12967 /// },
12968 /// "relatedLogs": {
12969 /// "type": "array",
12970 /// "items": {
12971 /// "$ref": "#/components/schemas/PackLog"
12972 /// }
12973 /// },
12974 /// "type": {
12975 /// "type": "string",
12976 /// "enum": [
12977 /// "invocation"
12978 /// ],
12979 /// "x-tsType": "PackLogType.Invocation"
12980 /// }
12981 /// },
12982 /// "additionalProperties": false,
12983 /// "x-schema-name": "GroupedPackInvocationLog"
12984 ///}
12985 /// ```
12986 /// </details>
12987 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12988 #[serde(deny_unknown_fields)]
12989 pub struct GroupedPackInvocationLog {
12990 #[serde(rename = "invocationLog")]
12991 pub invocation_log: PackInvocationLog,
12992 #[serde(rename = "relatedLogs")]
12993 pub related_logs: ::std::vec::Vec<PackLog>,
12994 #[serde(rename = "type")]
12995 pub type_: GroupedPackInvocationLogType,
12996 }
12997
12998 impl ::std::convert::From<&GroupedPackInvocationLog> for GroupedPackInvocationLog {
12999 fn from(value: &GroupedPackInvocationLog) -> Self {
13000 value.clone()
13001 }
13002 }
13003
13004 ///`GroupedPackInvocationLogType`
13005 ///
13006 /// <details><summary>JSON schema</summary>
13007 ///
13008 /// ```json
13009 ///{
13010 /// "type": "string",
13011 /// "enum": [
13012 /// "invocation"
13013 /// ],
13014 /// "x-tsType": "PackLogType.Invocation"
13015 ///}
13016 /// ```
13017 /// </details>
13018 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13019 pub enum GroupedPackInvocationLogType {
13020 #[serde(rename = "invocation")]
13021 Invocation,
13022 }
13023
13024 impl ::std::convert::From<&Self> for GroupedPackInvocationLogType {
13025 fn from(value: &GroupedPackInvocationLogType) -> Self {
13026 value.clone()
13027 }
13028 }
13029
13030 impl ::std::fmt::Display for GroupedPackInvocationLogType {
13031 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13032 match *self {
13033 Self::Invocation => f.write_str("invocation"),
13034 }
13035 }
13036 }
13037
13038 impl ::std::str::FromStr for GroupedPackInvocationLogType {
13039 type Err = self::error::ConversionError;
13040 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13041 match value {
13042 "invocation" => Ok(Self::Invocation),
13043 _ => Err("invalid value".into()),
13044 }
13045 }
13046 }
13047
13048 impl ::std::convert::TryFrom<&str> for GroupedPackInvocationLogType {
13049 type Error = self::error::ConversionError;
13050 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13051 value.parse()
13052 }
13053 }
13054
13055 impl ::std::convert::TryFrom<&::std::string::String> for GroupedPackInvocationLogType {
13056 type Error = self::error::ConversionError;
13057 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13058 value.parse()
13059 }
13060 }
13061
13062 impl ::std::convert::TryFrom<::std::string::String> for GroupedPackInvocationLogType {
13063 type Error = self::error::ConversionError;
13064 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13065 value.parse()
13066 }
13067 }
13068
13069 ///A record of grouped Pack log.
13070 ///
13071 /// <details><summary>JSON schema</summary>
13072 ///
13073 /// ```json
13074 ///{
13075 /// "description": "A record of grouped Pack log.",
13076 /// "oneOf": [
13077 /// {
13078 /// "$ref": "#/components/schemas/GroupedPackInvocationLog"
13079 /// },
13080 /// {
13081 /// "$ref": "#/components/schemas/GroupedPackAuthLog"
13082 /// }
13083 /// ],
13084 /// "x-schema-name": "GroupedPackLog"
13085 ///}
13086 /// ```
13087 /// </details>
13088 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13089 #[serde(untagged)]
13090 pub enum GroupedPackLog {
13091 InvocationLog(GroupedPackInvocationLog),
13092 AuthLog(GroupedPackAuthLog),
13093 }
13094
13095 impl ::std::convert::From<&Self> for GroupedPackLog {
13096 fn from(value: &GroupedPackLog) -> Self {
13097 value.clone()
13098 }
13099 }
13100
13101 impl ::std::convert::From<GroupedPackInvocationLog> for GroupedPackLog {
13102 fn from(value: GroupedPackInvocationLog) -> Self {
13103 Self::InvocationLog(value)
13104 }
13105 }
13106
13107 impl ::std::convert::From<GroupedPackAuthLog> for GroupedPackLog {
13108 fn from(value: GroupedPackAuthLog) -> Self {
13109 Self::AuthLog(value)
13110 }
13111 }
13112
13113 ///List of grouped Pack logs.
13114 ///
13115 /// <details><summary>JSON schema</summary>
13116 ///
13117 /// ```json
13118 ///{
13119 /// "description": "List of grouped Pack logs.",
13120 /// "type": "object",
13121 /// "required": [
13122 /// "incompleteRelatedLogs",
13123 /// "items"
13124 /// ],
13125 /// "properties": {
13126 /// "incompleteRelatedLogs": {
13127 /// "description": "This flag will be set to true if the result doens't
13128 /// include all the related logs.",
13129 /// "type": "boolean"
13130 /// },
13131 /// "items": {
13132 /// "type": "array",
13133 /// "items": {
13134 /// "$ref": "#/components/schemas/GroupedPackLog"
13135 /// }
13136 /// },
13137 /// "nextPageLink": {
13138 /// "allOf": [
13139 /// {
13140 /// "$ref": "#/components/schemas/nextPageLink"
13141 /// },
13142 /// {
13143 /// "examples": [
13144 /// "https://coda.io/apis/v1/packs/1/groupedLogs?pageToken=xyz"
13145 /// ],
13146 /// "type": "string"
13147 /// }
13148 /// ]
13149 /// },
13150 /// "nextPageToken": {
13151 /// "$ref": "#/components/schemas/nextPageToken"
13152 /// }
13153 /// },
13154 /// "additionalProperties": false,
13155 /// "x-schema-name": "GroupedPackLogsList"
13156 ///}
13157 /// ```
13158 /// </details>
13159 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13160 #[serde(deny_unknown_fields)]
13161 pub struct GroupedPackLogsList {
13162 ///This flag will be set to true if the result doens't include all the
13163 /// related logs.
13164 #[serde(rename = "incompleteRelatedLogs")]
13165 pub incomplete_related_logs: bool,
13166 pub items: ::std::vec::Vec<GroupedPackLog>,
13167 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
13168 pub next_page_link: ::std::option::Option<NextPageLink>,
13169 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
13170 pub next_page_token: ::std::option::Option<NextPageToken>,
13171 }
13172
13173 impl ::std::convert::From<&GroupedPackLogsList> for GroupedPackLogsList {
13174 fn from(value: &GroupedPackLogsList) -> Self {
13175 value.clone()
13176 }
13177 }
13178
13179 ///Payload for handling a Pack invitation (accept or reject).
13180 ///
13181 /// <details><summary>JSON schema</summary>
13182 ///
13183 /// ```json
13184 ///{
13185 /// "description": "Payload for handling a Pack invitation (accept or
13186 /// reject).",
13187 /// "type": "object",
13188 /// "required": [
13189 /// "accept"
13190 /// ],
13191 /// "properties": {
13192 /// "accept": {
13193 /// "description": "True to accept the invitation, false to reject it",
13194 /// "type": "boolean"
13195 /// }
13196 /// },
13197 /// "additionalProperties": false,
13198 /// "x-schema-name": "HandlePackInvitationRequest"
13199 ///}
13200 /// ```
13201 /// </details>
13202 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13203 #[serde(deny_unknown_fields)]
13204 pub struct HandlePackInvitationRequest {
13205 ///True to accept the invitation, false to reject it
13206 pub accept: bool,
13207 }
13208
13209 impl ::std::convert::From<&HandlePackInvitationRequest> for HandlePackInvitationRequest {
13210 fn from(value: &HandlePackInvitationRequest) -> Self {
13211 value.clone()
13212 }
13213 }
13214
13215 ///Confirmation of successfully handling a Pack invitation.
13216 ///
13217 /// <details><summary>JSON schema</summary>
13218 ///
13219 /// ```json
13220 ///{
13221 /// "description": "Confirmation of successfully handling a Pack
13222 /// invitation.",
13223 /// "type": "object",
13224 /// "properties": {
13225 /// "permissionId": {
13226 /// "description": "The ID of the permission that was created. Only
13227 /// returned when accepting the invitation.",
13228 /// "type": "string"
13229 /// }
13230 /// },
13231 /// "additionalProperties": false,
13232 /// "x-schema-name": "HandlePackInvitationResponse"
13233 ///}
13234 /// ```
13235 /// </details>
13236 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13237 #[serde(deny_unknown_fields)]
13238 pub struct HandlePackInvitationResponse {
13239 ///The ID of the permission that was created. Only returned when
13240 /// accepting the invitation.
13241 #[serde(rename = "permissionId", default, skip_serializing_if = "::std::option::Option::is_none")]
13242 pub permission_id: ::std::option::Option<::std::string::String>,
13243 }
13244
13245 impl ::std::convert::From<&HandlePackInvitationResponse> for HandlePackInvitationResponse {
13246 fn from(value: &HandlePackInvitationResponse) -> Self {
13247 value.clone()
13248 }
13249 }
13250
13251 impl ::std::default::Default for HandlePackInvitationResponse {
13252 fn default() -> Self {
13253 Self {
13254 permission_id: Default::default(),
13255 }
13256 }
13257 }
13258
13259 ///Info about the icon.
13260 ///
13261 /// <details><summary>JSON schema</summary>
13262 ///
13263 /// ```json
13264 ///{
13265 /// "description": "Info about the icon.",
13266 /// "type": "object",
13267 /// "required": [
13268 /// "browserLink",
13269 /// "name",
13270 /// "type"
13271 /// ],
13272 /// "properties": {
13273 /// "browserLink": {
13274 /// "description": "Browser-friendly link to an icon.",
13275 /// "examples": [
13276 /// "https://cdn.coda.io/icons/png/color/icon-32.png"
13277 /// ],
13278 /// "type": "string",
13279 /// "format": "url"
13280 /// },
13281 /// "name": {
13282 /// "description": "Name of the icon.",
13283 /// "type": "string"
13284 /// },
13285 /// "type": {
13286 /// "description": "MIME type of the icon",
13287 /// "type": "string"
13288 /// }
13289 /// },
13290 /// "additionalProperties": false,
13291 /// "x-schema-name": "icon"
13292 ///}
13293 /// ```
13294 /// </details>
13295 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13296 #[serde(deny_unknown_fields)]
13297 pub struct Icon {
13298 ///Browser-friendly link to an icon.
13299 #[serde(rename = "browserLink")]
13300 pub browser_link: ::std::string::String,
13301 ///Name of the icon.
13302 pub name: ::std::string::String,
13303 ///MIME type of the icon
13304 #[serde(rename = "type")]
13305 pub type_: ::std::string::String,
13306 }
13307
13308 impl ::std::convert::From<&Icon> for Icon {
13309 fn from(value: &Icon) -> Self {
13310 value.clone()
13311 }
13312 }
13313
13314 ///List of available icon sets.
13315 ///
13316 /// <details><summary>JSON schema</summary>
13317 ///
13318 /// ```json
13319 ///{
13320 /// "description": "List of available icon sets.",
13321 /// "type": "string",
13322 /// "enum": [
13323 /// "star",
13324 /// "circle",
13325 /// "fire",
13326 /// "bug",
13327 /// "diamond",
13328 /// "bell",
13329 /// "thumbsup",
13330 /// "heart",
13331 /// "chili",
13332 /// "smiley",
13333 /// "lightning",
13334 /// "currency",
13335 /// "coffee",
13336 /// "person",
13337 /// "battery",
13338 /// "cocktail",
13339 /// "cloud",
13340 /// "sun",
13341 /// "checkmark",
13342 /// "lightbulb"
13343 /// ],
13344 /// "x-schema-name": "IconSet",
13345 /// "x-tsEnumNames": [
13346 /// "Star",
13347 /// "Circle",
13348 /// "Fire",
13349 /// "Bug",
13350 /// "Diamond",
13351 /// "Bell",
13352 /// "ThumbsUp",
13353 /// "Heart",
13354 /// "Chili",
13355 /// "Smiley",
13356 /// "Lightning",
13357 /// "Currency",
13358 /// "Coffee",
13359 /// "Person",
13360 /// "Battery",
13361 /// "Cocktail",
13362 /// "Cloud",
13363 /// "Sun",
13364 /// "Checkmark",
13365 /// "LightBulb"
13366 /// ]
13367 ///}
13368 /// ```
13369 /// </details>
13370 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13371 pub enum IconSet {
13372 #[serde(rename = "star")]
13373 Star,
13374 #[serde(rename = "circle")]
13375 Circle,
13376 #[serde(rename = "fire")]
13377 Fire,
13378 #[serde(rename = "bug")]
13379 Bug,
13380 #[serde(rename = "diamond")]
13381 Diamond,
13382 #[serde(rename = "bell")]
13383 Bell,
13384 #[serde(rename = "thumbsup")]
13385 Thumbsup,
13386 #[serde(rename = "heart")]
13387 Heart,
13388 #[serde(rename = "chili")]
13389 Chili,
13390 #[serde(rename = "smiley")]
13391 Smiley,
13392 #[serde(rename = "lightning")]
13393 Lightning,
13394 #[serde(rename = "currency")]
13395 Currency,
13396 #[serde(rename = "coffee")]
13397 Coffee,
13398 #[serde(rename = "person")]
13399 Person,
13400 #[serde(rename = "battery")]
13401 Battery,
13402 #[serde(rename = "cocktail")]
13403 Cocktail,
13404 #[serde(rename = "cloud")]
13405 Cloud,
13406 #[serde(rename = "sun")]
13407 Sun,
13408 #[serde(rename = "checkmark")]
13409 Checkmark,
13410 #[serde(rename = "lightbulb")]
13411 Lightbulb,
13412 }
13413
13414 impl ::std::convert::From<&Self> for IconSet {
13415 fn from(value: &IconSet) -> Self {
13416 value.clone()
13417 }
13418 }
13419
13420 impl ::std::fmt::Display for IconSet {
13421 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13422 match *self {
13423 Self::Star => f.write_str("star"),
13424 Self::Circle => f.write_str("circle"),
13425 Self::Fire => f.write_str("fire"),
13426 Self::Bug => f.write_str("bug"),
13427 Self::Diamond => f.write_str("diamond"),
13428 Self::Bell => f.write_str("bell"),
13429 Self::Thumbsup => f.write_str("thumbsup"),
13430 Self::Heart => f.write_str("heart"),
13431 Self::Chili => f.write_str("chili"),
13432 Self::Smiley => f.write_str("smiley"),
13433 Self::Lightning => f.write_str("lightning"),
13434 Self::Currency => f.write_str("currency"),
13435 Self::Coffee => f.write_str("coffee"),
13436 Self::Person => f.write_str("person"),
13437 Self::Battery => f.write_str("battery"),
13438 Self::Cocktail => f.write_str("cocktail"),
13439 Self::Cloud => f.write_str("cloud"),
13440 Self::Sun => f.write_str("sun"),
13441 Self::Checkmark => f.write_str("checkmark"),
13442 Self::Lightbulb => f.write_str("lightbulb"),
13443 }
13444 }
13445 }
13446
13447 impl ::std::str::FromStr for IconSet {
13448 type Err = self::error::ConversionError;
13449 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13450 match value {
13451 "star" => Ok(Self::Star),
13452 "circle" => Ok(Self::Circle),
13453 "fire" => Ok(Self::Fire),
13454 "bug" => Ok(Self::Bug),
13455 "diamond" => Ok(Self::Diamond),
13456 "bell" => Ok(Self::Bell),
13457 "thumbsup" => Ok(Self::Thumbsup),
13458 "heart" => Ok(Self::Heart),
13459 "chili" => Ok(Self::Chili),
13460 "smiley" => Ok(Self::Smiley),
13461 "lightning" => Ok(Self::Lightning),
13462 "currency" => Ok(Self::Currency),
13463 "coffee" => Ok(Self::Coffee),
13464 "person" => Ok(Self::Person),
13465 "battery" => Ok(Self::Battery),
13466 "cocktail" => Ok(Self::Cocktail),
13467 "cloud" => Ok(Self::Cloud),
13468 "sun" => Ok(Self::Sun),
13469 "checkmark" => Ok(Self::Checkmark),
13470 "lightbulb" => Ok(Self::Lightbulb),
13471 _ => Err("invalid value".into()),
13472 }
13473 }
13474 }
13475
13476 impl ::std::convert::TryFrom<&str> for IconSet {
13477 type Error = self::error::ConversionError;
13478 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13479 value.parse()
13480 }
13481 }
13482
13483 impl ::std::convert::TryFrom<&::std::string::String> for IconSet {
13484 type Error = self::error::ConversionError;
13485 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13486 value.parse()
13487 }
13488 }
13489
13490 impl ::std::convert::TryFrom<::std::string::String> for IconSet {
13491 type Error = self::error::ConversionError;
13492 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13493 value.parse()
13494 }
13495 }
13496
13497 ///Info about the image.
13498 ///
13499 /// <details><summary>JSON schema</summary>
13500 ///
13501 /// ```json
13502 ///{
13503 /// "description": "Info about the image.",
13504 /// "type": "object",
13505 /// "required": [
13506 /// "browserLink"
13507 /// ],
13508 /// "properties": {
13509 /// "browserLink": {
13510 /// "description": "Browser-friendly link to an image.",
13511 /// "examples": [
13512 /// "https://codahosted.io/docs/nUYhlXysYO/blobs/bl-lYkYKNzkuT/3f879b9ecfa27448"
13513 /// ],
13514 /// "type": "string",
13515 /// "format": "url"
13516 /// },
13517 /// "height": {
13518 /// "description": "The height in pixels of the image.",
13519 /// "examples": [
13520 /// 600
13521 /// ],
13522 /// "type": "number"
13523 /// },
13524 /// "type": {
13525 /// "description": "MIME type of the image.",
13526 /// "type": "string"
13527 /// },
13528 /// "width": {
13529 /// "description": "The width in pixels of the image.",
13530 /// "examples": [
13531 /// 800
13532 /// ],
13533 /// "type": "number"
13534 /// }
13535 /// },
13536 /// "additionalProperties": false,
13537 /// "x-schema-name": "Image"
13538 ///}
13539 /// ```
13540 /// </details>
13541 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13542 #[serde(deny_unknown_fields)]
13543 pub struct Image {
13544 ///Browser-friendly link to an image.
13545 #[serde(rename = "browserLink")]
13546 pub browser_link: ::std::string::String,
13547 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13548 pub height: ::std::option::Option<f64>,
13549 ///MIME type of the image.
13550 #[serde(rename = "type", default, skip_serializing_if = "::std::option::Option::is_none")]
13551 pub type_: ::std::option::Option<::std::string::String>,
13552 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13553 pub width: ::std::option::Option<f64>,
13554 }
13555
13556 impl ::std::convert::From<&Image> for Image {
13557 fn from(value: &Image) -> Self {
13558 value.clone()
13559 }
13560 }
13561
13562 ///Information about an image file for an update Pack request.
13563 ///
13564 /// <details><summary>JSON schema</summary>
13565 ///
13566 /// ```json
13567 ///{
13568 /// "description": "Information about an image file for an update Pack
13569 /// request.",
13570 /// "type": "object",
13571 /// "required": [
13572 /// "assetId",
13573 /// "filename"
13574 /// ],
13575 /// "properties": {
13576 /// "assetId": {
13577 /// "description": "The asset id of the Pack's image, returned by
13578 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
13579 /// endpoint.",
13580 /// "type": "string"
13581 /// },
13582 /// "filename": {
13583 /// "description": "The filename for the image.",
13584 /// "type": "string"
13585 /// },
13586 /// "mimeType": {
13587 /// "description": "The media type of the image being sent.",
13588 /// "examples": [
13589 /// "image/jpeg"
13590 /// ],
13591 /// "type": "string"
13592 /// }
13593 /// },
13594 /// "additionalProperties": false,
13595 /// "x-schema-name": "ImageFileForUpdatePackRequest"
13596 ///}
13597 /// ```
13598 /// </details>
13599 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13600 #[serde(deny_unknown_fields)]
13601 pub struct ImageFileForUpdatePackRequest {
13602 ///The asset id of the Pack's image, returned by
13603 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
13604 /// endpoint.
13605 #[serde(rename = "assetId")]
13606 pub asset_id: ::std::string::String,
13607 ///The filename for the image.
13608 pub filename: ::std::string::String,
13609 ///The media type of the image being sent.
13610 #[serde(rename = "mimeType", default, skip_serializing_if = "::std::option::Option::is_none")]
13611 pub mime_type: ::std::option::Option<::std::string::String>,
13612 }
13613
13614 impl ::std::convert::From<&ImageFileForUpdatePackRequest> for ImageFileForUpdatePackRequest {
13615 fn from(value: &ImageFileForUpdatePackRequest) -> Self {
13616 value.clone()
13617 }
13618 }
13619
13620 ///`ImageReferenceColumnFormat`
13621 ///
13622 /// <details><summary>JSON schema</summary>
13623 ///
13624 /// ```json
13625 ///{
13626 /// "description": "Format of an image reference column.",
13627 /// "allOf": [
13628 /// {
13629 /// "$ref": "#/components/schemas/SimpleColumnFormat"
13630 /// },
13631 /// {
13632 /// "type": "object",
13633 /// "required": [
13634 /// "height",
13635 /// "style",
13636 /// "width"
13637 /// ],
13638 /// "properties": {
13639 /// "height": {
13640 /// "allOf": [
13641 /// {
13642 /// "description": "The image height.",
13643 /// "additionalProperties": false
13644 /// },
13645 /// {
13646 /// "$ref": "#/components/schemas/NumberOrNumberFormula"
13647 /// }
13648 /// ]
13649 /// },
13650 /// "style": {
13651 /// "$ref": "#/components/schemas/ImageShapeStyle"
13652 /// },
13653 /// "width": {
13654 /// "allOf": [
13655 /// {
13656 /// "description": "The image width.",
13657 /// "additionalProperties": false
13658 /// },
13659 /// {
13660 /// "$ref": "#/components/schemas/NumberOrNumberFormula"
13661 /// }
13662 /// ]
13663 /// }
13664 /// },
13665 /// "additionalProperties": false
13666 /// }
13667 /// ],
13668 /// "x-schema-name": "ImageReferenceColumnFormat"
13669 ///}
13670 /// ```
13671 /// </details>
13672 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13673 #[serde(deny_unknown_fields)]
13674 pub enum ImageReferenceColumnFormat {}
13675 impl ::std::convert::From<&Self> for ImageReferenceColumnFormat {
13676 fn from(value: &ImageReferenceColumnFormat) -> Self {
13677 value.clone()
13678 }
13679 }
13680
13681 ///How an image should be displayed.
13682 ///
13683 /// <details><summary>JSON schema</summary>
13684 ///
13685 /// ```json
13686 ///{
13687 /// "description": "How an image should be displayed.",
13688 /// "type": "string",
13689 /// "enum": [
13690 /// "auto",
13691 /// "circle"
13692 /// ],
13693 /// "x-schema-name": "ImageShapeStyle",
13694 /// "x-tsEnumNames": [
13695 /// "Auto",
13696 /// "Circle"
13697 /// ]
13698 ///}
13699 /// ```
13700 /// </details>
13701 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13702 pub enum ImageShapeStyle {
13703 #[serde(rename = "auto")]
13704 Auto,
13705 #[serde(rename = "circle")]
13706 Circle,
13707 }
13708
13709 impl ::std::convert::From<&Self> for ImageShapeStyle {
13710 fn from(value: &ImageShapeStyle) -> Self {
13711 value.clone()
13712 }
13713 }
13714
13715 impl ::std::fmt::Display for ImageShapeStyle {
13716 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13717 match *self {
13718 Self::Auto => f.write_str("auto"),
13719 Self::Circle => f.write_str("circle"),
13720 }
13721 }
13722 }
13723
13724 impl ::std::str::FromStr for ImageShapeStyle {
13725 type Err = self::error::ConversionError;
13726 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13727 match value {
13728 "auto" => Ok(Self::Auto),
13729 "circle" => Ok(Self::Circle),
13730 _ => Err("invalid value".into()),
13731 }
13732 }
13733 }
13734
13735 impl ::std::convert::TryFrom<&str> for ImageShapeStyle {
13736 type Error = self::error::ConversionError;
13737 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13738 value.parse()
13739 }
13740 }
13741
13742 impl ::std::convert::TryFrom<&::std::string::String> for ImageShapeStyle {
13743 type Error = self::error::ConversionError;
13744 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13745 value.parse()
13746 }
13747 }
13748
13749 impl ::std::convert::TryFrom<::std::string::String> for ImageShapeStyle {
13750 type Error = self::error::ConversionError;
13751 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13752 value.parse()
13753 }
13754 }
13755
13756 ///The status values that an image object can have.
13757 ///
13758 /// <details><summary>JSON schema</summary>
13759 ///
13760 /// ```json
13761 ///{
13762 /// "description": "The status values that an image object can have.",
13763 /// "type": "string",
13764 /// "enum": [
13765 /// "live",
13766 /// "deleted",
13767 /// "failed"
13768 /// ],
13769 /// "x-schema-name": "ImageStatus",
13770 /// "x-tsEnumNames": [
13771 /// "Live",
13772 /// "Deleted",
13773 /// "Failed"
13774 /// ]
13775 ///}
13776 /// ```
13777 /// </details>
13778 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13779 pub enum ImageStatus {
13780 #[serde(rename = "live")]
13781 Live,
13782 #[serde(rename = "deleted")]
13783 Deleted,
13784 #[serde(rename = "failed")]
13785 Failed,
13786 }
13787
13788 impl ::std::convert::From<&Self> for ImageStatus {
13789 fn from(value: &ImageStatus) -> Self {
13790 value.clone()
13791 }
13792 }
13793
13794 impl ::std::fmt::Display for ImageStatus {
13795 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13796 match *self {
13797 Self::Live => f.write_str("live"),
13798 Self::Deleted => f.write_str("deleted"),
13799 Self::Failed => f.write_str("failed"),
13800 }
13801 }
13802 }
13803
13804 impl ::std::str::FromStr for ImageStatus {
13805 type Err = self::error::ConversionError;
13806 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13807 match value {
13808 "live" => Ok(Self::Live),
13809 "deleted" => Ok(Self::Deleted),
13810 "failed" => Ok(Self::Failed),
13811 _ => Err("invalid value".into()),
13812 }
13813 }
13814 }
13815
13816 impl ::std::convert::TryFrom<&str> for ImageStatus {
13817 type Error = self::error::ConversionError;
13818 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13819 value.parse()
13820 }
13821 }
13822
13823 impl ::std::convert::TryFrom<&::std::string::String> for ImageStatus {
13824 type Error = self::error::ConversionError;
13825 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13826 value.parse()
13827 }
13828 }
13829
13830 impl ::std::convert::TryFrom<::std::string::String> for ImageStatus {
13831 type Error = self::error::ConversionError;
13832 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
13833 value.parse()
13834 }
13835 }
13836
13837 ///`ImageUrlValue`
13838 ///
13839 /// <details><summary>JSON schema</summary>
13840 ///
13841 /// ```json
13842 ///{
13843 /// "description": "A named url of an image along with metadata.",
13844 /// "allOf": [
13845 /// {
13846 /// "$ref": "#/components/schemas/LinkedDataObject"
13847 /// },
13848 /// {
13849 /// "type": "object",
13850 /// "required": [
13851 /// "@type"
13852 /// ],
13853 /// "properties": {
13854 /// "@type": {
13855 /// "type": "string",
13856 /// "enum": [
13857 /// "ImageObject"
13858 /// ],
13859 /// "x-tsType": "LinkedDataType.ImageObject"
13860 /// },
13861 /// "height": {
13862 /// "description": "The height of the image in pixels.",
13863 /// "examples": [
13864 /// 480
13865 /// ],
13866 /// "type": "number"
13867 /// },
13868 /// "name": {
13869 /// "description": "The name of the image.",
13870 /// "examples": [
13871 /// "Dogs Playing Poker"
13872 /// ],
13873 /// "type": "string"
13874 /// },
13875 /// "status": {
13876 /// "$ref": "#/components/schemas/ImageStatus"
13877 /// },
13878 /// "url": {
13879 /// "description": "The url of the image.",
13880 /// "examples": [
13881 /// "https://example.com/dogs-playing-poker.jpg"
13882 /// ],
13883 /// "type": "string"
13884 /// },
13885 /// "width": {
13886 /// "description": "The width of the image in pixels.",
13887 /// "examples": [
13888 /// 640
13889 /// ],
13890 /// "type": "number"
13891 /// }
13892 /// },
13893 /// "additionalProperties": false
13894 /// }
13895 /// ],
13896 /// "x-schema-name": "ImageUrlValue"
13897 ///}
13898 /// ```
13899 /// </details>
13900 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13901 #[serde(deny_unknown_fields)]
13902 pub enum ImageUrlValue {}
13903 impl ::std::convert::From<&Self> for ImageUrlValue {
13904 fn from(value: &ImageUrlValue) -> Self {
13905 value.clone()
13906 }
13907 }
13908
13909 ///An ingestion batch execution.
13910 ///
13911 /// <details><summary>JSON schema</summary>
13912 ///
13913 /// ```json
13914 ///{
13915 /// "description": "An ingestion batch execution.",
13916 /// "type": "object",
13917 /// "required": [
13918 /// "completionTimestamp",
13919 /// "creationTimestamp",
13920 /// "errorMessage",
13921 /// "executionType",
13922 /// "fullExecutionId",
13923 /// "ingestionExecutionId",
13924 /// "ingestionId",
13925 /// "ingestionName",
13926 /// "ingestionStatuses",
13927 /// "startTimestamp"
13928 /// ],
13929 /// "properties": {
13930 /// "completionTimestamp": {
13931 /// "description": "Completion time of the ingestion batch execution in
13932 /// seconds since epoch.",
13933 /// "type": "number"
13934 /// },
13935 /// "creationTimestamp": {
13936 /// "description": "Creation time of the ingestion batch execution in
13937 /// seconds since epoch.",
13938 /// "type": "number"
13939 /// },
13940 /// "dynamicLabel": {
13941 /// "description": "The label of the dynamic URL of the ingestion, if
13942 /// any.",
13943 /// "type": "string"
13944 /// },
13945 /// "dynamicUrl": {
13946 /// "description": "The dynamic URL of the ingestion.",
13947 /// "type": "string"
13948 /// },
13949 /// "executionType": {
13950 /// "$ref": "#/components/schemas/IngestionExecutionType"
13951 /// },
13952 /// "fullExecutionId": {
13953 /// "description": "The ID of the full ingestion execution.",
13954 /// "type": "string"
13955 /// },
13956 /// "ingestionExecutionId": {
13957 /// "description": "The ID of the ingestion batch execution.",
13958 /// "type": "string"
13959 /// },
13960 /// "ingestionId": {
13961 /// "description": "The ID of the ingestion.",
13962 /// "type": "string"
13963 /// },
13964 /// "ingestionName": {
13965 /// "description": "The name of the ingestion.",
13966 /// "type": "string"
13967 /// },
13968 /// "ingestionStatusCounts": {
13969 /// "description": "Histogram of IngestionStatus of child executions
13970 /// (even if there's only 1, non-crawled execution) as enum values.",
13971 /// "examples": [
13972 /// {
13973 /// "COMPLETED": 12,
13974 /// "FAILED": 5,
13975 /// "STARTED": 4
13976 /// }
13977 /// ],
13978 /// "type": "object",
13979 /// "additionalProperties": {
13980 /// "type": "integer"
13981 /// }
13982 /// },
13983 /// "lastFinishedFullWorkflowExecutionId": {
13984 /// "description": "The ID of the last full workflow execution that
13985 /// finished.",
13986 /// "type": "string",
13987 /// "format": "uuid"
13988 /// },
13989 /// "lastFinishedIncrementalWorkflowExecutionId": {
13990 /// "description": "The ID of the last incremental workflow execution
13991 /// that finished.",
13992 /// "type": "string",
13993 /// "format": "uuid"
13994 /// },
13995 /// "latestFullWorkflowExecutionId": {
13996 /// "description": "The ID of the latest full workflow execution.",
13997 /// "type": "string",
13998 /// "format": "uuid"
13999 /// },
14000 /// "latestIncrementalWorkflowExecutionId": {
14001 /// "description": "The ID of the latest incremental workflow
14002 /// execution.",
14003 /// "type": "string",
14004 /// "format": "uuid"
14005 /// },
14006 /// "latestIngestionSequenceId": {
14007 /// "description": "The ID of the latest full execution.",
14008 /// "type": "string",
14009 /// "format": "uuid"
14010 /// },
14011 /// "liveIngestionSequenceId": {
14012 /// "description": "The ID of the full execution that generated the
14013 /// currently live data.",
14014 /// "type": "string",
14015 /// "format": "uuid"
14016 /// },
14017 /// "parentSyncTableIngestionId": {
14018 /// "description": "The ID of the parent sync tableingestion, if any.",
14019 /// "type": "string"
14020 /// },
14021 /// "startTimestamp": {
14022 /// "description": "Start time of the ingestion batch execution in
14023 /// seconds since epoch.",
14024 /// "type": "number"
14025 /// },
14026 /// "totalRowCount": {
14027 /// "description": "The total number of rows processed in the ingestion
14028 /// batch execution.",
14029 /// "type": "number"
14030 /// }
14031 /// },
14032 /// "additionalProperties": false,
14033 /// "x-schema-name": "IngestionBatchExecution"
14034 ///}
14035 /// ```
14036 /// </details>
14037 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14038 #[serde(deny_unknown_fields)]
14039 pub struct IngestionBatchExecution {
14040 #[serde(rename = "completionTimestamp")]
14041 pub completion_timestamp: f64,
14042 #[serde(rename = "creationTimestamp")]
14043 pub creation_timestamp: f64,
14044 ///The label of the dynamic URL of the ingestion, if any.
14045 #[serde(rename = "dynamicLabel", default, skip_serializing_if = "::std::option::Option::is_none")]
14046 pub dynamic_label: ::std::option::Option<::std::string::String>,
14047 ///The dynamic URL of the ingestion.
14048 #[serde(rename = "dynamicUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
14049 pub dynamic_url: ::std::option::Option<::std::string::String>,
14050 #[serde(rename = "errorMessage")]
14051 pub error_message: ::serde_json::Value,
14052 #[serde(rename = "executionType")]
14053 pub execution_type: IngestionExecutionType,
14054 ///The ID of the full ingestion execution.
14055 #[serde(rename = "fullExecutionId")]
14056 pub full_execution_id: ::std::string::String,
14057 ///The ID of the ingestion batch execution.
14058 #[serde(rename = "ingestionExecutionId")]
14059 pub ingestion_execution_id: ::std::string::String,
14060 ///The ID of the ingestion.
14061 #[serde(rename = "ingestionId")]
14062 pub ingestion_id: ::std::string::String,
14063 ///The name of the ingestion.
14064 #[serde(rename = "ingestionName")]
14065 pub ingestion_name: ::std::string::String,
14066 ///Histogram of IngestionStatus of child executions (even if there's
14067 /// only 1, non-crawled execution) as enum values.
14068 #[serde(rename = "ingestionStatusCounts", default, skip_serializing_if = ":: std :: collections :: HashMap::is_empty")]
14069 pub ingestion_status_counts: ::std::collections::HashMap<::std::string::String, i64>,
14070 #[serde(rename = "ingestionStatuses")]
14071 pub ingestion_statuses: ::serde_json::Value,
14072 ///The ID of the last full workflow execution that finished.
14073 #[serde(rename = "lastFinishedFullWorkflowExecutionId", default, skip_serializing_if = "::std::option::Option::is_none")]
14074 pub last_finished_full_workflow_execution_id: ::std::option::Option<::uuid::Uuid>,
14075 ///The ID of the last incremental workflow execution that finished.
14076 #[serde(rename = "lastFinishedIncrementalWorkflowExecutionId", default, skip_serializing_if = "::std::option::Option::is_none")]
14077 pub last_finished_incremental_workflow_execution_id: ::std::option::Option<::uuid::Uuid>,
14078 ///The ID of the latest full workflow execution.
14079 #[serde(rename = "latestFullWorkflowExecutionId", default, skip_serializing_if = "::std::option::Option::is_none")]
14080 pub latest_full_workflow_execution_id: ::std::option::Option<::uuid::Uuid>,
14081 ///The ID of the latest incremental workflow execution.
14082 #[serde(rename = "latestIncrementalWorkflowExecutionId", default, skip_serializing_if = "::std::option::Option::is_none")]
14083 pub latest_incremental_workflow_execution_id: ::std::option::Option<::uuid::Uuid>,
14084 ///The ID of the latest full execution.
14085 #[serde(rename = "latestIngestionSequenceId", default, skip_serializing_if = "::std::option::Option::is_none")]
14086 pub latest_ingestion_sequence_id: ::std::option::Option<::uuid::Uuid>,
14087 ///The ID of the full execution that generated the currently live data.
14088 #[serde(rename = "liveIngestionSequenceId", default, skip_serializing_if = "::std::option::Option::is_none")]
14089 pub live_ingestion_sequence_id: ::std::option::Option<::uuid::Uuid>,
14090 ///The ID of the parent sync tableingestion, if any.
14091 #[serde(rename = "parentSyncTableIngestionId", default, skip_serializing_if = "::std::option::Option::is_none")]
14092 pub parent_sync_table_ingestion_id: ::std::option::Option<::std::string::String>,
14093 #[serde(rename = "startTimestamp")]
14094 pub start_timestamp: f64,
14095 #[serde(rename = "totalRowCount", default, skip_serializing_if = "::std::option::Option::is_none")]
14096 pub total_row_count: ::std::option::Option<f64>,
14097 }
14098
14099 impl ::std::convert::From<&IngestionBatchExecution> for IngestionBatchExecution {
14100 fn from(value: &IngestionBatchExecution) -> Self {
14101 value.clone()
14102 }
14103 }
14104
14105 ///List of Ingestion Batch Executions.
14106 ///
14107 /// <details><summary>JSON schema</summary>
14108 ///
14109 /// ```json
14110 ///{
14111 /// "description": "List of Ingestion Batch Executions.",
14112 /// "type": "object",
14113 /// "required": [
14114 /// "items"
14115 /// ],
14116 /// "properties": {
14117 /// "items": {
14118 /// "type": "array",
14119 /// "items": {
14120 /// "$ref": "#/components/schemas/IngestionBatchExecution"
14121 /// }
14122 /// },
14123 /// "nextPageToken": {
14124 /// "$ref": "#/components/schemas/nextPageToken"
14125 /// }
14126 /// },
14127 /// "additionalProperties": false,
14128 /// "x-schema-name": "IngestionBatchExecutionsList"
14129 ///}
14130 /// ```
14131 /// </details>
14132 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14133 #[serde(deny_unknown_fields)]
14134 pub struct IngestionBatchExecutionsList {
14135 pub items: ::std::vec::Vec<IngestionBatchExecution>,
14136 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
14137 pub next_page_token: ::std::option::Option<NextPageToken>,
14138 }
14139
14140 impl ::std::convert::From<&IngestionBatchExecutionsList> for IngestionBatchExecutionsList {
14141 fn from(value: &IngestionBatchExecutionsList) -> Self {
14142 value.clone()
14143 }
14144 }
14145
14146 ///Type of an ingestion childexecution.
14147 ///
14148 /// <details><summary>JSON schema</summary>
14149 ///
14150 /// ```json
14151 ///{
14152 /// "description": "Type of an ingestion childexecution.",
14153 /// "type": "string",
14154 /// "enum": [
14155 /// "FULL",
14156 /// "INCREMENTAL",
14157 /// "PATCH"
14158 /// ],
14159 /// "x-schema-name": "IngestionChildExecutionType",
14160 /// "x-tsEnumNames": [
14161 /// "Full",
14162 /// "Incremental",
14163 /// "Patch"
14164 /// ]
14165 ///}
14166 /// ```
14167 /// </details>
14168 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14169 pub enum IngestionChildExecutionType {
14170 #[serde(rename = "FULL")]
14171 Full,
14172 #[serde(rename = "INCREMENTAL")]
14173 Incremental,
14174 #[serde(rename = "PATCH")]
14175 Patch,
14176 }
14177
14178 impl ::std::convert::From<&Self> for IngestionChildExecutionType {
14179 fn from(value: &IngestionChildExecutionType) -> Self {
14180 value.clone()
14181 }
14182 }
14183
14184 impl ::std::fmt::Display for IngestionChildExecutionType {
14185 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14186 match *self {
14187 Self::Full => f.write_str("FULL"),
14188 Self::Incremental => f.write_str("INCREMENTAL"),
14189 Self::Patch => f.write_str("PATCH"),
14190 }
14191 }
14192 }
14193
14194 impl ::std::str::FromStr for IngestionChildExecutionType {
14195 type Err = self::error::ConversionError;
14196 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14197 match value {
14198 "FULL" => Ok(Self::Full),
14199 "INCREMENTAL" => Ok(Self::Incremental),
14200 "PATCH" => Ok(Self::Patch),
14201 _ => Err("invalid value".into()),
14202 }
14203 }
14204 }
14205
14206 impl ::std::convert::TryFrom<&str> for IngestionChildExecutionType {
14207 type Error = self::error::ConversionError;
14208 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14209 value.parse()
14210 }
14211 }
14212
14213 impl ::std::convert::TryFrom<&::std::string::String> for IngestionChildExecutionType {
14214 type Error = self::error::ConversionError;
14215 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14216 value.parse()
14217 }
14218 }
14219
14220 impl ::std::convert::TryFrom<::std::string::String> for IngestionChildExecutionType {
14221 type Error = self::error::ConversionError;
14222 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14223 value.parse()
14224 }
14225 }
14226
14227 ///An attempt of an ingestion execution.
14228 ///
14229 /// <details><summary>JSON schema</summary>
14230 ///
14231 /// ```json
14232 ///{
14233 /// "description": "An attempt of an ingestion execution.",
14234 /// "type": "object",
14235 /// "required": [
14236 /// "attemptNumber",
14237 /// "completionTimestamp",
14238 /// "csbIngestionExecutionId",
14239 /// "errorMessage",
14240 /// "message",
14241 /// "startTimestamp"
14242 /// ],
14243 /// "properties": {
14244 /// "attemptNumber": {
14245 /// "description": "The attempt number of the ingestion execution
14246 /// attempt.",
14247 /// "type": "number"
14248 /// },
14249 /// "completionTimestamp": {
14250 /// "description": "The completion time of the ingestion execution
14251 /// attempt in seconds since epoch.",
14252 /// "type": [
14253 /// "number",
14254 /// "null"
14255 /// ]
14256 /// },
14257 /// "csbIngestionExecutionId": {
14258 /// "description": "The ID of the ingestion execution.",
14259 /// "type": "string"
14260 /// },
14261 /// "errorMessage": {
14262 /// "description": "The error message of the ingestion execution
14263 /// attempt.",
14264 /// "type": [
14265 /// "string",
14266 /// "null"
14267 /// ]
14268 /// },
14269 /// "ingestionStatus": {
14270 /// "$ref": "#/components/schemas/IngestionStatus"
14271 /// },
14272 /// "latestCheckpointTimestamp": {
14273 /// "description": "The timestamp of the latest checkpoint of the
14274 /// ingestion execution attempt.",
14275 /// "type": [
14276 /// "number",
14277 /// "null"
14278 /// ]
14279 /// },
14280 /// "rowCountInAttempt": {
14281 /// "description": "The total number of rows processed in the ingestion
14282 /// execution attempt.",
14283 /// "type": [
14284 /// "string",
14285 /// "null"
14286 /// ]
14287 /// },
14288 /// "startTimestamp": {
14289 /// "description": "The start time of the ingestion execution attempt
14290 /// in seconds since epoch.",
14291 /// "type": [
14292 /// "number",
14293 /// "null"
14294 /// ]
14295 /// }
14296 /// },
14297 /// "additionalProperties": false,
14298 /// "x-schema-name": "IngestionExecutionAttempt"
14299 ///}
14300 /// ```
14301 /// </details>
14302 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14303 #[serde(deny_unknown_fields)]
14304 pub struct IngestionExecutionAttempt {
14305 #[serde(rename = "attemptNumber")]
14306 pub attempt_number: f64,
14307 ///The completion time of the ingestion execution attempt in seconds
14308 /// since epoch.
14309 #[serde(rename = "completionTimestamp")]
14310 pub completion_timestamp: ::std::option::Option<f64>,
14311 ///The ID of the ingestion execution.
14312 #[serde(rename = "csbIngestionExecutionId")]
14313 pub csb_ingestion_execution_id: ::std::string::String,
14314 ///The error message of the ingestion execution attempt.
14315 #[serde(rename = "errorMessage")]
14316 pub error_message: ::std::option::Option<::std::string::String>,
14317 #[serde(rename = "ingestionStatus", default, skip_serializing_if = "::std::option::Option::is_none")]
14318 pub ingestion_status: ::std::option::Option<IngestionStatus>,
14319 ///The timestamp of the latest checkpoint of the ingestion execution
14320 /// attempt.
14321 #[serde(rename = "latestCheckpointTimestamp", default, skip_serializing_if = "::std::option::Option::is_none")]
14322 pub latest_checkpoint_timestamp: ::std::option::Option<f64>,
14323 pub message: ::serde_json::Value,
14324 ///The total number of rows processed in the ingestion execution
14325 /// attempt.
14326 #[serde(rename = "rowCountInAttempt", default, skip_serializing_if = "::std::option::Option::is_none")]
14327 pub row_count_in_attempt: ::std::option::Option<::std::string::String>,
14328 ///The start time of the ingestion execution attempt in seconds since
14329 /// epoch.
14330 #[serde(rename = "startTimestamp")]
14331 pub start_timestamp: ::std::option::Option<f64>,
14332 }
14333
14334 impl ::std::convert::From<&IngestionExecutionAttempt> for IngestionExecutionAttempt {
14335 fn from(value: &IngestionExecutionAttempt) -> Self {
14336 value.clone()
14337 }
14338 }
14339
14340 ///List of Ingestion Execution Attempts.
14341 ///
14342 /// <details><summary>JSON schema</summary>
14343 ///
14344 /// ```json
14345 ///{
14346 /// "description": "List of Ingestion Execution Attempts.",
14347 /// "type": "object",
14348 /// "required": [
14349 /// "items"
14350 /// ],
14351 /// "properties": {
14352 /// "items": {
14353 /// "type": "array",
14354 /// "items": {
14355 /// "$ref": "#/components/schemas/IngestionExecutionAttempt"
14356 /// }
14357 /// },
14358 /// "nextPageToken": {
14359 /// "$ref": "#/components/schemas/nextPageToken"
14360 /// }
14361 /// },
14362 /// "additionalProperties": false,
14363 /// "x-schema-name": "IngestionExecutionAttemptsList"
14364 ///}
14365 /// ```
14366 /// </details>
14367 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14368 #[serde(deny_unknown_fields)]
14369 pub struct IngestionExecutionAttemptsList {
14370 pub items: ::std::vec::Vec<IngestionExecutionAttempt>,
14371 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
14372 pub next_page_token: ::std::option::Option<NextPageToken>,
14373 }
14374
14375 impl ::std::convert::From<&IngestionExecutionAttemptsList> for IngestionExecutionAttemptsList {
14376 fn from(value: &IngestionExecutionAttemptsList) -> Self {
14377 value.clone()
14378 }
14379 }
14380
14381 ///Context that comes with a ingestion execution.
14382 ///
14383 /// <details><summary>JSON schema</summary>
14384 ///
14385 /// ```json
14386 ///{
14387 /// "description": "Context that comes with a ingestion execution.",
14388 /// "type": "object",
14389 /// "required": [
14390 /// "attemptNumber",
14391 /// "completionTimestamp",
14392 /// "creationTimestamp",
14393 /// "csbIngestionExecutionId",
14394 /// "csbIngestionId",
14395 /// "errorMessage",
14396 /// "executionType",
14397 /// "ingestionName",
14398 /// "ingestionStatus",
14399 /// "nextEligibleIncrementalTimestamp",
14400 /// "nextEligibleTimestamp",
14401 /// "parentItemId",
14402 /// "startTimestamp"
14403 /// ],
14404 /// "properties": {
14405 /// "attemptNumber": {
14406 /// "description": "The attempt number of the ingestion execution.",
14407 /// "type": "number"
14408 /// },
14409 /// "completionTimestamp": {
14410 /// "description": "Completion time of the ingestion execution in
14411 /// seconds since epoch.",
14412 /// "type": [
14413 /// "number",
14414 /// "null"
14415 /// ]
14416 /// },
14417 /// "creationTimestamp": {
14418 /// "description": "Creation time of the ingestion execution in seconds
14419 /// since epoch.",
14420 /// "type": "number"
14421 /// },
14422 /// "csbIngestionExecutionId": {
14423 /// "type": "string"
14424 /// },
14425 /// "csbIngestionId": {
14426 /// "type": "string"
14427 /// },
14428 /// "errorMessage": {
14429 /// "type": [
14430 /// "string",
14431 /// "null"
14432 /// ]
14433 /// },
14434 /// "executionType": {
14435 /// "$ref": "#/components/schemas/IngestionExecutionType"
14436 /// },
14437 /// "ingestionName": {
14438 /// "type": [
14439 /// "string",
14440 /// "null"
14441 /// ]
14442 /// },
14443 /// "ingestionStatus": {
14444 /// "$ref": "#/components/schemas/IngestionStatus"
14445 /// },
14446 /// "latestCheckpointTimestamp": {
14447 /// "description": "The timestamp of the latest checkpoint of the
14448 /// ingestion execution.",
14449 /// "type": "number"
14450 /// },
14451 /// "nextEligibleIncrementalTimestamp": {
14452 /// "description": "Next eligible time for the ingestion to run
14453 /// incrementally in seconds since epoch.",
14454 /// "type": [
14455 /// "number",
14456 /// "null"
14457 /// ]
14458 /// },
14459 /// "nextEligibleTimestamp": {
14460 /// "description": "Next eligible time for the ingestion to run in
14461 /// seconds since epoch.",
14462 /// "type": [
14463 /// "number",
14464 /// "null"
14465 /// ]
14466 /// },
14467 /// "parentItemId": {
14468 /// "type": [
14469 /// "string",
14470 /// "null"
14471 /// ]
14472 /// },
14473 /// "startTimestamp": {
14474 /// "description": "Start time of the ingestion execution in seconds
14475 /// since epoch.",
14476 /// "type": [
14477 /// "number",
14478 /// "null"
14479 /// ]
14480 /// },
14481 /// "totalRowCount": {
14482 /// "description": "The total number of rows processed in the ingestion
14483 /// execution.",
14484 /// "type": "string"
14485 /// }
14486 /// },
14487 /// "additionalProperties": false,
14488 /// "x-schema-name": "IngestionExecutionContext"
14489 ///}
14490 /// ```
14491 /// </details>
14492 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14493 #[serde(deny_unknown_fields)]
14494 pub struct IngestionExecutionContext {
14495 #[serde(rename = "attemptNumber")]
14496 pub attempt_number: f64,
14497 ///Completion time of the ingestion execution in seconds since epoch.
14498 #[serde(rename = "completionTimestamp")]
14499 pub completion_timestamp: ::std::option::Option<f64>,
14500 #[serde(rename = "creationTimestamp")]
14501 pub creation_timestamp: f64,
14502 #[serde(rename = "csbIngestionExecutionId")]
14503 pub csb_ingestion_execution_id: ::std::string::String,
14504 #[serde(rename = "csbIngestionId")]
14505 pub csb_ingestion_id: ::std::string::String,
14506 #[serde(rename = "errorMessage")]
14507 pub error_message: ::std::option::Option<::std::string::String>,
14508 #[serde(rename = "executionType")]
14509 pub execution_type: IngestionExecutionType,
14510 #[serde(rename = "ingestionName")]
14511 pub ingestion_name: ::std::option::Option<::std::string::String>,
14512 #[serde(rename = "ingestionStatus")]
14513 pub ingestion_status: IngestionStatus,
14514 #[serde(rename = "latestCheckpointTimestamp", default, skip_serializing_if = "::std::option::Option::is_none")]
14515 pub latest_checkpoint_timestamp: ::std::option::Option<f64>,
14516 ///Next eligible time for the ingestion to run incrementally in seconds
14517 /// since epoch.
14518 #[serde(rename = "nextEligibleIncrementalTimestamp")]
14519 pub next_eligible_incremental_timestamp: ::std::option::Option<f64>,
14520 ///Next eligible time for the ingestion to run in seconds since epoch.
14521 #[serde(rename = "nextEligibleTimestamp")]
14522 pub next_eligible_timestamp: ::std::option::Option<f64>,
14523 #[serde(rename = "parentItemId")]
14524 pub parent_item_id: ::std::option::Option<::std::string::String>,
14525 ///Start time of the ingestion execution in seconds since epoch.
14526 #[serde(rename = "startTimestamp")]
14527 pub start_timestamp: ::std::option::Option<f64>,
14528 ///The total number of rows processed in the ingestion execution.
14529 #[serde(rename = "totalRowCount", default, skip_serializing_if = "::std::option::Option::is_none")]
14530 pub total_row_count: ::std::option::Option<::std::string::String>,
14531 }
14532
14533 impl ::std::convert::From<&IngestionExecutionContext> for IngestionExecutionContext {
14534 fn from(value: &IngestionExecutionContext) -> Self {
14535 value.clone()
14536 }
14537 }
14538
14539 ///Type of an ingestion batch execution.
14540 ///
14541 /// <details><summary>JSON schema</summary>
14542 ///
14543 /// ```json
14544 ///{
14545 /// "description": "Type of an ingestion batch execution.",
14546 /// "type": "string",
14547 /// "enum": [
14548 /// "FULL",
14549 /// "INCREMENTAL"
14550 /// ],
14551 /// "x-schema-name": "IngestionExecutionType",
14552 /// "x-tsEnumNames": [
14553 /// "Full",
14554 /// "Incremental"
14555 /// ]
14556 ///}
14557 /// ```
14558 /// </details>
14559 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14560 pub enum IngestionExecutionType {
14561 #[serde(rename = "FULL")]
14562 Full,
14563 #[serde(rename = "INCREMENTAL")]
14564 Incremental,
14565 }
14566
14567 impl ::std::convert::From<&Self> for IngestionExecutionType {
14568 fn from(value: &IngestionExecutionType) -> Self {
14569 value.clone()
14570 }
14571 }
14572
14573 impl ::std::fmt::Display for IngestionExecutionType {
14574 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14575 match *self {
14576 Self::Full => f.write_str("FULL"),
14577 Self::Incremental => f.write_str("INCREMENTAL"),
14578 }
14579 }
14580 }
14581
14582 impl ::std::str::FromStr for IngestionExecutionType {
14583 type Err = self::error::ConversionError;
14584 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14585 match value {
14586 "FULL" => Ok(Self::Full),
14587 "INCREMENTAL" => Ok(Self::Incremental),
14588 _ => Err("invalid value".into()),
14589 }
14590 }
14591 }
14592
14593 impl ::std::convert::TryFrom<&str> for IngestionExecutionType {
14594 type Error = self::error::ConversionError;
14595 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14596 value.parse()
14597 }
14598 }
14599
14600 impl ::std::convert::TryFrom<&::std::string::String> for IngestionExecutionType {
14601 type Error = self::error::ConversionError;
14602 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14603 value.parse()
14604 }
14605 }
14606
14607 impl ::std::convert::TryFrom<::std::string::String> for IngestionExecutionType {
14608 type Error = self::error::ConversionError;
14609 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14610 value.parse()
14611 }
14612 }
14613
14614 ///List of Ingestion Executions.
14615 ///
14616 /// <details><summary>JSON schema</summary>
14617 ///
14618 /// ```json
14619 ///{
14620 /// "description": "List of Ingestion Executions.",
14621 /// "type": "object",
14622 /// "required": [
14623 /// "items"
14624 /// ],
14625 /// "properties": {
14626 /// "items": {
14627 /// "type": "array",
14628 /// "items": {
14629 /// "$ref": "#/components/schemas/IngestionExecutionContext"
14630 /// }
14631 /// },
14632 /// "nextPageToken": {
14633 /// "$ref": "#/components/schemas/nextPageToken"
14634 /// }
14635 /// },
14636 /// "additionalProperties": false,
14637 /// "x-schema-name": "IngestionExecutionsList"
14638 ///}
14639 /// ```
14640 /// </details>
14641 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14642 #[serde(deny_unknown_fields)]
14643 pub struct IngestionExecutionsList {
14644 pub items: ::std::vec::Vec<IngestionExecutionContext>,
14645 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
14646 pub next_page_token: ::std::option::Option<NextPageToken>,
14647 }
14648
14649 impl ::std::convert::From<&IngestionExecutionsList> for IngestionExecutionsList {
14650 fn from(value: &IngestionExecutionsList) -> Self {
14651 value.clone()
14652 }
14653 }
14654
14655 ///Limits for a pack-driven ingestion
14656 ///
14657 /// <details><summary>JSON schema</summary>
14658 ///
14659 /// ```json
14660 ///{
14661 /// "description": "Limits for a pack-driven ingestion",
14662 /// "type": "object",
14663 /// "required": [
14664 /// "allowedTablesCount",
14665 /// "maxBytesPerSyncTableDefault"
14666 /// ],
14667 /// "properties": {
14668 /// "allowedTablesCount": {
14669 /// "description": "The maximum number of tables that can be included.
14670 /// -1 means no limit.",
14671 /// "type": "number"
14672 /// },
14673 /// "maxBytesPerSyncTableDefault": {
14674 /// "description": "The default bytes limit when ingesting data for a
14675 /// table in the pack. null means no limit.",
14676 /// "type": [
14677 /// "number",
14678 /// "null"
14679 /// ]
14680 /// },
14681 /// "tableSettings": {
14682 /// "description": "Map from table name to per table settings. This may
14683 /// not include every table in the pack. Each setting per table will include
14684 /// an optional maxBytesPerSyncTableOverride that will override the default,
14685 /// an optional excludeIngestionByDefault flag, and an optional
14686 /// parameterLimits dictionary of allowed parameter values.\n",
14687 /// "type": "object",
14688 /// "additionalProperties": {
14689 /// "$ref": "#/components/schemas/IngestionTableSetting"
14690 /// }
14691 /// }
14692 /// },
14693 /// "additionalProperties": false,
14694 /// "x-schema-name": "IngestionLimitSettings"
14695 ///}
14696 /// ```
14697 /// </details>
14698 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14699 #[serde(deny_unknown_fields)]
14700 pub struct IngestionLimitSettings {
14701 #[serde(rename = "allowedTablesCount")]
14702 pub allowed_tables_count: f64,
14703 ///The default bytes limit when ingesting data for a table in the pack.
14704 /// null means no limit.
14705 #[serde(rename = "maxBytesPerSyncTableDefault")]
14706 pub max_bytes_per_sync_table_default: ::std::option::Option<f64>,
14707 ///Map from table name to per table settings. This may not include
14708 /// every table in the pack. Each setting per table will include an
14709 /// optional maxBytesPerSyncTableOverride that will override the
14710 /// default, an optional excludeIngestionByDefault flag, and an optional
14711 /// parameterLimits dictionary of allowed parameter values.
14712 #[serde(rename = "tableSettings", default, skip_serializing_if = ":: std :: collections :: HashMap::is_empty")]
14713 pub table_settings: ::std::collections::HashMap<::std::string::String, IngestionTableSetting>,
14714 }
14715
14716 impl ::std::convert::From<&IngestionLimitSettings> for IngestionLimitSettings {
14717 fn from(value: &IngestionLimitSettings) -> Self {
14718 value.clone()
14719 }
14720 }
14721
14722 ///Live or Latest version of pack
14723 ///
14724 /// <details><summary>JSON schema</summary>
14725 ///
14726 /// ```json
14727 ///{
14728 /// "description": "Live or Latest version of pack",
14729 /// "type": "string",
14730 /// "enum": [
14731 /// "LIVE",
14732 /// "LATEST"
14733 /// ],
14734 /// "x-schema-name": "IngestionPackReleaseChannel",
14735 /// "x-tsEnumNames": [
14736 /// "Live",
14737 /// "Latest"
14738 /// ]
14739 ///}
14740 /// ```
14741 /// </details>
14742 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14743 pub enum IngestionPackReleaseChannel {
14744 #[serde(rename = "LIVE")]
14745 Live,
14746 #[serde(rename = "LATEST")]
14747 Latest,
14748 }
14749
14750 impl ::std::convert::From<&Self> for IngestionPackReleaseChannel {
14751 fn from(value: &IngestionPackReleaseChannel) -> Self {
14752 value.clone()
14753 }
14754 }
14755
14756 impl ::std::fmt::Display for IngestionPackReleaseChannel {
14757 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14758 match *self {
14759 Self::Live => f.write_str("LIVE"),
14760 Self::Latest => f.write_str("LATEST"),
14761 }
14762 }
14763 }
14764
14765 impl ::std::str::FromStr for IngestionPackReleaseChannel {
14766 type Err = self::error::ConversionError;
14767 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14768 match value {
14769 "LIVE" => Ok(Self::Live),
14770 "LATEST" => Ok(Self::Latest),
14771 _ => Err("invalid value".into()),
14772 }
14773 }
14774 }
14775
14776 impl ::std::convert::TryFrom<&str> for IngestionPackReleaseChannel {
14777 type Error = self::error::ConversionError;
14778 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14779 value.parse()
14780 }
14781 }
14782
14783 impl ::std::convert::TryFrom<&::std::string::String> for IngestionPackReleaseChannel {
14784 type Error = self::error::ConversionError;
14785 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14786 value.parse()
14787 }
14788 }
14789
14790 impl ::std::convert::TryFrom<::std::string::String> for IngestionPackReleaseChannel {
14791 type Error = self::error::ConversionError;
14792 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
14793 value.parse()
14794 }
14795 }
14796
14797 ///An ingestion parent item and its execution state (either full or
14798 /// incremental).
14799 ///
14800 /// <details><summary>JSON schema</summary>
14801 ///
14802 /// ```json
14803 ///{
14804 /// "description": "An ingestion parent item and its execution state
14805 /// (either full or incremental).",
14806 /// "type": "object",
14807 /// "required": [
14808 /// "completionTimestamp",
14809 /// "creationTimestamp",
14810 /// "errorMessage",
14811 /// "executionType",
14812 /// "ingestionExecutionId",
14813 /// "ingestionName",
14814 /// "parentItemId",
14815 /// "startTimestamp"
14816 /// ],
14817 /// "properties": {
14818 /// "attemptNumber": {
14819 /// "description": "The attempt number of the ingestion child
14820 /// execution.",
14821 /// "type": "number"
14822 /// },
14823 /// "completionTimestamp": {
14824 /// "description": "Completion time of the ingestion child execution in
14825 /// seconds since epoch.",
14826 /// "type": "number"
14827 /// },
14828 /// "errorMessage": {
14829 /// "type": [
14830 /// "string",
14831 /// "null"
14832 /// ]
14833 /// },
14834 /// "executionType": {
14835 /// "$ref": "#/components/schemas/IngestionChildExecutionType"
14836 /// },
14837 /// "ingestionChildExecutionIndex": {
14838 /// "description": "Current execution index for this parent item's
14839 /// child execution.",
14840 /// "type": "number"
14841 /// },
14842 /// "ingestionExecutionId": {
14843 /// "description": "The ID of the ingestion child execution.",
14844 /// "type": "string"
14845 /// },
14846 /// "ingestionName": {
14847 /// "description": "The name of the ingestion child execution.",
14848 /// "type": "string"
14849 /// },
14850 /// "ingestionStatus": {
14851 /// "$ref": "#/components/schemas/IngestionStatus"
14852 /// },
14853 /// "latestCheckpointTimestamp": {
14854 /// "description": "The timestamp of the latest checkpoint of the
14855 /// ingestion child execution.",
14856 /// "type": "number"
14857 /// },
14858 /// "parentItemId": {
14859 /// "description": "The ID of the parent item.",
14860 /// "type": "string"
14861 /// },
14862 /// "rowCount": {
14863 /// "description": "The number of rows processed so far in the current
14864 /// ingestion child execution.",
14865 /// "type": "number"
14866 /// },
14867 /// "startTimestamp": {
14868 /// "description": "Start time of the ingestion child execution in
14869 /// seconds since epoch.",
14870 /// "type": "number"
14871 /// }
14872 /// },
14873 /// "additionalProperties": false,
14874 /// "x-schema-name": "IngestionParentItem"
14875 ///}
14876 /// ```
14877 /// </details>
14878 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14879 #[serde(deny_unknown_fields)]
14880 pub struct IngestionParentItem {
14881 #[serde(rename = "attemptNumber", default, skip_serializing_if = "::std::option::Option::is_none")]
14882 pub attempt_number: ::std::option::Option<f64>,
14883 #[serde(rename = "completionTimestamp")]
14884 pub completion_timestamp: f64,
14885 #[serde(rename = "creationTimestamp")]
14886 pub creation_timestamp: ::serde_json::Value,
14887 #[serde(rename = "errorMessage")]
14888 pub error_message: ::std::option::Option<::std::string::String>,
14889 #[serde(rename = "executionType")]
14890 pub execution_type: IngestionChildExecutionType,
14891 #[serde(rename = "ingestionChildExecutionIndex", default, skip_serializing_if = "::std::option::Option::is_none")]
14892 pub ingestion_child_execution_index: ::std::option::Option<f64>,
14893 ///The ID of the ingestion child execution.
14894 #[serde(rename = "ingestionExecutionId")]
14895 pub ingestion_execution_id: ::std::string::String,
14896 ///The name of the ingestion child execution.
14897 #[serde(rename = "ingestionName")]
14898 pub ingestion_name: ::std::string::String,
14899 #[serde(rename = "ingestionStatus", default, skip_serializing_if = "::std::option::Option::is_none")]
14900 pub ingestion_status: ::std::option::Option<IngestionStatus>,
14901 #[serde(rename = "latestCheckpointTimestamp", default, skip_serializing_if = "::std::option::Option::is_none")]
14902 pub latest_checkpoint_timestamp: ::std::option::Option<f64>,
14903 ///The ID of the parent item.
14904 #[serde(rename = "parentItemId")]
14905 pub parent_item_id: ::std::string::String,
14906 #[serde(rename = "rowCount", default, skip_serializing_if = "::std::option::Option::is_none")]
14907 pub row_count: ::std::option::Option<f64>,
14908 #[serde(rename = "startTimestamp")]
14909 pub start_timestamp: f64,
14910 }
14911
14912 impl ::std::convert::From<&IngestionParentItem> for IngestionParentItem {
14913 fn from(value: &IngestionParentItem) -> Self {
14914 value.clone()
14915 }
14916 }
14917
14918 ///List of Ingestion Parent Items.
14919 ///
14920 /// <details><summary>JSON schema</summary>
14921 ///
14922 /// ```json
14923 ///{
14924 /// "description": "List of Ingestion Parent Items.",
14925 /// "type": "object",
14926 /// "required": [
14927 /// "items"
14928 /// ],
14929 /// "properties": {
14930 /// "items": {
14931 /// "type": "array",
14932 /// "items": {
14933 /// "$ref": "#/components/schemas/IngestionParentItem"
14934 /// }
14935 /// },
14936 /// "nextPageToken": {
14937 /// "$ref": "#/components/schemas/nextPageToken"
14938 /// }
14939 /// },
14940 /// "additionalProperties": false,
14941 /// "x-schema-name": "IngestionParentItemsList"
14942 ///}
14943 /// ```
14944 /// </details>
14945 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14946 #[serde(deny_unknown_fields)]
14947 pub struct IngestionParentItemsList {
14948 pub items: ::std::vec::Vec<IngestionParentItem>,
14949 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
14950 pub next_page_token: ::std::option::Option<NextPageToken>,
14951 }
14952
14953 impl ::std::convert::From<&IngestionParentItemsList> for IngestionParentItemsList {
14954 fn from(value: &IngestionParentItemsList) -> Self {
14955 value.clone()
14956 }
14957 }
14958
14959 ///Status of the ingestion execution.
14960 ///
14961 /// <details><summary>JSON schema</summary>
14962 ///
14963 /// ```json
14964 ///{
14965 /// "description": "Status of the ingestion execution.",
14966 /// "type": "string",
14967 /// "enum": [
14968 /// "QUEUED",
14969 /// "STARTED",
14970 /// "CANCELLED",
14971 /// "UP_FOR_RETRY",
14972 /// "COMPLETED",
14973 /// "FAILED"
14974 /// ],
14975 /// "x-schema-name": "IngestionStatus",
14976 /// "x-tsEnumNames": [
14977 /// "Queued",
14978 /// "Started",
14979 /// "Cancelled",
14980 /// "UpForRetry",
14981 /// "Completed",
14982 /// "Failed"
14983 /// ]
14984 ///}
14985 /// ```
14986 /// </details>
14987 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14988 pub enum IngestionStatus {
14989 #[serde(rename = "QUEUED")]
14990 Queued,
14991 #[serde(rename = "STARTED")]
14992 Started,
14993 #[serde(rename = "CANCELLED")]
14994 Cancelled,
14995 #[serde(rename = "UP_FOR_RETRY")]
14996 UpForRetry,
14997 #[serde(rename = "COMPLETED")]
14998 Completed,
14999 #[serde(rename = "FAILED")]
15000 Failed,
15001 }
15002
15003 impl ::std::convert::From<&Self> for IngestionStatus {
15004 fn from(value: &IngestionStatus) -> Self {
15005 value.clone()
15006 }
15007 }
15008
15009 impl ::std::fmt::Display for IngestionStatus {
15010 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15011 match *self {
15012 Self::Queued => f.write_str("QUEUED"),
15013 Self::Started => f.write_str("STARTED"),
15014 Self::Cancelled => f.write_str("CANCELLED"),
15015 Self::UpForRetry => f.write_str("UP_FOR_RETRY"),
15016 Self::Completed => f.write_str("COMPLETED"),
15017 Self::Failed => f.write_str("FAILED"),
15018 }
15019 }
15020 }
15021
15022 impl ::std::str::FromStr for IngestionStatus {
15023 type Err = self::error::ConversionError;
15024 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15025 match value {
15026 "QUEUED" => Ok(Self::Queued),
15027 "STARTED" => Ok(Self::Started),
15028 "CANCELLED" => Ok(Self::Cancelled),
15029 "UP_FOR_RETRY" => Ok(Self::UpForRetry),
15030 "COMPLETED" => Ok(Self::Completed),
15031 "FAILED" => Ok(Self::Failed),
15032 _ => Err("invalid value".into()),
15033 }
15034 }
15035 }
15036
15037 impl ::std::convert::TryFrom<&str> for IngestionStatus {
15038 type Error = self::error::ConversionError;
15039 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15040 value.parse()
15041 }
15042 }
15043
15044 impl ::std::convert::TryFrom<&::std::string::String> for IngestionStatus {
15045 type Error = self::error::ConversionError;
15046 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15047 value.parse()
15048 }
15049 }
15050
15051 impl ::std::convert::TryFrom<::std::string::String> for IngestionStatus {
15052 type Error = self::error::ConversionError;
15053 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15054 value.parse()
15055 }
15056 }
15057
15058 ///Ingestion settings for a specific table
15059 ///
15060 /// <details><summary>JSON schema</summary>
15061 ///
15062 /// ```json
15063 ///{
15064 /// "description": "Ingestion settings for a specific table",
15065 /// "type": "object",
15066 /// "properties": {
15067 /// "excludeIngestionByDefault": {
15068 /// "description": "Whether to exclude this table from ingestions by
15069 /// default.",
15070 /// "type": "boolean"
15071 /// },
15072 /// "maxBytesPerSyncTableOverride": {
15073 /// "description": "The bytes limit when ingesting data for this table.
15074 /// null means no limit.",
15075 /// "type": [
15076 /// "number",
15077 /// "null"
15078 /// ]
15079 /// },
15080 /// "parameterLimits": {
15081 /// "description": "Limits for allowed parameter values.",
15082 /// "type": "object",
15083 /// "additionalProperties": {
15084 /// "$ref": "#/components/schemas/ParameterSetting"
15085 /// }
15086 /// }
15087 /// },
15088 /// "additionalProperties": false,
15089 /// "x-schema-name": "IngestionTableSetting"
15090 ///}
15091 /// ```
15092 /// </details>
15093 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15094 #[serde(deny_unknown_fields)]
15095 pub struct IngestionTableSetting {
15096 ///Whether to exclude this table from ingestions by default.
15097 #[serde(rename = "excludeIngestionByDefault", default, skip_serializing_if = "::std::option::Option::is_none")]
15098 pub exclude_ingestion_by_default: ::std::option::Option<bool>,
15099 ///The bytes limit when ingesting data for this table. null means no
15100 /// limit.
15101 #[serde(rename = "maxBytesPerSyncTableOverride", default, skip_serializing_if = "::std::option::Option::is_none")]
15102 pub max_bytes_per_sync_table_override: ::std::option::Option<f64>,
15103 ///Limits for allowed parameter values.
15104 #[serde(rename = "parameterLimits", default, skip_serializing_if = ":: std :: collections :: HashMap::is_empty")]
15105 pub parameter_limits: ::std::collections::HashMap<::std::string::String, ParameterSetting>,
15106 }
15107
15108 impl ::std::convert::From<&IngestionTableSetting> for IngestionTableSetting {
15109 fn from(value: &IngestionTableSetting) -> Self {
15110 value.clone()
15111 }
15112 }
15113
15114 impl ::std::default::Default for IngestionTableSetting {
15115 fn default() -> Self {
15116 Self {
15117 exclude_ingestion_by_default: Default::default(),
15118 max_bytes_per_sync_table_override: Default::default(),
15119 parameter_limits: Default::default(),
15120 }
15121 }
15122 }
15123
15124 ///`InternalAccessPrincipal`
15125 ///
15126 /// <details><summary>JSON schema</summary>
15127 ///
15128 /// ```json
15129 ///{
15130 /// "type": "object",
15131 /// "required": [
15132 /// "internalAccessType",
15133 /// "type"
15134 /// ],
15135 /// "properties": {
15136 /// "internalAccessType": {
15137 /// "description": "The type of internal access (e.g., support).",
15138 /// "examples": [
15139 /// "support"
15140 /// ],
15141 /// "type": "string"
15142 /// },
15143 /// "type": {
15144 /// "description": "The type of this principal.",
15145 /// "type": "string",
15146 /// "enum": [
15147 /// "internalAccess"
15148 /// ],
15149 /// "x-tsType": "PrincipalType.InternalAccess"
15150 /// }
15151 /// },
15152 /// "additionalProperties": false
15153 ///}
15154 /// ```
15155 /// </details>
15156 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15157 #[serde(deny_unknown_fields)]
15158 pub struct InternalAccessPrincipal {
15159 ///The type of internal access (e.g., support).
15160 #[serde(rename = "internalAccessType")]
15161 pub internal_access_type: ::std::string::String,
15162 ///The type of this principal.
15163 #[serde(rename = "type")]
15164 pub type_: InternalAccessPrincipalType,
15165 }
15166
15167 impl ::std::convert::From<&InternalAccessPrincipal> for InternalAccessPrincipal {
15168 fn from(value: &InternalAccessPrincipal) -> Self {
15169 value.clone()
15170 }
15171 }
15172
15173 ///The type of this principal.
15174 ///
15175 /// <details><summary>JSON schema</summary>
15176 ///
15177 /// ```json
15178 ///{
15179 /// "description": "The type of this principal.",
15180 /// "type": "string",
15181 /// "enum": [
15182 /// "internalAccess"
15183 /// ],
15184 /// "x-tsType": "PrincipalType.InternalAccess"
15185 ///}
15186 /// ```
15187 /// </details>
15188 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15189 pub enum InternalAccessPrincipalType {
15190 #[serde(rename = "internalAccess")]
15191 InternalAccess,
15192 }
15193
15194 impl ::std::convert::From<&Self> for InternalAccessPrincipalType {
15195 fn from(value: &InternalAccessPrincipalType) -> Self {
15196 value.clone()
15197 }
15198 }
15199
15200 impl ::std::fmt::Display for InternalAccessPrincipalType {
15201 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15202 match *self {
15203 Self::InternalAccess => f.write_str("internalAccess"),
15204 }
15205 }
15206 }
15207
15208 impl ::std::str::FromStr for InternalAccessPrincipalType {
15209 type Err = self::error::ConversionError;
15210 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15211 match value {
15212 "internalAccess" => Ok(Self::InternalAccess),
15213 _ => Err("invalid value".into()),
15214 }
15215 }
15216 }
15217
15218 impl ::std::convert::TryFrom<&str> for InternalAccessPrincipalType {
15219 type Error = self::error::ConversionError;
15220 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15221 value.parse()
15222 }
15223 }
15224
15225 impl ::std::convert::TryFrom<&::std::string::String> for InternalAccessPrincipalType {
15226 type Error = self::error::ConversionError;
15227 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15228 value.parse()
15229 }
15230 }
15231
15232 impl ::std::convert::TryFrom<::std::string::String> for InternalAccessPrincipalType {
15233 type Error = self::error::ConversionError;
15234 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15235 value.parse()
15236 }
15237 }
15238
15239 ///Layout type of the table or view.
15240 ///
15241 /// <details><summary>JSON schema</summary>
15242 ///
15243 /// ```json
15244 ///{
15245 /// "description": "Layout type of the table or view.",
15246 /// "type": "string",
15247 /// "enum": [
15248 /// "default",
15249 /// "areaChart",
15250 /// "barChart",
15251 /// "bubbleChart",
15252 /// "calendar",
15253 /// "card",
15254 /// "detail",
15255 /// "form",
15256 /// "ganttChart",
15257 /// "lineChart",
15258 /// "masterDetail",
15259 /// "pieChart",
15260 /// "scatterChart",
15261 /// "slide",
15262 /// "wordCloud"
15263 /// ],
15264 /// "x-schema-name": "Layout",
15265 /// "x-tsEnumNames": [
15266 /// "Default",
15267 /// "AreaChart",
15268 /// "BarChart",
15269 /// "BubbleChart",
15270 /// "Calendar",
15271 /// "Card",
15272 /// "Detail",
15273 /// "Form",
15274 /// "GanttChart",
15275 /// "LineChart",
15276 /// "MasterDetail",
15277 /// "PieChart",
15278 /// "ScatterChart",
15279 /// "Slide",
15280 /// "WordCloud"
15281 /// ]
15282 ///}
15283 /// ```
15284 /// </details>
15285 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15286 pub enum Layout {
15287 #[serde(rename = "default")]
15288 Default,
15289 #[serde(rename = "areaChart")]
15290 AreaChart,
15291 #[serde(rename = "barChart")]
15292 BarChart,
15293 #[serde(rename = "bubbleChart")]
15294 BubbleChart,
15295 #[serde(rename = "calendar")]
15296 Calendar,
15297 #[serde(rename = "card")]
15298 Card,
15299 #[serde(rename = "detail")]
15300 Detail,
15301 #[serde(rename = "form")]
15302 Form,
15303 #[serde(rename = "ganttChart")]
15304 GanttChart,
15305 #[serde(rename = "lineChart")]
15306 LineChart,
15307 #[serde(rename = "masterDetail")]
15308 MasterDetail,
15309 #[serde(rename = "pieChart")]
15310 PieChart,
15311 #[serde(rename = "scatterChart")]
15312 ScatterChart,
15313 #[serde(rename = "slide")]
15314 Slide,
15315 #[serde(rename = "wordCloud")]
15316 WordCloud,
15317 }
15318
15319 impl ::std::convert::From<&Self> for Layout {
15320 fn from(value: &Layout) -> Self {
15321 value.clone()
15322 }
15323 }
15324
15325 impl ::std::fmt::Display for Layout {
15326 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15327 match *self {
15328 Self::Default => f.write_str("default"),
15329 Self::AreaChart => f.write_str("areaChart"),
15330 Self::BarChart => f.write_str("barChart"),
15331 Self::BubbleChart => f.write_str("bubbleChart"),
15332 Self::Calendar => f.write_str("calendar"),
15333 Self::Card => f.write_str("card"),
15334 Self::Detail => f.write_str("detail"),
15335 Self::Form => f.write_str("form"),
15336 Self::GanttChart => f.write_str("ganttChart"),
15337 Self::LineChart => f.write_str("lineChart"),
15338 Self::MasterDetail => f.write_str("masterDetail"),
15339 Self::PieChart => f.write_str("pieChart"),
15340 Self::ScatterChart => f.write_str("scatterChart"),
15341 Self::Slide => f.write_str("slide"),
15342 Self::WordCloud => f.write_str("wordCloud"),
15343 }
15344 }
15345 }
15346
15347 impl ::std::str::FromStr for Layout {
15348 type Err = self::error::ConversionError;
15349 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15350 match value {
15351 "default" => Ok(Self::Default),
15352 "areaChart" => Ok(Self::AreaChart),
15353 "barChart" => Ok(Self::BarChart),
15354 "bubbleChart" => Ok(Self::BubbleChart),
15355 "calendar" => Ok(Self::Calendar),
15356 "card" => Ok(Self::Card),
15357 "detail" => Ok(Self::Detail),
15358 "form" => Ok(Self::Form),
15359 "ganttChart" => Ok(Self::GanttChart),
15360 "lineChart" => Ok(Self::LineChart),
15361 "masterDetail" => Ok(Self::MasterDetail),
15362 "pieChart" => Ok(Self::PieChart),
15363 "scatterChart" => Ok(Self::ScatterChart),
15364 "slide" => Ok(Self::Slide),
15365 "wordCloud" => Ok(Self::WordCloud),
15366 _ => Err("invalid value".into()),
15367 }
15368 }
15369 }
15370
15371 impl ::std::convert::TryFrom<&str> for Layout {
15372 type Error = self::error::ConversionError;
15373 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15374 value.parse()
15375 }
15376 }
15377
15378 impl ::std::convert::TryFrom<&::std::string::String> for Layout {
15379 type Error = self::error::ConversionError;
15380 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15381 value.parse()
15382 }
15383 }
15384
15385 impl ::std::convert::TryFrom<::std::string::String> for Layout {
15386 type Error = self::error::ConversionError;
15387 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15388 value.parse()
15389 }
15390 }
15391
15392 ///`LinkColumnFormat`
15393 ///
15394 /// <details><summary>JSON schema</summary>
15395 ///
15396 /// ```json
15397 ///{
15398 /// "description": "Format of a link column.",
15399 /// "allOf": [
15400 /// {
15401 /// "$ref": "#/components/schemas/SimpleColumnFormat"
15402 /// },
15403 /// {
15404 /// "type": "object",
15405 /// "properties": {
15406 /// "display": {
15407 /// "$ref": "#/components/schemas/LinkDisplayType"
15408 /// },
15409 /// "force": {
15410 /// "description": "Force embeds to render on the client instead of
15411 /// the server (for sites that require user login).",
15412 /// "examples": [
15413 /// true
15414 /// ],
15415 /// "type": "boolean"
15416 /// }
15417 /// },
15418 /// "additionalProperties": false
15419 /// }
15420 /// ],
15421 /// "x-schema-name": "LinkColumnFormat"
15422 ///}
15423 /// ```
15424 /// </details>
15425 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15426 #[serde(deny_unknown_fields)]
15427 pub enum LinkColumnFormat {}
15428 impl ::std::convert::From<&Self> for LinkColumnFormat {
15429 fn from(value: &LinkColumnFormat) -> Self {
15430 value.clone()
15431 }
15432 }
15433
15434 ///How a link should be displayed in the user interface.
15435 ///
15436 /// <details><summary>JSON schema</summary>
15437 ///
15438 /// ```json
15439 ///{
15440 /// "description": "How a link should be displayed in the user interface.",
15441 /// "type": "string",
15442 /// "enum": [
15443 /// "iconOnly",
15444 /// "url",
15445 /// "title",
15446 /// "card",
15447 /// "embed"
15448 /// ],
15449 /// "x-schema-name": "LinkDisplayType",
15450 /// "x-tsEnumNames": [
15451 /// "IconOnly",
15452 /// "Url",
15453 /// "Title",
15454 /// "Card",
15455 /// "Embed"
15456 /// ]
15457 ///}
15458 /// ```
15459 /// </details>
15460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15461 pub enum LinkDisplayType {
15462 #[serde(rename = "iconOnly")]
15463 IconOnly,
15464 #[serde(rename = "url")]
15465 Url,
15466 #[serde(rename = "title")]
15467 Title,
15468 #[serde(rename = "card")]
15469 Card,
15470 #[serde(rename = "embed")]
15471 Embed,
15472 }
15473
15474 impl ::std::convert::From<&Self> for LinkDisplayType {
15475 fn from(value: &LinkDisplayType) -> Self {
15476 value.clone()
15477 }
15478 }
15479
15480 impl ::std::fmt::Display for LinkDisplayType {
15481 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15482 match *self {
15483 Self::IconOnly => f.write_str("iconOnly"),
15484 Self::Url => f.write_str("url"),
15485 Self::Title => f.write_str("title"),
15486 Self::Card => f.write_str("card"),
15487 Self::Embed => f.write_str("embed"),
15488 }
15489 }
15490 }
15491
15492 impl ::std::str::FromStr for LinkDisplayType {
15493 type Err = self::error::ConversionError;
15494 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15495 match value {
15496 "iconOnly" => Ok(Self::IconOnly),
15497 "url" => Ok(Self::Url),
15498 "title" => Ok(Self::Title),
15499 "card" => Ok(Self::Card),
15500 "embed" => Ok(Self::Embed),
15501 _ => Err("invalid value".into()),
15502 }
15503 }
15504 }
15505
15506 impl ::std::convert::TryFrom<&str> for LinkDisplayType {
15507 type Error = self::error::ConversionError;
15508 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15509 value.parse()
15510 }
15511 }
15512
15513 impl ::std::convert::TryFrom<&::std::string::String> for LinkDisplayType {
15514 type Error = self::error::ConversionError;
15515 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15516 value.parse()
15517 }
15518 }
15519
15520 impl ::std::convert::TryFrom<::std::string::String> for LinkDisplayType {
15521 type Error = self::error::ConversionError;
15522 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15523 value.parse()
15524 }
15525 }
15526
15527 ///Base type for a JSON-LD (Linked Data) object.
15528 ///
15529 /// <details><summary>JSON schema</summary>
15530 ///
15531 /// ```json
15532 ///{
15533 /// "description": "Base type for a JSON-LD (Linked Data) object.",
15534 /// "type": "object",
15535 /// "required": [
15536 /// "@context",
15537 /// "@type"
15538 /// ],
15539 /// "properties": {
15540 /// "@context": {
15541 /// "description": "A url describing the schema context for this object, typically \"http://schema.org/\".",
15542 /// "examples": [
15543 /// "<http://schema.org/>"
15544 /// ],
15545 /// "type": "string"
15546 /// },
15547 /// "@type": {
15548 /// "$ref": "#/components/schemas/LinkedDataType"
15549 /// },
15550 /// "additionalType": {
15551 /// "description": "An identifier of additional type info specific to
15552 /// Coda that may not be present in a schema.org taxonomy,\n",
15553 /// "type": "string"
15554 /// }
15555 /// },
15556 /// "additionalProperties": false,
15557 /// "x-schema-name": "LinkedDataObject"
15558 ///}
15559 /// ```
15560 /// </details>
15561 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15562 #[serde(deny_unknown_fields)]
15563 pub struct LinkedDataObject {
15564 ///An identifier of additional type info specific to Coda that may not
15565 /// be present in a schema.org taxonomy,
15566 #[serde(rename = "additionalType", default, skip_serializing_if = "::std::option::Option::is_none")]
15567 pub additional_type: ::std::option::Option<::std::string::String>,
15568 ///A url describing the schema context for this object, typically "<http://schema.org/>".
15569 #[serde(rename = "@context")]
15570 pub context: ::std::string::String,
15571 #[serde(rename = "@type")]
15572 pub type_: LinkedDataType,
15573 }
15574
15575 impl ::std::convert::From<&LinkedDataObject> for LinkedDataObject {
15576 fn from(value: &LinkedDataObject) -> Self {
15577 value.clone()
15578 }
15579 }
15580
15581 ///A schema.org identifier for the object.
15582 ///
15583 /// <details><summary>JSON schema</summary>
15584 ///
15585 /// ```json
15586 ///{
15587 /// "description": "A schema.org identifier for the object.",
15588 /// "type": "string",
15589 /// "enum": [
15590 /// "ImageObject",
15591 /// "MonetaryAmount",
15592 /// "Person",
15593 /// "WebPage",
15594 /// "StructuredValue"
15595 /// ],
15596 /// "x-schema-name": "LinkedDataType",
15597 /// "x-tsEnumNames": [
15598 /// "ImageObject",
15599 /// "MonetaryAmount",
15600 /// "Person",
15601 /// "WebPage",
15602 /// "StructuredValue"
15603 /// ]
15604 ///}
15605 /// ```
15606 /// </details>
15607 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15608 pub enum LinkedDataType {
15609 ImageObject,
15610 MonetaryAmount,
15611 Person,
15612 WebPage,
15613 StructuredValue,
15614 }
15615
15616 impl ::std::convert::From<&Self> for LinkedDataType {
15617 fn from(value: &LinkedDataType) -> Self {
15618 value.clone()
15619 }
15620 }
15621
15622 impl ::std::fmt::Display for LinkedDataType {
15623 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15624 match *self {
15625 Self::ImageObject => f.write_str("ImageObject"),
15626 Self::MonetaryAmount => f.write_str("MonetaryAmount"),
15627 Self::Person => f.write_str("Person"),
15628 Self::WebPage => f.write_str("WebPage"),
15629 Self::StructuredValue => f.write_str("StructuredValue"),
15630 }
15631 }
15632 }
15633
15634 impl ::std::str::FromStr for LinkedDataType {
15635 type Err = self::error::ConversionError;
15636 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15637 match value {
15638 "ImageObject" => Ok(Self::ImageObject),
15639 "MonetaryAmount" => Ok(Self::MonetaryAmount),
15640 "Person" => Ok(Self::Person),
15641 "WebPage" => Ok(Self::WebPage),
15642 "StructuredValue" => Ok(Self::StructuredValue),
15643 _ => Err("invalid value".into()),
15644 }
15645 }
15646 }
15647
15648 impl ::std::convert::TryFrom<&str> for LinkedDataType {
15649 type Error = self::error::ConversionError;
15650 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15651 value.parse()
15652 }
15653 }
15654
15655 impl ::std::convert::TryFrom<&::std::string::String> for LinkedDataType {
15656 type Error = self::error::ConversionError;
15657 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15658 value.parse()
15659 }
15660 }
15661
15662 impl ::std::convert::TryFrom<::std::string::String> for LinkedDataType {
15663 type Error = self::error::ConversionError;
15664 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15665 value.parse()
15666 }
15667 }
15668
15669 ///`ListAgentLogsOrder`
15670 ///
15671 /// <details><summary>JSON schema</summary>
15672 ///
15673 /// ```json
15674 ///{
15675 /// "type": "string",
15676 /// "enum": [
15677 /// "asc",
15678 /// "desc"
15679 /// ]
15680 ///}
15681 /// ```
15682 /// </details>
15683 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15684 pub enum ListAgentLogsOrder {
15685 #[serde(rename = "asc")]
15686 Asc,
15687 #[serde(rename = "desc")]
15688 Desc,
15689 }
15690
15691 impl ::std::convert::From<&Self> for ListAgentLogsOrder {
15692 fn from(value: &ListAgentLogsOrder) -> Self {
15693 value.clone()
15694 }
15695 }
15696
15697 impl ::std::fmt::Display for ListAgentLogsOrder {
15698 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15699 match *self {
15700 Self::Asc => f.write_str("asc"),
15701 Self::Desc => f.write_str("desc"),
15702 }
15703 }
15704 }
15705
15706 impl ::std::str::FromStr for ListAgentLogsOrder {
15707 type Err = self::error::ConversionError;
15708 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15709 match value {
15710 "asc" => Ok(Self::Asc),
15711 "desc" => Ok(Self::Desc),
15712 _ => Err("invalid value".into()),
15713 }
15714 }
15715 }
15716
15717 impl ::std::convert::TryFrom<&str> for ListAgentLogsOrder {
15718 type Error = self::error::ConversionError;
15719 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15720 value.parse()
15721 }
15722 }
15723
15724 impl ::std::convert::TryFrom<&::std::string::String> for ListAgentLogsOrder {
15725 type Error = self::error::ConversionError;
15726 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15727 value.parse()
15728 }
15729 }
15730
15731 impl ::std::convert::TryFrom<::std::string::String> for ListAgentLogsOrder {
15732 type Error = self::error::ConversionError;
15733 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15734 value.parse()
15735 }
15736 }
15737
15738 ///An HTTP error resulting from an unsuccessful request.
15739 ///
15740 /// <details><summary>JSON schema</summary>
15741 ///
15742 /// ```json
15743 ///{
15744 /// "description": "An HTTP error resulting from an unsuccessful request.",
15745 /// "required": [
15746 /// "message",
15747 /// "statusCode",
15748 /// "statusMessage"
15749 /// ],
15750 /// "properties": {
15751 /// "codaDetail": {
15752 /// "description": "Detail about why this request was rejected.",
15753 /// "type": "object",
15754 /// "properties": {
15755 /// "validationErrors": {
15756 /// "type": "array",
15757 /// "items": {
15758 /// "$ref": "#/components/schemas/ValidationError"
15759 /// }
15760 /// }
15761 /// },
15762 /// "additionalProperties": false
15763 /// },
15764 /// "message": {
15765 /// "description": "Any additional context on the error, or the same as
15766 /// `statusMessage` otherwise.",
15767 /// "examples": [
15768 /// "Bad Request"
15769 /// ],
15770 /// "type": "string"
15771 /// },
15772 /// "statusCode": {
15773 /// "description": "HTTP status code of the error.",
15774 /// "examples": [
15775 /// 400
15776 /// ],
15777 /// "type": "number"
15778 /// },
15779 /// "statusMessage": {
15780 /// "description": "HTTP status message of the error.",
15781 /// "examples": [
15782 /// "Bad Request"
15783 /// ],
15784 /// "type": "string"
15785 /// }
15786 /// },
15787 /// "additionalProperties": false
15788 ///}
15789 /// ```
15790 /// </details>
15791 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15792 #[serde(deny_unknown_fields)]
15793 pub struct ListAgentLogsResponse {
15794 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
15795 pub coda_detail: ::std::option::Option<ListAgentLogsResponseCodaDetail>,
15796 ///Any additional context on the error, or the same as `statusMessage`
15797 /// otherwise.
15798 pub message: ::std::string::String,
15799 #[serde(rename = "statusCode")]
15800 pub status_code: f64,
15801 ///HTTP status message of the error.
15802 #[serde(rename = "statusMessage")]
15803 pub status_message: ::std::string::String,
15804 }
15805
15806 impl ::std::convert::From<&ListAgentLogsResponse> for ListAgentLogsResponse {
15807 fn from(value: &ListAgentLogsResponse) -> Self {
15808 value.clone()
15809 }
15810 }
15811
15812 ///Detail about why this request was rejected.
15813 ///
15814 /// <details><summary>JSON schema</summary>
15815 ///
15816 /// ```json
15817 ///{
15818 /// "description": "Detail about why this request was rejected.",
15819 /// "type": "object",
15820 /// "properties": {
15821 /// "validationErrors": {
15822 /// "type": "array",
15823 /// "items": {
15824 /// "$ref": "#/components/schemas/ValidationError"
15825 /// }
15826 /// }
15827 /// },
15828 /// "additionalProperties": false
15829 ///}
15830 /// ```
15831 /// </details>
15832 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15833 #[serde(deny_unknown_fields)]
15834 pub struct ListAgentLogsResponseCodaDetail {
15835 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15836 pub validation_errors: ::std::vec::Vec<ValidationError>,
15837 }
15838
15839 impl ::std::convert::From<&ListAgentLogsResponseCodaDetail> for ListAgentLogsResponseCodaDetail {
15840 fn from(value: &ListAgentLogsResponseCodaDetail) -> Self {
15841 value.clone()
15842 }
15843 }
15844
15845 impl ::std::default::Default for ListAgentLogsResponseCodaDetail {
15846 fn default() -> Self {
15847 Self {
15848 validation_errors: Default::default(),
15849 }
15850 }
15851 }
15852
15853 ///`ListAgentSessionIdsOrder`
15854 ///
15855 /// <details><summary>JSON schema</summary>
15856 ///
15857 /// ```json
15858 ///{
15859 /// "type": "string",
15860 /// "enum": [
15861 /// "asc",
15862 /// "desc"
15863 /// ]
15864 ///}
15865 /// ```
15866 /// </details>
15867 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15868 pub enum ListAgentSessionIdsOrder {
15869 #[serde(rename = "asc")]
15870 Asc,
15871 #[serde(rename = "desc")]
15872 Desc,
15873 }
15874
15875 impl ::std::convert::From<&Self> for ListAgentSessionIdsOrder {
15876 fn from(value: &ListAgentSessionIdsOrder) -> Self {
15877 value.clone()
15878 }
15879 }
15880
15881 impl ::std::fmt::Display for ListAgentSessionIdsOrder {
15882 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15883 match *self {
15884 Self::Asc => f.write_str("asc"),
15885 Self::Desc => f.write_str("desc"),
15886 }
15887 }
15888 }
15889
15890 impl ::std::str::FromStr for ListAgentSessionIdsOrder {
15891 type Err = self::error::ConversionError;
15892 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15893 match value {
15894 "asc" => Ok(Self::Asc),
15895 "desc" => Ok(Self::Desc),
15896 _ => Err("invalid value".into()),
15897 }
15898 }
15899 }
15900
15901 impl ::std::convert::TryFrom<&str> for ListAgentSessionIdsOrder {
15902 type Error = self::error::ConversionError;
15903 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15904 value.parse()
15905 }
15906 }
15907
15908 impl ::std::convert::TryFrom<&::std::string::String> for ListAgentSessionIdsOrder {
15909 type Error = self::error::ConversionError;
15910 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15911 value.parse()
15912 }
15913 }
15914
15915 impl ::std::convert::TryFrom<::std::string::String> for ListAgentSessionIdsOrder {
15916 type Error = self::error::ConversionError;
15917 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
15918 value.parse()
15919 }
15920 }
15921
15922 ///An HTTP error resulting from an unsuccessful request.
15923 ///
15924 /// <details><summary>JSON schema</summary>
15925 ///
15926 /// ```json
15927 ///{
15928 /// "description": "An HTTP error resulting from an unsuccessful request.",
15929 /// "required": [
15930 /// "message",
15931 /// "statusCode",
15932 /// "statusMessage"
15933 /// ],
15934 /// "properties": {
15935 /// "codaDetail": {
15936 /// "description": "Detail about why this request was rejected.",
15937 /// "type": "object",
15938 /// "properties": {
15939 /// "validationErrors": {
15940 /// "type": "array",
15941 /// "items": {
15942 /// "$ref": "#/components/schemas/ValidationError"
15943 /// }
15944 /// }
15945 /// },
15946 /// "additionalProperties": false
15947 /// },
15948 /// "message": {
15949 /// "description": "Any additional context on the error, or the same as
15950 /// `statusMessage` otherwise.",
15951 /// "examples": [
15952 /// "Bad Request"
15953 /// ],
15954 /// "type": "string"
15955 /// },
15956 /// "statusCode": {
15957 /// "description": "HTTP status code of the error.",
15958 /// "examples": [
15959 /// 400
15960 /// ],
15961 /// "type": "number"
15962 /// },
15963 /// "statusMessage": {
15964 /// "description": "HTTP status message of the error.",
15965 /// "examples": [
15966 /// "Bad Request"
15967 /// ],
15968 /// "type": "string"
15969 /// }
15970 /// },
15971 /// "additionalProperties": false
15972 ///}
15973 /// ```
15974 /// </details>
15975 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15976 #[serde(deny_unknown_fields)]
15977 pub struct ListAgentSessionIdsResponse {
15978 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
15979 pub coda_detail: ::std::option::Option<ListAgentSessionIdsResponseCodaDetail>,
15980 ///Any additional context on the error, or the same as `statusMessage`
15981 /// otherwise.
15982 pub message: ::std::string::String,
15983 #[serde(rename = "statusCode")]
15984 pub status_code: f64,
15985 ///HTTP status message of the error.
15986 #[serde(rename = "statusMessage")]
15987 pub status_message: ::std::string::String,
15988 }
15989
15990 impl ::std::convert::From<&ListAgentSessionIdsResponse> for ListAgentSessionIdsResponse {
15991 fn from(value: &ListAgentSessionIdsResponse) -> Self {
15992 value.clone()
15993 }
15994 }
15995
15996 ///Detail about why this request was rejected.
15997 ///
15998 /// <details><summary>JSON schema</summary>
15999 ///
16000 /// ```json
16001 ///{
16002 /// "description": "Detail about why this request was rejected.",
16003 /// "type": "object",
16004 /// "properties": {
16005 /// "validationErrors": {
16006 /// "type": "array",
16007 /// "items": {
16008 /// "$ref": "#/components/schemas/ValidationError"
16009 /// }
16010 /// }
16011 /// },
16012 /// "additionalProperties": false
16013 ///}
16014 /// ```
16015 /// </details>
16016 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16017 #[serde(deny_unknown_fields)]
16018 pub struct ListAgentSessionIdsResponseCodaDetail {
16019 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16020 pub validation_errors: ::std::vec::Vec<ValidationError>,
16021 }
16022
16023 impl ::std::convert::From<&ListAgentSessionIdsResponseCodaDetail> for ListAgentSessionIdsResponseCodaDetail {
16024 fn from(value: &ListAgentSessionIdsResponseCodaDetail) -> Self {
16025 value.clone()
16026 }
16027 }
16028
16029 impl ::std::default::Default for ListAgentSessionIdsResponseCodaDetail {
16030 fn default() -> Self {
16031 Self {
16032 validation_errors: Default::default(),
16033 }
16034 }
16035 }
16036
16037 ///An HTTP error resulting from an unsuccessful request.
16038 ///
16039 /// <details><summary>JSON schema</summary>
16040 ///
16041 /// ```json
16042 ///{
16043 /// "description": "An HTTP error resulting from an unsuccessful request.",
16044 /// "required": [
16045 /// "message",
16046 /// "statusCode",
16047 /// "statusMessage"
16048 /// ],
16049 /// "properties": {
16050 /// "message": {
16051 /// "description": "Any additional context on the error, or the same as
16052 /// `statusMessage` otherwise.",
16053 /// "examples": [
16054 /// "Unauthorized"
16055 /// ],
16056 /// "type": "string"
16057 /// },
16058 /// "statusCode": {
16059 /// "description": "HTTP status code of the error.",
16060 /// "examples": [
16061 /// 401
16062 /// ],
16063 /// "type": "number"
16064 /// },
16065 /// "statusMessage": {
16066 /// "description": "HTTP status message of the error.",
16067 /// "examples": [
16068 /// "Unauthorized"
16069 /// ],
16070 /// "type": "string"
16071 /// }
16072 /// },
16073 /// "additionalProperties": false
16074 ///}
16075 /// ```
16076 /// </details>
16077 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16078 #[serde(deny_unknown_fields)]
16079 pub struct ListCategoriesResponse {
16080 ///Any additional context on the error, or the same as `statusMessage`
16081 /// otherwise.
16082 pub message: ::std::string::String,
16083 #[serde(rename = "statusCode")]
16084 pub status_code: f64,
16085 ///HTTP status message of the error.
16086 #[serde(rename = "statusMessage")]
16087 pub status_message: ::std::string::String,
16088 }
16089
16090 impl ::std::convert::From<&ListCategoriesResponse> for ListCategoriesResponse {
16091 fn from(value: &ListCategoriesResponse) -> Self {
16092 value.clone()
16093 }
16094 }
16095
16096 ///An HTTP error resulting from an unsuccessful request.
16097 ///
16098 /// <details><summary>JSON schema</summary>
16099 ///
16100 /// ```json
16101 ///{
16102 /// "description": "An HTTP error resulting from an unsuccessful request.",
16103 /// "required": [
16104 /// "message",
16105 /// "statusCode",
16106 /// "statusMessage"
16107 /// ],
16108 /// "properties": {
16109 /// "message": {
16110 /// "description": "Any additional context on the error, or the same as
16111 /// `statusMessage` otherwise.",
16112 /// "examples": [
16113 /// "Unauthorized"
16114 /// ],
16115 /// "type": "string"
16116 /// },
16117 /// "statusCode": {
16118 /// "description": "HTTP status code of the error.",
16119 /// "examples": [
16120 /// 401
16121 /// ],
16122 /// "type": "number"
16123 /// },
16124 /// "statusMessage": {
16125 /// "description": "HTTP status message of the error.",
16126 /// "examples": [
16127 /// "Unauthorized"
16128 /// ],
16129 /// "type": "string"
16130 /// }
16131 /// },
16132 /// "additionalProperties": false
16133 ///}
16134 /// ```
16135 /// </details>
16136 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16137 #[serde(deny_unknown_fields)]
16138 pub struct ListColumnsResponse {
16139 ///Any additional context on the error, or the same as `statusMessage`
16140 /// otherwise.
16141 pub message: ::std::string::String,
16142 #[serde(rename = "statusCode")]
16143 pub status_code: f64,
16144 ///HTTP status message of the error.
16145 #[serde(rename = "statusMessage")]
16146 pub status_message: ::std::string::String,
16147 }
16148
16149 impl ::std::convert::From<&ListColumnsResponse> for ListColumnsResponse {
16150 fn from(value: &ListColumnsResponse) -> Self {
16151 value.clone()
16152 }
16153 }
16154
16155 ///An HTTP error resulting from an unsuccessful request.
16156 ///
16157 /// <details><summary>JSON schema</summary>
16158 ///
16159 /// ```json
16160 ///{
16161 /// "description": "An HTTP error resulting from an unsuccessful request.",
16162 /// "required": [
16163 /// "message",
16164 /// "statusCode",
16165 /// "statusMessage"
16166 /// ],
16167 /// "properties": {
16168 /// "message": {
16169 /// "description": "Any additional context on the error, or the same as
16170 /// `statusMessage` otherwise.",
16171 /// "examples": [
16172 /// "Unauthorized"
16173 /// ],
16174 /// "type": "string"
16175 /// },
16176 /// "statusCode": {
16177 /// "description": "HTTP status code of the error.",
16178 /// "examples": [
16179 /// 401
16180 /// ],
16181 /// "type": "number"
16182 /// },
16183 /// "statusMessage": {
16184 /// "description": "HTTP status message of the error.",
16185 /// "examples": [
16186 /// "Unauthorized"
16187 /// ],
16188 /// "type": "string"
16189 /// }
16190 /// },
16191 /// "additionalProperties": false
16192 ///}
16193 /// ```
16194 /// </details>
16195 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16196 #[serde(deny_unknown_fields)]
16197 pub struct ListControlsResponse {
16198 ///Any additional context on the error, or the same as `statusMessage`
16199 /// otherwise.
16200 pub message: ::std::string::String,
16201 #[serde(rename = "statusCode")]
16202 pub status_code: f64,
16203 ///HTTP status message of the error.
16204 #[serde(rename = "statusMessage")]
16205 pub status_message: ::std::string::String,
16206 }
16207
16208 impl ::std::convert::From<&ListControlsResponse> for ListControlsResponse {
16209 fn from(value: &ListControlsResponse) -> Self {
16210 value.clone()
16211 }
16212 }
16213
16214 ///An HTTP error resulting from an unsuccessful request.
16215 ///
16216 /// <details><summary>JSON schema</summary>
16217 ///
16218 /// ```json
16219 ///{
16220 /// "description": "An HTTP error resulting from an unsuccessful request.",
16221 /// "required": [
16222 /// "message",
16223 /// "statusCode",
16224 /// "statusMessage"
16225 /// ],
16226 /// "properties": {
16227 /// "message": {
16228 /// "description": "Any additional context on the error, or the same as
16229 /// `statusMessage` otherwise.",
16230 /// "examples": [
16231 /// "Unauthorized"
16232 /// ],
16233 /// "type": "string"
16234 /// },
16235 /// "statusCode": {
16236 /// "description": "HTTP status code of the error.",
16237 /// "examples": [
16238 /// 401
16239 /// ],
16240 /// "type": "number"
16241 /// },
16242 /// "statusMessage": {
16243 /// "description": "HTTP status message of the error.",
16244 /// "examples": [
16245 /// "Unauthorized"
16246 /// ],
16247 /// "type": "string"
16248 /// }
16249 /// },
16250 /// "additionalProperties": false
16251 ///}
16252 /// ```
16253 /// </details>
16254 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16255 #[serde(deny_unknown_fields)]
16256 pub struct ListCustomDocDomainsResponse {
16257 ///Any additional context on the error, or the same as `statusMessage`
16258 /// otherwise.
16259 pub message: ::std::string::String,
16260 #[serde(rename = "statusCode")]
16261 pub status_code: f64,
16262 ///HTTP status message of the error.
16263 #[serde(rename = "statusMessage")]
16264 pub status_message: ::std::string::String,
16265 }
16266
16267 impl ::std::convert::From<&ListCustomDocDomainsResponse> for ListCustomDocDomainsResponse {
16268 fn from(value: &ListCustomDocDomainsResponse) -> Self {
16269 value.clone()
16270 }
16271 }
16272
16273 ///An HTTP error resulting from an unsuccessful request.
16274 ///
16275 /// <details><summary>JSON schema</summary>
16276 ///
16277 /// ```json
16278 ///{
16279 /// "description": "An HTTP error resulting from an unsuccessful request.",
16280 /// "required": [
16281 /// "message",
16282 /// "statusCode",
16283 /// "statusMessage"
16284 /// ],
16285 /// "properties": {
16286 /// "message": {
16287 /// "description": "Any additional context on the error, or the same as
16288 /// `statusMessage` otherwise.",
16289 /// "examples": [
16290 /// "Unauthorized"
16291 /// ],
16292 /// "type": "string"
16293 /// },
16294 /// "statusCode": {
16295 /// "description": "HTTP status code of the error.",
16296 /// "examples": [
16297 /// 401
16298 /// ],
16299 /// "type": "number"
16300 /// },
16301 /// "statusMessage": {
16302 /// "description": "HTTP status message of the error.",
16303 /// "examples": [
16304 /// "Unauthorized"
16305 /// ],
16306 /// "type": "string"
16307 /// }
16308 /// },
16309 /// "additionalProperties": false
16310 ///}
16311 /// ```
16312 /// </details>
16313 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16314 #[serde(deny_unknown_fields)]
16315 pub struct ListDocAnalyticsResponse {
16316 ///Any additional context on the error, or the same as `statusMessage`
16317 /// otherwise.
16318 pub message: ::std::string::String,
16319 #[serde(rename = "statusCode")]
16320 pub status_code: f64,
16321 ///HTTP status message of the error.
16322 #[serde(rename = "statusMessage")]
16323 pub status_message: ::std::string::String,
16324 }
16325
16326 impl ::std::convert::From<&ListDocAnalyticsResponse> for ListDocAnalyticsResponse {
16327 fn from(value: &ListDocAnalyticsResponse) -> Self {
16328 value.clone()
16329 }
16330 }
16331
16332 ///An HTTP error resulting from an unsuccessful request.
16333 ///
16334 /// <details><summary>JSON schema</summary>
16335 ///
16336 /// ```json
16337 ///{
16338 /// "description": "An HTTP error resulting from an unsuccessful request.",
16339 /// "required": [
16340 /// "message",
16341 /// "statusCode",
16342 /// "statusMessage"
16343 /// ],
16344 /// "properties": {
16345 /// "message": {
16346 /// "description": "Any additional context on the error, or the same as
16347 /// `statusMessage` otherwise.",
16348 /// "examples": [
16349 /// "Unauthorized"
16350 /// ],
16351 /// "type": "string"
16352 /// },
16353 /// "statusCode": {
16354 /// "description": "HTTP status code of the error.",
16355 /// "examples": [
16356 /// 401
16357 /// ],
16358 /// "type": "number"
16359 /// },
16360 /// "statusMessage": {
16361 /// "description": "HTTP status message of the error.",
16362 /// "examples": [
16363 /// "Unauthorized"
16364 /// ],
16365 /// "type": "string"
16366 /// }
16367 /// },
16368 /// "additionalProperties": false
16369 ///}
16370 /// ```
16371 /// </details>
16372 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16373 #[serde(deny_unknown_fields)]
16374 pub struct ListDocAnalyticsSummaryResponse {
16375 ///Any additional context on the error, or the same as `statusMessage`
16376 /// otherwise.
16377 pub message: ::std::string::String,
16378 #[serde(rename = "statusCode")]
16379 pub status_code: f64,
16380 ///HTTP status message of the error.
16381 #[serde(rename = "statusMessage")]
16382 pub status_message: ::std::string::String,
16383 }
16384
16385 impl ::std::convert::From<&ListDocAnalyticsSummaryResponse> for ListDocAnalyticsSummaryResponse {
16386 fn from(value: &ListDocAnalyticsSummaryResponse) -> Self {
16387 value.clone()
16388 }
16389 }
16390
16391 ///An HTTP error resulting from an unsuccessful request.
16392 ///
16393 /// <details><summary>JSON schema</summary>
16394 ///
16395 /// ```json
16396 ///{
16397 /// "description": "An HTTP error resulting from an unsuccessful request.",
16398 /// "required": [
16399 /// "message",
16400 /// "statusCode",
16401 /// "statusMessage"
16402 /// ],
16403 /// "properties": {
16404 /// "message": {
16405 /// "description": "Any additional context on the error, or the same as
16406 /// `statusMessage` otherwise.",
16407 /// "examples": [
16408 /// "Unauthorized"
16409 /// ],
16410 /// "type": "string"
16411 /// },
16412 /// "statusCode": {
16413 /// "description": "HTTP status code of the error.",
16414 /// "examples": [
16415 /// 401
16416 /// ],
16417 /// "type": "number"
16418 /// },
16419 /// "statusMessage": {
16420 /// "description": "HTTP status message of the error.",
16421 /// "examples": [
16422 /// "Unauthorized"
16423 /// ],
16424 /// "type": "string"
16425 /// }
16426 /// },
16427 /// "additionalProperties": false
16428 ///}
16429 /// ```
16430 /// </details>
16431 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16432 #[serde(deny_unknown_fields)]
16433 pub struct ListDocsResponse {
16434 ///Any additional context on the error, or the same as `statusMessage`
16435 /// otherwise.
16436 pub message: ::std::string::String,
16437 #[serde(rename = "statusCode")]
16438 pub status_code: f64,
16439 ///HTTP status message of the error.
16440 #[serde(rename = "statusMessage")]
16441 pub status_message: ::std::string::String,
16442 }
16443
16444 impl ::std::convert::From<&ListDocsResponse> for ListDocsResponse {
16445 fn from(value: &ListDocsResponse) -> Self {
16446 value.clone()
16447 }
16448 }
16449
16450 ///An HTTP error resulting from an unsuccessful request.
16451 ///
16452 /// <details><summary>JSON schema</summary>
16453 ///
16454 /// ```json
16455 ///{
16456 /// "description": "An HTTP error resulting from an unsuccessful request.",
16457 /// "required": [
16458 /// "message",
16459 /// "statusCode",
16460 /// "statusMessage"
16461 /// ],
16462 /// "properties": {
16463 /// "message": {
16464 /// "description": "Any additional context on the error, or the same as
16465 /// `statusMessage` otherwise.",
16466 /// "examples": [
16467 /// "Unauthorized"
16468 /// ],
16469 /// "type": "string"
16470 /// },
16471 /// "statusCode": {
16472 /// "description": "HTTP status code of the error.",
16473 /// "examples": [
16474 /// 401
16475 /// ],
16476 /// "type": "number"
16477 /// },
16478 /// "statusMessage": {
16479 /// "description": "HTTP status message of the error.",
16480 /// "examples": [
16481 /// "Unauthorized"
16482 /// ],
16483 /// "type": "string"
16484 /// }
16485 /// },
16486 /// "additionalProperties": false
16487 ///}
16488 /// ```
16489 /// </details>
16490 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16491 #[serde(deny_unknown_fields)]
16492 pub struct ListFormulasResponse {
16493 ///Any additional context on the error, or the same as `statusMessage`
16494 /// otherwise.
16495 pub message: ::std::string::String,
16496 #[serde(rename = "statusCode")]
16497 pub status_code: f64,
16498 ///HTTP status message of the error.
16499 #[serde(rename = "statusMessage")]
16500 pub status_message: ::std::string::String,
16501 }
16502
16503 impl ::std::convert::From<&ListFormulasResponse> for ListFormulasResponse {
16504 fn from(value: &ListFormulasResponse) -> Self {
16505 value.clone()
16506 }
16507 }
16508
16509 ///`ListGroupedIngestionLogsOrder`
16510 ///
16511 /// <details><summary>JSON schema</summary>
16512 ///
16513 /// ```json
16514 ///{
16515 /// "type": "string",
16516 /// "enum": [
16517 /// "asc",
16518 /// "desc"
16519 /// ]
16520 ///}
16521 /// ```
16522 /// </details>
16523 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16524 pub enum ListGroupedIngestionLogsOrder {
16525 #[serde(rename = "asc")]
16526 Asc,
16527 #[serde(rename = "desc")]
16528 Desc,
16529 }
16530
16531 impl ::std::convert::From<&Self> for ListGroupedIngestionLogsOrder {
16532 fn from(value: &ListGroupedIngestionLogsOrder) -> Self {
16533 value.clone()
16534 }
16535 }
16536
16537 impl ::std::fmt::Display for ListGroupedIngestionLogsOrder {
16538 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16539 match *self {
16540 Self::Asc => f.write_str("asc"),
16541 Self::Desc => f.write_str("desc"),
16542 }
16543 }
16544 }
16545
16546 impl ::std::str::FromStr for ListGroupedIngestionLogsOrder {
16547 type Err = self::error::ConversionError;
16548 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16549 match value {
16550 "asc" => Ok(Self::Asc),
16551 "desc" => Ok(Self::Desc),
16552 _ => Err("invalid value".into()),
16553 }
16554 }
16555 }
16556
16557 impl ::std::convert::TryFrom<&str> for ListGroupedIngestionLogsOrder {
16558 type Error = self::error::ConversionError;
16559 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16560 value.parse()
16561 }
16562 }
16563
16564 impl ::std::convert::TryFrom<&::std::string::String> for ListGroupedIngestionLogsOrder {
16565 type Error = self::error::ConversionError;
16566 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
16567 value.parse()
16568 }
16569 }
16570
16571 impl ::std::convert::TryFrom<::std::string::String> for ListGroupedIngestionLogsOrder {
16572 type Error = self::error::ConversionError;
16573 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
16574 value.parse()
16575 }
16576 }
16577
16578 ///An HTTP error resulting from an unsuccessful request.
16579 ///
16580 /// <details><summary>JSON schema</summary>
16581 ///
16582 /// ```json
16583 ///{
16584 /// "description": "An HTTP error resulting from an unsuccessful request.",
16585 /// "required": [
16586 /// "message",
16587 /// "statusCode",
16588 /// "statusMessage"
16589 /// ],
16590 /// "properties": {
16591 /// "codaDetail": {
16592 /// "description": "Detail about why this request was rejected.",
16593 /// "type": "object",
16594 /// "properties": {
16595 /// "validationErrors": {
16596 /// "type": "array",
16597 /// "items": {
16598 /// "$ref": "#/components/schemas/ValidationError"
16599 /// }
16600 /// }
16601 /// },
16602 /// "additionalProperties": false
16603 /// },
16604 /// "message": {
16605 /// "description": "Any additional context on the error, or the same as
16606 /// `statusMessage` otherwise.",
16607 /// "examples": [
16608 /// "Bad Request"
16609 /// ],
16610 /// "type": "string"
16611 /// },
16612 /// "statusCode": {
16613 /// "description": "HTTP status code of the error.",
16614 /// "examples": [
16615 /// 400
16616 /// ],
16617 /// "type": "number"
16618 /// },
16619 /// "statusMessage": {
16620 /// "description": "HTTP status message of the error.",
16621 /// "examples": [
16622 /// "Bad Request"
16623 /// ],
16624 /// "type": "string"
16625 /// }
16626 /// },
16627 /// "additionalProperties": false
16628 ///}
16629 /// ```
16630 /// </details>
16631 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16632 #[serde(deny_unknown_fields)]
16633 pub struct ListGroupedIngestionLogsResponse {
16634 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
16635 pub coda_detail: ::std::option::Option<ListGroupedIngestionLogsResponseCodaDetail>,
16636 ///Any additional context on the error, or the same as `statusMessage`
16637 /// otherwise.
16638 pub message: ::std::string::String,
16639 #[serde(rename = "statusCode")]
16640 pub status_code: f64,
16641 ///HTTP status message of the error.
16642 #[serde(rename = "statusMessage")]
16643 pub status_message: ::std::string::String,
16644 }
16645
16646 impl ::std::convert::From<&ListGroupedIngestionLogsResponse> for ListGroupedIngestionLogsResponse {
16647 fn from(value: &ListGroupedIngestionLogsResponse) -> Self {
16648 value.clone()
16649 }
16650 }
16651
16652 ///Detail about why this request was rejected.
16653 ///
16654 /// <details><summary>JSON schema</summary>
16655 ///
16656 /// ```json
16657 ///{
16658 /// "description": "Detail about why this request was rejected.",
16659 /// "type": "object",
16660 /// "properties": {
16661 /// "validationErrors": {
16662 /// "type": "array",
16663 /// "items": {
16664 /// "$ref": "#/components/schemas/ValidationError"
16665 /// }
16666 /// }
16667 /// },
16668 /// "additionalProperties": false
16669 ///}
16670 /// ```
16671 /// </details>
16672 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16673 #[serde(deny_unknown_fields)]
16674 pub struct ListGroupedIngestionLogsResponseCodaDetail {
16675 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16676 pub validation_errors: ::std::vec::Vec<ValidationError>,
16677 }
16678
16679 impl ::std::convert::From<&ListGroupedIngestionLogsResponseCodaDetail> for ListGroupedIngestionLogsResponseCodaDetail {
16680 fn from(value: &ListGroupedIngestionLogsResponseCodaDetail) -> Self {
16681 value.clone()
16682 }
16683 }
16684
16685 impl ::std::default::Default for ListGroupedIngestionLogsResponseCodaDetail {
16686 fn default() -> Self {
16687 Self {
16688 validation_errors: Default::default(),
16689 }
16690 }
16691 }
16692
16693 ///`ListGroupedPackLogsOrder`
16694 ///
16695 /// <details><summary>JSON schema</summary>
16696 ///
16697 /// ```json
16698 ///{
16699 /// "type": "string",
16700 /// "enum": [
16701 /// "asc",
16702 /// "desc"
16703 /// ]
16704 ///}
16705 /// ```
16706 /// </details>
16707 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16708 pub enum ListGroupedPackLogsOrder {
16709 #[serde(rename = "asc")]
16710 Asc,
16711 #[serde(rename = "desc")]
16712 Desc,
16713 }
16714
16715 impl ::std::convert::From<&Self> for ListGroupedPackLogsOrder {
16716 fn from(value: &ListGroupedPackLogsOrder) -> Self {
16717 value.clone()
16718 }
16719 }
16720
16721 impl ::std::fmt::Display for ListGroupedPackLogsOrder {
16722 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16723 match *self {
16724 Self::Asc => f.write_str("asc"),
16725 Self::Desc => f.write_str("desc"),
16726 }
16727 }
16728 }
16729
16730 impl ::std::str::FromStr for ListGroupedPackLogsOrder {
16731 type Err = self::error::ConversionError;
16732 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16733 match value {
16734 "asc" => Ok(Self::Asc),
16735 "desc" => Ok(Self::Desc),
16736 _ => Err("invalid value".into()),
16737 }
16738 }
16739 }
16740
16741 impl ::std::convert::TryFrom<&str> for ListGroupedPackLogsOrder {
16742 type Error = self::error::ConversionError;
16743 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16744 value.parse()
16745 }
16746 }
16747
16748 impl ::std::convert::TryFrom<&::std::string::String> for ListGroupedPackLogsOrder {
16749 type Error = self::error::ConversionError;
16750 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
16751 value.parse()
16752 }
16753 }
16754
16755 impl ::std::convert::TryFrom<::std::string::String> for ListGroupedPackLogsOrder {
16756 type Error = self::error::ConversionError;
16757 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
16758 value.parse()
16759 }
16760 }
16761
16762 ///An HTTP error resulting from an unsuccessful request.
16763 ///
16764 /// <details><summary>JSON schema</summary>
16765 ///
16766 /// ```json
16767 ///{
16768 /// "description": "An HTTP error resulting from an unsuccessful request.",
16769 /// "required": [
16770 /// "message",
16771 /// "statusCode",
16772 /// "statusMessage"
16773 /// ],
16774 /// "properties": {
16775 /// "codaDetail": {
16776 /// "description": "Detail about why this request was rejected.",
16777 /// "type": "object",
16778 /// "properties": {
16779 /// "validationErrors": {
16780 /// "type": "array",
16781 /// "items": {
16782 /// "$ref": "#/components/schemas/ValidationError"
16783 /// }
16784 /// }
16785 /// },
16786 /// "additionalProperties": false
16787 /// },
16788 /// "message": {
16789 /// "description": "Any additional context on the error, or the same as
16790 /// `statusMessage` otherwise.",
16791 /// "examples": [
16792 /// "Bad Request"
16793 /// ],
16794 /// "type": "string"
16795 /// },
16796 /// "statusCode": {
16797 /// "description": "HTTP status code of the error.",
16798 /// "examples": [
16799 /// 400
16800 /// ],
16801 /// "type": "number"
16802 /// },
16803 /// "statusMessage": {
16804 /// "description": "HTTP status message of the error.",
16805 /// "examples": [
16806 /// "Bad Request"
16807 /// ],
16808 /// "type": "string"
16809 /// }
16810 /// },
16811 /// "additionalProperties": false
16812 ///}
16813 /// ```
16814 /// </details>
16815 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16816 #[serde(deny_unknown_fields)]
16817 pub struct ListGroupedPackLogsResponse {
16818 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
16819 pub coda_detail: ::std::option::Option<ListGroupedPackLogsResponseCodaDetail>,
16820 ///Any additional context on the error, or the same as `statusMessage`
16821 /// otherwise.
16822 pub message: ::std::string::String,
16823 #[serde(rename = "statusCode")]
16824 pub status_code: f64,
16825 ///HTTP status message of the error.
16826 #[serde(rename = "statusMessage")]
16827 pub status_message: ::std::string::String,
16828 }
16829
16830 impl ::std::convert::From<&ListGroupedPackLogsResponse> for ListGroupedPackLogsResponse {
16831 fn from(value: &ListGroupedPackLogsResponse) -> Self {
16832 value.clone()
16833 }
16834 }
16835
16836 ///Detail about why this request was rejected.
16837 ///
16838 /// <details><summary>JSON schema</summary>
16839 ///
16840 /// ```json
16841 ///{
16842 /// "description": "Detail about why this request was rejected.",
16843 /// "type": "object",
16844 /// "properties": {
16845 /// "validationErrors": {
16846 /// "type": "array",
16847 /// "items": {
16848 /// "$ref": "#/components/schemas/ValidationError"
16849 /// }
16850 /// }
16851 /// },
16852 /// "additionalProperties": false
16853 ///}
16854 /// ```
16855 /// </details>
16856 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16857 #[serde(deny_unknown_fields)]
16858 pub struct ListGroupedPackLogsResponseCodaDetail {
16859 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16860 pub validation_errors: ::std::vec::Vec<ValidationError>,
16861 }
16862
16863 impl ::std::convert::From<&ListGroupedPackLogsResponseCodaDetail> for ListGroupedPackLogsResponseCodaDetail {
16864 fn from(value: &ListGroupedPackLogsResponseCodaDetail) -> Self {
16865 value.clone()
16866 }
16867 }
16868
16869 impl ::std::default::Default for ListGroupedPackLogsResponseCodaDetail {
16870 fn default() -> Self {
16871 Self {
16872 validation_errors: Default::default(),
16873 }
16874 }
16875 }
16876
16877 ///An HTTP error resulting from an unsuccessful request.
16878 ///
16879 /// <details><summary>JSON schema</summary>
16880 ///
16881 /// ```json
16882 ///{
16883 /// "description": "An HTTP error resulting from an unsuccessful request.",
16884 /// "required": [
16885 /// "message",
16886 /// "statusCode",
16887 /// "statusMessage"
16888 /// ],
16889 /// "properties": {
16890 /// "codaDetail": {
16891 /// "description": "Detail about why this request was rejected.",
16892 /// "type": "object",
16893 /// "properties": {
16894 /// "validationErrors": {
16895 /// "type": "array",
16896 /// "items": {
16897 /// "$ref": "#/components/schemas/ValidationError"
16898 /// }
16899 /// }
16900 /// },
16901 /// "additionalProperties": false
16902 /// },
16903 /// "message": {
16904 /// "description": "Any additional context on the error, or the same as
16905 /// `statusMessage` otherwise.",
16906 /// "examples": [
16907 /// "Bad Request"
16908 /// ],
16909 /// "type": "string"
16910 /// },
16911 /// "statusCode": {
16912 /// "description": "HTTP status code of the error.",
16913 /// "examples": [
16914 /// 400
16915 /// ],
16916 /// "type": "number"
16917 /// },
16918 /// "statusMessage": {
16919 /// "description": "HTTP status message of the error.",
16920 /// "examples": [
16921 /// "Bad Request"
16922 /// ],
16923 /// "type": "string"
16924 /// }
16925 /// },
16926 /// "additionalProperties": false
16927 ///}
16928 /// ```
16929 /// </details>
16930 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16931 #[serde(deny_unknown_fields)]
16932 pub struct ListIngestionBatchExecutionsResponse {
16933 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
16934 pub coda_detail: ::std::option::Option<ListIngestionBatchExecutionsResponseCodaDetail>,
16935 ///Any additional context on the error, or the same as `statusMessage`
16936 /// otherwise.
16937 pub message: ::std::string::String,
16938 #[serde(rename = "statusCode")]
16939 pub status_code: f64,
16940 ///HTTP status message of the error.
16941 #[serde(rename = "statusMessage")]
16942 pub status_message: ::std::string::String,
16943 }
16944
16945 impl ::std::convert::From<&ListIngestionBatchExecutionsResponse> for ListIngestionBatchExecutionsResponse {
16946 fn from(value: &ListIngestionBatchExecutionsResponse) -> Self {
16947 value.clone()
16948 }
16949 }
16950
16951 ///Detail about why this request was rejected.
16952 ///
16953 /// <details><summary>JSON schema</summary>
16954 ///
16955 /// ```json
16956 ///{
16957 /// "description": "Detail about why this request was rejected.",
16958 /// "type": "object",
16959 /// "properties": {
16960 /// "validationErrors": {
16961 /// "type": "array",
16962 /// "items": {
16963 /// "$ref": "#/components/schemas/ValidationError"
16964 /// }
16965 /// }
16966 /// },
16967 /// "additionalProperties": false
16968 ///}
16969 /// ```
16970 /// </details>
16971 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16972 #[serde(deny_unknown_fields)]
16973 pub struct ListIngestionBatchExecutionsResponseCodaDetail {
16974 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16975 pub validation_errors: ::std::vec::Vec<ValidationError>,
16976 }
16977
16978 impl ::std::convert::From<&ListIngestionBatchExecutionsResponseCodaDetail> for ListIngestionBatchExecutionsResponseCodaDetail {
16979 fn from(value: &ListIngestionBatchExecutionsResponseCodaDetail) -> Self {
16980 value.clone()
16981 }
16982 }
16983
16984 impl ::std::default::Default for ListIngestionBatchExecutionsResponseCodaDetail {
16985 fn default() -> Self {
16986 Self {
16987 validation_errors: Default::default(),
16988 }
16989 }
16990 }
16991
16992 ///`ListIngestionLogsOrder`
16993 ///
16994 /// <details><summary>JSON schema</summary>
16995 ///
16996 /// ```json
16997 ///{
16998 /// "type": "string",
16999 /// "enum": [
17000 /// "asc",
17001 /// "desc"
17002 /// ]
17003 ///}
17004 /// ```
17005 /// </details>
17006 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17007 pub enum ListIngestionLogsOrder {
17008 #[serde(rename = "asc")]
17009 Asc,
17010 #[serde(rename = "desc")]
17011 Desc,
17012 }
17013
17014 impl ::std::convert::From<&Self> for ListIngestionLogsOrder {
17015 fn from(value: &ListIngestionLogsOrder) -> Self {
17016 value.clone()
17017 }
17018 }
17019
17020 impl ::std::fmt::Display for ListIngestionLogsOrder {
17021 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17022 match *self {
17023 Self::Asc => f.write_str("asc"),
17024 Self::Desc => f.write_str("desc"),
17025 }
17026 }
17027 }
17028
17029 impl ::std::str::FromStr for ListIngestionLogsOrder {
17030 type Err = self::error::ConversionError;
17031 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17032 match value {
17033 "asc" => Ok(Self::Asc),
17034 "desc" => Ok(Self::Desc),
17035 _ => Err("invalid value".into()),
17036 }
17037 }
17038 }
17039
17040 impl ::std::convert::TryFrom<&str> for ListIngestionLogsOrder {
17041 type Error = self::error::ConversionError;
17042 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17043 value.parse()
17044 }
17045 }
17046
17047 impl ::std::convert::TryFrom<&::std::string::String> for ListIngestionLogsOrder {
17048 type Error = self::error::ConversionError;
17049 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
17050 value.parse()
17051 }
17052 }
17053
17054 impl ::std::convert::TryFrom<::std::string::String> for ListIngestionLogsOrder {
17055 type Error = self::error::ConversionError;
17056 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
17057 value.parse()
17058 }
17059 }
17060
17061 ///An HTTP error resulting from an unsuccessful request.
17062 ///
17063 /// <details><summary>JSON schema</summary>
17064 ///
17065 /// ```json
17066 ///{
17067 /// "description": "An HTTP error resulting from an unsuccessful request.",
17068 /// "required": [
17069 /// "message",
17070 /// "statusCode",
17071 /// "statusMessage"
17072 /// ],
17073 /// "properties": {
17074 /// "codaDetail": {
17075 /// "description": "Detail about why this request was rejected.",
17076 /// "type": "object",
17077 /// "properties": {
17078 /// "validationErrors": {
17079 /// "type": "array",
17080 /// "items": {
17081 /// "$ref": "#/components/schemas/ValidationError"
17082 /// }
17083 /// }
17084 /// },
17085 /// "additionalProperties": false
17086 /// },
17087 /// "message": {
17088 /// "description": "Any additional context on the error, or the same as
17089 /// `statusMessage` otherwise.",
17090 /// "examples": [
17091 /// "Bad Request"
17092 /// ],
17093 /// "type": "string"
17094 /// },
17095 /// "statusCode": {
17096 /// "description": "HTTP status code of the error.",
17097 /// "examples": [
17098 /// 400
17099 /// ],
17100 /// "type": "number"
17101 /// },
17102 /// "statusMessage": {
17103 /// "description": "HTTP status message of the error.",
17104 /// "examples": [
17105 /// "Bad Request"
17106 /// ],
17107 /// "type": "string"
17108 /// }
17109 /// },
17110 /// "additionalProperties": false
17111 ///}
17112 /// ```
17113 /// </details>
17114 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17115 #[serde(deny_unknown_fields)]
17116 pub struct ListIngestionLogsResponse {
17117 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
17118 pub coda_detail: ::std::option::Option<ListIngestionLogsResponseCodaDetail>,
17119 ///Any additional context on the error, or the same as `statusMessage`
17120 /// otherwise.
17121 pub message: ::std::string::String,
17122 #[serde(rename = "statusCode")]
17123 pub status_code: f64,
17124 ///HTTP status message of the error.
17125 #[serde(rename = "statusMessage")]
17126 pub status_message: ::std::string::String,
17127 }
17128
17129 impl ::std::convert::From<&ListIngestionLogsResponse> for ListIngestionLogsResponse {
17130 fn from(value: &ListIngestionLogsResponse) -> Self {
17131 value.clone()
17132 }
17133 }
17134
17135 ///Detail about why this request was rejected.
17136 ///
17137 /// <details><summary>JSON schema</summary>
17138 ///
17139 /// ```json
17140 ///{
17141 /// "description": "Detail about why this request was rejected.",
17142 /// "type": "object",
17143 /// "properties": {
17144 /// "validationErrors": {
17145 /// "type": "array",
17146 /// "items": {
17147 /// "$ref": "#/components/schemas/ValidationError"
17148 /// }
17149 /// }
17150 /// },
17151 /// "additionalProperties": false
17152 ///}
17153 /// ```
17154 /// </details>
17155 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17156 #[serde(deny_unknown_fields)]
17157 pub struct ListIngestionLogsResponseCodaDetail {
17158 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17159 pub validation_errors: ::std::vec::Vec<ValidationError>,
17160 }
17161
17162 impl ::std::convert::From<&ListIngestionLogsResponseCodaDetail> for ListIngestionLogsResponseCodaDetail {
17163 fn from(value: &ListIngestionLogsResponseCodaDetail) -> Self {
17164 value.clone()
17165 }
17166 }
17167
17168 impl ::std::default::Default for ListIngestionLogsResponseCodaDetail {
17169 fn default() -> Self {
17170 Self {
17171 validation_errors: Default::default(),
17172 }
17173 }
17174 }
17175
17176 ///An HTTP error resulting from an unsuccessful request.
17177 ///
17178 /// <details><summary>JSON schema</summary>
17179 ///
17180 /// ```json
17181 ///{
17182 /// "description": "An HTTP error resulting from an unsuccessful request.",
17183 /// "required": [
17184 /// "message",
17185 /// "statusCode",
17186 /// "statusMessage"
17187 /// ],
17188 /// "properties": {
17189 /// "codaDetail": {
17190 /// "description": "Detail about why this request was rejected.",
17191 /// "type": "object",
17192 /// "properties": {
17193 /// "validationErrors": {
17194 /// "type": "array",
17195 /// "items": {
17196 /// "$ref": "#/components/schemas/ValidationError"
17197 /// }
17198 /// }
17199 /// },
17200 /// "additionalProperties": false
17201 /// },
17202 /// "message": {
17203 /// "description": "Any additional context on the error, or the same as
17204 /// `statusMessage` otherwise.",
17205 /// "examples": [
17206 /// "Bad Request"
17207 /// ],
17208 /// "type": "string"
17209 /// },
17210 /// "statusCode": {
17211 /// "description": "HTTP status code of the error.",
17212 /// "examples": [
17213 /// 400
17214 /// ],
17215 /// "type": "number"
17216 /// },
17217 /// "statusMessage": {
17218 /// "description": "HTTP status message of the error.",
17219 /// "examples": [
17220 /// "Bad Request"
17221 /// ],
17222 /// "type": "string"
17223 /// }
17224 /// },
17225 /// "additionalProperties": false
17226 ///}
17227 /// ```
17228 /// </details>
17229 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17230 #[serde(deny_unknown_fields)]
17231 pub struct ListIngestionParentItemsResponse {
17232 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
17233 pub coda_detail: ::std::option::Option<ListIngestionParentItemsResponseCodaDetail>,
17234 ///Any additional context on the error, or the same as `statusMessage`
17235 /// otherwise.
17236 pub message: ::std::string::String,
17237 #[serde(rename = "statusCode")]
17238 pub status_code: f64,
17239 ///HTTP status message of the error.
17240 #[serde(rename = "statusMessage")]
17241 pub status_message: ::std::string::String,
17242 }
17243
17244 impl ::std::convert::From<&ListIngestionParentItemsResponse> for ListIngestionParentItemsResponse {
17245 fn from(value: &ListIngestionParentItemsResponse) -> Self {
17246 value.clone()
17247 }
17248 }
17249
17250 ///Detail about why this request was rejected.
17251 ///
17252 /// <details><summary>JSON schema</summary>
17253 ///
17254 /// ```json
17255 ///{
17256 /// "description": "Detail about why this request was rejected.",
17257 /// "type": "object",
17258 /// "properties": {
17259 /// "validationErrors": {
17260 /// "type": "array",
17261 /// "items": {
17262 /// "$ref": "#/components/schemas/ValidationError"
17263 /// }
17264 /// }
17265 /// },
17266 /// "additionalProperties": false
17267 ///}
17268 /// ```
17269 /// </details>
17270 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17271 #[serde(deny_unknown_fields)]
17272 pub struct ListIngestionParentItemsResponseCodaDetail {
17273 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17274 pub validation_errors: ::std::vec::Vec<ValidationError>,
17275 }
17276
17277 impl ::std::convert::From<&ListIngestionParentItemsResponseCodaDetail> for ListIngestionParentItemsResponseCodaDetail {
17278 fn from(value: &ListIngestionParentItemsResponseCodaDetail) -> Self {
17279 value.clone()
17280 }
17281 }
17282
17283 impl ::std::default::Default for ListIngestionParentItemsResponseCodaDetail {
17284 fn default() -> Self {
17285 Self {
17286 validation_errors: Default::default(),
17287 }
17288 }
17289 }
17290
17291 ///An HTTP error resulting from an unsuccessful request.
17292 ///
17293 /// <details><summary>JSON schema</summary>
17294 ///
17295 /// ```json
17296 ///{
17297 /// "description": "An HTTP error resulting from an unsuccessful request.",
17298 /// "required": [
17299 /// "message",
17300 /// "statusCode",
17301 /// "statusMessage"
17302 /// ],
17303 /// "properties": {
17304 /// "message": {
17305 /// "description": "Any additional context on the error, or the same as
17306 /// `statusMessage` otherwise.",
17307 /// "examples": [
17308 /// "Unauthorized"
17309 /// ],
17310 /// "type": "string"
17311 /// },
17312 /// "statusCode": {
17313 /// "description": "HTTP status code of the error.",
17314 /// "examples": [
17315 /// 401
17316 /// ],
17317 /// "type": "number"
17318 /// },
17319 /// "statusMessage": {
17320 /// "description": "HTTP status message of the error.",
17321 /// "examples": [
17322 /// "Unauthorized"
17323 /// ],
17324 /// "type": "string"
17325 /// }
17326 /// },
17327 /// "additionalProperties": false
17328 ///}
17329 /// ```
17330 /// </details>
17331 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17332 #[serde(deny_unknown_fields)]
17333 pub struct ListPackAnalyticsResponse {
17334 ///Any additional context on the error, or the same as `statusMessage`
17335 /// otherwise.
17336 pub message: ::std::string::String,
17337 #[serde(rename = "statusCode")]
17338 pub status_code: f64,
17339 ///HTTP status message of the error.
17340 #[serde(rename = "statusMessage")]
17341 pub status_message: ::std::string::String,
17342 }
17343
17344 impl ::std::convert::From<&ListPackAnalyticsResponse> for ListPackAnalyticsResponse {
17345 fn from(value: &ListPackAnalyticsResponse) -> Self {
17346 value.clone()
17347 }
17348 }
17349
17350 ///An HTTP error resulting from an unsuccessful request.
17351 ///
17352 /// <details><summary>JSON schema</summary>
17353 ///
17354 /// ```json
17355 ///{
17356 /// "description": "An HTTP error resulting from an unsuccessful request.",
17357 /// "required": [
17358 /// "message",
17359 /// "statusCode",
17360 /// "statusMessage"
17361 /// ],
17362 /// "properties": {
17363 /// "message": {
17364 /// "description": "Any additional context on the error, or the same as
17365 /// `statusMessage` otherwise.",
17366 /// "examples": [
17367 /// "Unauthorized"
17368 /// ],
17369 /// "type": "string"
17370 /// },
17371 /// "statusCode": {
17372 /// "description": "HTTP status code of the error.",
17373 /// "examples": [
17374 /// 401
17375 /// ],
17376 /// "type": "number"
17377 /// },
17378 /// "statusMessage": {
17379 /// "description": "HTTP status message of the error.",
17380 /// "examples": [
17381 /// "Unauthorized"
17382 /// ],
17383 /// "type": "string"
17384 /// }
17385 /// },
17386 /// "additionalProperties": false
17387 ///}
17388 /// ```
17389 /// </details>
17390 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17391 #[serde(deny_unknown_fields)]
17392 pub struct ListPackAnalyticsSummaryResponse {
17393 ///Any additional context on the error, or the same as `statusMessage`
17394 /// otherwise.
17395 pub message: ::std::string::String,
17396 #[serde(rename = "statusCode")]
17397 pub status_code: f64,
17398 ///HTTP status message of the error.
17399 #[serde(rename = "statusMessage")]
17400 pub status_message: ::std::string::String,
17401 }
17402
17403 impl ::std::convert::From<&ListPackAnalyticsSummaryResponse> for ListPackAnalyticsSummaryResponse {
17404 fn from(value: &ListPackAnalyticsSummaryResponse) -> Self {
17405 value.clone()
17406 }
17407 }
17408
17409 ///Confirmation of successfully retrieving Pack categories.
17410 ///
17411 /// <details><summary>JSON schema</summary>
17412 ///
17413 /// ```json
17414 ///{
17415 /// "description": "Confirmation of successfully retrieving Pack
17416 /// categories.",
17417 /// "type": "object",
17418 /// "required": [
17419 /// "categories"
17420 /// ],
17421 /// "properties": {
17422 /// "categories": {
17423 /// "description": "The names of categories associated with a Pack.",
17424 /// "type": "array",
17425 /// "items": {
17426 /// "$ref": "#/components/schemas/PublishingCategory"
17427 /// }
17428 /// }
17429 /// },
17430 /// "additionalProperties": false,
17431 /// "x-schema-name": "ListPackCategoriesResponse"
17432 ///}
17433 /// ```
17434 /// </details>
17435 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17436 #[serde(deny_unknown_fields)]
17437 pub struct ListPackCategoriesResponse {
17438 ///The names of categories associated with a Pack.
17439 pub categories: ::std::vec::Vec<PublishingCategory>,
17440 }
17441
17442 impl ::std::convert::From<&ListPackCategoriesResponse> for ListPackCategoriesResponse {
17443 fn from(value: &ListPackCategoriesResponse) -> Self {
17444 value.clone()
17445 }
17446 }
17447
17448 ///Detail about why this request was rejected.
17449 ///
17450 /// <details><summary>JSON schema</summary>
17451 ///
17452 /// ```json
17453 ///{
17454 /// "description": "Detail about why this request was rejected.",
17455 /// "type": "object",
17456 /// "properties": {
17457 /// "validationErrors": {
17458 /// "type": "array",
17459 /// "items": {
17460 /// "$ref": "#/components/schemas/ValidationError"
17461 /// }
17462 /// }
17463 /// },
17464 /// "additionalProperties": false
17465 ///}
17466 /// ```
17467 /// </details>
17468 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17469 #[serde(deny_unknown_fields)]
17470 pub struct ListPackCategoriesResponseCodaDetail {
17471 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17472 pub validation_errors: ::std::vec::Vec<ValidationError>,
17473 }
17474
17475 impl ::std::convert::From<&ListPackCategoriesResponseCodaDetail> for ListPackCategoriesResponseCodaDetail {
17476 fn from(value: &ListPackCategoriesResponseCodaDetail) -> Self {
17477 value.clone()
17478 }
17479 }
17480
17481 impl ::std::default::Default for ListPackCategoriesResponseCodaDetail {
17482 fn default() -> Self {
17483 Self {
17484 validation_errors: Default::default(),
17485 }
17486 }
17487 }
17488
17489 ///An HTTP error resulting from an unsuccessful request.
17490 ///
17491 /// <details><summary>JSON schema</summary>
17492 ///
17493 /// ```json
17494 ///{
17495 /// "description": "An HTTP error resulting from an unsuccessful request.",
17496 /// "required": [
17497 /// "message",
17498 /// "statusCode",
17499 /// "statusMessage"
17500 /// ],
17501 /// "properties": {
17502 /// "message": {
17503 /// "description": "Any additional context on the error, or the same as
17504 /// `statusMessage` otherwise.",
17505 /// "examples": [
17506 /// "Bad Request"
17507 /// ],
17508 /// "type": "string"
17509 /// },
17510 /// "statusCode": {
17511 /// "description": "HTTP status code of the error.",
17512 /// "examples": [
17513 /// 400
17514 /// ],
17515 /// "type": "number"
17516 /// },
17517 /// "statusMessage": {
17518 /// "description": "HTTP status message of the error.",
17519 /// "examples": [
17520 /// "Bad Request"
17521 /// ],
17522 /// "type": "string"
17523 /// }
17524 /// },
17525 /// "additionalProperties": false
17526 ///}
17527 /// ```
17528 /// </details>
17529 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17530 #[serde(deny_unknown_fields)]
17531 pub struct ListPackFeaturedDocsResponse {
17532 ///Any additional context on the error, or the same as `statusMessage`
17533 /// otherwise.
17534 pub message: ::std::string::String,
17535 #[serde(rename = "statusCode")]
17536 pub status_code: f64,
17537 ///HTTP status message of the error.
17538 #[serde(rename = "statusMessage")]
17539 pub status_message: ::std::string::String,
17540 }
17541
17542 impl ::std::convert::From<&ListPackFeaturedDocsResponse> for ListPackFeaturedDocsResponse {
17543 fn from(value: &ListPackFeaturedDocsResponse) -> Self {
17544 value.clone()
17545 }
17546 }
17547
17548 ///An HTTP error resulting from an unsuccessful request.
17549 ///
17550 /// <details><summary>JSON schema</summary>
17551 ///
17552 /// ```json
17553 ///{
17554 /// "description": "An HTTP error resulting from an unsuccessful request.",
17555 /// "required": [
17556 /// "message",
17557 /// "statusCode",
17558 /// "statusMessage"
17559 /// ],
17560 /// "properties": {
17561 /// "message": {
17562 /// "description": "Any additional context on the error, or the same as
17563 /// `statusMessage` otherwise.",
17564 /// "examples": [
17565 /// "Unauthorized"
17566 /// ],
17567 /// "type": "string"
17568 /// },
17569 /// "statusCode": {
17570 /// "description": "HTTP status code of the error.",
17571 /// "examples": [
17572 /// 401
17573 /// ],
17574 /// "type": "number"
17575 /// },
17576 /// "statusMessage": {
17577 /// "description": "HTTP status message of the error.",
17578 /// "examples": [
17579 /// "Unauthorized"
17580 /// ],
17581 /// "type": "string"
17582 /// }
17583 /// },
17584 /// "additionalProperties": false
17585 ///}
17586 /// ```
17587 /// </details>
17588 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17589 #[serde(deny_unknown_fields)]
17590 pub struct ListPackFormulaAnalyticsResponse {
17591 ///Any additional context on the error, or the same as `statusMessage`
17592 /// otherwise.
17593 pub message: ::std::string::String,
17594 #[serde(rename = "statusCode")]
17595 pub status_code: f64,
17596 ///HTTP status message of the error.
17597 #[serde(rename = "statusMessage")]
17598 pub status_message: ::std::string::String,
17599 }
17600
17601 impl ::std::convert::From<&ListPackFormulaAnalyticsResponse> for ListPackFormulaAnalyticsResponse {
17602 fn from(value: &ListPackFormulaAnalyticsResponse) -> Self {
17603 value.clone()
17604 }
17605 }
17606
17607 ///An HTTP error resulting from an unsuccessful request.
17608 ///
17609 /// <details><summary>JSON schema</summary>
17610 ///
17611 /// ```json
17612 ///{
17613 /// "description": "An HTTP error resulting from an unsuccessful request.",
17614 /// "required": [
17615 /// "message",
17616 /// "statusCode",
17617 /// "statusMessage"
17618 /// ],
17619 /// "properties": {
17620 /// "codaDetail": {
17621 /// "description": "Detail about why this request was rejected.",
17622 /// "type": "object",
17623 /// "properties": {
17624 /// "validationErrors": {
17625 /// "type": "array",
17626 /// "items": {
17627 /// "$ref": "#/components/schemas/ValidationError"
17628 /// }
17629 /// }
17630 /// },
17631 /// "additionalProperties": false
17632 /// },
17633 /// "message": {
17634 /// "description": "Any additional context on the error, or the same as
17635 /// `statusMessage` otherwise.",
17636 /// "examples": [
17637 /// "Bad Request"
17638 /// ],
17639 /// "type": "string"
17640 /// },
17641 /// "statusCode": {
17642 /// "description": "HTTP status code of the error.",
17643 /// "examples": [
17644 /// 400
17645 /// ],
17646 /// "type": "number"
17647 /// },
17648 /// "statusMessage": {
17649 /// "description": "HTTP status message of the error.",
17650 /// "examples": [
17651 /// "Bad Request"
17652 /// ],
17653 /// "type": "string"
17654 /// }
17655 /// },
17656 /// "additionalProperties": false
17657 ///}
17658 /// ```
17659 /// </details>
17660 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17661 #[serde(deny_unknown_fields)]
17662 pub struct ListPackInvitationsResponse {
17663 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
17664 pub coda_detail: ::std::option::Option<ListPackInvitationsResponseCodaDetail>,
17665 ///Any additional context on the error, or the same as `statusMessage`
17666 /// otherwise.
17667 pub message: ::std::string::String,
17668 #[serde(rename = "statusCode")]
17669 pub status_code: f64,
17670 ///HTTP status message of the error.
17671 #[serde(rename = "statusMessage")]
17672 pub status_message: ::std::string::String,
17673 }
17674
17675 impl ::std::convert::From<&ListPackInvitationsResponse> for ListPackInvitationsResponse {
17676 fn from(value: &ListPackInvitationsResponse) -> Self {
17677 value.clone()
17678 }
17679 }
17680
17681 ///Detail about why this request was rejected.
17682 ///
17683 /// <details><summary>JSON schema</summary>
17684 ///
17685 /// ```json
17686 ///{
17687 /// "description": "Detail about why this request was rejected.",
17688 /// "type": "object",
17689 /// "properties": {
17690 /// "validationErrors": {
17691 /// "type": "array",
17692 /// "items": {
17693 /// "$ref": "#/components/schemas/ValidationError"
17694 /// }
17695 /// }
17696 /// },
17697 /// "additionalProperties": false
17698 ///}
17699 /// ```
17700 /// </details>
17701 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17702 #[serde(deny_unknown_fields)]
17703 pub struct ListPackInvitationsResponseCodaDetail {
17704 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17705 pub validation_errors: ::std::vec::Vec<ValidationError>,
17706 }
17707
17708 impl ::std::convert::From<&ListPackInvitationsResponseCodaDetail> for ListPackInvitationsResponseCodaDetail {
17709 fn from(value: &ListPackInvitationsResponseCodaDetail) -> Self {
17710 value.clone()
17711 }
17712 }
17713
17714 impl ::std::default::Default for ListPackInvitationsResponseCodaDetail {
17715 fn default() -> Self {
17716 Self {
17717 validation_errors: Default::default(),
17718 }
17719 }
17720 }
17721
17722 ///An HTTP error resulting from an unsuccessful request.
17723 ///
17724 /// <details><summary>JSON schema</summary>
17725 ///
17726 /// ```json
17727 ///{
17728 /// "description": "An HTTP error resulting from an unsuccessful request.",
17729 /// "required": [
17730 /// "message",
17731 /// "statusCode",
17732 /// "statusMessage"
17733 /// ],
17734 /// "properties": {
17735 /// "codaDetail": {
17736 /// "description": "Detail about why this request was rejected.",
17737 /// "type": "object",
17738 /// "properties": {
17739 /// "validationErrors": {
17740 /// "type": "array",
17741 /// "items": {
17742 /// "$ref": "#/components/schemas/ValidationError"
17743 /// }
17744 /// }
17745 /// },
17746 /// "additionalProperties": false
17747 /// },
17748 /// "message": {
17749 /// "description": "Any additional context on the error, or the same as
17750 /// `statusMessage` otherwise.",
17751 /// "examples": [
17752 /// "Bad Request"
17753 /// ],
17754 /// "type": "string"
17755 /// },
17756 /// "statusCode": {
17757 /// "description": "HTTP status code of the error.",
17758 /// "examples": [
17759 /// 400
17760 /// ],
17761 /// "type": "number"
17762 /// },
17763 /// "statusMessage": {
17764 /// "description": "HTTP status message of the error.",
17765 /// "examples": [
17766 /// "Bad Request"
17767 /// ],
17768 /// "type": "string"
17769 /// }
17770 /// },
17771 /// "additionalProperties": false
17772 ///}
17773 /// ```
17774 /// </details>
17775 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17776 #[serde(deny_unknown_fields)]
17777 pub struct ListPackListingsResponse {
17778 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
17779 pub coda_detail: ::std::option::Option<ListPackListingsResponseCodaDetail>,
17780 ///Any additional context on the error, or the same as `statusMessage`
17781 /// otherwise.
17782 pub message: ::std::string::String,
17783 #[serde(rename = "statusCode")]
17784 pub status_code: f64,
17785 ///HTTP status message of the error.
17786 #[serde(rename = "statusMessage")]
17787 pub status_message: ::std::string::String,
17788 }
17789
17790 impl ::std::convert::From<&ListPackListingsResponse> for ListPackListingsResponse {
17791 fn from(value: &ListPackListingsResponse) -> Self {
17792 value.clone()
17793 }
17794 }
17795
17796 ///Detail about why this request was rejected.
17797 ///
17798 /// <details><summary>JSON schema</summary>
17799 ///
17800 /// ```json
17801 ///{
17802 /// "description": "Detail about why this request was rejected.",
17803 /// "type": "object",
17804 /// "properties": {
17805 /// "validationErrors": {
17806 /// "type": "array",
17807 /// "items": {
17808 /// "$ref": "#/components/schemas/ValidationError"
17809 /// }
17810 /// }
17811 /// },
17812 /// "additionalProperties": false
17813 ///}
17814 /// ```
17815 /// </details>
17816 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17817 #[serde(deny_unknown_fields)]
17818 pub struct ListPackListingsResponseCodaDetail {
17819 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17820 pub validation_errors: ::std::vec::Vec<ValidationError>,
17821 }
17822
17823 impl ::std::convert::From<&ListPackListingsResponseCodaDetail> for ListPackListingsResponseCodaDetail {
17824 fn from(value: &ListPackListingsResponseCodaDetail) -> Self {
17825 value.clone()
17826 }
17827 }
17828
17829 impl ::std::default::Default for ListPackListingsResponseCodaDetail {
17830 fn default() -> Self {
17831 Self {
17832 validation_errors: Default::default(),
17833 }
17834 }
17835 }
17836
17837 ///`ListPackLogsOrder`
17838 ///
17839 /// <details><summary>JSON schema</summary>
17840 ///
17841 /// ```json
17842 ///{
17843 /// "type": "string",
17844 /// "enum": [
17845 /// "asc",
17846 /// "desc"
17847 /// ]
17848 ///}
17849 /// ```
17850 /// </details>
17851 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17852 pub enum ListPackLogsOrder {
17853 #[serde(rename = "asc")]
17854 Asc,
17855 #[serde(rename = "desc")]
17856 Desc,
17857 }
17858
17859 impl ::std::convert::From<&Self> for ListPackLogsOrder {
17860 fn from(value: &ListPackLogsOrder) -> Self {
17861 value.clone()
17862 }
17863 }
17864
17865 impl ::std::fmt::Display for ListPackLogsOrder {
17866 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17867 match *self {
17868 Self::Asc => f.write_str("asc"),
17869 Self::Desc => f.write_str("desc"),
17870 }
17871 }
17872 }
17873
17874 impl ::std::str::FromStr for ListPackLogsOrder {
17875 type Err = self::error::ConversionError;
17876 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17877 match value {
17878 "asc" => Ok(Self::Asc),
17879 "desc" => Ok(Self::Desc),
17880 _ => Err("invalid value".into()),
17881 }
17882 }
17883 }
17884
17885 impl ::std::convert::TryFrom<&str> for ListPackLogsOrder {
17886 type Error = self::error::ConversionError;
17887 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17888 value.parse()
17889 }
17890 }
17891
17892 impl ::std::convert::TryFrom<&::std::string::String> for ListPackLogsOrder {
17893 type Error = self::error::ConversionError;
17894 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
17895 value.parse()
17896 }
17897 }
17898
17899 impl ::std::convert::TryFrom<::std::string::String> for ListPackLogsOrder {
17900 type Error = self::error::ConversionError;
17901 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
17902 value.parse()
17903 }
17904 }
17905
17906 ///An HTTP error resulting from an unsuccessful request.
17907 ///
17908 /// <details><summary>JSON schema</summary>
17909 ///
17910 /// ```json
17911 ///{
17912 /// "description": "An HTTP error resulting from an unsuccessful request.",
17913 /// "required": [
17914 /// "message",
17915 /// "statusCode",
17916 /// "statusMessage"
17917 /// ],
17918 /// "properties": {
17919 /// "codaDetail": {
17920 /// "description": "Detail about why this request was rejected.",
17921 /// "type": "object",
17922 /// "properties": {
17923 /// "validationErrors": {
17924 /// "type": "array",
17925 /// "items": {
17926 /// "$ref": "#/components/schemas/ValidationError"
17927 /// }
17928 /// }
17929 /// },
17930 /// "additionalProperties": false
17931 /// },
17932 /// "message": {
17933 /// "description": "Any additional context on the error, or the same as
17934 /// `statusMessage` otherwise.",
17935 /// "examples": [
17936 /// "Bad Request"
17937 /// ],
17938 /// "type": "string"
17939 /// },
17940 /// "statusCode": {
17941 /// "description": "HTTP status code of the error.",
17942 /// "examples": [
17943 /// 400
17944 /// ],
17945 /// "type": "number"
17946 /// },
17947 /// "statusMessage": {
17948 /// "description": "HTTP status message of the error.",
17949 /// "examples": [
17950 /// "Bad Request"
17951 /// ],
17952 /// "type": "string"
17953 /// }
17954 /// },
17955 /// "additionalProperties": false
17956 ///}
17957 /// ```
17958 /// </details>
17959 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17960 #[serde(deny_unknown_fields)]
17961 pub struct ListPackLogsResponse {
17962 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
17963 pub coda_detail: ::std::option::Option<ListPackLogsResponseCodaDetail>,
17964 ///Any additional context on the error, or the same as `statusMessage`
17965 /// otherwise.
17966 pub message: ::std::string::String,
17967 #[serde(rename = "statusCode")]
17968 pub status_code: f64,
17969 ///HTTP status message of the error.
17970 #[serde(rename = "statusMessage")]
17971 pub status_message: ::std::string::String,
17972 }
17973
17974 impl ::std::convert::From<&ListPackLogsResponse> for ListPackLogsResponse {
17975 fn from(value: &ListPackLogsResponse) -> Self {
17976 value.clone()
17977 }
17978 }
17979
17980 ///Detail about why this request was rejected.
17981 ///
17982 /// <details><summary>JSON schema</summary>
17983 ///
17984 /// ```json
17985 ///{
17986 /// "description": "Detail about why this request was rejected.",
17987 /// "type": "object",
17988 /// "properties": {
17989 /// "validationErrors": {
17990 /// "type": "array",
17991 /// "items": {
17992 /// "$ref": "#/components/schemas/ValidationError"
17993 /// }
17994 /// }
17995 /// },
17996 /// "additionalProperties": false
17997 ///}
17998 /// ```
17999 /// </details>
18000 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18001 #[serde(deny_unknown_fields)]
18002 pub struct ListPackLogsResponseCodaDetail {
18003 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18004 pub validation_errors: ::std::vec::Vec<ValidationError>,
18005 }
18006
18007 impl ::std::convert::From<&ListPackLogsResponseCodaDetail> for ListPackLogsResponseCodaDetail {
18008 fn from(value: &ListPackLogsResponseCodaDetail) -> Self {
18009 value.clone()
18010 }
18011 }
18012
18013 impl ::std::default::Default for ListPackLogsResponseCodaDetail {
18014 fn default() -> Self {
18015 Self {
18016 validation_errors: Default::default(),
18017 }
18018 }
18019 }
18020
18021 ///Confirmation of successfully retrieving Pack makers.
18022 ///
18023 /// <details><summary>JSON schema</summary>
18024 ///
18025 /// ```json
18026 ///{
18027 /// "description": "Confirmation of successfully retrieving Pack makers.",
18028 /// "type": "object",
18029 /// "required": [
18030 /// "makers"
18031 /// ],
18032 /// "properties": {
18033 /// "makers": {
18034 /// "type": "array",
18035 /// "items": {
18036 /// "$ref": "#/components/schemas/Maker"
18037 /// }
18038 /// }
18039 /// },
18040 /// "additionalProperties": false,
18041 /// "x-schema-name": "ListPackMakersResponse"
18042 ///}
18043 /// ```
18044 /// </details>
18045 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18046 #[serde(deny_unknown_fields)]
18047 pub struct ListPackMakersResponse {
18048 pub makers: ::std::vec::Vec<Maker>,
18049 }
18050
18051 impl ::std::convert::From<&ListPackMakersResponse> for ListPackMakersResponse {
18052 fn from(value: &ListPackMakersResponse) -> Self {
18053 value.clone()
18054 }
18055 }
18056
18057 ///Detail about why this request was rejected.
18058 ///
18059 /// <details><summary>JSON schema</summary>
18060 ///
18061 /// ```json
18062 ///{
18063 /// "description": "Detail about why this request was rejected.",
18064 /// "type": "object",
18065 /// "properties": {
18066 /// "validationErrors": {
18067 /// "type": "array",
18068 /// "items": {
18069 /// "$ref": "#/components/schemas/ValidationError"
18070 /// }
18071 /// }
18072 /// },
18073 /// "additionalProperties": false
18074 ///}
18075 /// ```
18076 /// </details>
18077 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18078 #[serde(deny_unknown_fields)]
18079 pub struct ListPackMakersResponseCodaDetail {
18080 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18081 pub validation_errors: ::std::vec::Vec<ValidationError>,
18082 }
18083
18084 impl ::std::convert::From<&ListPackMakersResponseCodaDetail> for ListPackMakersResponseCodaDetail {
18085 fn from(value: &ListPackMakersResponseCodaDetail) -> Self {
18086 value.clone()
18087 }
18088 }
18089
18090 impl ::std::default::Default for ListPackMakersResponseCodaDetail {
18091 fn default() -> Self {
18092 Self {
18093 validation_errors: Default::default(),
18094 }
18095 }
18096 }
18097
18098 ///An HTTP error resulting from an unsuccessful request.
18099 ///
18100 /// <details><summary>JSON schema</summary>
18101 ///
18102 /// ```json
18103 ///{
18104 /// "description": "An HTTP error resulting from an unsuccessful request.",
18105 /// "required": [
18106 /// "message",
18107 /// "statusCode",
18108 /// "statusMessage"
18109 /// ],
18110 /// "properties": {
18111 /// "codaDetail": {
18112 /// "description": "Detail about why this request was rejected.",
18113 /// "type": "object",
18114 /// "properties": {
18115 /// "validationErrors": {
18116 /// "type": "array",
18117 /// "items": {
18118 /// "$ref": "#/components/schemas/ValidationError"
18119 /// }
18120 /// }
18121 /// },
18122 /// "additionalProperties": false
18123 /// },
18124 /// "message": {
18125 /// "description": "Any additional context on the error, or the same as
18126 /// `statusMessage` otherwise.",
18127 /// "examples": [
18128 /// "Bad Request"
18129 /// ],
18130 /// "type": "string"
18131 /// },
18132 /// "statusCode": {
18133 /// "description": "HTTP status code of the error.",
18134 /// "examples": [
18135 /// 400
18136 /// ],
18137 /// "type": "number"
18138 /// },
18139 /// "statusMessage": {
18140 /// "description": "HTTP status message of the error.",
18141 /// "examples": [
18142 /// "Bad Request"
18143 /// ],
18144 /// "type": "string"
18145 /// }
18146 /// },
18147 /// "additionalProperties": false
18148 ///}
18149 /// ```
18150 /// </details>
18151 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18152 #[serde(deny_unknown_fields)]
18153 pub struct ListPackReleasesResponse {
18154 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
18155 pub coda_detail: ::std::option::Option<ListPackReleasesResponseCodaDetail>,
18156 ///Any additional context on the error, or the same as `statusMessage`
18157 /// otherwise.
18158 pub message: ::std::string::String,
18159 #[serde(rename = "statusCode")]
18160 pub status_code: f64,
18161 ///HTTP status message of the error.
18162 #[serde(rename = "statusMessage")]
18163 pub status_message: ::std::string::String,
18164 }
18165
18166 impl ::std::convert::From<&ListPackReleasesResponse> for ListPackReleasesResponse {
18167 fn from(value: &ListPackReleasesResponse) -> Self {
18168 value.clone()
18169 }
18170 }
18171
18172 ///Detail about why this request was rejected.
18173 ///
18174 /// <details><summary>JSON schema</summary>
18175 ///
18176 /// ```json
18177 ///{
18178 /// "description": "Detail about why this request was rejected.",
18179 /// "type": "object",
18180 /// "properties": {
18181 /// "validationErrors": {
18182 /// "type": "array",
18183 /// "items": {
18184 /// "$ref": "#/components/schemas/ValidationError"
18185 /// }
18186 /// }
18187 /// },
18188 /// "additionalProperties": false
18189 ///}
18190 /// ```
18191 /// </details>
18192 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18193 #[serde(deny_unknown_fields)]
18194 pub struct ListPackReleasesResponseCodaDetail {
18195 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18196 pub validation_errors: ::std::vec::Vec<ValidationError>,
18197 }
18198
18199 impl ::std::convert::From<&ListPackReleasesResponseCodaDetail> for ListPackReleasesResponseCodaDetail {
18200 fn from(value: &ListPackReleasesResponseCodaDetail) -> Self {
18201 value.clone()
18202 }
18203 }
18204
18205 impl ::std::default::Default for ListPackReleasesResponseCodaDetail {
18206 fn default() -> Self {
18207 Self {
18208 validation_errors: Default::default(),
18209 }
18210 }
18211 }
18212
18213 ///An HTTP error resulting from an unsuccessful request.
18214 ///
18215 /// <details><summary>JSON schema</summary>
18216 ///
18217 /// ```json
18218 ///{
18219 /// "description": "An HTTP error resulting from an unsuccessful request.",
18220 /// "required": [
18221 /// "message",
18222 /// "statusCode",
18223 /// "statusMessage"
18224 /// ],
18225 /// "properties": {
18226 /// "codaDetail": {
18227 /// "description": "Detail about why this request was rejected.",
18228 /// "type": "object",
18229 /// "properties": {
18230 /// "validationErrors": {
18231 /// "type": "array",
18232 /// "items": {
18233 /// "$ref": "#/components/schemas/ValidationError"
18234 /// }
18235 /// }
18236 /// },
18237 /// "additionalProperties": false
18238 /// },
18239 /// "message": {
18240 /// "description": "Any additional context on the error, or the same as
18241 /// `statusMessage` otherwise.",
18242 /// "examples": [
18243 /// "Bad Request"
18244 /// ],
18245 /// "type": "string"
18246 /// },
18247 /// "statusCode": {
18248 /// "description": "HTTP status code of the error.",
18249 /// "examples": [
18250 /// 400
18251 /// ],
18252 /// "type": "number"
18253 /// },
18254 /// "statusMessage": {
18255 /// "description": "HTTP status message of the error.",
18256 /// "examples": [
18257 /// "Bad Request"
18258 /// ],
18259 /// "type": "string"
18260 /// }
18261 /// },
18262 /// "additionalProperties": false
18263 ///}
18264 /// ```
18265 /// </details>
18266 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18267 #[serde(deny_unknown_fields)]
18268 pub struct ListPackVersionsResponse {
18269 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
18270 pub coda_detail: ::std::option::Option<ListPackVersionsResponseCodaDetail>,
18271 ///Any additional context on the error, or the same as `statusMessage`
18272 /// otherwise.
18273 pub message: ::std::string::String,
18274 #[serde(rename = "statusCode")]
18275 pub status_code: f64,
18276 ///HTTP status message of the error.
18277 #[serde(rename = "statusMessage")]
18278 pub status_message: ::std::string::String,
18279 }
18280
18281 impl ::std::convert::From<&ListPackVersionsResponse> for ListPackVersionsResponse {
18282 fn from(value: &ListPackVersionsResponse) -> Self {
18283 value.clone()
18284 }
18285 }
18286
18287 ///Detail about why this request was rejected.
18288 ///
18289 /// <details><summary>JSON schema</summary>
18290 ///
18291 /// ```json
18292 ///{
18293 /// "description": "Detail about why this request was rejected.",
18294 /// "type": "object",
18295 /// "properties": {
18296 /// "validationErrors": {
18297 /// "type": "array",
18298 /// "items": {
18299 /// "$ref": "#/components/schemas/ValidationError"
18300 /// }
18301 /// }
18302 /// },
18303 /// "additionalProperties": false
18304 ///}
18305 /// ```
18306 /// </details>
18307 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18308 #[serde(deny_unknown_fields)]
18309 pub struct ListPackVersionsResponseCodaDetail {
18310 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18311 pub validation_errors: ::std::vec::Vec<ValidationError>,
18312 }
18313
18314 impl ::std::convert::From<&ListPackVersionsResponseCodaDetail> for ListPackVersionsResponseCodaDetail {
18315 fn from(value: &ListPackVersionsResponseCodaDetail) -> Self {
18316 value.clone()
18317 }
18318 }
18319
18320 impl ::std::default::Default for ListPackVersionsResponseCodaDetail {
18321 fn default() -> Self {
18322 Self {
18323 validation_errors: Default::default(),
18324 }
18325 }
18326 }
18327
18328 ///An HTTP error resulting from an unsuccessful request.
18329 ///
18330 /// <details><summary>JSON schema</summary>
18331 ///
18332 /// ```json
18333 ///{
18334 /// "description": "An HTTP error resulting from an unsuccessful request.",
18335 /// "required": [
18336 /// "message",
18337 /// "statusCode",
18338 /// "statusMessage"
18339 /// ],
18340 /// "properties": {
18341 /// "message": {
18342 /// "description": "Any additional context on the error, or the same as
18343 /// `statusMessage` otherwise.",
18344 /// "examples": [
18345 /// "Bad Request"
18346 /// ],
18347 /// "type": "string"
18348 /// },
18349 /// "statusCode": {
18350 /// "description": "HTTP status code of the error.",
18351 /// "examples": [
18352 /// 400
18353 /// ],
18354 /// "type": "number"
18355 /// },
18356 /// "statusMessage": {
18357 /// "description": "HTTP status message of the error.",
18358 /// "examples": [
18359 /// "Bad Request"
18360 /// ],
18361 /// "type": "string"
18362 /// }
18363 /// },
18364 /// "additionalProperties": false
18365 ///}
18366 /// ```
18367 /// </details>
18368 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18369 #[serde(deny_unknown_fields)]
18370 pub struct ListPacksResponse {
18371 ///Any additional context on the error, or the same as `statusMessage`
18372 /// otherwise.
18373 pub message: ::std::string::String,
18374 #[serde(rename = "statusCode")]
18375 pub status_code: f64,
18376 ///HTTP status message of the error.
18377 #[serde(rename = "statusMessage")]
18378 pub status_message: ::std::string::String,
18379 }
18380
18381 impl ::std::convert::From<&ListPacksResponse> for ListPacksResponse {
18382 fn from(value: &ListPacksResponse) -> Self {
18383 value.clone()
18384 }
18385 }
18386
18387 ///An HTTP error resulting from an unsuccessful request.
18388 ///
18389 /// <details><summary>JSON schema</summary>
18390 ///
18391 /// ```json
18392 ///{
18393 /// "description": "An HTTP error resulting from an unsuccessful request.",
18394 /// "required": [
18395 /// "message",
18396 /// "statusCode",
18397 /// "statusMessage"
18398 /// ],
18399 /// "properties": {
18400 /// "message": {
18401 /// "description": "Any additional context on the error, or the same as
18402 /// `statusMessage` otherwise.",
18403 /// "examples": [
18404 /// "Unauthorized"
18405 /// ],
18406 /// "type": "string"
18407 /// },
18408 /// "statusCode": {
18409 /// "description": "HTTP status code of the error.",
18410 /// "examples": [
18411 /// 401
18412 /// ],
18413 /// "type": "number"
18414 /// },
18415 /// "statusMessage": {
18416 /// "description": "HTTP status message of the error.",
18417 /// "examples": [
18418 /// "Unauthorized"
18419 /// ],
18420 /// "type": "string"
18421 /// }
18422 /// },
18423 /// "additionalProperties": false
18424 ///}
18425 /// ```
18426 /// </details>
18427 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18428 #[serde(deny_unknown_fields)]
18429 pub struct ListPageAnalyticsResponse {
18430 ///Any additional context on the error, or the same as `statusMessage`
18431 /// otherwise.
18432 pub message: ::std::string::String,
18433 #[serde(rename = "statusCode")]
18434 pub status_code: f64,
18435 ///HTTP status message of the error.
18436 #[serde(rename = "statusMessage")]
18437 pub status_message: ::std::string::String,
18438 }
18439
18440 impl ::std::convert::From<&ListPageAnalyticsResponse> for ListPageAnalyticsResponse {
18441 fn from(value: &ListPageAnalyticsResponse) -> Self {
18442 value.clone()
18443 }
18444 }
18445
18446 ///`ListPageContentContentFormat`
18447 ///
18448 /// <details><summary>JSON schema</summary>
18449 ///
18450 /// ```json
18451 ///{
18452 /// "default": "plainText",
18453 /// "type": "string",
18454 /// "enum": [
18455 /// "plainText"
18456 /// ]
18457 ///}
18458 /// ```
18459 /// </details>
18460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18461 pub enum ListPageContentContentFormat {
18462 #[serde(rename = "plainText")]
18463 PlainText,
18464 }
18465
18466 impl ::std::convert::From<&Self> for ListPageContentContentFormat {
18467 fn from(value: &ListPageContentContentFormat) -> Self {
18468 value.clone()
18469 }
18470 }
18471
18472 impl ::std::fmt::Display for ListPageContentContentFormat {
18473 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18474 match *self {
18475 Self::PlainText => f.write_str("plainText"),
18476 }
18477 }
18478 }
18479
18480 impl ::std::str::FromStr for ListPageContentContentFormat {
18481 type Err = self::error::ConversionError;
18482 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18483 match value {
18484 "plainText" => Ok(Self::PlainText),
18485 _ => Err("invalid value".into()),
18486 }
18487 }
18488 }
18489
18490 impl ::std::convert::TryFrom<&str> for ListPageContentContentFormat {
18491 type Error = self::error::ConversionError;
18492 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18493 value.parse()
18494 }
18495 }
18496
18497 impl ::std::convert::TryFrom<&::std::string::String> for ListPageContentContentFormat {
18498 type Error = self::error::ConversionError;
18499 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
18500 value.parse()
18501 }
18502 }
18503
18504 impl ::std::convert::TryFrom<::std::string::String> for ListPageContentContentFormat {
18505 type Error = self::error::ConversionError;
18506 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
18507 value.parse()
18508 }
18509 }
18510
18511 impl ::std::default::Default for ListPageContentContentFormat {
18512 fn default() -> Self {
18513 ListPageContentContentFormat::PlainText
18514 }
18515 }
18516
18517 ///An HTTP error resulting from an unsuccessful request.
18518 ///
18519 /// <details><summary>JSON schema</summary>
18520 ///
18521 /// ```json
18522 ///{
18523 /// "description": "An HTTP error resulting from an unsuccessful request.",
18524 /// "required": [
18525 /// "message",
18526 /// "statusCode",
18527 /// "statusMessage"
18528 /// ],
18529 /// "properties": {
18530 /// "message": {
18531 /// "description": "Any additional context on the error, or the same as
18532 /// `statusMessage` otherwise.",
18533 /// "examples": [
18534 /// "Unauthorized"
18535 /// ],
18536 /// "type": "string"
18537 /// },
18538 /// "statusCode": {
18539 /// "description": "HTTP status code of the error.",
18540 /// "examples": [
18541 /// 401
18542 /// ],
18543 /// "type": "number"
18544 /// },
18545 /// "statusMessage": {
18546 /// "description": "HTTP status message of the error.",
18547 /// "examples": [
18548 /// "Unauthorized"
18549 /// ],
18550 /// "type": "string"
18551 /// }
18552 /// },
18553 /// "additionalProperties": false
18554 ///}
18555 /// ```
18556 /// </details>
18557 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18558 #[serde(deny_unknown_fields)]
18559 pub struct ListPageContentResponse {
18560 ///Any additional context on the error, or the same as `statusMessage`
18561 /// otherwise.
18562 pub message: ::std::string::String,
18563 #[serde(rename = "statusCode")]
18564 pub status_code: f64,
18565 ///HTTP status message of the error.
18566 #[serde(rename = "statusMessage")]
18567 pub status_message: ::std::string::String,
18568 }
18569
18570 impl ::std::convert::From<&ListPageContentResponse> for ListPageContentResponse {
18571 fn from(value: &ListPageContentResponse) -> Self {
18572 value.clone()
18573 }
18574 }
18575
18576 ///An HTTP error resulting from an unsuccessful request.
18577 ///
18578 /// <details><summary>JSON schema</summary>
18579 ///
18580 /// ```json
18581 ///{
18582 /// "description": "An HTTP error resulting from an unsuccessful request.",
18583 /// "required": [
18584 /// "message",
18585 /// "statusCode",
18586 /// "statusMessage"
18587 /// ],
18588 /// "properties": {
18589 /// "message": {
18590 /// "description": "Any additional context on the error, or the same as
18591 /// `statusMessage` otherwise.",
18592 /// "examples": [
18593 /// "Unauthorized"
18594 /// ],
18595 /// "type": "string"
18596 /// },
18597 /// "statusCode": {
18598 /// "description": "HTTP status code of the error.",
18599 /// "examples": [
18600 /// 401
18601 /// ],
18602 /// "type": "number"
18603 /// },
18604 /// "statusMessage": {
18605 /// "description": "HTTP status message of the error.",
18606 /// "examples": [
18607 /// "Unauthorized"
18608 /// ],
18609 /// "type": "string"
18610 /// }
18611 /// },
18612 /// "additionalProperties": false
18613 ///}
18614 /// ```
18615 /// </details>
18616 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18617 #[serde(deny_unknown_fields)]
18618 pub struct ListPagesResponse {
18619 ///Any additional context on the error, or the same as `statusMessage`
18620 /// otherwise.
18621 pub message: ::std::string::String,
18622 #[serde(rename = "statusCode")]
18623 pub status_code: f64,
18624 ///HTTP status message of the error.
18625 #[serde(rename = "statusMessage")]
18626 pub status_message: ::std::string::String,
18627 }
18628
18629 impl ::std::convert::From<&ListPagesResponse> for ListPagesResponse {
18630 fn from(value: &ListPagesResponse) -> Self {
18631 value.clone()
18632 }
18633 }
18634
18635 ///An HTTP error resulting from an unsuccessful request.
18636 ///
18637 /// <details><summary>JSON schema</summary>
18638 ///
18639 /// ```json
18640 ///{
18641 /// "description": "An HTTP error resulting from an unsuccessful request.",
18642 /// "required": [
18643 /// "message",
18644 /// "statusCode",
18645 /// "statusMessage"
18646 /// ],
18647 /// "properties": {
18648 /// "message": {
18649 /// "description": "Any additional context on the error, or the same as
18650 /// `statusMessage` otherwise.",
18651 /// "examples": [
18652 /// "Bad Request"
18653 /// ],
18654 /// "type": "string"
18655 /// },
18656 /// "statusCode": {
18657 /// "description": "HTTP status code of the error.",
18658 /// "examples": [
18659 /// 400
18660 /// ],
18661 /// "type": "number"
18662 /// },
18663 /// "statusMessage": {
18664 /// "description": "HTTP status message of the error.",
18665 /// "examples": [
18666 /// "Bad Request"
18667 /// ],
18668 /// "type": "string"
18669 /// }
18670 /// },
18671 /// "additionalProperties": false
18672 ///}
18673 /// ```
18674 /// </details>
18675 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18676 #[serde(deny_unknown_fields)]
18677 pub struct ListRowsResponse {
18678 ///Any additional context on the error, or the same as `statusMessage`
18679 /// otherwise.
18680 pub message: ::std::string::String,
18681 #[serde(rename = "statusCode")]
18682 pub status_code: f64,
18683 ///HTTP status message of the error.
18684 #[serde(rename = "statusMessage")]
18685 pub status_message: ::std::string::String,
18686 }
18687
18688 impl ::std::convert::From<&ListRowsResponse> for ListRowsResponse {
18689 fn from(value: &ListRowsResponse) -> Self {
18690 value.clone()
18691 }
18692 }
18693
18694 ///An HTTP error resulting from an unsuccessful request.
18695 ///
18696 /// <details><summary>JSON schema</summary>
18697 ///
18698 /// ```json
18699 ///{
18700 /// "description": "An HTTP error resulting from an unsuccessful request.",
18701 /// "required": [
18702 /// "message",
18703 /// "statusCode",
18704 /// "statusMessage"
18705 /// ],
18706 /// "properties": {
18707 /// "message": {
18708 /// "description": "Any additional context on the error, or the same as
18709 /// `statusMessage` otherwise.",
18710 /// "examples": [
18711 /// "Unauthorized"
18712 /// ],
18713 /// "type": "string"
18714 /// },
18715 /// "statusCode": {
18716 /// "description": "HTTP status code of the error.",
18717 /// "examples": [
18718 /// 401
18719 /// ],
18720 /// "type": "number"
18721 /// },
18722 /// "statusMessage": {
18723 /// "description": "HTTP status message of the error.",
18724 /// "examples": [
18725 /// "Unauthorized"
18726 /// ],
18727 /// "type": "string"
18728 /// }
18729 /// },
18730 /// "additionalProperties": false
18731 ///}
18732 /// ```
18733 /// </details>
18734 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18735 #[serde(deny_unknown_fields)]
18736 pub struct ListTablesResponse {
18737 ///Any additional context on the error, or the same as `statusMessage`
18738 /// otherwise.
18739 pub message: ::std::string::String,
18740 #[serde(rename = "statusCode")]
18741 pub status_code: f64,
18742 ///HTTP status message of the error.
18743 #[serde(rename = "statusMessage")]
18744 pub status_message: ::std::string::String,
18745 }
18746
18747 impl ::std::convert::From<&ListTablesResponse> for ListTablesResponse {
18748 fn from(value: &ListTablesResponse) -> Self {
18749 value.clone()
18750 }
18751 }
18752
18753 ///An HTTP error resulting from an unsuccessful request.
18754 ///
18755 /// <details><summary>JSON schema</summary>
18756 ///
18757 /// ```json
18758 ///{
18759 /// "description": "An HTTP error resulting from an unsuccessful request.",
18760 /// "required": [
18761 /// "message",
18762 /// "statusCode",
18763 /// "statusMessage"
18764 /// ],
18765 /// "properties": {
18766 /// "codaDetail": {
18767 /// "description": "Detail about why this request was rejected.",
18768 /// "type": "object",
18769 /// "properties": {
18770 /// "validationErrors": {
18771 /// "type": "array",
18772 /// "items": {
18773 /// "$ref": "#/components/schemas/ValidationError"
18774 /// }
18775 /// }
18776 /// },
18777 /// "additionalProperties": false
18778 /// },
18779 /// "message": {
18780 /// "description": "Any additional context on the error, or the same as
18781 /// `statusMessage` otherwise.",
18782 /// "examples": [
18783 /// "Bad Request"
18784 /// ],
18785 /// "type": "string"
18786 /// },
18787 /// "statusCode": {
18788 /// "description": "HTTP status code of the error.",
18789 /// "examples": [
18790 /// 400
18791 /// ],
18792 /// "type": "number"
18793 /// },
18794 /// "statusMessage": {
18795 /// "description": "HTTP status message of the error.",
18796 /// "examples": [
18797 /// "Bad Request"
18798 /// ],
18799 /// "type": "string"
18800 /// }
18801 /// },
18802 /// "additionalProperties": false
18803 ///}
18804 /// ```
18805 /// </details>
18806 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18807 #[serde(deny_unknown_fields)]
18808 pub struct ListUserPackInvitationsResponse {
18809 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
18810 pub coda_detail: ::std::option::Option<ListUserPackInvitationsResponseCodaDetail>,
18811 ///Any additional context on the error, or the same as `statusMessage`
18812 /// otherwise.
18813 pub message: ::std::string::String,
18814 #[serde(rename = "statusCode")]
18815 pub status_code: f64,
18816 ///HTTP status message of the error.
18817 #[serde(rename = "statusMessage")]
18818 pub status_message: ::std::string::String,
18819 }
18820
18821 impl ::std::convert::From<&ListUserPackInvitationsResponse> for ListUserPackInvitationsResponse {
18822 fn from(value: &ListUserPackInvitationsResponse) -> Self {
18823 value.clone()
18824 }
18825 }
18826
18827 ///Detail about why this request was rejected.
18828 ///
18829 /// <details><summary>JSON schema</summary>
18830 ///
18831 /// ```json
18832 ///{
18833 /// "description": "Detail about why this request was rejected.",
18834 /// "type": "object",
18835 /// "properties": {
18836 /// "validationErrors": {
18837 /// "type": "array",
18838 /// "items": {
18839 /// "$ref": "#/components/schemas/ValidationError"
18840 /// }
18841 /// }
18842 /// },
18843 /// "additionalProperties": false
18844 ///}
18845 /// ```
18846 /// </details>
18847 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18848 #[serde(deny_unknown_fields)]
18849 pub struct ListUserPackInvitationsResponseCodaDetail {
18850 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18851 pub validation_errors: ::std::vec::Vec<ValidationError>,
18852 }
18853
18854 impl ::std::convert::From<&ListUserPackInvitationsResponseCodaDetail> for ListUserPackInvitationsResponseCodaDetail {
18855 fn from(value: &ListUserPackInvitationsResponseCodaDetail) -> Self {
18856 value.clone()
18857 }
18858 }
18859
18860 impl ::std::default::Default for ListUserPackInvitationsResponseCodaDetail {
18861 fn default() -> Self {
18862 Self {
18863 validation_errors: Default::default(),
18864 }
18865 }
18866 }
18867
18868 ///An HTTP error resulting from an unsuccessful request.
18869 ///
18870 /// <details><summary>JSON schema</summary>
18871 ///
18872 /// ```json
18873 ///{
18874 /// "description": "An HTTP error resulting from an unsuccessful request.",
18875 /// "required": [
18876 /// "message",
18877 /// "statusCode",
18878 /// "statusMessage"
18879 /// ],
18880 /// "properties": {
18881 /// "message": {
18882 /// "description": "Any additional context on the error, or the same as
18883 /// `statusMessage` otherwise.",
18884 /// "examples": [
18885 /// "Unauthorized"
18886 /// ],
18887 /// "type": "string"
18888 /// },
18889 /// "statusCode": {
18890 /// "description": "HTTP status code of the error.",
18891 /// "examples": [
18892 /// 401
18893 /// ],
18894 /// "type": "number"
18895 /// },
18896 /// "statusMessage": {
18897 /// "description": "HTTP status message of the error.",
18898 /// "examples": [
18899 /// "Unauthorized"
18900 /// ],
18901 /// "type": "string"
18902 /// }
18903 /// },
18904 /// "additionalProperties": false
18905 ///}
18906 /// ```
18907 /// </details>
18908 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18909 #[serde(deny_unknown_fields)]
18910 pub struct ListWorkspaceMembersResponse {
18911 ///Any additional context on the error, or the same as `statusMessage`
18912 /// otherwise.
18913 pub message: ::std::string::String,
18914 #[serde(rename = "statusCode")]
18915 pub status_code: f64,
18916 ///HTTP status message of the error.
18917 #[serde(rename = "statusMessage")]
18918 pub status_message: ::std::string::String,
18919 }
18920
18921 impl ::std::convert::From<&ListWorkspaceMembersResponse> for ListWorkspaceMembersResponse {
18922 fn from(value: &ListWorkspaceMembersResponse) -> Self {
18923 value.clone()
18924 }
18925 }
18926
18927 ///An HTTP error resulting from an unsuccessful request.
18928 ///
18929 /// <details><summary>JSON schema</summary>
18930 ///
18931 /// ```json
18932 ///{
18933 /// "description": "An HTTP error resulting from an unsuccessful request.",
18934 /// "required": [
18935 /// "message",
18936 /// "statusCode",
18937 /// "statusMessage"
18938 /// ],
18939 /// "properties": {
18940 /// "message": {
18941 /// "description": "Any additional context on the error, or the same as
18942 /// `statusMessage` otherwise.",
18943 /// "examples": [
18944 /// "Unauthorized"
18945 /// ],
18946 /// "type": "string"
18947 /// },
18948 /// "statusCode": {
18949 /// "description": "HTTP status code of the error.",
18950 /// "examples": [
18951 /// 401
18952 /// ],
18953 /// "type": "number"
18954 /// },
18955 /// "statusMessage": {
18956 /// "description": "HTTP status message of the error.",
18957 /// "examples": [
18958 /// "Unauthorized"
18959 /// ],
18960 /// "type": "string"
18961 /// }
18962 /// },
18963 /// "additionalProperties": false
18964 ///}
18965 /// ```
18966 /// </details>
18967 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18968 #[serde(deny_unknown_fields)]
18969 pub struct ListWorkspaceRoleActivityResponse {
18970 ///Any additional context on the error, or the same as `statusMessage`
18971 /// otherwise.
18972 pub message: ::std::string::String,
18973 #[serde(rename = "statusCode")]
18974 pub status_code: f64,
18975 ///HTTP status message of the error.
18976 #[serde(rename = "statusMessage")]
18977 pub status_message: ::std::string::String,
18978 }
18979
18980 impl ::std::convert::From<&ListWorkspaceRoleActivityResponse> for ListWorkspaceRoleActivityResponse {
18981 fn from(value: &ListWorkspaceRoleActivityResponse) -> Self {
18982 value.clone()
18983 }
18984 }
18985
18986 ///`LogLevel`
18987 ///
18988 /// <details><summary>JSON schema</summary>
18989 ///
18990 /// ```json
18991 ///{
18992 /// "type": "string",
18993 /// "enum": [
18994 /// "error",
18995 /// "warn",
18996 /// "info",
18997 /// "debug",
18998 /// "trace",
18999 /// "unknown"
19000 /// ],
19001 /// "x-schema-name": "LogLevel",
19002 /// "x-tsEnumNames": [
19003 /// "Error",
19004 /// "Warn",
19005 /// "Info",
19006 /// "Debug",
19007 /// "Trace",
19008 /// "Unknown"
19009 /// ]
19010 ///}
19011 /// ```
19012 /// </details>
19013 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19014 pub enum LogLevel {
19015 #[serde(rename = "error")]
19016 Error,
19017 #[serde(rename = "warn")]
19018 Warn,
19019 #[serde(rename = "info")]
19020 Info,
19021 #[serde(rename = "debug")]
19022 Debug,
19023 #[serde(rename = "trace")]
19024 Trace,
19025 #[serde(rename = "unknown")]
19026 Unknown,
19027 }
19028
19029 impl ::std::convert::From<&Self> for LogLevel {
19030 fn from(value: &LogLevel) -> Self {
19031 value.clone()
19032 }
19033 }
19034
19035 impl ::std::fmt::Display for LogLevel {
19036 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19037 match *self {
19038 Self::Error => f.write_str("error"),
19039 Self::Warn => f.write_str("warn"),
19040 Self::Info => f.write_str("info"),
19041 Self::Debug => f.write_str("debug"),
19042 Self::Trace => f.write_str("trace"),
19043 Self::Unknown => f.write_str("unknown"),
19044 }
19045 }
19046 }
19047
19048 impl ::std::str::FromStr for LogLevel {
19049 type Err = self::error::ConversionError;
19050 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19051 match value {
19052 "error" => Ok(Self::Error),
19053 "warn" => Ok(Self::Warn),
19054 "info" => Ok(Self::Info),
19055 "debug" => Ok(Self::Debug),
19056 "trace" => Ok(Self::Trace),
19057 "unknown" => Ok(Self::Unknown),
19058 _ => Err("invalid value".into()),
19059 }
19060 }
19061 }
19062
19063 impl ::std::convert::TryFrom<&str> for LogLevel {
19064 type Error = self::error::ConversionError;
19065 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19066 value.parse()
19067 }
19068 }
19069
19070 impl ::std::convert::TryFrom<&::std::string::String> for LogLevel {
19071 type Error = self::error::ConversionError;
19072 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
19073 value.parse()
19074 }
19075 }
19076
19077 impl ::std::convert::TryFrom<::std::string::String> for LogLevel {
19078 type Error = self::error::ConversionError;
19079 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
19080 value.parse()
19081 }
19082 }
19083
19084 ///Info about the maker
19085 ///
19086 /// <details><summary>JSON schema</summary>
19087 ///
19088 /// ```json
19089 ///{
19090 /// "description": "Info about the maker",
19091 /// "type": "object",
19092 /// "required": [
19093 /// "loginId",
19094 /// "name"
19095 /// ],
19096 /// "properties": {
19097 /// "description": {
19098 /// "description": "Description for the maker.",
19099 /// "type": "string"
19100 /// },
19101 /// "employer": {
19102 /// "description": "Employer for maker.",
19103 /// "type": "string"
19104 /// },
19105 /// "jobTitle": {
19106 /// "description": "Job title for maker.",
19107 /// "type": "string"
19108 /// },
19109 /// "loginId": {
19110 /// "description": "Email address of the user.",
19111 /// "examples": [
19112 /// "user@example.com"
19113 /// ],
19114 /// "type": "string"
19115 /// },
19116 /// "name": {
19117 /// "description": "Name of the maker.",
19118 /// "examples": [
19119 /// "John Doe"
19120 /// ],
19121 /// "type": "string"
19122 /// },
19123 /// "pictureLink": {
19124 /// "description": "Browser-friendly link to the maker's avatar
19125 /// image.",
19126 /// "examples": [
19127 /// "https://cdn.coda.io/avatars/default_avatar.png"
19128 /// ],
19129 /// "type": "string",
19130 /// "format": "url"
19131 /// },
19132 /// "slug": {
19133 /// "description": "Maker profile identifier for the maker.",
19134 /// "type": "string"
19135 /// }
19136 /// },
19137 /// "additionalProperties": false,
19138 /// "x-schema-name": "Maker"
19139 ///}
19140 /// ```
19141 /// </details>
19142 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19143 #[serde(deny_unknown_fields)]
19144 pub struct Maker {
19145 ///Description for the maker.
19146 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19147 pub description: ::std::option::Option<::std::string::String>,
19148 ///Employer for maker.
19149 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19150 pub employer: ::std::option::Option<::std::string::String>,
19151 ///Job title for maker.
19152 #[serde(rename = "jobTitle", default, skip_serializing_if = "::std::option::Option::is_none")]
19153 pub job_title: ::std::option::Option<::std::string::String>,
19154 ///Email address of the user.
19155 #[serde(rename = "loginId")]
19156 pub login_id: ::std::string::String,
19157 ///Name of the maker.
19158 pub name: ::std::string::String,
19159 ///Browser-friendly link to the maker's avatar image.
19160 #[serde(rename = "pictureLink", default, skip_serializing_if = "::std::option::Option::is_none")]
19161 pub picture_link: ::std::option::Option<::std::string::String>,
19162 ///Maker profile identifier for the maker.
19163 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19164 pub slug: ::std::option::Option<::std::string::String>,
19165 }
19166
19167 impl ::std::convert::From<&Maker> for Maker {
19168 fn from(value: &Maker) -> Self {
19169 value.clone()
19170 }
19171 }
19172
19173 ///Summary about a maker
19174 ///
19175 /// <details><summary>JSON schema</summary>
19176 ///
19177 /// ```json
19178 ///{
19179 /// "description": "Summary about a maker",
19180 /// "type": "object",
19181 /// "required": [
19182 /// "name"
19183 /// ],
19184 /// "properties": {
19185 /// "description": {
19186 /// "description": "Description for the maker.",
19187 /// "type": "string"
19188 /// },
19189 /// "employer": {
19190 /// "description": "Employer for maker.",
19191 /// "type": "string"
19192 /// },
19193 /// "jobTitle": {
19194 /// "description": "Job title for maker.",
19195 /// "type": "string"
19196 /// },
19197 /// "name": {
19198 /// "description": "Name of the maker.",
19199 /// "examples": [
19200 /// "John Doe"
19201 /// ],
19202 /// "type": "string"
19203 /// },
19204 /// "pictureLink": {
19205 /// "description": "Browser-friendly link to the maker's avatar
19206 /// image.",
19207 /// "examples": [
19208 /// "https://cdn.coda.io/avatars/default_avatar.png"
19209 /// ],
19210 /// "type": "string",
19211 /// "format": "url"
19212 /// },
19213 /// "slug": {
19214 /// "description": "Maker profile identifier for the maker.",
19215 /// "type": "string"
19216 /// }
19217 /// },
19218 /// "additionalProperties": false,
19219 /// "x-schema-name": "MakerSummary"
19220 ///}
19221 /// ```
19222 /// </details>
19223 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19224 #[serde(deny_unknown_fields)]
19225 pub struct MakerSummary {
19226 ///Description for the maker.
19227 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19228 pub description: ::std::option::Option<::std::string::String>,
19229 ///Employer for maker.
19230 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19231 pub employer: ::std::option::Option<::std::string::String>,
19232 ///Job title for maker.
19233 #[serde(rename = "jobTitle", default, skip_serializing_if = "::std::option::Option::is_none")]
19234 pub job_title: ::std::option::Option<::std::string::String>,
19235 ///Name of the maker.
19236 pub name: ::std::string::String,
19237 ///Browser-friendly link to the maker's avatar image.
19238 #[serde(rename = "pictureLink", default, skip_serializing_if = "::std::option::Option::is_none")]
19239 pub picture_link: ::std::option::Option<::std::string::String>,
19240 ///Maker profile identifier for the maker.
19241 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19242 pub slug: ::std::option::Option<::std::string::String>,
19243 }
19244
19245 impl ::std::convert::From<&MakerSummary> for MakerSummary {
19246 fn from(value: &MakerSummary) -> Self {
19247 value.clone()
19248 }
19249 }
19250
19251 ///Pricing used when workspaces can subscribe to the Pack for a monthly
19252 /// cost per Doc Maker.
19253 ///
19254 /// <details><summary>JSON schema</summary>
19255 ///
19256 /// ```json
19257 ///{
19258 /// "description": "Pricing used when workspaces can subscribe to the Pack
19259 /// for a monthly cost per Doc Maker.",
19260 /// "type": "object",
19261 /// "required": [
19262 /// "amount",
19263 /// "currency",
19264 /// "type"
19265 /// ],
19266 /// "properties": {
19267 /// "amount": {
19268 /// "description": "The monthly cost of the Pack per Doc Maker.",
19269 /// "type": "number"
19270 /// },
19271 /// "currency": {
19272 /// "$ref": "#/components/schemas/PackPlanCurrency"
19273 /// },
19274 /// "type": {
19275 /// "type": "string",
19276 /// "enum": [
19277 /// "MonthlyDocMaker"
19278 /// ],
19279 /// "x-tsType": "PackPlanPricingType.MonthlyDocMaker"
19280 /// }
19281 /// },
19282 /// "additionalProperties": false,
19283 /// "x-schema-name": "MonthlyDocMakerPackPlanPricing"
19284 ///}
19285 /// ```
19286 /// </details>
19287 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19288 #[serde(deny_unknown_fields)]
19289 pub struct MonthlyDocMakerPackPlanPricing {
19290 pub amount: f64,
19291 pub currency: PackPlanCurrency,
19292 #[serde(rename = "type")]
19293 pub type_: MonthlyDocMakerPackPlanPricingType,
19294 }
19295
19296 impl ::std::convert::From<&MonthlyDocMakerPackPlanPricing> for MonthlyDocMakerPackPlanPricing {
19297 fn from(value: &MonthlyDocMakerPackPlanPricing) -> Self {
19298 value.clone()
19299 }
19300 }
19301
19302 ///`MonthlyDocMakerPackPlanPricingType`
19303 ///
19304 /// <details><summary>JSON schema</summary>
19305 ///
19306 /// ```json
19307 ///{
19308 /// "type": "string",
19309 /// "enum": [
19310 /// "MonthlyDocMaker"
19311 /// ],
19312 /// "x-tsType": "PackPlanPricingType.MonthlyDocMaker"
19313 ///}
19314 /// ```
19315 /// </details>
19316 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19317 pub enum MonthlyDocMakerPackPlanPricingType {
19318 MonthlyDocMaker,
19319 }
19320
19321 impl ::std::convert::From<&Self> for MonthlyDocMakerPackPlanPricingType {
19322 fn from(value: &MonthlyDocMakerPackPlanPricingType) -> Self {
19323 value.clone()
19324 }
19325 }
19326
19327 impl ::std::fmt::Display for MonthlyDocMakerPackPlanPricingType {
19328 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19329 match *self {
19330 Self::MonthlyDocMaker => f.write_str("MonthlyDocMaker"),
19331 }
19332 }
19333 }
19334
19335 impl ::std::str::FromStr for MonthlyDocMakerPackPlanPricingType {
19336 type Err = self::error::ConversionError;
19337 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19338 match value {
19339 "MonthlyDocMaker" => Ok(Self::MonthlyDocMaker),
19340 _ => Err("invalid value".into()),
19341 }
19342 }
19343 }
19344
19345 impl ::std::convert::TryFrom<&str> for MonthlyDocMakerPackPlanPricingType {
19346 type Error = self::error::ConversionError;
19347 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19348 value.parse()
19349 }
19350 }
19351
19352 impl ::std::convert::TryFrom<&::std::string::String> for MonthlyDocMakerPackPlanPricingType {
19353 type Error = self::error::ConversionError;
19354 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
19355 value.parse()
19356 }
19357 }
19358
19359 impl ::std::convert::TryFrom<::std::string::String> for MonthlyDocMakerPackPlanPricingType {
19360 type Error = self::error::ConversionError;
19361 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
19362 value.parse()
19363 }
19364 }
19365
19366 ///The status of an asynchronous mutation.
19367 ///
19368 /// <details><summary>JSON schema</summary>
19369 ///
19370 /// ```json
19371 ///{
19372 /// "description": "The status of an asynchronous mutation.",
19373 /// "type": "object",
19374 /// "required": [
19375 /// "completed"
19376 /// ],
19377 /// "properties": {
19378 /// "completed": {
19379 /// "description": "Returns whether the mutation has completed.",
19380 /// "examples": [
19381 /// true
19382 /// ],
19383 /// "type": "boolean"
19384 /// },
19385 /// "warning": {
19386 /// "description": "A warning if the mutation completed but with
19387 /// caveats.",
19388 /// "examples": [
19389 /// "Initial page HTML was invalid."
19390 /// ],
19391 /// "type": "string"
19392 /// }
19393 /// },
19394 /// "additionalProperties": false,
19395 /// "x-schema-name": "MutationStatus"
19396 ///}
19397 /// ```
19398 /// </details>
19399 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19400 #[serde(deny_unknown_fields)]
19401 pub struct MutationStatus {
19402 ///Returns whether the mutation has completed.
19403 pub completed: bool,
19404 ///A warning if the mutation completed but with caveats.
19405 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19406 pub warning: ::std::option::Option<::std::string::String>,
19407 }
19408
19409 impl ::std::convert::From<&MutationStatus> for MutationStatus {
19410 fn from(value: &MutationStatus) -> Self {
19411 value.clone()
19412 }
19413 }
19414
19415 ///Information indicating the next Pack version definition.
19416 ///
19417 /// <details><summary>JSON schema</summary>
19418 ///
19419 /// ```json
19420 ///{
19421 /// "description": "Information indicating the next Pack version
19422 /// definition.",
19423 /// "type": "object",
19424 /// "required": [
19425 /// "findingDetails",
19426 /// "findings",
19427 /// "nextVersion"
19428 /// ],
19429 /// "properties": {
19430 /// "findingDetails": {
19431 /// "type": "array",
19432 /// "items": {
19433 /// "type": "object",
19434 /// "required": [
19435 /// "finding",
19436 /// "path"
19437 /// ],
19438 /// "properties": {
19439 /// "finding": {
19440 /// "type": "string"
19441 /// },
19442 /// "path": {
19443 /// "type": "string"
19444 /// }
19445 /// },
19446 /// "additionalProperties": false
19447 /// }
19448 /// },
19449 /// "findings": {
19450 /// "description": "List of changes from the previous version.",
19451 /// "deprecated": true,
19452 /// "type": "array",
19453 /// "items": {
19454 /// "type": "string"
19455 /// }
19456 /// },
19457 /// "nextVersion": {
19458 /// "description": "The next valid version for the Pack.",
19459 /// "examples": [
19460 /// "2.1.0"
19461 /// ],
19462 /// "type": "string"
19463 /// }
19464 /// },
19465 /// "additionalProperties": false,
19466 /// "x-schema-name": "NextPackVersionInfo"
19467 ///}
19468 /// ```
19469 /// </details>
19470 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19471 #[serde(deny_unknown_fields)]
19472 pub struct NextPackVersionInfo {
19473 #[serde(rename = "findingDetails")]
19474 pub finding_details: ::std::vec::Vec<NextPackVersionInfoFindingDetailsItem>,
19475 ///List of changes from the previous version.
19476 pub findings: ::std::vec::Vec<::std::string::String>,
19477 ///The next valid version for the Pack.
19478 #[serde(rename = "nextVersion")]
19479 pub next_version: ::std::string::String,
19480 }
19481
19482 impl ::std::convert::From<&NextPackVersionInfo> for NextPackVersionInfo {
19483 fn from(value: &NextPackVersionInfo) -> Self {
19484 value.clone()
19485 }
19486 }
19487
19488 ///`NextPackVersionInfoFindingDetailsItem`
19489 ///
19490 /// <details><summary>JSON schema</summary>
19491 ///
19492 /// ```json
19493 ///{
19494 /// "type": "object",
19495 /// "required": [
19496 /// "finding",
19497 /// "path"
19498 /// ],
19499 /// "properties": {
19500 /// "finding": {
19501 /// "type": "string"
19502 /// },
19503 /// "path": {
19504 /// "type": "string"
19505 /// }
19506 /// },
19507 /// "additionalProperties": false
19508 ///}
19509 /// ```
19510 /// </details>
19511 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19512 #[serde(deny_unknown_fields)]
19513 pub struct NextPackVersionInfoFindingDetailsItem {
19514 pub finding: ::std::string::String,
19515 pub path: ::std::string::String,
19516 }
19517
19518 impl ::std::convert::From<&NextPackVersionInfoFindingDetailsItem> for NextPackVersionInfoFindingDetailsItem {
19519 fn from(value: &NextPackVersionInfoFindingDetailsItem) -> Self {
19520 value.clone()
19521 }
19522 }
19523
19524 ///If specified, a link that can be used to fetch the next page of results.
19525 ///
19526 /// <details><summary>JSON schema</summary>
19527 ///
19528 /// ```json
19529 ///{
19530 /// "description": "If specified, a link that can be used to fetch the next
19531 /// page of results.",
19532 /// "type": "string",
19533 /// "format": "url"
19534 ///}
19535 /// ```
19536 /// </details>
19537 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19538 #[serde(transparent)]
19539 pub struct NextPageLink(pub ::std::string::String);
19540 impl ::std::ops::Deref for NextPageLink {
19541 type Target = ::std::string::String;
19542 fn deref(&self) -> &::std::string::String {
19543 &self.0
19544 }
19545 }
19546
19547 impl ::std::convert::From<NextPageLink> for ::std::string::String {
19548 fn from(value: NextPageLink) -> Self {
19549 value.0
19550 }
19551 }
19552
19553 impl ::std::convert::From<&NextPageLink> for NextPageLink {
19554 fn from(value: &NextPageLink) -> Self {
19555 value.clone()
19556 }
19557 }
19558
19559 impl ::std::convert::From<::std::string::String> for NextPageLink {
19560 fn from(value: ::std::string::String) -> Self {
19561 Self(value)
19562 }
19563 }
19564
19565 impl ::std::str::FromStr for NextPageLink {
19566 type Err = ::std::convert::Infallible;
19567 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19568 Ok(Self(value.to_string()))
19569 }
19570 }
19571
19572 impl ::std::fmt::Display for NextPageLink {
19573 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19574 self.0.fmt(f)
19575 }
19576 }
19577
19578 ///If specified, an opaque token used to fetch the next page of results.
19579 ///
19580 /// <details><summary>JSON schema</summary>
19581 ///
19582 /// ```json
19583 ///{
19584 /// "description": "If specified, an opaque token used to fetch the next
19585 /// page of results.",
19586 /// "examples": [
19587 /// "eyJsaW1pd"
19588 /// ],
19589 /// "type": "string"
19590 ///}
19591 /// ```
19592 /// </details>
19593 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19594 #[serde(transparent)]
19595 pub struct NextPageToken(pub ::std::string::String);
19596 impl ::std::ops::Deref for NextPageToken {
19597 type Target = ::std::string::String;
19598 fn deref(&self) -> &::std::string::String {
19599 &self.0
19600 }
19601 }
19602
19603 impl ::std::convert::From<NextPageToken> for ::std::string::String {
19604 fn from(value: NextPageToken) -> Self {
19605 value.0
19606 }
19607 }
19608
19609 impl ::std::convert::From<&NextPageToken> for NextPageToken {
19610 fn from(value: &NextPageToken) -> Self {
19611 value.clone()
19612 }
19613 }
19614
19615 impl ::std::convert::From<::std::string::String> for NextPageToken {
19616 fn from(value: ::std::string::String) -> Self {
19617 Self(value)
19618 }
19619 }
19620
19621 impl ::std::str::FromStr for NextPageToken {
19622 type Err = ::std::convert::Infallible;
19623 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19624 Ok(Self(value.to_string()))
19625 }
19626 }
19627
19628 impl ::std::fmt::Display for NextPageToken {
19629 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19630 self.0.fmt(f)
19631 }
19632 }
19633
19634 ///If specified, an opaque token that can be passed back later to retrieve
19635 /// new results that match the parameters specified when the sync token was
19636 /// created.
19637 ///
19638 /// <details><summary>JSON schema</summary>
19639 ///
19640 /// ```json
19641 ///{
19642 /// "description": "If specified, an opaque token that can be passed back
19643 /// later to retrieve new results that match the parameters specified when
19644 /// the sync token was created.\n",
19645 /// "examples": [
19646 /// "eyJsaW1pd"
19647 /// ],
19648 /// "type": "string"
19649 ///}
19650 /// ```
19651 /// </details>
19652 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19653 #[serde(transparent)]
19654 pub struct NextSyncToken(pub ::std::string::String);
19655 impl ::std::ops::Deref for NextSyncToken {
19656 type Target = ::std::string::String;
19657 fn deref(&self) -> &::std::string::String {
19658 &self.0
19659 }
19660 }
19661
19662 impl ::std::convert::From<NextSyncToken> for ::std::string::String {
19663 fn from(value: NextSyncToken) -> Self {
19664 value.0
19665 }
19666 }
19667
19668 impl ::std::convert::From<&NextSyncToken> for NextSyncToken {
19669 fn from(value: &NextSyncToken) -> Self {
19670 value.clone()
19671 }
19672 }
19673
19674 impl ::std::convert::From<::std::string::String> for NextSyncToken {
19675 fn from(value: ::std::string::String) -> Self {
19676 Self(value)
19677 }
19678 }
19679
19680 impl ::std::str::FromStr for NextSyncToken {
19681 type Err = ::std::convert::Infallible;
19682 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19683 Ok(Self(value.to_string()))
19684 }
19685 }
19686
19687 impl ::std::fmt::Display for NextSyncToken {
19688 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19689 self.0.fmt(f)
19690 }
19691 }
19692
19693 ///A number or a string representing a formula that evaluates to a number.
19694 ///
19695 /// <details><summary>JSON schema</summary>
19696 ///
19697 /// ```json
19698 ///{
19699 /// "description": "A number or a string representing a formula that
19700 /// evaluates to a number.",
19701 /// "oneOf": [
19702 /// {
19703 /// "description": "A numeric value.",
19704 /// "examples": [
19705 /// 1
19706 /// ],
19707 /// "type": "number"
19708 /// },
19709 /// {
19710 /// "description": "A formula that evaluates to a numeric value.",
19711 /// "examples": [
19712 /// "5 * 10"
19713 /// ],
19714 /// "type": "string"
19715 /// }
19716 /// ],
19717 /// "x-schema-name": "NumberOrNumberFormula"
19718 ///}
19719 /// ```
19720 /// </details>
19721 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19722 #[serde(untagged)]
19723 pub enum NumberOrNumberFormula {
19724 Variant0(f64),
19725 Variant1(::std::string::String),
19726 }
19727
19728 impl ::std::convert::From<&Self> for NumberOrNumberFormula {
19729 fn from(value: &NumberOrNumberFormula) -> Self {
19730 value.clone()
19731 }
19732 }
19733
19734 impl ::std::fmt::Display for NumberOrNumberFormula {
19735 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19736 match self {
19737 Self::Variant0(x) => x.fmt(f),
19738 Self::Variant1(x) => x.fmt(f),
19739 }
19740 }
19741 }
19742
19743 impl ::std::convert::From<f64> for NumberOrNumberFormula {
19744 fn from(value: f64) -> Self {
19745 Self::Variant0(value)
19746 }
19747 }
19748
19749 ///`NumericColumnFormat`
19750 ///
19751 /// <details><summary>JSON schema</summary>
19752 ///
19753 /// ```json
19754 ///{
19755 /// "description": "Format of a numeric column.",
19756 /// "allOf": [
19757 /// {
19758 /// "$ref": "#/components/schemas/SimpleColumnFormat"
19759 /// },
19760 /// {
19761 /// "type": "object",
19762 /// "properties": {
19763 /// "precision": {
19764 /// "description": "The decimal precision.",
19765 /// "examples": [
19766 /// 2
19767 /// ],
19768 /// "type": "integer",
19769 /// "maximum": 10.0,
19770 /// "minimum": 0.0
19771 /// },
19772 /// "useThousandsSeparator": {
19773 /// "description": "Whether to use a thousands separator (like
19774 /// \",\") to format the numeric value.",
19775 /// "examples": [
19776 /// true
19777 /// ],
19778 /// "type": "boolean"
19779 /// }
19780 /// },
19781 /// "additionalProperties": false
19782 /// }
19783 /// ],
19784 /// "x-schema-name": "NumericColumnFormat"
19785 ///}
19786 /// ```
19787 /// </details>
19788 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19789 #[serde(deny_unknown_fields)]
19790 pub enum NumericColumnFormat {}
19791 impl ::std::convert::From<&Self> for NumericColumnFormat {
19792 fn from(value: &NumericColumnFormat) -> Self {
19793 value.clone()
19794 }
19795 }
19796
19797 ///Details about a Pack.
19798 ///
19799 /// <details><summary>JSON schema</summary>
19800 ///
19801 /// ```json
19802 ///{
19803 /// "description": "Details about a Pack.",
19804 /// "type": "object",
19805 /// "required": [
19806 /// "categories",
19807 /// "description",
19808 /// "id",
19809 /// "name",
19810 /// "shortDescription",
19811 /// "workspaceId"
19812 /// ],
19813 /// "properties": {
19814 /// "agentDescription": {
19815 /// "description": "A full description for the pack as an agent.",
19816 /// "examples": [
19817 /// "Chat with a comprehensive tool that can calculate cool geometric
19818 /// formulas like surface area, volume, and other mathematical operations.
19819 /// This agent can help with complex calculations and provide detailed
19820 /// explanations."
19821 /// ],
19822 /// "type": "string",
19823 /// "maxLength": 8192,
19824 /// "x-allow-empty": true
19825 /// },
19826 /// "agentImages": {
19827 /// "description": "The agent images for the Pack.",
19828 /// "type": "array",
19829 /// "items": {
19830 /// "$ref": "#/components/schemas/PackImageFile"
19831 /// }
19832 /// },
19833 /// "agentShortDescription": {
19834 /// "description": "A short description for the pack as an agent.",
19835 /// "examples": [
19836 /// "Chat with a tool that can calculate cool geometric formulas like
19837 /// surface area."
19838 /// ],
19839 /// "type": "string",
19840 /// "maxLength": 256
19841 /// },
19842 /// "categories": {
19843 /// "description": "Publishing categories associated with this Pack.",
19844 /// "type": "array",
19845 /// "items": {
19846 /// "$ref": "#/components/schemas/PublishingCategory"
19847 /// }
19848 /// },
19849 /// "certified": {
19850 /// "description": "Denotes if the pack is certified by Coda.",
19851 /// "type": "boolean"
19852 /// },
19853 /// "certifiedAgent": {
19854 /// "description": "Denotes if the pack is certified by Grammarly to be
19855 /// optimized for agent usage.",
19856 /// "type": "boolean"
19857 /// },
19858 /// "coverUrl": {
19859 /// "description": "The link to the cover photo of the Pack.",
19860 /// "type": "string",
19861 /// "format": "url"
19862 /// },
19863 /// "description": {
19864 /// "description": "The full description of the Pack.",
19865 /// "examples": [
19866 /// "This Pack allows users to calculate the surface area and volume
19867 /// of a few common 3D shapes, like cubes and pyramids."
19868 /// ],
19869 /// "type": "string",
19870 /// "maxLength": 8192
19871 /// },
19872 /// "exampleImages": {
19873 /// "description": "The example images for the Pack.",
19874 /// "type": "array",
19875 /// "items": {
19876 /// "$ref": "#/components/schemas/PackImageFile"
19877 /// }
19878 /// },
19879 /// "featuredDocStatus": {
19880 /// "$ref": "#/components/schemas/FeaturedDocStatus"
19881 /// },
19882 /// "id": {
19883 /// "description": "ID of the Pack.",
19884 /// "examples": [
19885 /// 1003
19886 /// ],
19887 /// "type": "number"
19888 /// },
19889 /// "logoUrl": {
19890 /// "description": "The link to the logo of the Pack.",
19891 /// "type": "string",
19892 /// "format": "url"
19893 /// },
19894 /// "name": {
19895 /// "description": "The name of the Pack.",
19896 /// "examples": [
19897 /// "Cool Geometry Formulas"
19898 /// ],
19899 /// "type": "string",
19900 /// "maxLength": 128
19901 /// },
19902 /// "overallRateLimit": {
19903 /// "$ref": "#/components/schemas/PackRateLimit"
19904 /// },
19905 /// "packEntrypoints": {
19906 /// "description": "Pack entrypoints where this pack is available",
19907 /// "type": "array",
19908 /// "items": {
19909 /// "$ref": "#/components/schemas/PackEntrypoint"
19910 /// }
19911 /// },
19912 /// "perConnectionRateLimit": {
19913 /// "$ref": "#/components/schemas/PackRateLimit"
19914 /// },
19915 /// "privacyPolicyUrl": {
19916 /// "description": "A Privacy Policy URL for the Pack.",
19917 /// "type": "string",
19918 /// "format": "url",
19919 /// "maxLength": 512
19920 /// },
19921 /// "shortDescription": {
19922 /// "description": "A short version of the description of the Pack.",
19923 /// "examples": [
19924 /// "Calculate cool geometric formulas like surface area."
19925 /// ],
19926 /// "type": "string",
19927 /// "maxLength": 256
19928 /// },
19929 /// "sourceCodeVisibility": {
19930 /// "$ref": "#/components/schemas/PackSourceCodeVisibility"
19931 /// },
19932 /// "supportEmail": {
19933 /// "description": "A contact email for the Pack.",
19934 /// "examples": [
19935 /// "user@email.com"
19936 /// ],
19937 /// "type": "string",
19938 /// "maxLength": 512
19939 /// },
19940 /// "termsOfServiceUrl": {
19941 /// "description": "A Terms of Service URL for the Pack.",
19942 /// "type": "string",
19943 /// "format": "url",
19944 /// "maxLength": 512
19945 /// },
19946 /// "workspaceId": {
19947 /// "description": "The parent workspace for the Pack.",
19948 /// "examples": [
19949 /// "ws-asdf"
19950 /// ],
19951 /// "type": "string"
19952 /// }
19953 /// },
19954 /// "additionalProperties": false,
19955 /// "x-schema-name": "Pack"
19956 ///}
19957 /// ```
19958 /// </details>
19959 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19960 #[serde(deny_unknown_fields)]
19961 pub struct Pack {
19962 ///A full description for the pack as an agent.
19963 #[serde(rename = "agentDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
19964 pub agent_description: ::std::option::Option<PackAgentDescription>,
19965 ///The agent images for the Pack.
19966 #[serde(rename = "agentImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
19967 pub agent_images: ::std::vec::Vec<PackImageFile>,
19968 ///A short description for the pack as an agent.
19969 #[serde(rename = "agentShortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
19970 pub agent_short_description: ::std::option::Option<PackAgentShortDescription>,
19971 ///Publishing categories associated with this Pack.
19972 pub categories: ::std::vec::Vec<PublishingCategory>,
19973 ///Denotes if the pack is certified by Coda.
19974 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19975 pub certified: ::std::option::Option<bool>,
19976 ///Denotes if the pack is certified by Grammarly to be optimized for
19977 /// agent usage.
19978 #[serde(rename = "certifiedAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
19979 pub certified_agent: ::std::option::Option<bool>,
19980 ///The link to the cover photo of the Pack.
19981 #[serde(rename = "coverUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
19982 pub cover_url: ::std::option::Option<::std::string::String>,
19983 ///The full description of the Pack.
19984 pub description: PackDescription,
19985 ///The example images for the Pack.
19986 #[serde(rename = "exampleImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
19987 pub example_images: ::std::vec::Vec<PackImageFile>,
19988 #[serde(rename = "featuredDocStatus", default, skip_serializing_if = "::std::option::Option::is_none")]
19989 pub featured_doc_status: ::std::option::Option<FeaturedDocStatus>,
19990 pub id: f64,
19991 ///The link to the logo of the Pack.
19992 #[serde(rename = "logoUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
19993 pub logo_url: ::std::option::Option<::std::string::String>,
19994 ///The name of the Pack.
19995 pub name: PackName,
19996 #[serde(rename = "overallRateLimit", default, skip_serializing_if = "::std::option::Option::is_none")]
19997 pub overall_rate_limit: ::std::option::Option<PackRateLimit>,
19998 ///Pack entrypoints where this pack is available
19999 #[serde(rename = "packEntrypoints", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
20000 pub pack_entrypoints: ::std::vec::Vec<PackEntrypoint>,
20001 #[serde(rename = "perConnectionRateLimit", default, skip_serializing_if = "::std::option::Option::is_none")]
20002 pub per_connection_rate_limit: ::std::option::Option<PackRateLimit>,
20003 ///A Privacy Policy URL for the Pack.
20004 #[serde(rename = "privacyPolicyUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
20005 pub privacy_policy_url: ::std::option::Option<::std::string::String>,
20006 ///A short version of the description of the Pack.
20007 #[serde(rename = "shortDescription")]
20008 pub short_description: PackShortDescription,
20009 #[serde(rename = "sourceCodeVisibility", default, skip_serializing_if = "::std::option::Option::is_none")]
20010 pub source_code_visibility: ::std::option::Option<PackSourceCodeVisibility>,
20011 ///A contact email for the Pack.
20012 #[serde(rename = "supportEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
20013 pub support_email: ::std::option::Option<PackSupportEmail>,
20014 ///A Terms of Service URL for the Pack.
20015 #[serde(rename = "termsOfServiceUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
20016 pub terms_of_service_url: ::std::option::Option<::std::string::String>,
20017 ///The parent workspace for the Pack.
20018 #[serde(rename = "workspaceId")]
20019 pub workspace_id: ::std::string::String,
20020 }
20021
20022 impl ::std::convert::From<&Pack> for Pack {
20023 fn from(value: &Pack) -> Self {
20024 value.clone()
20025 }
20026 }
20027
20028 ///`PackAccessType`
20029 ///
20030 /// <details><summary>JSON schema</summary>
20031 ///
20032 /// ```json
20033 ///{
20034 /// "type": "string",
20035 /// "enum": [
20036 /// "none",
20037 /// "view",
20038 /// "test",
20039 /// "edit",
20040 /// "admin"
20041 /// ],
20042 /// "x-schema-name": "PackAccessType",
20043 /// "x-tsEnumNames": [
20044 /// "None",
20045 /// "View",
20046 /// "Test",
20047 /// "Edit",
20048 /// "Admin"
20049 /// ]
20050 ///}
20051 /// ```
20052 /// </details>
20053 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20054 pub enum PackAccessType {
20055 #[serde(rename = "none")]
20056 None,
20057 #[serde(rename = "view")]
20058 View,
20059 #[serde(rename = "test")]
20060 Test,
20061 #[serde(rename = "edit")]
20062 Edit,
20063 #[serde(rename = "admin")]
20064 Admin,
20065 }
20066
20067 impl ::std::convert::From<&Self> for PackAccessType {
20068 fn from(value: &PackAccessType) -> Self {
20069 value.clone()
20070 }
20071 }
20072
20073 impl ::std::fmt::Display for PackAccessType {
20074 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20075 match *self {
20076 Self::None => f.write_str("none"),
20077 Self::View => f.write_str("view"),
20078 Self::Test => f.write_str("test"),
20079 Self::Edit => f.write_str("edit"),
20080 Self::Admin => f.write_str("admin"),
20081 }
20082 }
20083 }
20084
20085 impl ::std::str::FromStr for PackAccessType {
20086 type Err = self::error::ConversionError;
20087 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20088 match value {
20089 "none" => Ok(Self::None),
20090 "view" => Ok(Self::View),
20091 "test" => Ok(Self::Test),
20092 "edit" => Ok(Self::Edit),
20093 "admin" => Ok(Self::Admin),
20094 _ => Err("invalid value".into()),
20095 }
20096 }
20097 }
20098
20099 impl ::std::convert::TryFrom<&str> for PackAccessType {
20100 type Error = self::error::ConversionError;
20101 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20102 value.parse()
20103 }
20104 }
20105
20106 impl ::std::convert::TryFrom<&::std::string::String> for PackAccessType {
20107 type Error = self::error::ConversionError;
20108 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20109 value.parse()
20110 }
20111 }
20112
20113 impl ::std::convert::TryFrom<::std::string::String> for PackAccessType {
20114 type Error = self::error::ConversionError;
20115 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20116 value.parse()
20117 }
20118 }
20119
20120 ///Access types for a Pack.
20121 ///
20122 /// <details><summary>JSON schema</summary>
20123 ///
20124 /// ```json
20125 ///{
20126 /// "description": "Access types for a Pack.",
20127 /// "type": "array",
20128 /// "items": {
20129 /// "$ref": "#/components/schemas/PackAccessType"
20130 /// },
20131 /// "additionalProperties": false,
20132 /// "x-schema-name": "PackAccessTypes"
20133 ///}
20134 /// ```
20135 /// </details>
20136 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20137 #[serde(transparent)]
20138 pub struct PackAccessTypes(pub ::std::vec::Vec<PackAccessType>);
20139 impl ::std::ops::Deref for PackAccessTypes {
20140 type Target = ::std::vec::Vec<PackAccessType>;
20141 fn deref(&self) -> &::std::vec::Vec<PackAccessType> {
20142 &self.0
20143 }
20144 }
20145
20146 impl ::std::convert::From<PackAccessTypes> for ::std::vec::Vec<PackAccessType> {
20147 fn from(value: PackAccessTypes) -> Self {
20148 value.0
20149 }
20150 }
20151
20152 impl ::std::convert::From<&PackAccessTypes> for PackAccessTypes {
20153 fn from(value: &PackAccessTypes) -> Self {
20154 value.clone()
20155 }
20156 }
20157
20158 impl ::std::convert::From<::std::vec::Vec<PackAccessType>> for PackAccessTypes {
20159 fn from(value: ::std::vec::Vec<PackAccessType>) -> Self {
20160 Self(value)
20161 }
20162 }
20163
20164 ///A full description for the pack as an agent.
20165 ///
20166 /// <details><summary>JSON schema</summary>
20167 ///
20168 /// ```json
20169 ///{
20170 /// "description": "A full description for the pack as an agent.",
20171 /// "examples": [
20172 /// "Chat with a comprehensive tool that can calculate cool geometric
20173 /// formulas like surface area, volume, and other mathematical operations.
20174 /// This agent can help with complex calculations and provide detailed
20175 /// explanations."
20176 /// ],
20177 /// "type": "string",
20178 /// "maxLength": 8192,
20179 /// "x-allow-empty": true
20180 ///}
20181 /// ```
20182 /// </details>
20183 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20184 #[serde(transparent)]
20185 pub struct PackAgentDescription(::std::string::String);
20186 impl ::std::ops::Deref for PackAgentDescription {
20187 type Target = ::std::string::String;
20188 fn deref(&self) -> &::std::string::String {
20189 &self.0
20190 }
20191 }
20192
20193 impl ::std::convert::From<PackAgentDescription> for ::std::string::String {
20194 fn from(value: PackAgentDescription) -> Self {
20195 value.0
20196 }
20197 }
20198
20199 impl ::std::convert::From<&PackAgentDescription> for PackAgentDescription {
20200 fn from(value: &PackAgentDescription) -> Self {
20201 value.clone()
20202 }
20203 }
20204
20205 impl ::std::str::FromStr for PackAgentDescription {
20206 type Err = self::error::ConversionError;
20207 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20208 if value.chars().count() > 8192usize {
20209 return Err("longer than 8192 characters".into());
20210 }
20211 Ok(Self(value.to_string()))
20212 }
20213 }
20214
20215 impl ::std::convert::TryFrom<&str> for PackAgentDescription {
20216 type Error = self::error::ConversionError;
20217 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20218 value.parse()
20219 }
20220 }
20221
20222 impl ::std::convert::TryFrom<&::std::string::String> for PackAgentDescription {
20223 type Error = self::error::ConversionError;
20224 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20225 value.parse()
20226 }
20227 }
20228
20229 impl ::std::convert::TryFrom<::std::string::String> for PackAgentDescription {
20230 type Error = self::error::ConversionError;
20231 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20232 value.parse()
20233 }
20234 }
20235
20236 impl<'de> ::serde::Deserialize<'de> for PackAgentDescription {
20237 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
20238 where
20239 D: ::serde::Deserializer<'de>,
20240 {
20241 ::std::string::String::deserialize(deserializer)?
20242 .parse()
20243 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
20244 }
20245 }
20246
20247 ///Pack log generated by an executing agent runtime.
20248 ///
20249 /// <details><summary>JSON schema</summary>
20250 ///
20251 /// ```json
20252 ///{
20253 /// "description": "Pack log generated by an executing agent runtime.",
20254 /// "type": "object",
20255 /// "required": [
20256 /// "context",
20257 /// "turnType",
20258 /// "type"
20259 /// ],
20260 /// "properties": {
20261 /// "context": {
20262 /// "$ref": "#/components/schemas/PackLogContext"
20263 /// },
20264 /// "durationMs": {
20265 /// "description": "The duration of the turn in milliseconds.",
20266 /// "type": "number"
20267 /// },
20268 /// "fromAgent": {
20269 /// "description": "The name of the agent that initiated the turn.",
20270 /// "type": "string"
20271 /// },
20272 /// "instructions": {
20273 /// "description": "The instructions for the turn.",
20274 /// "type": "string"
20275 /// },
20276 /// "model": {
20277 /// "description": "The model used for the turn.",
20278 /// "type": "string"
20279 /// },
20280 /// "name": {
20281 /// "description": "The name of the turn target.",
20282 /// "type": "string"
20283 /// },
20284 /// "toAgent": {
20285 /// "description": "The name of the agent that received the turn.",
20286 /// "type": "string"
20287 /// },
20288 /// "tokenUsage": {
20289 /// "description": "The token usage for the turn.",
20290 /// "type": "string"
20291 /// },
20292 /// "turnType": {
20293 /// "description": "The type of LLM agent turn that this log is for.",
20294 /// "type": "string"
20295 /// },
20296 /// "type": {
20297 /// "type": "string",
20298 /// "enum": [
20299 /// "agentRuntime"
20300 /// ],
20301 /// "x-tsType": "PackLogType.AgentRuntime"
20302 /// }
20303 /// },
20304 /// "additionalProperties": false,
20305 /// "x-schema-name": "PackAgentRuntimeLog"
20306 ///}
20307 /// ```
20308 /// </details>
20309 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20310 #[serde(deny_unknown_fields)]
20311 pub struct PackAgentRuntimeLog {
20312 pub context: PackLogContext,
20313 #[serde(rename = "durationMs", default, skip_serializing_if = "::std::option::Option::is_none")]
20314 pub duration_ms: ::std::option::Option<f64>,
20315 ///The name of the agent that initiated the turn.
20316 #[serde(rename = "fromAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
20317 pub from_agent: ::std::option::Option<::std::string::String>,
20318 ///The instructions for the turn.
20319 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20320 pub instructions: ::std::option::Option<::std::string::String>,
20321 ///The model used for the turn.
20322 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20323 pub model: ::std::option::Option<::std::string::String>,
20324 ///The name of the turn target.
20325 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20326 pub name: ::std::option::Option<::std::string::String>,
20327 ///The name of the agent that received the turn.
20328 #[serde(rename = "toAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
20329 pub to_agent: ::std::option::Option<::std::string::String>,
20330 ///The token usage for the turn.
20331 #[serde(rename = "tokenUsage", default, skip_serializing_if = "::std::option::Option::is_none")]
20332 pub token_usage: ::std::option::Option<::std::string::String>,
20333 ///The type of LLM agent turn that this log is for.
20334 #[serde(rename = "turnType")]
20335 pub turn_type: ::std::string::String,
20336 #[serde(rename = "type")]
20337 pub type_: PackAgentRuntimeLogType,
20338 }
20339
20340 impl ::std::convert::From<&PackAgentRuntimeLog> for PackAgentRuntimeLog {
20341 fn from(value: &PackAgentRuntimeLog) -> Self {
20342 value.clone()
20343 }
20344 }
20345
20346 ///Details for pack agent runtime logs
20347 ///
20348 /// <details><summary>JSON schema</summary>
20349 ///
20350 /// ```json
20351 ///{
20352 /// "description": "Details for pack agent runtime logs",
20353 /// "type": "object",
20354 /// "required": [
20355 /// "type"
20356 /// ],
20357 /// "properties": {
20358 /// "input": {
20359 /// "description": "The input to the turn.",
20360 /// "type": "string"
20361 /// },
20362 /// "output": {
20363 /// "description": "The output from the turn.",
20364 /// "type": "string"
20365 /// },
20366 /// "type": {
20367 /// "type": "string",
20368 /// "enum": [
20369 /// "agentRuntime"
20370 /// ],
20371 /// "x-tsType": "PackLogType.AgentRuntime"
20372 /// }
20373 /// },
20374 /// "additionalProperties": false,
20375 /// "x-schema-name": "PackAgentRuntimeLogDetails"
20376 ///}
20377 /// ```
20378 /// </details>
20379 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20380 #[serde(deny_unknown_fields)]
20381 pub struct PackAgentRuntimeLogDetails {
20382 ///The input to the turn.
20383 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20384 pub input: ::std::option::Option<::std::string::String>,
20385 ///The output from the turn.
20386 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20387 pub output: ::std::option::Option<::std::string::String>,
20388 #[serde(rename = "type")]
20389 pub type_: PackAgentRuntimeLogDetailsType,
20390 }
20391
20392 impl ::std::convert::From<&PackAgentRuntimeLogDetails> for PackAgentRuntimeLogDetails {
20393 fn from(value: &PackAgentRuntimeLogDetails) -> Self {
20394 value.clone()
20395 }
20396 }
20397
20398 ///`PackAgentRuntimeLogDetailsType`
20399 ///
20400 /// <details><summary>JSON schema</summary>
20401 ///
20402 /// ```json
20403 ///{
20404 /// "type": "string",
20405 /// "enum": [
20406 /// "agentRuntime"
20407 /// ],
20408 /// "x-tsType": "PackLogType.AgentRuntime"
20409 ///}
20410 /// ```
20411 /// </details>
20412 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20413 pub enum PackAgentRuntimeLogDetailsType {
20414 #[serde(rename = "agentRuntime")]
20415 AgentRuntime,
20416 }
20417
20418 impl ::std::convert::From<&Self> for PackAgentRuntimeLogDetailsType {
20419 fn from(value: &PackAgentRuntimeLogDetailsType) -> Self {
20420 value.clone()
20421 }
20422 }
20423
20424 impl ::std::fmt::Display for PackAgentRuntimeLogDetailsType {
20425 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20426 match *self {
20427 Self::AgentRuntime => f.write_str("agentRuntime"),
20428 }
20429 }
20430 }
20431
20432 impl ::std::str::FromStr for PackAgentRuntimeLogDetailsType {
20433 type Err = self::error::ConversionError;
20434 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20435 match value {
20436 "agentRuntime" => Ok(Self::AgentRuntime),
20437 _ => Err("invalid value".into()),
20438 }
20439 }
20440 }
20441
20442 impl ::std::convert::TryFrom<&str> for PackAgentRuntimeLogDetailsType {
20443 type Error = self::error::ConversionError;
20444 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20445 value.parse()
20446 }
20447 }
20448
20449 impl ::std::convert::TryFrom<&::std::string::String> for PackAgentRuntimeLogDetailsType {
20450 type Error = self::error::ConversionError;
20451 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20452 value.parse()
20453 }
20454 }
20455
20456 impl ::std::convert::TryFrom<::std::string::String> for PackAgentRuntimeLogDetailsType {
20457 type Error = self::error::ConversionError;
20458 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20459 value.parse()
20460 }
20461 }
20462
20463 ///`PackAgentRuntimeLogType`
20464 ///
20465 /// <details><summary>JSON schema</summary>
20466 ///
20467 /// ```json
20468 ///{
20469 /// "type": "string",
20470 /// "enum": [
20471 /// "agentRuntime"
20472 /// ],
20473 /// "x-tsType": "PackLogType.AgentRuntime"
20474 ///}
20475 /// ```
20476 /// </details>
20477 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20478 pub enum PackAgentRuntimeLogType {
20479 #[serde(rename = "agentRuntime")]
20480 AgentRuntime,
20481 }
20482
20483 impl ::std::convert::From<&Self> for PackAgentRuntimeLogType {
20484 fn from(value: &PackAgentRuntimeLogType) -> Self {
20485 value.clone()
20486 }
20487 }
20488
20489 impl ::std::fmt::Display for PackAgentRuntimeLogType {
20490 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20491 match *self {
20492 Self::AgentRuntime => f.write_str("agentRuntime"),
20493 }
20494 }
20495 }
20496
20497 impl ::std::str::FromStr for PackAgentRuntimeLogType {
20498 type Err = self::error::ConversionError;
20499 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20500 match value {
20501 "agentRuntime" => Ok(Self::AgentRuntime),
20502 _ => Err("invalid value".into()),
20503 }
20504 }
20505 }
20506
20507 impl ::std::convert::TryFrom<&str> for PackAgentRuntimeLogType {
20508 type Error = self::error::ConversionError;
20509 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20510 value.parse()
20511 }
20512 }
20513
20514 impl ::std::convert::TryFrom<&::std::string::String> for PackAgentRuntimeLogType {
20515 type Error = self::error::ConversionError;
20516 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20517 value.parse()
20518 }
20519 }
20520
20521 impl ::std::convert::TryFrom<::std::string::String> for PackAgentRuntimeLogType {
20522 type Error = self::error::ConversionError;
20523 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20524 value.parse()
20525 }
20526 }
20527
20528 ///A short description for the pack as an agent.
20529 ///
20530 /// <details><summary>JSON schema</summary>
20531 ///
20532 /// ```json
20533 ///{
20534 /// "description": "A short description for the pack as an agent.",
20535 /// "examples": [
20536 /// "Chat with a tool that can calculate cool geometric formulas like
20537 /// surface area."
20538 /// ],
20539 /// "type": "string",
20540 /// "maxLength": 256
20541 ///}
20542 /// ```
20543 /// </details>
20544 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20545 #[serde(transparent)]
20546 pub struct PackAgentShortDescription(::std::string::String);
20547 impl ::std::ops::Deref for PackAgentShortDescription {
20548 type Target = ::std::string::String;
20549 fn deref(&self) -> &::std::string::String {
20550 &self.0
20551 }
20552 }
20553
20554 impl ::std::convert::From<PackAgentShortDescription> for ::std::string::String {
20555 fn from(value: PackAgentShortDescription) -> Self {
20556 value.0
20557 }
20558 }
20559
20560 impl ::std::convert::From<&PackAgentShortDescription> for PackAgentShortDescription {
20561 fn from(value: &PackAgentShortDescription) -> Self {
20562 value.clone()
20563 }
20564 }
20565
20566 impl ::std::str::FromStr for PackAgentShortDescription {
20567 type Err = self::error::ConversionError;
20568 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20569 if value.chars().count() > 256usize {
20570 return Err("longer than 256 characters".into());
20571 }
20572 Ok(Self(value.to_string()))
20573 }
20574 }
20575
20576 impl ::std::convert::TryFrom<&str> for PackAgentShortDescription {
20577 type Error = self::error::ConversionError;
20578 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20579 value.parse()
20580 }
20581 }
20582
20583 impl ::std::convert::TryFrom<&::std::string::String> for PackAgentShortDescription {
20584 type Error = self::error::ConversionError;
20585 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20586 value.parse()
20587 }
20588 }
20589
20590 impl ::std::convert::TryFrom<::std::string::String> for PackAgentShortDescription {
20591 type Error = self::error::ConversionError;
20592 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
20593 value.parse()
20594 }
20595 }
20596
20597 impl<'de> ::serde::Deserialize<'de> for PackAgentShortDescription {
20598 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
20599 where
20600 D: ::serde::Deserializer<'de>,
20601 {
20602 ::std::string::String::deserialize(deserializer)?
20603 .parse()
20604 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
20605 }
20606 }
20607
20608 ///List of analytics for Coda Packs over a date range.
20609 ///
20610 /// <details><summary>JSON schema</summary>
20611 ///
20612 /// ```json
20613 ///{
20614 /// "description": "List of analytics for Coda Packs over a date range.",
20615 /// "type": "object",
20616 /// "required": [
20617 /// "items"
20618 /// ],
20619 /// "properties": {
20620 /// "items": {
20621 /// "type": "array",
20622 /// "items": {
20623 /// "$ref": "#/components/schemas/PackAnalyticsItem"
20624 /// }
20625 /// },
20626 /// "nextPageLink": {
20627 /// "allOf": [
20628 /// {
20629 /// "$ref": "#/components/schemas/nextPageLink"
20630 /// },
20631 /// {
20632 /// "examples": [
20633 /// "https://coda.io/apis/v1/analytics/packs?pageToken=xyz"
20634 /// ],
20635 /// "type": "string"
20636 /// }
20637 /// ]
20638 /// },
20639 /// "nextPageToken": {
20640 /// "$ref": "#/components/schemas/nextPageToken"
20641 /// }
20642 /// },
20643 /// "additionalProperties": false,
20644 /// "x-schema-name": "PackAnalyticsCollection"
20645 ///}
20646 /// ```
20647 /// </details>
20648 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20649 #[serde(deny_unknown_fields)]
20650 pub struct PackAnalyticsCollection {
20651 pub items: ::std::vec::Vec<PackAnalyticsItem>,
20652 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
20653 pub next_page_link: ::std::option::Option<NextPageLink>,
20654 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
20655 pub next_page_token: ::std::option::Option<NextPageToken>,
20656 }
20657
20658 impl ::std::convert::From<&PackAnalyticsCollection> for PackAnalyticsCollection {
20659 fn from(value: &PackAnalyticsCollection) -> Self {
20660 value.clone()
20661 }
20662 }
20663
20664 ///Metadata about a Pack relevant to analytics.
20665 ///
20666 /// <details><summary>JSON schema</summary>
20667 ///
20668 /// ```json
20669 ///{
20670 /// "description": "Metadata about a Pack relevant to analytics.",
20671 /// "type": "object",
20672 /// "required": [
20673 /// "createdAt",
20674 /// "id",
20675 /// "name"
20676 /// ],
20677 /// "properties": {
20678 /// "createdAt": {
20679 /// "description": "Creation time of the Pack.",
20680 /// "examples": [
20681 /// "2022-04-11T00:18:57.946Z"
20682 /// ],
20683 /// "type": "string",
20684 /// "format": "date-time"
20685 /// },
20686 /// "id": {
20687 /// "description": "ID of the Pack.",
20688 /// "examples": [
20689 /// 1003
20690 /// ],
20691 /// "type": "number"
20692 /// },
20693 /// "logoUrl": {
20694 /// "description": "The link to the logo of the Pack.",
20695 /// "type": "string",
20696 /// "format": "url"
20697 /// },
20698 /// "name": {
20699 /// "description": "The name of the Pack.",
20700 /// "examples": [
20701 /// "Cool Geometry Formulas"
20702 /// ],
20703 /// "type": "string"
20704 /// }
20705 /// },
20706 /// "additionalProperties": false,
20707 /// "x-schema-name": "PackAnalyticsDetails"
20708 ///}
20709 /// ```
20710 /// </details>
20711 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20712 #[serde(deny_unknown_fields)]
20713 pub struct PackAnalyticsDetails {
20714 ///Creation time of the Pack.
20715 #[serde(rename = "createdAt")]
20716 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
20717 pub id: f64,
20718 ///The link to the logo of the Pack.
20719 #[serde(rename = "logoUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
20720 pub logo_url: ::std::option::Option<::std::string::String>,
20721 ///The name of the Pack.
20722 pub name: ::std::string::String,
20723 }
20724
20725 impl ::std::convert::From<&PackAnalyticsDetails> for PackAnalyticsDetails {
20726 fn from(value: &PackAnalyticsDetails) -> Self {
20727 value.clone()
20728 }
20729 }
20730
20731 ///Analytics data for a Coda Pack.
20732 ///
20733 /// <details><summary>JSON schema</summary>
20734 ///
20735 /// ```json
20736 ///{
20737 /// "description": "Analytics data for a Coda Pack.",
20738 /// "type": "object",
20739 /// "required": [
20740 /// "metrics",
20741 /// "pack"
20742 /// ],
20743 /// "properties": {
20744 /// "metrics": {
20745 /// "type": "array",
20746 /// "items": {
20747 /// "$ref": "#/components/schemas/PackAnalyticsMetrics"
20748 /// }
20749 /// },
20750 /// "pack": {
20751 /// "$ref": "#/components/schemas/PackAnalyticsDetails"
20752 /// }
20753 /// },
20754 /// "additionalProperties": false,
20755 /// "x-schema-name": "PackAnalyticsItem"
20756 ///}
20757 /// ```
20758 /// </details>
20759 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20760 #[serde(deny_unknown_fields)]
20761 pub struct PackAnalyticsItem {
20762 pub metrics: ::std::vec::Vec<PackAnalyticsMetrics>,
20763 pub pack: PackAnalyticsDetails,
20764 }
20765
20766 impl ::std::convert::From<&PackAnalyticsItem> for PackAnalyticsItem {
20767 fn from(value: &PackAnalyticsItem) -> Self {
20768 value.clone()
20769 }
20770 }
20771
20772 ///Analytics metrics for a Coda Pack.
20773 ///
20774 /// <details><summary>JSON schema</summary>
20775 ///
20776 /// ```json
20777 ///{
20778 /// "description": "Analytics metrics for a Coda Pack.",
20779 /// "type": "object",
20780 /// "required": [
20781 /// "date",
20782 /// "docInstalls",
20783 /// "docsActivelyUsing",
20784 /// "docsActivelyUsing30Day",
20785 /// "docsActivelyUsing7Day",
20786 /// "docsActivelyUsing90Day",
20787 /// "docsActivelyUsingAllTime",
20788 /// "numActionInvocations",
20789 /// "numFormulaInvocations",
20790 /// "numMetadataInvocations",
20791 /// "numSyncInvocations",
20792 /// "revenueUsd",
20793 /// "workspaceInstalls",
20794 /// "workspacesActivelyTrialing",
20795 /// "workspacesActivelyTrialing30Day",
20796 /// "workspacesActivelyTrialing7Day",
20797 /// "workspacesActivelyTrialing90Day",
20798 /// "workspacesActivelyTrialingAllTime",
20799 /// "workspacesActivelyUsing",
20800 /// "workspacesActivelyUsing30Day",
20801 /// "workspacesActivelyUsing7Day",
20802 /// "workspacesActivelyUsing90Day",
20803 /// "workspacesActivelyUsingAllTime",
20804 /// "workspacesNewlySubscribed",
20805 /// "workspacesWithActiveSubscriptions",
20806 /// "workspacesWithSuccessfulTrials"
20807 /// ],
20808 /// "properties": {
20809 /// "date": {
20810 /// "description": "Date of the analytics data.",
20811 /// "examples": [
20812 /// "2020-09-02"
20813 /// ],
20814 /// "type": "string",
20815 /// "format": "date"
20816 /// },
20817 /// "docInstalls": {
20818 /// "description": "Number of unique documents that have installed this
20819 /// Pack.",
20820 /// "examples": [
20821 /// 100
20822 /// ],
20823 /// "type": "integer"
20824 /// },
20825 /// "docsActivelyUsing": {
20826 /// "description": "Number of unique docs that have invoked a formula
20827 /// from this Pack in the past day.",
20828 /// "examples": [
20829 /// 50
20830 /// ],
20831 /// "type": "integer"
20832 /// },
20833 /// "docsActivelyUsing30Day": {
20834 /// "description": "Number of unique docs that have invoked a formula
20835 /// from this Pack in the past 30 days.",
20836 /// "examples": [
20837 /// 200
20838 /// ],
20839 /// "type": "integer"
20840 /// },
20841 /// "docsActivelyUsing7Day": {
20842 /// "description": "Number of unique docs that have invoked a formula
20843 /// from this Pack in the past 7 days.",
20844 /// "examples": [
20845 /// 100
20846 /// ],
20847 /// "type": "integer"
20848 /// },
20849 /// "docsActivelyUsing90Day": {
20850 /// "description": "Number of unique docs that have invoked a formula
20851 /// from this Pack in the past 90 days.",
20852 /// "examples": [
20853 /// 300
20854 /// ],
20855 /// "type": "integer"
20856 /// },
20857 /// "docsActivelyUsingAllTime": {
20858 /// "description": "Number of unique docs that have invoked a formula
20859 /// from this Pack ever.",
20860 /// "examples": [
20861 /// 500
20862 /// ],
20863 /// "type": "integer"
20864 /// },
20865 /// "numActionInvocations": {
20866 /// "description": "Number of times action formulas have been called.",
20867 /// "examples": [
20868 /// 100
20869 /// ],
20870 /// "type": "integer"
20871 /// },
20872 /// "numFormulaInvocations": {
20873 /// "description": "Number of times regular formulas have been
20874 /// called.",
20875 /// "examples": [
20876 /// 100
20877 /// ],
20878 /// "type": "integer"
20879 /// },
20880 /// "numMetadataInvocations": {
20881 /// "description": "Number of times metadata formulas have been
20882 /// called.",
20883 /// "examples": [
20884 /// 100
20885 /// ],
20886 /// "type": "integer"
20887 /// },
20888 /// "numSyncInvocations": {
20889 /// "description": "Number of times sync table formulas have been
20890 /// called.",
20891 /// "examples": [
20892 /// 100
20893 /// ],
20894 /// "type": "integer"
20895 /// },
20896 /// "revenueUsd": {
20897 /// "description": "Amount of revenue (in USD) that the Pack has
20898 /// produced.",
20899 /// "type": "string"
20900 /// },
20901 /// "workspaceInstalls": {
20902 /// "description": "Number of unique workspaces that have installed
20903 /// this Pack.",
20904 /// "examples": [
20905 /// 10
20906 /// ],
20907 /// "type": "integer"
20908 /// },
20909 /// "workspacesActivelyTrialing": {
20910 /// "description": "Number of unique workspaces that are currently
20911 /// involved in a trial.",
20912 /// "type": "integer"
20913 /// },
20914 /// "workspacesActivelyTrialing30Day": {
20915 /// "description": "Number of unique workspaces that have been involved
20916 /// in a trial in the last 30 days.",
20917 /// "type": "integer"
20918 /// },
20919 /// "workspacesActivelyTrialing7Day": {
20920 /// "description": "Number of unique workspaces that have been involved
20921 /// in a trial in the last 7 days.",
20922 /// "type": "integer"
20923 /// },
20924 /// "workspacesActivelyTrialing90Day": {
20925 /// "description": "Number of unique workspaces that have been involved
20926 /// in a trial in the last 90 days.",
20927 /// "type": "integer"
20928 /// },
20929 /// "workspacesActivelyTrialingAllTime": {
20930 /// "description": "Number of unique workspaces that have been involved
20931 /// in a trial ever.",
20932 /// "type": "integer"
20933 /// },
20934 /// "workspacesActivelyUsing": {
20935 /// "description": "Number of unique workspaces that have invoked a
20936 /// formula from this Pack in the past day.",
20937 /// "examples": [
20938 /// 10
20939 /// ],
20940 /// "type": "integer"
20941 /// },
20942 /// "workspacesActivelyUsing30Day": {
20943 /// "description": "Number of unique workspaces that have invoked a
20944 /// formula from this Pack in the past 30 days.",
20945 /// "examples": [
20946 /// 20
20947 /// ],
20948 /// "type": "integer"
20949 /// },
20950 /// "workspacesActivelyUsing7Day": {
20951 /// "description": "Number of unique workspaces that have invoked a
20952 /// formula from this Pack in the past 7 days.",
20953 /// "examples": [
20954 /// 15
20955 /// ],
20956 /// "type": "integer"
20957 /// },
20958 /// "workspacesActivelyUsing90Day": {
20959 /// "description": "Number of unique workspaces that have invoked a
20960 /// formula from this Pack in the past 90 days.",
20961 /// "examples": [
20962 /// 30
20963 /// ],
20964 /// "type": "integer"
20965 /// },
20966 /// "workspacesActivelyUsingAllTime": {
20967 /// "description": "Number of unique workspaces that have invoked a
20968 /// formula from this Pack ever.",
20969 /// "examples": [
20970 /// 50
20971 /// ],
20972 /// "type": "integer"
20973 /// },
20974 /// "workspacesNewlySubscribed": {
20975 /// "description": "Number of unique workspaces that have recently
20976 /// subscribed to the Pack.",
20977 /// "type": "integer"
20978 /// },
20979 /// "workspacesWithActiveSubscriptions": {
20980 /// "description": "Number of unique workspaces that are currently
20981 /// subscribed to the Pack.",
20982 /// "type": "integer"
20983 /// },
20984 /// "workspacesWithSuccessfulTrials": {
20985 /// "description": "Number of unique workspaces that subscribed after
20986 /// undertaking a Pack trial.",
20987 /// "type": "integer"
20988 /// }
20989 /// },
20990 /// "additionalProperties": false,
20991 /// "x-schema-name": "PackAnalyticsMetrics"
20992 ///}
20993 /// ```
20994 /// </details>
20995 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20996 #[serde(deny_unknown_fields)]
20997 pub struct PackAnalyticsMetrics {
20998 ///Date of the analytics data.
20999 pub date: ::chrono::naive::NaiveDate,
21000 ///Number of unique documents that have installed this Pack.
21001 #[serde(rename = "docInstalls")]
21002 pub doc_installs: i64,
21003 ///Number of unique docs that have invoked a formula from this Pack in
21004 /// the past day.
21005 #[serde(rename = "docsActivelyUsing")]
21006 pub docs_actively_using: i64,
21007 ///Number of unique docs that have invoked a formula from this Pack in
21008 /// the past 30 days.
21009 #[serde(rename = "docsActivelyUsing30Day")]
21010 pub docs_actively_using30_day: i64,
21011 ///Number of unique docs that have invoked a formula from this Pack in
21012 /// the past 7 days.
21013 #[serde(rename = "docsActivelyUsing7Day")]
21014 pub docs_actively_using7_day: i64,
21015 ///Number of unique docs that have invoked a formula from this Pack in
21016 /// the past 90 days.
21017 #[serde(rename = "docsActivelyUsing90Day")]
21018 pub docs_actively_using90_day: i64,
21019 ///Number of unique docs that have invoked a formula from this Pack
21020 /// ever.
21021 #[serde(rename = "docsActivelyUsingAllTime")]
21022 pub docs_actively_using_all_time: i64,
21023 ///Number of times action formulas have been called.
21024 #[serde(rename = "numActionInvocations")]
21025 pub num_action_invocations: i64,
21026 ///Number of times regular formulas have been called.
21027 #[serde(rename = "numFormulaInvocations")]
21028 pub num_formula_invocations: i64,
21029 ///Number of times metadata formulas have been called.
21030 #[serde(rename = "numMetadataInvocations")]
21031 pub num_metadata_invocations: i64,
21032 ///Number of times sync table formulas have been called.
21033 #[serde(rename = "numSyncInvocations")]
21034 pub num_sync_invocations: i64,
21035 ///Amount of revenue (in USD) that the Pack has produced.
21036 #[serde(rename = "revenueUsd")]
21037 pub revenue_usd: ::std::string::String,
21038 ///Number of unique workspaces that have installed this Pack.
21039 #[serde(rename = "workspaceInstalls")]
21040 pub workspace_installs: i64,
21041 ///Number of unique workspaces that are currently involved in a trial.
21042 #[serde(rename = "workspacesActivelyTrialing")]
21043 pub workspaces_actively_trialing: i64,
21044 ///Number of unique workspaces that have been involved in a trial in
21045 /// the last 30 days.
21046 #[serde(rename = "workspacesActivelyTrialing30Day")]
21047 pub workspaces_actively_trialing30_day: i64,
21048 ///Number of unique workspaces that have been involved in a trial in
21049 /// the last 7 days.
21050 #[serde(rename = "workspacesActivelyTrialing7Day")]
21051 pub workspaces_actively_trialing7_day: i64,
21052 ///Number of unique workspaces that have been involved in a trial in
21053 /// the last 90 days.
21054 #[serde(rename = "workspacesActivelyTrialing90Day")]
21055 pub workspaces_actively_trialing90_day: i64,
21056 ///Number of unique workspaces that have been involved in a trial ever.
21057 #[serde(rename = "workspacesActivelyTrialingAllTime")]
21058 pub workspaces_actively_trialing_all_time: i64,
21059 ///Number of unique workspaces that have invoked a formula from this
21060 /// Pack in the past day.
21061 #[serde(rename = "workspacesActivelyUsing")]
21062 pub workspaces_actively_using: i64,
21063 ///Number of unique workspaces that have invoked a formula from this
21064 /// Pack in the past 30 days.
21065 #[serde(rename = "workspacesActivelyUsing30Day")]
21066 pub workspaces_actively_using30_day: i64,
21067 ///Number of unique workspaces that have invoked a formula from this
21068 /// Pack in the past 7 days.
21069 #[serde(rename = "workspacesActivelyUsing7Day")]
21070 pub workspaces_actively_using7_day: i64,
21071 ///Number of unique workspaces that have invoked a formula from this
21072 /// Pack in the past 90 days.
21073 #[serde(rename = "workspacesActivelyUsing90Day")]
21074 pub workspaces_actively_using90_day: i64,
21075 ///Number of unique workspaces that have invoked a formula from this
21076 /// Pack ever.
21077 #[serde(rename = "workspacesActivelyUsingAllTime")]
21078 pub workspaces_actively_using_all_time: i64,
21079 ///Number of unique workspaces that have recently subscribed to the
21080 /// Pack.
21081 #[serde(rename = "workspacesNewlySubscribed")]
21082 pub workspaces_newly_subscribed: i64,
21083 ///Number of unique workspaces that are currently subscribed to the
21084 /// Pack.
21085 #[serde(rename = "workspacesWithActiveSubscriptions")]
21086 pub workspaces_with_active_subscriptions: i64,
21087 ///Number of unique workspaces that subscribed after undertaking a Pack
21088 /// trial.
21089 #[serde(rename = "workspacesWithSuccessfulTrials")]
21090 pub workspaces_with_successful_trials: i64,
21091 }
21092
21093 impl ::std::convert::From<&PackAnalyticsMetrics> for PackAnalyticsMetrics {
21094 fn from(value: &PackAnalyticsMetrics) -> Self {
21095 value.clone()
21096 }
21097 }
21098
21099 ///Determines how the Pack analytics returned are sorted.
21100 ///
21101 /// <details><summary>JSON schema</summary>
21102 ///
21103 /// ```json
21104 ///{
21105 /// "description": "Determines how the Pack analytics returned are
21106 /// sorted.",
21107 /// "type": "string",
21108 /// "enum": [
21109 /// "date",
21110 /// "packId",
21111 /// "name",
21112 /// "createdAt",
21113 /// "docInstalls",
21114 /// "workspaceInstalls",
21115 /// "numFormulaInvocations",
21116 /// "numActionInvocations",
21117 /// "numSyncInvocations",
21118 /// "numMetadataInvocations",
21119 /// "docsActivelyUsing",
21120 /// "docsActivelyUsing7Day",
21121 /// "docsActivelyUsing30Day",
21122 /// "docsActivelyUsing90Day",
21123 /// "docsActivelyUsingAllTime",
21124 /// "workspacesActivelyUsing",
21125 /// "workspacesActivelyUsing7Day",
21126 /// "workspacesActivelyUsing30Day",
21127 /// "workspacesActivelyUsing90Day",
21128 /// "workspacesActivelyUsingAllTime",
21129 /// "workspacesWithActiveSubscriptions",
21130 /// "workspacesWithSuccessfulTrials",
21131 /// "revenueUsd"
21132 /// ],
21133 /// "x-schema-name": "PackAnalyticsOrderBy",
21134 /// "x-tsEnumNames": [
21135 /// "AnalyticsDate",
21136 /// "PackId",
21137 /// "Name",
21138 /// "CreatedAt",
21139 /// "DocInstalls",
21140 /// "WorkspaceInstalls",
21141 /// "NumFormulaInvocations",
21142 /// "NumActionInvocations",
21143 /// "NumSyncInvocations",
21144 /// "NumMetadataInvocations",
21145 /// "DocsActivelyUsing",
21146 /// "DocsActivelyUsing7Day",
21147 /// "DocsActivelyUsing30Day",
21148 /// "DocsActivelyUsing90Day",
21149 /// "DocsActivelyUsingAllTime",
21150 /// "WorkspacesActivelyUsing",
21151 /// "WorkspacesActivelyUsing7Day",
21152 /// "WorkspacesActivelyUsing30Day",
21153 /// "WorkspacesActivelyUsing90Day",
21154 /// "WorkspacesActivelyUsingAllTime",
21155 /// "WorkspacesWithActiveSubscriptions",
21156 /// "WorkspacesWithSuccessfulTrials",
21157 /// "RevenueUsd"
21158 /// ]
21159 ///}
21160 /// ```
21161 /// </details>
21162 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21163 pub enum PackAnalyticsOrderBy {
21164 #[serde(rename = "date")]
21165 Date,
21166 #[serde(rename = "packId")]
21167 PackId,
21168 #[serde(rename = "name")]
21169 Name,
21170 #[serde(rename = "createdAt")]
21171 CreatedAt,
21172 #[serde(rename = "docInstalls")]
21173 DocInstalls,
21174 #[serde(rename = "workspaceInstalls")]
21175 WorkspaceInstalls,
21176 #[serde(rename = "numFormulaInvocations")]
21177 NumFormulaInvocations,
21178 #[serde(rename = "numActionInvocations")]
21179 NumActionInvocations,
21180 #[serde(rename = "numSyncInvocations")]
21181 NumSyncInvocations,
21182 #[serde(rename = "numMetadataInvocations")]
21183 NumMetadataInvocations,
21184 #[serde(rename = "docsActivelyUsing")]
21185 DocsActivelyUsing,
21186 #[serde(rename = "docsActivelyUsing7Day")]
21187 DocsActivelyUsing7Day,
21188 #[serde(rename = "docsActivelyUsing30Day")]
21189 DocsActivelyUsing30Day,
21190 #[serde(rename = "docsActivelyUsing90Day")]
21191 DocsActivelyUsing90Day,
21192 #[serde(rename = "docsActivelyUsingAllTime")]
21193 DocsActivelyUsingAllTime,
21194 #[serde(rename = "workspacesActivelyUsing")]
21195 WorkspacesActivelyUsing,
21196 #[serde(rename = "workspacesActivelyUsing7Day")]
21197 WorkspacesActivelyUsing7Day,
21198 #[serde(rename = "workspacesActivelyUsing30Day")]
21199 WorkspacesActivelyUsing30Day,
21200 #[serde(rename = "workspacesActivelyUsing90Day")]
21201 WorkspacesActivelyUsing90Day,
21202 #[serde(rename = "workspacesActivelyUsingAllTime")]
21203 WorkspacesActivelyUsingAllTime,
21204 #[serde(rename = "workspacesWithActiveSubscriptions")]
21205 WorkspacesWithActiveSubscriptions,
21206 #[serde(rename = "workspacesWithSuccessfulTrials")]
21207 WorkspacesWithSuccessfulTrials,
21208 #[serde(rename = "revenueUsd")]
21209 RevenueUsd,
21210 }
21211
21212 impl ::std::convert::From<&Self> for PackAnalyticsOrderBy {
21213 fn from(value: &PackAnalyticsOrderBy) -> Self {
21214 value.clone()
21215 }
21216 }
21217
21218 impl ::std::fmt::Display for PackAnalyticsOrderBy {
21219 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21220 match *self {
21221 Self::Date => f.write_str("date"),
21222 Self::PackId => f.write_str("packId"),
21223 Self::Name => f.write_str("name"),
21224 Self::CreatedAt => f.write_str("createdAt"),
21225 Self::DocInstalls => f.write_str("docInstalls"),
21226 Self::WorkspaceInstalls => f.write_str("workspaceInstalls"),
21227 Self::NumFormulaInvocations => f.write_str("numFormulaInvocations"),
21228 Self::NumActionInvocations => f.write_str("numActionInvocations"),
21229 Self::NumSyncInvocations => f.write_str("numSyncInvocations"),
21230 Self::NumMetadataInvocations => f.write_str("numMetadataInvocations"),
21231 Self::DocsActivelyUsing => f.write_str("docsActivelyUsing"),
21232 Self::DocsActivelyUsing7Day => f.write_str("docsActivelyUsing7Day"),
21233 Self::DocsActivelyUsing30Day => f.write_str("docsActivelyUsing30Day"),
21234 Self::DocsActivelyUsing90Day => f.write_str("docsActivelyUsing90Day"),
21235 Self::DocsActivelyUsingAllTime => f.write_str("docsActivelyUsingAllTime"),
21236 Self::WorkspacesActivelyUsing => f.write_str("workspacesActivelyUsing"),
21237 Self::WorkspacesActivelyUsing7Day => f.write_str("workspacesActivelyUsing7Day"),
21238 Self::WorkspacesActivelyUsing30Day => f.write_str("workspacesActivelyUsing30Day"),
21239 Self::WorkspacesActivelyUsing90Day => f.write_str("workspacesActivelyUsing90Day"),
21240 Self::WorkspacesActivelyUsingAllTime => f.write_str("workspacesActivelyUsingAllTime"),
21241 Self::WorkspacesWithActiveSubscriptions => f.write_str("workspacesWithActiveSubscriptions"),
21242 Self::WorkspacesWithSuccessfulTrials => f.write_str("workspacesWithSuccessfulTrials"),
21243 Self::RevenueUsd => f.write_str("revenueUsd"),
21244 }
21245 }
21246 }
21247
21248 impl ::std::str::FromStr for PackAnalyticsOrderBy {
21249 type Err = self::error::ConversionError;
21250 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21251 match value {
21252 "date" => Ok(Self::Date),
21253 "packId" => Ok(Self::PackId),
21254 "name" => Ok(Self::Name),
21255 "createdAt" => Ok(Self::CreatedAt),
21256 "docInstalls" => Ok(Self::DocInstalls),
21257 "workspaceInstalls" => Ok(Self::WorkspaceInstalls),
21258 "numFormulaInvocations" => Ok(Self::NumFormulaInvocations),
21259 "numActionInvocations" => Ok(Self::NumActionInvocations),
21260 "numSyncInvocations" => Ok(Self::NumSyncInvocations),
21261 "numMetadataInvocations" => Ok(Self::NumMetadataInvocations),
21262 "docsActivelyUsing" => Ok(Self::DocsActivelyUsing),
21263 "docsActivelyUsing7Day" => Ok(Self::DocsActivelyUsing7Day),
21264 "docsActivelyUsing30Day" => Ok(Self::DocsActivelyUsing30Day),
21265 "docsActivelyUsing90Day" => Ok(Self::DocsActivelyUsing90Day),
21266 "docsActivelyUsingAllTime" => Ok(Self::DocsActivelyUsingAllTime),
21267 "workspacesActivelyUsing" => Ok(Self::WorkspacesActivelyUsing),
21268 "workspacesActivelyUsing7Day" => Ok(Self::WorkspacesActivelyUsing7Day),
21269 "workspacesActivelyUsing30Day" => Ok(Self::WorkspacesActivelyUsing30Day),
21270 "workspacesActivelyUsing90Day" => Ok(Self::WorkspacesActivelyUsing90Day),
21271 "workspacesActivelyUsingAllTime" => Ok(Self::WorkspacesActivelyUsingAllTime),
21272 "workspacesWithActiveSubscriptions" => Ok(Self::WorkspacesWithActiveSubscriptions),
21273 "workspacesWithSuccessfulTrials" => Ok(Self::WorkspacesWithSuccessfulTrials),
21274 "revenueUsd" => Ok(Self::RevenueUsd),
21275 _ => Err("invalid value".into()),
21276 }
21277 }
21278 }
21279
21280 impl ::std::convert::TryFrom<&str> for PackAnalyticsOrderBy {
21281 type Error = self::error::ConversionError;
21282 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21283 value.parse()
21284 }
21285 }
21286
21287 impl ::std::convert::TryFrom<&::std::string::String> for PackAnalyticsOrderBy {
21288 type Error = self::error::ConversionError;
21289 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21290 value.parse()
21291 }
21292 }
21293
21294 impl ::std::convert::TryFrom<::std::string::String> for PackAnalyticsOrderBy {
21295 type Error = self::error::ConversionError;
21296 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21297 value.parse()
21298 }
21299 }
21300
21301 ///Summary analytics for Packs.
21302 ///
21303 /// <details><summary>JSON schema</summary>
21304 ///
21305 /// ```json
21306 ///{
21307 /// "description": "Summary analytics for Packs.",
21308 /// "type": "object",
21309 /// "required": [
21310 /// "totalDocInstalls",
21311 /// "totalInvocations",
21312 /// "totalWorkspaceInstalls"
21313 /// ],
21314 /// "properties": {
21315 /// "totalDocInstalls": {
21316 /// "description": "The number of times this Pack was installed in
21317 /// docs.",
21318 /// "type": "integer"
21319 /// },
21320 /// "totalInvocations": {
21321 /// "description": "The number of times formulas in this Pack were
21322 /// invoked.",
21323 /// "type": "integer"
21324 /// },
21325 /// "totalWorkspaceInstalls": {
21326 /// "description": "The number of times this Pack was installed in
21327 /// workspaces.",
21328 /// "type": "integer"
21329 /// }
21330 /// },
21331 /// "additionalProperties": false,
21332 /// "x-schema-name": "PackAnalyticsSummary"
21333 ///}
21334 /// ```
21335 /// </details>
21336 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21337 #[serde(deny_unknown_fields)]
21338 pub struct PackAnalyticsSummary {
21339 ///The number of times this Pack was installed in docs.
21340 #[serde(rename = "totalDocInstalls")]
21341 pub total_doc_installs: i64,
21342 ///The number of times formulas in this Pack were invoked.
21343 #[serde(rename = "totalInvocations")]
21344 pub total_invocations: i64,
21345 ///The number of times this Pack was installed in workspaces.
21346 #[serde(rename = "totalWorkspaceInstalls")]
21347 pub total_workspace_installs: i64,
21348 }
21349
21350 impl ::std::convert::From<&PackAnalyticsSummary> for PackAnalyticsSummary {
21351 fn from(value: &PackAnalyticsSummary) -> Self {
21352 value.clone()
21353 }
21354 }
21355
21356 ///`PackAssetType`
21357 ///
21358 /// <details><summary>JSON schema</summary>
21359 ///
21360 /// ```json
21361 ///{
21362 /// "type": "string",
21363 /// "enum": [
21364 /// "logo",
21365 /// "cover",
21366 /// "exampleImage",
21367 /// "agentImage"
21368 /// ],
21369 /// "x-schema-name": "PackAssetType",
21370 /// "x-tsEnumNames": [
21371 /// "Logo",
21372 /// "Cover",
21373 /// "ExampleImage",
21374 /// "AgentImage"
21375 /// ]
21376 ///}
21377 /// ```
21378 /// </details>
21379 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21380 pub enum PackAssetType {
21381 #[serde(rename = "logo")]
21382 Logo,
21383 #[serde(rename = "cover")]
21384 Cover,
21385 #[serde(rename = "exampleImage")]
21386 ExampleImage,
21387 #[serde(rename = "agentImage")]
21388 AgentImage,
21389 }
21390
21391 impl ::std::convert::From<&Self> for PackAssetType {
21392 fn from(value: &PackAssetType) -> Self {
21393 value.clone()
21394 }
21395 }
21396
21397 impl ::std::fmt::Display for PackAssetType {
21398 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21399 match *self {
21400 Self::Logo => f.write_str("logo"),
21401 Self::Cover => f.write_str("cover"),
21402 Self::ExampleImage => f.write_str("exampleImage"),
21403 Self::AgentImage => f.write_str("agentImage"),
21404 }
21405 }
21406 }
21407
21408 impl ::std::str::FromStr for PackAssetType {
21409 type Err = self::error::ConversionError;
21410 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21411 match value {
21412 "logo" => Ok(Self::Logo),
21413 "cover" => Ok(Self::Cover),
21414 "exampleImage" => Ok(Self::ExampleImage),
21415 "agentImage" => Ok(Self::AgentImage),
21416 _ => Err("invalid value".into()),
21417 }
21418 }
21419 }
21420
21421 impl ::std::convert::TryFrom<&str> for PackAssetType {
21422 type Error = self::error::ConversionError;
21423 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21424 value.parse()
21425 }
21426 }
21427
21428 impl ::std::convert::TryFrom<&::std::string::String> for PackAssetType {
21429 type Error = self::error::ConversionError;
21430 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21431 value.parse()
21432 }
21433 }
21434
21435 impl ::std::convert::TryFrom<::std::string::String> for PackAssetType {
21436 type Error = self::error::ConversionError;
21437 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21438 value.parse()
21439 }
21440 }
21441
21442 ///Payload for noting a Pack asset upload is complete.
21443 ///
21444 /// <details><summary>JSON schema</summary>
21445 ///
21446 /// ```json
21447 ///{
21448 /// "description": "Payload for noting a Pack asset upload is complete.",
21449 /// "type": "object",
21450 /// "required": [
21451 /// "packAssetType"
21452 /// ],
21453 /// "properties": {
21454 /// "packAssetType": {
21455 /// "$ref": "#/components/schemas/PackAssetType"
21456 /// }
21457 /// },
21458 /// "additionalProperties": false,
21459 /// "x-schema-name": "PackAssetUploadCompleteRequest"
21460 ///}
21461 /// ```
21462 /// </details>
21463 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21464 #[serde(deny_unknown_fields)]
21465 pub struct PackAssetUploadCompleteRequest {
21466 #[serde(rename = "packAssetType")]
21467 pub pack_asset_type: PackAssetType,
21468 }
21469
21470 impl ::std::convert::From<&PackAssetUploadCompleteRequest> for PackAssetUploadCompleteRequest {
21471 fn from(value: &PackAssetUploadCompleteRequest) -> Self {
21472 value.clone()
21473 }
21474 }
21475
21476 ///Response for noting a Pack asset upload is complete.
21477 ///
21478 /// <details><summary>JSON schema</summary>
21479 ///
21480 /// ```json
21481 ///{
21482 /// "description": "Response for noting a Pack asset upload is complete.",
21483 /// "type": "object",
21484 /// "required": [
21485 /// "assetId",
21486 /// "requestId"
21487 /// ],
21488 /// "properties": {
21489 /// "assetId": {
21490 /// "description": "An identifier of this uploaded asset.",
21491 /// "examples": [
21492 /// "e23fcb5e564f08b71183d424c2c380c0"
21493 /// ],
21494 /// "type": "string"
21495 /// },
21496 /// "requestId": {
21497 /// "description": "An arbitrary unique identifier for this request.",
21498 /// "examples": [
21499 /// "abc-123-def-456"
21500 /// ],
21501 /// "type": "string"
21502 /// }
21503 /// },
21504 /// "additionalProperties": false,
21505 /// "x-schema-name": "PackAssetUploadCompleteResponse"
21506 ///}
21507 /// ```
21508 /// </details>
21509 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21510 #[serde(deny_unknown_fields)]
21511 pub struct PackAssetUploadCompleteResponse {
21512 ///An identifier of this uploaded asset.
21513 #[serde(rename = "assetId")]
21514 pub asset_id: ::std::string::String,
21515 ///An arbitrary unique identifier for this request.
21516 #[serde(rename = "requestId")]
21517 pub request_id: ::std::string::String,
21518 }
21519
21520 impl ::std::convert::From<&PackAssetUploadCompleteResponse> for PackAssetUploadCompleteResponse {
21521 fn from(value: &PackAssetUploadCompleteResponse) -> Self {
21522 value.clone()
21523 }
21524 }
21525
21526 ///Detail about why this request was rejected.
21527 ///
21528 /// <details><summary>JSON schema</summary>
21529 ///
21530 /// ```json
21531 ///{
21532 /// "description": "Detail about why this request was rejected.",
21533 /// "type": "object",
21534 /// "properties": {
21535 /// "validationErrors": {
21536 /// "type": "array",
21537 /// "items": {
21538 /// "$ref": "#/components/schemas/ValidationError"
21539 /// }
21540 /// }
21541 /// },
21542 /// "additionalProperties": false
21543 ///}
21544 /// ```
21545 /// </details>
21546 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21547 #[serde(deny_unknown_fields)]
21548 pub struct PackAssetUploadCompleteResponseCodaDetail {
21549 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
21550 pub validation_errors: ::std::vec::Vec<ValidationError>,
21551 }
21552
21553 impl ::std::convert::From<&PackAssetUploadCompleteResponseCodaDetail> for PackAssetUploadCompleteResponseCodaDetail {
21554 fn from(value: &PackAssetUploadCompleteResponseCodaDetail) -> Self {
21555 value.clone()
21556 }
21557 }
21558
21559 impl ::std::default::Default for PackAssetUploadCompleteResponseCodaDetail {
21560 fn default() -> Self {
21561 Self {
21562 validation_errors: Default::default(),
21563 }
21564 }
21565 }
21566
21567 ///Information indicating where to upload the Pack asset, and an endpoint
21568 /// to mark the upload as complete.
21569 ///
21570 /// <details><summary>JSON schema</summary>
21571 ///
21572 /// ```json
21573 ///{
21574 /// "description": "Information indicating where to upload the Pack asset,
21575 /// and an endpoint to mark the upload as complete.",
21576 /// "type": "object",
21577 /// "required": [
21578 /// "headers",
21579 /// "packAssetUploadedPathName",
21580 /// "uploadUrl"
21581 /// ],
21582 /// "properties": {
21583 /// "headers": {
21584 /// "description": "Key-value pairs of authorization headers to include
21585 /// in the upload request.",
21586 /// "examples": [
21587 /// "{\"header1\": \"value1\"}"
21588 /// ],
21589 /// "type": "object",
21590 /// "additionalProperties": {
21591 /// "type": "string"
21592 /// }
21593 /// },
21594 /// "packAssetUploadedPathName": {
21595 /// "description": "An endpoint to mark the upload as complete.",
21596 /// "examples": [
21597 /// "/packs/123/assets/e23fcb5e564f08b71183d424c2c380c0"
21598 /// ],
21599 /// "type": "string"
21600 /// },
21601 /// "uploadUrl": {
21602 /// "description": "A signed URL to be used for uploading a Pack
21603 /// asset.",
21604 /// "examples": [
21605 /// "https://coda-us-west-2-prod-blobs-upload.s3-accelerate.amazonaws.com/packs/123/assets/logo/e23fcb5e564f08b71183d424c2c380c0"
21606 /// ],
21607 /// "type": "string",
21608 /// "format": "url"
21609 /// }
21610 /// },
21611 /// "additionalProperties": false,
21612 /// "x-schema-name": "PackAssetUploadInfo"
21613 ///}
21614 /// ```
21615 /// </details>
21616 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21617 #[serde(deny_unknown_fields)]
21618 pub struct PackAssetUploadInfo {
21619 ///Key-value pairs of authorization headers to include in the upload
21620 /// request.
21621 pub headers: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
21622 ///An endpoint to mark the upload as complete.
21623 #[serde(rename = "packAssetUploadedPathName")]
21624 pub pack_asset_uploaded_path_name: ::std::string::String,
21625 ///A signed URL to be used for uploading a Pack asset.
21626 #[serde(rename = "uploadUrl")]
21627 pub upload_url: ::std::string::String,
21628 }
21629
21630 impl ::std::convert::From<&PackAssetUploadInfo> for PackAssetUploadInfo {
21631 fn from(value: &PackAssetUploadInfo) -> Self {
21632 value.clone()
21633 }
21634 }
21635
21636 ///System logs of Pack authentication requests.
21637 ///
21638 /// <details><summary>JSON schema</summary>
21639 ///
21640 /// ```json
21641 ///{
21642 /// "description": "System logs of Pack authentication requests.",
21643 /// "type": "object",
21644 /// "required": [
21645 /// "context",
21646 /// "path",
21647 /// "type"
21648 /// ],
21649 /// "properties": {
21650 /// "context": {
21651 /// "$ref": "#/components/schemas/PackLogContext"
21652 /// },
21653 /// "errorMessage": {
21654 /// "description": "The error message.",
21655 /// "type": "string"
21656 /// },
21657 /// "errorStack": {
21658 /// "description": "The error stacktrace (internal only).",
21659 /// "type": "string"
21660 /// },
21661 /// "path": {
21662 /// "description": "The request path.",
21663 /// "type": "string"
21664 /// },
21665 /// "type": {
21666 /// "type": "string",
21667 /// "enum": [
21668 /// "auth"
21669 /// ],
21670 /// "x-tsType": "PackLogType.Auth"
21671 /// }
21672 /// },
21673 /// "additionalProperties": false,
21674 /// "x-schema-name": "PackAuthLog"
21675 ///}
21676 /// ```
21677 /// </details>
21678 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21679 #[serde(deny_unknown_fields)]
21680 pub struct PackAuthLog {
21681 pub context: PackLogContext,
21682 ///The error message.
21683 #[serde(rename = "errorMessage", default, skip_serializing_if = "::std::option::Option::is_none")]
21684 pub error_message: ::std::option::Option<::std::string::String>,
21685 ///The error stacktrace (internal only).
21686 #[serde(rename = "errorStack", default, skip_serializing_if = "::std::option::Option::is_none")]
21687 pub error_stack: ::std::option::Option<::std::string::String>,
21688 ///The request path.
21689 pub path: ::std::string::String,
21690 #[serde(rename = "type")]
21691 pub type_: PackAuthLogType,
21692 }
21693
21694 impl ::std::convert::From<&PackAuthLog> for PackAuthLog {
21695 fn from(value: &PackAuthLog) -> Self {
21696 value.clone()
21697 }
21698 }
21699
21700 ///`PackAuthLogType`
21701 ///
21702 /// <details><summary>JSON schema</summary>
21703 ///
21704 /// ```json
21705 ///{
21706 /// "type": "string",
21707 /// "enum": [
21708 /// "auth"
21709 /// ],
21710 /// "x-tsType": "PackLogType.Auth"
21711 ///}
21712 /// ```
21713 /// </details>
21714 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21715 pub enum PackAuthLogType {
21716 #[serde(rename = "auth")]
21717 Auth,
21718 }
21719
21720 impl ::std::convert::From<&Self> for PackAuthLogType {
21721 fn from(value: &PackAuthLogType) -> Self {
21722 value.clone()
21723 }
21724 }
21725
21726 impl ::std::fmt::Display for PackAuthLogType {
21727 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21728 match *self {
21729 Self::Auth => f.write_str("auth"),
21730 }
21731 }
21732 }
21733
21734 impl ::std::str::FromStr for PackAuthLogType {
21735 type Err = self::error::ConversionError;
21736 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21737 match value {
21738 "auth" => Ok(Self::Auth),
21739 _ => Err("invalid value".into()),
21740 }
21741 }
21742 }
21743
21744 impl ::std::convert::TryFrom<&str> for PackAuthLogType {
21745 type Error = self::error::ConversionError;
21746 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21747 value.parse()
21748 }
21749 }
21750
21751 impl ::std::convert::TryFrom<&::std::string::String> for PackAuthLogType {
21752 type Error = self::error::ConversionError;
21753 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21754 value.parse()
21755 }
21756 }
21757
21758 impl ::std::convert::TryFrom<::std::string::String> for PackAuthLogType {
21759 type Error = self::error::ConversionError;
21760 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21761 value.parse()
21762 }
21763 }
21764
21765 ///Basic details about a configuration that can be used in conjunction with
21766 /// a pack
21767 ///
21768 /// <details><summary>JSON schema</summary>
21769 ///
21770 /// ```json
21771 ///{
21772 /// "description": "Basic details about a configuration that can be used in
21773 /// conjunction with a pack",
21774 /// "type": "object",
21775 /// "required": [
21776 /// "configurationId",
21777 /// "name"
21778 /// ],
21779 /// "properties": {
21780 /// "configurationId": {
21781 /// "type": "string"
21782 /// },
21783 /// "name": {
21784 /// "description": "Name of the configuration",
21785 /// "type": "string"
21786 /// },
21787 /// "policy": {
21788 /// "description": "Policy associated with the configuration",
21789 /// "type": "object",
21790 /// "additionalProperties": true
21791 /// }
21792 /// },
21793 /// "additionalProperties": false,
21794 /// "x-schema-name": "PackConfigurationEntry"
21795 ///}
21796 /// ```
21797 /// </details>
21798 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21799 #[serde(deny_unknown_fields)]
21800 pub struct PackConfigurationEntry {
21801 #[serde(rename = "configurationId")]
21802 pub configuration_id: ::std::string::String,
21803 ///Name of the configuration
21804 pub name: ::std::string::String,
21805 ///Policy associated with the configuration
21806 #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
21807 pub policy: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
21808 }
21809
21810 impl ::std::convert::From<&PackConfigurationEntry> for PackConfigurationEntry {
21811 fn from(value: &PackConfigurationEntry) -> Self {
21812 value.clone()
21813 }
21814 }
21815
21816 ///`PackConnectionAwsAccessKeyCredentials`
21817 ///
21818 /// <details><summary>JSON schema</summary>
21819 ///
21820 /// ```json
21821 ///{
21822 /// "type": "object",
21823 /// "required": [
21824 /// "accessKeyId",
21825 /// "secretAccessKey",
21826 /// "type"
21827 /// ],
21828 /// "properties": {
21829 /// "accessKeyId": {
21830 /// "type": "string"
21831 /// },
21832 /// "secretAccessKey": {
21833 /// "type": "string"
21834 /// },
21835 /// "type": {
21836 /// "type": "string",
21837 /// "enum": [
21838 /// "awsAccessKey"
21839 /// ],
21840 /// "x-tsType": "PackConnectionType.AwsAccessKey"
21841 /// }
21842 /// },
21843 /// "additionalProperties": false,
21844 /// "x-schema-name": "PackConnectionAwsAccessKeyCredentials"
21845 ///}
21846 /// ```
21847 /// </details>
21848 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21849 #[serde(deny_unknown_fields)]
21850 pub struct PackConnectionAwsAccessKeyCredentials {
21851 #[serde(rename = "accessKeyId")]
21852 pub access_key_id: ::std::string::String,
21853 #[serde(rename = "secretAccessKey")]
21854 pub secret_access_key: ::std::string::String,
21855 #[serde(rename = "type")]
21856 pub type_: PackConnectionAwsAccessKeyCredentialsType,
21857 }
21858
21859 impl ::std::convert::From<&PackConnectionAwsAccessKeyCredentials> for PackConnectionAwsAccessKeyCredentials {
21860 fn from(value: &PackConnectionAwsAccessKeyCredentials) -> Self {
21861 value.clone()
21862 }
21863 }
21864
21865 ///`PackConnectionAwsAccessKeyCredentialsType`
21866 ///
21867 /// <details><summary>JSON schema</summary>
21868 ///
21869 /// ```json
21870 ///{
21871 /// "type": "string",
21872 /// "enum": [
21873 /// "awsAccessKey"
21874 /// ],
21875 /// "x-tsType": "PackConnectionType.AwsAccessKey"
21876 ///}
21877 /// ```
21878 /// </details>
21879 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21880 pub enum PackConnectionAwsAccessKeyCredentialsType {
21881 #[serde(rename = "awsAccessKey")]
21882 AwsAccessKey,
21883 }
21884
21885 impl ::std::convert::From<&Self> for PackConnectionAwsAccessKeyCredentialsType {
21886 fn from(value: &PackConnectionAwsAccessKeyCredentialsType) -> Self {
21887 value.clone()
21888 }
21889 }
21890
21891 impl ::std::fmt::Display for PackConnectionAwsAccessKeyCredentialsType {
21892 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21893 match *self {
21894 Self::AwsAccessKey => f.write_str("awsAccessKey"),
21895 }
21896 }
21897 }
21898
21899 impl ::std::str::FromStr for PackConnectionAwsAccessKeyCredentialsType {
21900 type Err = self::error::ConversionError;
21901 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21902 match value {
21903 "awsAccessKey" => Ok(Self::AwsAccessKey),
21904 _ => Err("invalid value".into()),
21905 }
21906 }
21907 }
21908
21909 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAccessKeyCredentialsType {
21910 type Error = self::error::ConversionError;
21911 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21912 value.parse()
21913 }
21914 }
21915
21916 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAccessKeyCredentialsType {
21917 type Error = self::error::ConversionError;
21918 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21919 value.parse()
21920 }
21921 }
21922
21923 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAccessKeyCredentialsType {
21924 type Error = self::error::ConversionError;
21925 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
21926 value.parse()
21927 }
21928 }
21929
21930 ///`PackConnectionAwsAccessKeyMetadata`
21931 ///
21932 /// <details><summary>JSON schema</summary>
21933 ///
21934 /// ```json
21935 ///{
21936 /// "type": "object",
21937 /// "required": [
21938 /// "maskedAccessKeyId",
21939 /// "maskedSecretAccessKey",
21940 /// "service",
21941 /// "type"
21942 /// ],
21943 /// "properties": {
21944 /// "maskedAccessKeyId": {
21945 /// "type": "string"
21946 /// },
21947 /// "maskedSecretAccessKey": {
21948 /// "type": "string"
21949 /// },
21950 /// "service": {
21951 /// "type": "string"
21952 /// },
21953 /// "type": {
21954 /// "type": "string",
21955 /// "enum": [
21956 /// "awsAccessKey"
21957 /// ],
21958 /// "x-tsType": "PackConnectionType.AwsAccessKey"
21959 /// }
21960 /// },
21961 /// "additionalProperties": false,
21962 /// "x-schema-name": "PackConnectionAwsAccessKeyMetadata"
21963 ///}
21964 /// ```
21965 /// </details>
21966 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21967 #[serde(deny_unknown_fields)]
21968 pub struct PackConnectionAwsAccessKeyMetadata {
21969 #[serde(rename = "maskedAccessKeyId")]
21970 pub masked_access_key_id: ::std::string::String,
21971 #[serde(rename = "maskedSecretAccessKey")]
21972 pub masked_secret_access_key: ::std::string::String,
21973 pub service: ::std::string::String,
21974 #[serde(rename = "type")]
21975 pub type_: PackConnectionAwsAccessKeyMetadataType,
21976 }
21977
21978 impl ::std::convert::From<&PackConnectionAwsAccessKeyMetadata> for PackConnectionAwsAccessKeyMetadata {
21979 fn from(value: &PackConnectionAwsAccessKeyMetadata) -> Self {
21980 value.clone()
21981 }
21982 }
21983
21984 ///`PackConnectionAwsAccessKeyMetadataType`
21985 ///
21986 /// <details><summary>JSON schema</summary>
21987 ///
21988 /// ```json
21989 ///{
21990 /// "type": "string",
21991 /// "enum": [
21992 /// "awsAccessKey"
21993 /// ],
21994 /// "x-tsType": "PackConnectionType.AwsAccessKey"
21995 ///}
21996 /// ```
21997 /// </details>
21998 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
21999 pub enum PackConnectionAwsAccessKeyMetadataType {
22000 #[serde(rename = "awsAccessKey")]
22001 AwsAccessKey,
22002 }
22003
22004 impl ::std::convert::From<&Self> for PackConnectionAwsAccessKeyMetadataType {
22005 fn from(value: &PackConnectionAwsAccessKeyMetadataType) -> Self {
22006 value.clone()
22007 }
22008 }
22009
22010 impl ::std::fmt::Display for PackConnectionAwsAccessKeyMetadataType {
22011 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22012 match *self {
22013 Self::AwsAccessKey => f.write_str("awsAccessKey"),
22014 }
22015 }
22016 }
22017
22018 impl ::std::str::FromStr for PackConnectionAwsAccessKeyMetadataType {
22019 type Err = self::error::ConversionError;
22020 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22021 match value {
22022 "awsAccessKey" => Ok(Self::AwsAccessKey),
22023 _ => Err("invalid value".into()),
22024 }
22025 }
22026 }
22027
22028 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAccessKeyMetadataType {
22029 type Error = self::error::ConversionError;
22030 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22031 value.parse()
22032 }
22033 }
22034
22035 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAccessKeyMetadataType {
22036 type Error = self::error::ConversionError;
22037 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22038 value.parse()
22039 }
22040 }
22041
22042 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAccessKeyMetadataType {
22043 type Error = self::error::ConversionError;
22044 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22045 value.parse()
22046 }
22047 }
22048
22049 ///`PackConnectionAwsAccessKeyPatch`
22050 ///
22051 /// <details><summary>JSON schema</summary>
22052 ///
22053 /// ```json
22054 ///{
22055 /// "type": "object",
22056 /// "required": [
22057 /// "type"
22058 /// ],
22059 /// "properties": {
22060 /// "accessKeyId": {
22061 /// "type": "string"
22062 /// },
22063 /// "secretAccessKey": {
22064 /// "type": "string"
22065 /// },
22066 /// "type": {
22067 /// "type": "string",
22068 /// "enum": [
22069 /// "awsAccessKey"
22070 /// ],
22071 /// "x-tsType": "PackConnectionType.AwsAccessKey"
22072 /// }
22073 /// },
22074 /// "additionalProperties": false,
22075 /// "x-schema-name": "PackConnectionAwsAccessKeyPatch"
22076 ///}
22077 /// ```
22078 /// </details>
22079 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22080 #[serde(deny_unknown_fields)]
22081 pub struct PackConnectionAwsAccessKeyPatch {
22082 #[serde(rename = "accessKeyId", default, skip_serializing_if = "::std::option::Option::is_none")]
22083 pub access_key_id: ::std::option::Option<::std::string::String>,
22084 #[serde(rename = "secretAccessKey", default, skip_serializing_if = "::std::option::Option::is_none")]
22085 pub secret_access_key: ::std::option::Option<::std::string::String>,
22086 #[serde(rename = "type")]
22087 pub type_: PackConnectionAwsAccessKeyPatchType,
22088 }
22089
22090 impl ::std::convert::From<&PackConnectionAwsAccessKeyPatch> for PackConnectionAwsAccessKeyPatch {
22091 fn from(value: &PackConnectionAwsAccessKeyPatch) -> Self {
22092 value.clone()
22093 }
22094 }
22095
22096 ///`PackConnectionAwsAccessKeyPatchType`
22097 ///
22098 /// <details><summary>JSON schema</summary>
22099 ///
22100 /// ```json
22101 ///{
22102 /// "type": "string",
22103 /// "enum": [
22104 /// "awsAccessKey"
22105 /// ],
22106 /// "x-tsType": "PackConnectionType.AwsAccessKey"
22107 ///}
22108 /// ```
22109 /// </details>
22110 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22111 pub enum PackConnectionAwsAccessKeyPatchType {
22112 #[serde(rename = "awsAccessKey")]
22113 AwsAccessKey,
22114 }
22115
22116 impl ::std::convert::From<&Self> for PackConnectionAwsAccessKeyPatchType {
22117 fn from(value: &PackConnectionAwsAccessKeyPatchType) -> Self {
22118 value.clone()
22119 }
22120 }
22121
22122 impl ::std::fmt::Display for PackConnectionAwsAccessKeyPatchType {
22123 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22124 match *self {
22125 Self::AwsAccessKey => f.write_str("awsAccessKey"),
22126 }
22127 }
22128 }
22129
22130 impl ::std::str::FromStr for PackConnectionAwsAccessKeyPatchType {
22131 type Err = self::error::ConversionError;
22132 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22133 match value {
22134 "awsAccessKey" => Ok(Self::AwsAccessKey),
22135 _ => Err("invalid value".into()),
22136 }
22137 }
22138 }
22139
22140 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAccessKeyPatchType {
22141 type Error = self::error::ConversionError;
22142 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22143 value.parse()
22144 }
22145 }
22146
22147 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAccessKeyPatchType {
22148 type Error = self::error::ConversionError;
22149 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22150 value.parse()
22151 }
22152 }
22153
22154 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAccessKeyPatchType {
22155 type Error = self::error::ConversionError;
22156 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22157 value.parse()
22158 }
22159 }
22160
22161 ///`PackConnectionAwsAssumeRoleCredentials`
22162 ///
22163 /// <details><summary>JSON schema</summary>
22164 ///
22165 /// ```json
22166 ///{
22167 /// "type": "object",
22168 /// "required": [
22169 /// "externalId",
22170 /// "roleArn",
22171 /// "type"
22172 /// ],
22173 /// "properties": {
22174 /// "externalId": {
22175 /// "type": "string"
22176 /// },
22177 /// "roleArn": {
22178 /// "type": "string"
22179 /// },
22180 /// "type": {
22181 /// "type": "string",
22182 /// "enum": [
22183 /// "awsAssumeRole"
22184 /// ],
22185 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22186 /// }
22187 /// },
22188 /// "additionalProperties": false,
22189 /// "x-schema-name": "PackConnectionAwsAssumeRoleCredentials"
22190 ///}
22191 /// ```
22192 /// </details>
22193 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22194 #[serde(deny_unknown_fields)]
22195 pub struct PackConnectionAwsAssumeRoleCredentials {
22196 #[serde(rename = "externalId")]
22197 pub external_id: ::std::string::String,
22198 #[serde(rename = "roleArn")]
22199 pub role_arn: ::std::string::String,
22200 #[serde(rename = "type")]
22201 pub type_: PackConnectionAwsAssumeRoleCredentialsType,
22202 }
22203
22204 impl ::std::convert::From<&PackConnectionAwsAssumeRoleCredentials> for PackConnectionAwsAssumeRoleCredentials {
22205 fn from(value: &PackConnectionAwsAssumeRoleCredentials) -> Self {
22206 value.clone()
22207 }
22208 }
22209
22210 ///`PackConnectionAwsAssumeRoleCredentialsType`
22211 ///
22212 /// <details><summary>JSON schema</summary>
22213 ///
22214 /// ```json
22215 ///{
22216 /// "type": "string",
22217 /// "enum": [
22218 /// "awsAssumeRole"
22219 /// ],
22220 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22221 ///}
22222 /// ```
22223 /// </details>
22224 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22225 pub enum PackConnectionAwsAssumeRoleCredentialsType {
22226 #[serde(rename = "awsAssumeRole")]
22227 AwsAssumeRole,
22228 }
22229
22230 impl ::std::convert::From<&Self> for PackConnectionAwsAssumeRoleCredentialsType {
22231 fn from(value: &PackConnectionAwsAssumeRoleCredentialsType) -> Self {
22232 value.clone()
22233 }
22234 }
22235
22236 impl ::std::fmt::Display for PackConnectionAwsAssumeRoleCredentialsType {
22237 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22238 match *self {
22239 Self::AwsAssumeRole => f.write_str("awsAssumeRole"),
22240 }
22241 }
22242 }
22243
22244 impl ::std::str::FromStr for PackConnectionAwsAssumeRoleCredentialsType {
22245 type Err = self::error::ConversionError;
22246 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22247 match value {
22248 "awsAssumeRole" => Ok(Self::AwsAssumeRole),
22249 _ => Err("invalid value".into()),
22250 }
22251 }
22252 }
22253
22254 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAssumeRoleCredentialsType {
22255 type Error = self::error::ConversionError;
22256 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22257 value.parse()
22258 }
22259 }
22260
22261 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAssumeRoleCredentialsType {
22262 type Error = self::error::ConversionError;
22263 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22264 value.parse()
22265 }
22266 }
22267
22268 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAssumeRoleCredentialsType {
22269 type Error = self::error::ConversionError;
22270 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22271 value.parse()
22272 }
22273 }
22274
22275 ///`PackConnectionAwsAssumeRoleMetadata`
22276 ///
22277 /// <details><summary>JSON schema</summary>
22278 ///
22279 /// ```json
22280 ///{
22281 /// "type": "object",
22282 /// "required": [
22283 /// "externalId",
22284 /// "roleArn",
22285 /// "service",
22286 /// "type"
22287 /// ],
22288 /// "properties": {
22289 /// "externalId": {
22290 /// "type": "string"
22291 /// },
22292 /// "roleArn": {
22293 /// "type": "string"
22294 /// },
22295 /// "service": {
22296 /// "type": "string"
22297 /// },
22298 /// "type": {
22299 /// "type": "string",
22300 /// "enum": [
22301 /// "awsAssumeRole"
22302 /// ],
22303 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22304 /// }
22305 /// },
22306 /// "additionalProperties": false,
22307 /// "x-schema-name": "PackConnectionAwsAssumeRoleMetadata"
22308 ///}
22309 /// ```
22310 /// </details>
22311 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22312 #[serde(deny_unknown_fields)]
22313 pub struct PackConnectionAwsAssumeRoleMetadata {
22314 #[serde(rename = "externalId")]
22315 pub external_id: ::std::string::String,
22316 #[serde(rename = "roleArn")]
22317 pub role_arn: ::std::string::String,
22318 pub service: ::std::string::String,
22319 #[serde(rename = "type")]
22320 pub type_: PackConnectionAwsAssumeRoleMetadataType,
22321 }
22322
22323 impl ::std::convert::From<&PackConnectionAwsAssumeRoleMetadata> for PackConnectionAwsAssumeRoleMetadata {
22324 fn from(value: &PackConnectionAwsAssumeRoleMetadata) -> Self {
22325 value.clone()
22326 }
22327 }
22328
22329 ///`PackConnectionAwsAssumeRoleMetadataType`
22330 ///
22331 /// <details><summary>JSON schema</summary>
22332 ///
22333 /// ```json
22334 ///{
22335 /// "type": "string",
22336 /// "enum": [
22337 /// "awsAssumeRole"
22338 /// ],
22339 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22340 ///}
22341 /// ```
22342 /// </details>
22343 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22344 pub enum PackConnectionAwsAssumeRoleMetadataType {
22345 #[serde(rename = "awsAssumeRole")]
22346 AwsAssumeRole,
22347 }
22348
22349 impl ::std::convert::From<&Self> for PackConnectionAwsAssumeRoleMetadataType {
22350 fn from(value: &PackConnectionAwsAssumeRoleMetadataType) -> Self {
22351 value.clone()
22352 }
22353 }
22354
22355 impl ::std::fmt::Display for PackConnectionAwsAssumeRoleMetadataType {
22356 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22357 match *self {
22358 Self::AwsAssumeRole => f.write_str("awsAssumeRole"),
22359 }
22360 }
22361 }
22362
22363 impl ::std::str::FromStr for PackConnectionAwsAssumeRoleMetadataType {
22364 type Err = self::error::ConversionError;
22365 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22366 match value {
22367 "awsAssumeRole" => Ok(Self::AwsAssumeRole),
22368 _ => Err("invalid value".into()),
22369 }
22370 }
22371 }
22372
22373 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAssumeRoleMetadataType {
22374 type Error = self::error::ConversionError;
22375 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22376 value.parse()
22377 }
22378 }
22379
22380 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAssumeRoleMetadataType {
22381 type Error = self::error::ConversionError;
22382 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22383 value.parse()
22384 }
22385 }
22386
22387 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAssumeRoleMetadataType {
22388 type Error = self::error::ConversionError;
22389 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22390 value.parse()
22391 }
22392 }
22393
22394 ///`PackConnectionAwsAssumeRolePatch`
22395 ///
22396 /// <details><summary>JSON schema</summary>
22397 ///
22398 /// ```json
22399 ///{
22400 /// "type": "object",
22401 /// "required": [
22402 /// "type"
22403 /// ],
22404 /// "properties": {
22405 /// "externalId": {
22406 /// "type": "string"
22407 /// },
22408 /// "roleArn": {
22409 /// "type": "string"
22410 /// },
22411 /// "type": {
22412 /// "type": "string",
22413 /// "enum": [
22414 /// "awsAssumeRole"
22415 /// ],
22416 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22417 /// }
22418 /// },
22419 /// "additionalProperties": false,
22420 /// "x-schema-name": "PackConnectionAwsAssumeRolePatch"
22421 ///}
22422 /// ```
22423 /// </details>
22424 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22425 #[serde(deny_unknown_fields)]
22426 pub struct PackConnectionAwsAssumeRolePatch {
22427 #[serde(rename = "externalId", default, skip_serializing_if = "::std::option::Option::is_none")]
22428 pub external_id: ::std::option::Option<::std::string::String>,
22429 #[serde(rename = "roleArn", default, skip_serializing_if = "::std::option::Option::is_none")]
22430 pub role_arn: ::std::option::Option<::std::string::String>,
22431 #[serde(rename = "type")]
22432 pub type_: PackConnectionAwsAssumeRolePatchType,
22433 }
22434
22435 impl ::std::convert::From<&PackConnectionAwsAssumeRolePatch> for PackConnectionAwsAssumeRolePatch {
22436 fn from(value: &PackConnectionAwsAssumeRolePatch) -> Self {
22437 value.clone()
22438 }
22439 }
22440
22441 ///`PackConnectionAwsAssumeRolePatchType`
22442 ///
22443 /// <details><summary>JSON schema</summary>
22444 ///
22445 /// ```json
22446 ///{
22447 /// "type": "string",
22448 /// "enum": [
22449 /// "awsAssumeRole"
22450 /// ],
22451 /// "x-tsType": "PackConnectionType.AwsAssumeRole"
22452 ///}
22453 /// ```
22454 /// </details>
22455 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22456 pub enum PackConnectionAwsAssumeRolePatchType {
22457 #[serde(rename = "awsAssumeRole")]
22458 AwsAssumeRole,
22459 }
22460
22461 impl ::std::convert::From<&Self> for PackConnectionAwsAssumeRolePatchType {
22462 fn from(value: &PackConnectionAwsAssumeRolePatchType) -> Self {
22463 value.clone()
22464 }
22465 }
22466
22467 impl ::std::fmt::Display for PackConnectionAwsAssumeRolePatchType {
22468 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22469 match *self {
22470 Self::AwsAssumeRole => f.write_str("awsAssumeRole"),
22471 }
22472 }
22473 }
22474
22475 impl ::std::str::FromStr for PackConnectionAwsAssumeRolePatchType {
22476 type Err = self::error::ConversionError;
22477 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22478 match value {
22479 "awsAssumeRole" => Ok(Self::AwsAssumeRole),
22480 _ => Err("invalid value".into()),
22481 }
22482 }
22483 }
22484
22485 impl ::std::convert::TryFrom<&str> for PackConnectionAwsAssumeRolePatchType {
22486 type Error = self::error::ConversionError;
22487 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22488 value.parse()
22489 }
22490 }
22491
22492 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionAwsAssumeRolePatchType {
22493 type Error = self::error::ConversionError;
22494 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22495 value.parse()
22496 }
22497 }
22498
22499 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionAwsAssumeRolePatchType {
22500 type Error = self::error::ConversionError;
22501 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22502 value.parse()
22503 }
22504 }
22505
22506 ///`PackConnectionCustomCredentials`
22507 ///
22508 /// <details><summary>JSON schema</summary>
22509 ///
22510 /// ```json
22511 ///{
22512 /// "type": "object",
22513 /// "required": [
22514 /// "params",
22515 /// "type"
22516 /// ],
22517 /// "properties": {
22518 /// "params": {
22519 /// "type": "array",
22520 /// "items": {
22521 /// "type": "object",
22522 /// "required": [
22523 /// "key",
22524 /// "value"
22525 /// ],
22526 /// "properties": {
22527 /// "key": {
22528 /// "type": "string"
22529 /// },
22530 /// "value": {
22531 /// "type": "string"
22532 /// }
22533 /// },
22534 /// "additionalProperties": false
22535 /// }
22536 /// },
22537 /// "type": {
22538 /// "type": "string",
22539 /// "enum": [
22540 /// "custom"
22541 /// ],
22542 /// "x-tsType": "PackConnectionType.Custom"
22543 /// }
22544 /// },
22545 /// "additionalProperties": false,
22546 /// "x-schema-name": "PackConnectionCustomCredentials"
22547 ///}
22548 /// ```
22549 /// </details>
22550 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22551 #[serde(deny_unknown_fields)]
22552 pub struct PackConnectionCustomCredentials {
22553 pub params: ::std::vec::Vec<PackConnectionCustomCredentialsParamsItem>,
22554 #[serde(rename = "type")]
22555 pub type_: PackConnectionCustomCredentialsType,
22556 }
22557
22558 impl ::std::convert::From<&PackConnectionCustomCredentials> for PackConnectionCustomCredentials {
22559 fn from(value: &PackConnectionCustomCredentials) -> Self {
22560 value.clone()
22561 }
22562 }
22563
22564 ///`PackConnectionCustomCredentialsParamsItem`
22565 ///
22566 /// <details><summary>JSON schema</summary>
22567 ///
22568 /// ```json
22569 ///{
22570 /// "type": "object",
22571 /// "required": [
22572 /// "key",
22573 /// "value"
22574 /// ],
22575 /// "properties": {
22576 /// "key": {
22577 /// "type": "string"
22578 /// },
22579 /// "value": {
22580 /// "type": "string"
22581 /// }
22582 /// },
22583 /// "additionalProperties": false
22584 ///}
22585 /// ```
22586 /// </details>
22587 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22588 #[serde(deny_unknown_fields)]
22589 pub struct PackConnectionCustomCredentialsParamsItem {
22590 pub key: ::std::string::String,
22591 pub value: ::std::string::String,
22592 }
22593
22594 impl ::std::convert::From<&PackConnectionCustomCredentialsParamsItem> for PackConnectionCustomCredentialsParamsItem {
22595 fn from(value: &PackConnectionCustomCredentialsParamsItem) -> Self {
22596 value.clone()
22597 }
22598 }
22599
22600 ///`PackConnectionCustomCredentialsType`
22601 ///
22602 /// <details><summary>JSON schema</summary>
22603 ///
22604 /// ```json
22605 ///{
22606 /// "type": "string",
22607 /// "enum": [
22608 /// "custom"
22609 /// ],
22610 /// "x-tsType": "PackConnectionType.Custom"
22611 ///}
22612 /// ```
22613 /// </details>
22614 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22615 pub enum PackConnectionCustomCredentialsType {
22616 #[serde(rename = "custom")]
22617 Custom,
22618 }
22619
22620 impl ::std::convert::From<&Self> for PackConnectionCustomCredentialsType {
22621 fn from(value: &PackConnectionCustomCredentialsType) -> Self {
22622 value.clone()
22623 }
22624 }
22625
22626 impl ::std::fmt::Display for PackConnectionCustomCredentialsType {
22627 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22628 match *self {
22629 Self::Custom => f.write_str("custom"),
22630 }
22631 }
22632 }
22633
22634 impl ::std::str::FromStr for PackConnectionCustomCredentialsType {
22635 type Err = self::error::ConversionError;
22636 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22637 match value {
22638 "custom" => Ok(Self::Custom),
22639 _ => Err("invalid value".into()),
22640 }
22641 }
22642 }
22643
22644 impl ::std::convert::TryFrom<&str> for PackConnectionCustomCredentialsType {
22645 type Error = self::error::ConversionError;
22646 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22647 value.parse()
22648 }
22649 }
22650
22651 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionCustomCredentialsType {
22652 type Error = self::error::ConversionError;
22653 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22654 value.parse()
22655 }
22656 }
22657
22658 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionCustomCredentialsType {
22659 type Error = self::error::ConversionError;
22660 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22661 value.parse()
22662 }
22663 }
22664
22665 ///`PackConnectionCustomMetadata`
22666 ///
22667 /// <details><summary>JSON schema</summary>
22668 ///
22669 /// ```json
22670 ///{
22671 /// "type": "object",
22672 /// "required": [
22673 /// "domain",
22674 /// "params",
22675 /// "presetKeys",
22676 /// "type"
22677 /// ],
22678 /// "properties": {
22679 /// "domain": {
22680 /// "description": "The domain corresponding to the pre-authorized
22681 /// network domain in the pack.",
22682 /// "type": "string"
22683 /// },
22684 /// "params": {
22685 /// "description": "An array of objects containing the parameter key
22686 /// and masked value.",
22687 /// "type": "array",
22688 /// "items": {
22689 /// "type": "object",
22690 /// "required": [
22691 /// "key",
22692 /// "maskedValue"
22693 /// ],
22694 /// "properties": {
22695 /// "key": {
22696 /// "type": "string"
22697 /// },
22698 /// "maskedValue": {
22699 /// "type": "string"
22700 /// }
22701 /// },
22702 /// "additionalProperties": false
22703 /// }
22704 /// },
22705 /// "presetKeys": {
22706 /// "description": "An array containing the keys of parameters
22707 /// specified by the authentication config.",
22708 /// "type": "array",
22709 /// "items": {
22710 /// "type": "string"
22711 /// }
22712 /// },
22713 /// "type": {
22714 /// "type": "string",
22715 /// "enum": [
22716 /// "custom"
22717 /// ],
22718 /// "x-tsType": "PackConnectionType.Custom"
22719 /// }
22720 /// },
22721 /// "additionalProperties": false,
22722 /// "x-schema-name": "PackConnectionCustomMetadata"
22723 ///}
22724 /// ```
22725 /// </details>
22726 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22727 #[serde(deny_unknown_fields)]
22728 pub struct PackConnectionCustomMetadata {
22729 ///The domain corresponding to the pre-authorized network domain in the
22730 /// pack.
22731 pub domain: ::std::string::String,
22732 ///An array of objects containing the parameter key and masked value.
22733 pub params: ::std::vec::Vec<PackConnectionCustomMetadataParamsItem>,
22734 ///An array containing the keys of parameters specified by the
22735 /// authentication config.
22736 #[serde(rename = "presetKeys")]
22737 pub preset_keys: ::std::vec::Vec<::std::string::String>,
22738 #[serde(rename = "type")]
22739 pub type_: PackConnectionCustomMetadataType,
22740 }
22741
22742 impl ::std::convert::From<&PackConnectionCustomMetadata> for PackConnectionCustomMetadata {
22743 fn from(value: &PackConnectionCustomMetadata) -> Self {
22744 value.clone()
22745 }
22746 }
22747
22748 ///`PackConnectionCustomMetadataParamsItem`
22749 ///
22750 /// <details><summary>JSON schema</summary>
22751 ///
22752 /// ```json
22753 ///{
22754 /// "type": "object",
22755 /// "required": [
22756 /// "key",
22757 /// "maskedValue"
22758 /// ],
22759 /// "properties": {
22760 /// "key": {
22761 /// "type": "string"
22762 /// },
22763 /// "maskedValue": {
22764 /// "type": "string"
22765 /// }
22766 /// },
22767 /// "additionalProperties": false
22768 ///}
22769 /// ```
22770 /// </details>
22771 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22772 #[serde(deny_unknown_fields)]
22773 pub struct PackConnectionCustomMetadataParamsItem {
22774 pub key: ::std::string::String,
22775 #[serde(rename = "maskedValue")]
22776 pub masked_value: ::std::string::String,
22777 }
22778
22779 impl ::std::convert::From<&PackConnectionCustomMetadataParamsItem> for PackConnectionCustomMetadataParamsItem {
22780 fn from(value: &PackConnectionCustomMetadataParamsItem) -> Self {
22781 value.clone()
22782 }
22783 }
22784
22785 ///`PackConnectionCustomMetadataType`
22786 ///
22787 /// <details><summary>JSON schema</summary>
22788 ///
22789 /// ```json
22790 ///{
22791 /// "type": "string",
22792 /// "enum": [
22793 /// "custom"
22794 /// ],
22795 /// "x-tsType": "PackConnectionType.Custom"
22796 ///}
22797 /// ```
22798 /// </details>
22799 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22800 pub enum PackConnectionCustomMetadataType {
22801 #[serde(rename = "custom")]
22802 Custom,
22803 }
22804
22805 impl ::std::convert::From<&Self> for PackConnectionCustomMetadataType {
22806 fn from(value: &PackConnectionCustomMetadataType) -> Self {
22807 value.clone()
22808 }
22809 }
22810
22811 impl ::std::fmt::Display for PackConnectionCustomMetadataType {
22812 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22813 match *self {
22814 Self::Custom => f.write_str("custom"),
22815 }
22816 }
22817 }
22818
22819 impl ::std::str::FromStr for PackConnectionCustomMetadataType {
22820 type Err = self::error::ConversionError;
22821 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22822 match value {
22823 "custom" => Ok(Self::Custom),
22824 _ => Err("invalid value".into()),
22825 }
22826 }
22827 }
22828
22829 impl ::std::convert::TryFrom<&str> for PackConnectionCustomMetadataType {
22830 type Error = self::error::ConversionError;
22831 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22832 value.parse()
22833 }
22834 }
22835
22836 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionCustomMetadataType {
22837 type Error = self::error::ConversionError;
22838 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22839 value.parse()
22840 }
22841 }
22842
22843 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionCustomMetadataType {
22844 type Error = self::error::ConversionError;
22845 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22846 value.parse()
22847 }
22848 }
22849
22850 ///`PackConnectionCustomPatch`
22851 ///
22852 /// <details><summary>JSON schema</summary>
22853 ///
22854 /// ```json
22855 ///{
22856 /// "type": "object",
22857 /// "required": [
22858 /// "type"
22859 /// ],
22860 /// "properties": {
22861 /// "paramsToPatch": {
22862 /// "type": "array",
22863 /// "items": {
22864 /// "type": "object",
22865 /// "required": [
22866 /// "key",
22867 /// "value"
22868 /// ],
22869 /// "properties": {
22870 /// "key": {
22871 /// "type": "string"
22872 /// },
22873 /// "value": {
22874 /// "type": "string"
22875 /// }
22876 /// },
22877 /// "additionalProperties": false
22878 /// }
22879 /// },
22880 /// "type": {
22881 /// "type": "string",
22882 /// "enum": [
22883 /// "custom"
22884 /// ],
22885 /// "x-tsType": "PackConnectionType.Custom"
22886 /// }
22887 /// },
22888 /// "additionalProperties": false,
22889 /// "x-schema-name": "PackConnectionCustomPatch"
22890 ///}
22891 /// ```
22892 /// </details>
22893 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22894 #[serde(deny_unknown_fields)]
22895 pub struct PackConnectionCustomPatch {
22896 #[serde(rename = "paramsToPatch", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
22897 pub params_to_patch: ::std::vec::Vec<PackConnectionCustomPatchParamsToPatchItem>,
22898 #[serde(rename = "type")]
22899 pub type_: PackConnectionCustomPatchType,
22900 }
22901
22902 impl ::std::convert::From<&PackConnectionCustomPatch> for PackConnectionCustomPatch {
22903 fn from(value: &PackConnectionCustomPatch) -> Self {
22904 value.clone()
22905 }
22906 }
22907
22908 ///`PackConnectionCustomPatchParamsToPatchItem`
22909 ///
22910 /// <details><summary>JSON schema</summary>
22911 ///
22912 /// ```json
22913 ///{
22914 /// "type": "object",
22915 /// "required": [
22916 /// "key",
22917 /// "value"
22918 /// ],
22919 /// "properties": {
22920 /// "key": {
22921 /// "type": "string"
22922 /// },
22923 /// "value": {
22924 /// "type": "string"
22925 /// }
22926 /// },
22927 /// "additionalProperties": false
22928 ///}
22929 /// ```
22930 /// </details>
22931 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22932 #[serde(deny_unknown_fields)]
22933 pub struct PackConnectionCustomPatchParamsToPatchItem {
22934 pub key: ::std::string::String,
22935 pub value: ::std::string::String,
22936 }
22937
22938 impl ::std::convert::From<&PackConnectionCustomPatchParamsToPatchItem> for PackConnectionCustomPatchParamsToPatchItem {
22939 fn from(value: &PackConnectionCustomPatchParamsToPatchItem) -> Self {
22940 value.clone()
22941 }
22942 }
22943
22944 ///`PackConnectionCustomPatchType`
22945 ///
22946 /// <details><summary>JSON schema</summary>
22947 ///
22948 /// ```json
22949 ///{
22950 /// "type": "string",
22951 /// "enum": [
22952 /// "custom"
22953 /// ],
22954 /// "x-tsType": "PackConnectionType.Custom"
22955 ///}
22956 /// ```
22957 /// </details>
22958 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22959 pub enum PackConnectionCustomPatchType {
22960 #[serde(rename = "custom")]
22961 Custom,
22962 }
22963
22964 impl ::std::convert::From<&Self> for PackConnectionCustomPatchType {
22965 fn from(value: &PackConnectionCustomPatchType) -> Self {
22966 value.clone()
22967 }
22968 }
22969
22970 impl ::std::fmt::Display for PackConnectionCustomPatchType {
22971 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22972 match *self {
22973 Self::Custom => f.write_str("custom"),
22974 }
22975 }
22976 }
22977
22978 impl ::std::str::FromStr for PackConnectionCustomPatchType {
22979 type Err = self::error::ConversionError;
22980 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22981 match value {
22982 "custom" => Ok(Self::Custom),
22983 _ => Err("invalid value".into()),
22984 }
22985 }
22986 }
22987
22988 impl ::std::convert::TryFrom<&str> for PackConnectionCustomPatchType {
22989 type Error = self::error::ConversionError;
22990 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22991 value.parse()
22992 }
22993 }
22994
22995 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionCustomPatchType {
22996 type Error = self::error::ConversionError;
22997 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
22998 value.parse()
22999 }
23000 }
23001
23002 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionCustomPatchType {
23003 type Error = self::error::ConversionError;
23004 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23005 value.parse()
23006 }
23007 }
23008
23009 ///`PackConnectionGoogleServiceAccountCredentials`
23010 ///
23011 /// <details><summary>JSON schema</summary>
23012 ///
23013 /// ```json
23014 ///{
23015 /// "type": "object",
23016 /// "required": [
23017 /// "serviceAccountKey",
23018 /// "type"
23019 /// ],
23020 /// "properties": {
23021 /// "serviceAccountKey": {
23022 /// "type": "string"
23023 /// },
23024 /// "type": {
23025 /// "type": "string",
23026 /// "enum": [
23027 /// "googleServiceAccount"
23028 /// ],
23029 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23030 /// }
23031 /// },
23032 /// "additionalProperties": false,
23033 /// "x-schema-name": "PackConnectionGoogleServiceAccountCredentials"
23034 ///}
23035 /// ```
23036 /// </details>
23037 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23038 #[serde(deny_unknown_fields)]
23039 pub struct PackConnectionGoogleServiceAccountCredentials {
23040 #[serde(rename = "serviceAccountKey")]
23041 pub service_account_key: ::std::string::String,
23042 #[serde(rename = "type")]
23043 pub type_: PackConnectionGoogleServiceAccountCredentialsType,
23044 }
23045
23046 impl ::std::convert::From<&PackConnectionGoogleServiceAccountCredentials> for PackConnectionGoogleServiceAccountCredentials {
23047 fn from(value: &PackConnectionGoogleServiceAccountCredentials) -> Self {
23048 value.clone()
23049 }
23050 }
23051
23052 ///`PackConnectionGoogleServiceAccountCredentialsType`
23053 ///
23054 /// <details><summary>JSON schema</summary>
23055 ///
23056 /// ```json
23057 ///{
23058 /// "type": "string",
23059 /// "enum": [
23060 /// "googleServiceAccount"
23061 /// ],
23062 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23063 ///}
23064 /// ```
23065 /// </details>
23066 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23067 pub enum PackConnectionGoogleServiceAccountCredentialsType {
23068 #[serde(rename = "googleServiceAccount")]
23069 GoogleServiceAccount,
23070 }
23071
23072 impl ::std::convert::From<&Self> for PackConnectionGoogleServiceAccountCredentialsType {
23073 fn from(value: &PackConnectionGoogleServiceAccountCredentialsType) -> Self {
23074 value.clone()
23075 }
23076 }
23077
23078 impl ::std::fmt::Display for PackConnectionGoogleServiceAccountCredentialsType {
23079 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23080 match *self {
23081 Self::GoogleServiceAccount => f.write_str("googleServiceAccount"),
23082 }
23083 }
23084 }
23085
23086 impl ::std::str::FromStr for PackConnectionGoogleServiceAccountCredentialsType {
23087 type Err = self::error::ConversionError;
23088 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23089 match value {
23090 "googleServiceAccount" => Ok(Self::GoogleServiceAccount),
23091 _ => Err("invalid value".into()),
23092 }
23093 }
23094 }
23095
23096 impl ::std::convert::TryFrom<&str> for PackConnectionGoogleServiceAccountCredentialsType {
23097 type Error = self::error::ConversionError;
23098 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23099 value.parse()
23100 }
23101 }
23102
23103 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionGoogleServiceAccountCredentialsType {
23104 type Error = self::error::ConversionError;
23105 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23106 value.parse()
23107 }
23108 }
23109
23110 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionGoogleServiceAccountCredentialsType {
23111 type Error = self::error::ConversionError;
23112 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23113 value.parse()
23114 }
23115 }
23116
23117 ///`PackConnectionGoogleServiceAccountMetadata`
23118 ///
23119 /// <details><summary>JSON schema</summary>
23120 ///
23121 /// ```json
23122 ///{
23123 /// "type": "object",
23124 /// "required": [
23125 /// "maskedServiceAccountKey",
23126 /// "type"
23127 /// ],
23128 /// "properties": {
23129 /// "maskedServiceAccountKey": {
23130 /// "type": "string"
23131 /// },
23132 /// "type": {
23133 /// "type": "string",
23134 /// "enum": [
23135 /// "googleServiceAccount"
23136 /// ],
23137 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23138 /// }
23139 /// },
23140 /// "additionalProperties": false,
23141 /// "x-schema-name": "PackConnectionGoogleServiceAccountMetadata"
23142 ///}
23143 /// ```
23144 /// </details>
23145 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23146 #[serde(deny_unknown_fields)]
23147 pub struct PackConnectionGoogleServiceAccountMetadata {
23148 #[serde(rename = "maskedServiceAccountKey")]
23149 pub masked_service_account_key: ::std::string::String,
23150 #[serde(rename = "type")]
23151 pub type_: PackConnectionGoogleServiceAccountMetadataType,
23152 }
23153
23154 impl ::std::convert::From<&PackConnectionGoogleServiceAccountMetadata> for PackConnectionGoogleServiceAccountMetadata {
23155 fn from(value: &PackConnectionGoogleServiceAccountMetadata) -> Self {
23156 value.clone()
23157 }
23158 }
23159
23160 ///`PackConnectionGoogleServiceAccountMetadataType`
23161 ///
23162 /// <details><summary>JSON schema</summary>
23163 ///
23164 /// ```json
23165 ///{
23166 /// "type": "string",
23167 /// "enum": [
23168 /// "googleServiceAccount"
23169 /// ],
23170 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23171 ///}
23172 /// ```
23173 /// </details>
23174 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23175 pub enum PackConnectionGoogleServiceAccountMetadataType {
23176 #[serde(rename = "googleServiceAccount")]
23177 GoogleServiceAccount,
23178 }
23179
23180 impl ::std::convert::From<&Self> for PackConnectionGoogleServiceAccountMetadataType {
23181 fn from(value: &PackConnectionGoogleServiceAccountMetadataType) -> Self {
23182 value.clone()
23183 }
23184 }
23185
23186 impl ::std::fmt::Display for PackConnectionGoogleServiceAccountMetadataType {
23187 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23188 match *self {
23189 Self::GoogleServiceAccount => f.write_str("googleServiceAccount"),
23190 }
23191 }
23192 }
23193
23194 impl ::std::str::FromStr for PackConnectionGoogleServiceAccountMetadataType {
23195 type Err = self::error::ConversionError;
23196 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23197 match value {
23198 "googleServiceAccount" => Ok(Self::GoogleServiceAccount),
23199 _ => Err("invalid value".into()),
23200 }
23201 }
23202 }
23203
23204 impl ::std::convert::TryFrom<&str> for PackConnectionGoogleServiceAccountMetadataType {
23205 type Error = self::error::ConversionError;
23206 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23207 value.parse()
23208 }
23209 }
23210
23211 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionGoogleServiceAccountMetadataType {
23212 type Error = self::error::ConversionError;
23213 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23214 value.parse()
23215 }
23216 }
23217
23218 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionGoogleServiceAccountMetadataType {
23219 type Error = self::error::ConversionError;
23220 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23221 value.parse()
23222 }
23223 }
23224
23225 ///`PackConnectionGoogleServiceAccountPatch`
23226 ///
23227 /// <details><summary>JSON schema</summary>
23228 ///
23229 /// ```json
23230 ///{
23231 /// "type": "object",
23232 /// "required": [
23233 /// "type"
23234 /// ],
23235 /// "properties": {
23236 /// "serviceAccountKey": {
23237 /// "type": "string",
23238 /// "maxLength": 512
23239 /// },
23240 /// "type": {
23241 /// "type": "string",
23242 /// "enum": [
23243 /// "googleServiceAccount"
23244 /// ],
23245 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23246 /// }
23247 /// },
23248 /// "additionalProperties": false,
23249 /// "x-schema-name": "PackConnectionGoogleServiceAccountPatch"
23250 ///}
23251 /// ```
23252 /// </details>
23253 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23254 #[serde(deny_unknown_fields)]
23255 pub struct PackConnectionGoogleServiceAccountPatch {
23256 #[serde(rename = "serviceAccountKey", default, skip_serializing_if = "::std::option::Option::is_none")]
23257 pub service_account_key: ::std::option::Option<PackConnectionGoogleServiceAccountPatchServiceAccountKey>,
23258 #[serde(rename = "type")]
23259 pub type_: PackConnectionGoogleServiceAccountPatchType,
23260 }
23261
23262 impl ::std::convert::From<&PackConnectionGoogleServiceAccountPatch> for PackConnectionGoogleServiceAccountPatch {
23263 fn from(value: &PackConnectionGoogleServiceAccountPatch) -> Self {
23264 value.clone()
23265 }
23266 }
23267
23268 ///`PackConnectionGoogleServiceAccountPatchServiceAccountKey`
23269 ///
23270 /// <details><summary>JSON schema</summary>
23271 ///
23272 /// ```json
23273 ///{
23274 /// "type": "string",
23275 /// "maxLength": 512
23276 ///}
23277 /// ```
23278 /// </details>
23279 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23280 #[serde(transparent)]
23281 pub struct PackConnectionGoogleServiceAccountPatchServiceAccountKey(::std::string::String);
23282 impl ::std::ops::Deref for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23283 type Target = ::std::string::String;
23284 fn deref(&self) -> &::std::string::String {
23285 &self.0
23286 }
23287 }
23288
23289 impl ::std::convert::From<PackConnectionGoogleServiceAccountPatchServiceAccountKey> for ::std::string::String {
23290 fn from(value: PackConnectionGoogleServiceAccountPatchServiceAccountKey) -> Self {
23291 value.0
23292 }
23293 }
23294
23295 impl ::std::convert::From<&PackConnectionGoogleServiceAccountPatchServiceAccountKey> for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23296 fn from(value: &PackConnectionGoogleServiceAccountPatchServiceAccountKey) -> Self {
23297 value.clone()
23298 }
23299 }
23300
23301 impl ::std::str::FromStr for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23302 type Err = self::error::ConversionError;
23303 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23304 if value.chars().count() > 512usize {
23305 return Err("longer than 512 characters".into());
23306 }
23307 Ok(Self(value.to_string()))
23308 }
23309 }
23310
23311 impl ::std::convert::TryFrom<&str> for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23312 type Error = self::error::ConversionError;
23313 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23314 value.parse()
23315 }
23316 }
23317
23318 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23319 type Error = self::error::ConversionError;
23320 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23321 value.parse()
23322 }
23323 }
23324
23325 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23326 type Error = self::error::ConversionError;
23327 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23328 value.parse()
23329 }
23330 }
23331
23332 impl<'de> ::serde::Deserialize<'de> for PackConnectionGoogleServiceAccountPatchServiceAccountKey {
23333 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
23334 where
23335 D: ::serde::Deserializer<'de>,
23336 {
23337 ::std::string::String::deserialize(deserializer)?
23338 .parse()
23339 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
23340 }
23341 }
23342
23343 ///`PackConnectionGoogleServiceAccountPatchType`
23344 ///
23345 /// <details><summary>JSON schema</summary>
23346 ///
23347 /// ```json
23348 ///{
23349 /// "type": "string",
23350 /// "enum": [
23351 /// "googleServiceAccount"
23352 /// ],
23353 /// "x-tsType": "PackConnectionType.GoogleServiceAccount"
23354 ///}
23355 /// ```
23356 /// </details>
23357 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23358 pub enum PackConnectionGoogleServiceAccountPatchType {
23359 #[serde(rename = "googleServiceAccount")]
23360 GoogleServiceAccount,
23361 }
23362
23363 impl ::std::convert::From<&Self> for PackConnectionGoogleServiceAccountPatchType {
23364 fn from(value: &PackConnectionGoogleServiceAccountPatchType) -> Self {
23365 value.clone()
23366 }
23367 }
23368
23369 impl ::std::fmt::Display for PackConnectionGoogleServiceAccountPatchType {
23370 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23371 match *self {
23372 Self::GoogleServiceAccount => f.write_str("googleServiceAccount"),
23373 }
23374 }
23375 }
23376
23377 impl ::std::str::FromStr for PackConnectionGoogleServiceAccountPatchType {
23378 type Err = self::error::ConversionError;
23379 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23380 match value {
23381 "googleServiceAccount" => Ok(Self::GoogleServiceAccount),
23382 _ => Err("invalid value".into()),
23383 }
23384 }
23385 }
23386
23387 impl ::std::convert::TryFrom<&str> for PackConnectionGoogleServiceAccountPatchType {
23388 type Error = self::error::ConversionError;
23389 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23390 value.parse()
23391 }
23392 }
23393
23394 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionGoogleServiceAccountPatchType {
23395 type Error = self::error::ConversionError;
23396 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23397 value.parse()
23398 }
23399 }
23400
23401 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionGoogleServiceAccountPatchType {
23402 type Error = self::error::ConversionError;
23403 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23404 value.parse()
23405 }
23406 }
23407
23408 ///`PackConnectionHeaderCredentials`
23409 ///
23410 /// <details><summary>JSON schema</summary>
23411 ///
23412 /// ```json
23413 ///{
23414 /// "type": "object",
23415 /// "required": [
23416 /// "token",
23417 /// "type"
23418 /// ],
23419 /// "properties": {
23420 /// "token": {
23421 /// "type": "string"
23422 /// },
23423 /// "type": {
23424 /// "type": "string",
23425 /// "enum": [
23426 /// "header"
23427 /// ],
23428 /// "x-tsType": "PackConnectionType.Header"
23429 /// }
23430 /// },
23431 /// "additionalProperties": false,
23432 /// "x-schema-name": "PackConnectionHeaderCredentials"
23433 ///}
23434 /// ```
23435 /// </details>
23436 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23437 #[serde(deny_unknown_fields)]
23438 pub struct PackConnectionHeaderCredentials {
23439 pub token: ::std::string::String,
23440 #[serde(rename = "type")]
23441 pub type_: PackConnectionHeaderCredentialsType,
23442 }
23443
23444 impl ::std::convert::From<&PackConnectionHeaderCredentials> for PackConnectionHeaderCredentials {
23445 fn from(value: &PackConnectionHeaderCredentials) -> Self {
23446 value.clone()
23447 }
23448 }
23449
23450 ///`PackConnectionHeaderCredentialsType`
23451 ///
23452 /// <details><summary>JSON schema</summary>
23453 ///
23454 /// ```json
23455 ///{
23456 /// "type": "string",
23457 /// "enum": [
23458 /// "header"
23459 /// ],
23460 /// "x-tsType": "PackConnectionType.Header"
23461 ///}
23462 /// ```
23463 /// </details>
23464 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23465 pub enum PackConnectionHeaderCredentialsType {
23466 #[serde(rename = "header")]
23467 Header,
23468 }
23469
23470 impl ::std::convert::From<&Self> for PackConnectionHeaderCredentialsType {
23471 fn from(value: &PackConnectionHeaderCredentialsType) -> Self {
23472 value.clone()
23473 }
23474 }
23475
23476 impl ::std::fmt::Display for PackConnectionHeaderCredentialsType {
23477 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23478 match *self {
23479 Self::Header => f.write_str("header"),
23480 }
23481 }
23482 }
23483
23484 impl ::std::str::FromStr for PackConnectionHeaderCredentialsType {
23485 type Err = self::error::ConversionError;
23486 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23487 match value {
23488 "header" => Ok(Self::Header),
23489 _ => Err("invalid value".into()),
23490 }
23491 }
23492 }
23493
23494 impl ::std::convert::TryFrom<&str> for PackConnectionHeaderCredentialsType {
23495 type Error = self::error::ConversionError;
23496 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23497 value.parse()
23498 }
23499 }
23500
23501 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHeaderCredentialsType {
23502 type Error = self::error::ConversionError;
23503 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23504 value.parse()
23505 }
23506 }
23507
23508 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHeaderCredentialsType {
23509 type Error = self::error::ConversionError;
23510 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23511 value.parse()
23512 }
23513 }
23514
23515 ///`PackConnectionHeaderMetadata`
23516 ///
23517 /// <details><summary>JSON schema</summary>
23518 ///
23519 /// ```json
23520 ///{
23521 /// "type": "object",
23522 /// "required": [
23523 /// "headerName",
23524 /// "tokenPrefix",
23525 /// "type"
23526 /// ],
23527 /// "properties": {
23528 /// "headerName": {
23529 /// "type": "string"
23530 /// },
23531 /// "maskedToken": {
23532 /// "type": "string"
23533 /// },
23534 /// "tokenPrefix": {
23535 /// "type": "string"
23536 /// },
23537 /// "type": {
23538 /// "type": "string",
23539 /// "enum": [
23540 /// "header"
23541 /// ],
23542 /// "x-tsType": "PackConnectionType.Header"
23543 /// }
23544 /// },
23545 /// "additionalProperties": false,
23546 /// "x-schema-name": "PackConnectionHeaderMetadata"
23547 ///}
23548 /// ```
23549 /// </details>
23550 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23551 #[serde(deny_unknown_fields)]
23552 pub struct PackConnectionHeaderMetadata {
23553 #[serde(rename = "headerName")]
23554 pub header_name: ::std::string::String,
23555 #[serde(rename = "maskedToken", default, skip_serializing_if = "::std::option::Option::is_none")]
23556 pub masked_token: ::std::option::Option<::std::string::String>,
23557 #[serde(rename = "tokenPrefix")]
23558 pub token_prefix: ::std::string::String,
23559 #[serde(rename = "type")]
23560 pub type_: PackConnectionHeaderMetadataType,
23561 }
23562
23563 impl ::std::convert::From<&PackConnectionHeaderMetadata> for PackConnectionHeaderMetadata {
23564 fn from(value: &PackConnectionHeaderMetadata) -> Self {
23565 value.clone()
23566 }
23567 }
23568
23569 ///`PackConnectionHeaderMetadataType`
23570 ///
23571 /// <details><summary>JSON schema</summary>
23572 ///
23573 /// ```json
23574 ///{
23575 /// "type": "string",
23576 /// "enum": [
23577 /// "header"
23578 /// ],
23579 /// "x-tsType": "PackConnectionType.Header"
23580 ///}
23581 /// ```
23582 /// </details>
23583 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23584 pub enum PackConnectionHeaderMetadataType {
23585 #[serde(rename = "header")]
23586 Header,
23587 }
23588
23589 impl ::std::convert::From<&Self> for PackConnectionHeaderMetadataType {
23590 fn from(value: &PackConnectionHeaderMetadataType) -> Self {
23591 value.clone()
23592 }
23593 }
23594
23595 impl ::std::fmt::Display for PackConnectionHeaderMetadataType {
23596 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23597 match *self {
23598 Self::Header => f.write_str("header"),
23599 }
23600 }
23601 }
23602
23603 impl ::std::str::FromStr for PackConnectionHeaderMetadataType {
23604 type Err = self::error::ConversionError;
23605 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23606 match value {
23607 "header" => Ok(Self::Header),
23608 _ => Err("invalid value".into()),
23609 }
23610 }
23611 }
23612
23613 impl ::std::convert::TryFrom<&str> for PackConnectionHeaderMetadataType {
23614 type Error = self::error::ConversionError;
23615 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23616 value.parse()
23617 }
23618 }
23619
23620 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHeaderMetadataType {
23621 type Error = self::error::ConversionError;
23622 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23623 value.parse()
23624 }
23625 }
23626
23627 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHeaderMetadataType {
23628 type Error = self::error::ConversionError;
23629 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23630 value.parse()
23631 }
23632 }
23633
23634 ///`PackConnectionHeaderPatch`
23635 ///
23636 /// <details><summary>JSON schema</summary>
23637 ///
23638 /// ```json
23639 ///{
23640 /// "type": "object",
23641 /// "required": [
23642 /// "type"
23643 /// ],
23644 /// "properties": {
23645 /// "token": {
23646 /// "type": "string"
23647 /// },
23648 /// "type": {
23649 /// "type": "string",
23650 /// "enum": [
23651 /// "header"
23652 /// ],
23653 /// "x-tsType": "PackConnectionType.Header"
23654 /// }
23655 /// },
23656 /// "additionalProperties": false,
23657 /// "x-schema-name": "PackConnectionHeaderPatch"
23658 ///}
23659 /// ```
23660 /// </details>
23661 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23662 #[serde(deny_unknown_fields)]
23663 pub struct PackConnectionHeaderPatch {
23664 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23665 pub token: ::std::option::Option<::std::string::String>,
23666 #[serde(rename = "type")]
23667 pub type_: PackConnectionHeaderPatchType,
23668 }
23669
23670 impl ::std::convert::From<&PackConnectionHeaderPatch> for PackConnectionHeaderPatch {
23671 fn from(value: &PackConnectionHeaderPatch) -> Self {
23672 value.clone()
23673 }
23674 }
23675
23676 ///`PackConnectionHeaderPatchType`
23677 ///
23678 /// <details><summary>JSON schema</summary>
23679 ///
23680 /// ```json
23681 ///{
23682 /// "type": "string",
23683 /// "enum": [
23684 /// "header"
23685 /// ],
23686 /// "x-tsType": "PackConnectionType.Header"
23687 ///}
23688 /// ```
23689 /// </details>
23690 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23691 pub enum PackConnectionHeaderPatchType {
23692 #[serde(rename = "header")]
23693 Header,
23694 }
23695
23696 impl ::std::convert::From<&Self> for PackConnectionHeaderPatchType {
23697 fn from(value: &PackConnectionHeaderPatchType) -> Self {
23698 value.clone()
23699 }
23700 }
23701
23702 impl ::std::fmt::Display for PackConnectionHeaderPatchType {
23703 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23704 match *self {
23705 Self::Header => f.write_str("header"),
23706 }
23707 }
23708 }
23709
23710 impl ::std::str::FromStr for PackConnectionHeaderPatchType {
23711 type Err = self::error::ConversionError;
23712 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23713 match value {
23714 "header" => Ok(Self::Header),
23715 _ => Err("invalid value".into()),
23716 }
23717 }
23718 }
23719
23720 impl ::std::convert::TryFrom<&str> for PackConnectionHeaderPatchType {
23721 type Error = self::error::ConversionError;
23722 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23723 value.parse()
23724 }
23725 }
23726
23727 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHeaderPatchType {
23728 type Error = self::error::ConversionError;
23729 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23730 value.parse()
23731 }
23732 }
23733
23734 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHeaderPatchType {
23735 type Error = self::error::ConversionError;
23736 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23737 value.parse()
23738 }
23739 }
23740
23741 ///`PackConnectionHttpBasicCredentials`
23742 ///
23743 /// <details><summary>JSON schema</summary>
23744 ///
23745 /// ```json
23746 ///{
23747 /// "type": "object",
23748 /// "required": [
23749 /// "type",
23750 /// "username"
23751 /// ],
23752 /// "properties": {
23753 /// "password": {
23754 /// "type": "string",
23755 /// "x-allow-empty": true
23756 /// },
23757 /// "type": {
23758 /// "type": "string",
23759 /// "enum": [
23760 /// "httpBasic"
23761 /// ],
23762 /// "x-tsType": "PackConnectionType.HttpBasic"
23763 /// },
23764 /// "username": {
23765 /// "type": "string"
23766 /// }
23767 /// },
23768 /// "additionalProperties": false,
23769 /// "x-schema-name": "PackConnectionHttpBasicCredentials"
23770 ///}
23771 /// ```
23772 /// </details>
23773 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23774 #[serde(deny_unknown_fields)]
23775 pub struct PackConnectionHttpBasicCredentials {
23776 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23777 pub password: ::std::option::Option<::std::string::String>,
23778 #[serde(rename = "type")]
23779 pub type_: PackConnectionHttpBasicCredentialsType,
23780 pub username: ::std::string::String,
23781 }
23782
23783 impl ::std::convert::From<&PackConnectionHttpBasicCredentials> for PackConnectionHttpBasicCredentials {
23784 fn from(value: &PackConnectionHttpBasicCredentials) -> Self {
23785 value.clone()
23786 }
23787 }
23788
23789 ///`PackConnectionHttpBasicCredentialsType`
23790 ///
23791 /// <details><summary>JSON schema</summary>
23792 ///
23793 /// ```json
23794 ///{
23795 /// "type": "string",
23796 /// "enum": [
23797 /// "httpBasic"
23798 /// ],
23799 /// "x-tsType": "PackConnectionType.HttpBasic"
23800 ///}
23801 /// ```
23802 /// </details>
23803 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23804 pub enum PackConnectionHttpBasicCredentialsType {
23805 #[serde(rename = "httpBasic")]
23806 HttpBasic,
23807 }
23808
23809 impl ::std::convert::From<&Self> for PackConnectionHttpBasicCredentialsType {
23810 fn from(value: &PackConnectionHttpBasicCredentialsType) -> Self {
23811 value.clone()
23812 }
23813 }
23814
23815 impl ::std::fmt::Display for PackConnectionHttpBasicCredentialsType {
23816 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23817 match *self {
23818 Self::HttpBasic => f.write_str("httpBasic"),
23819 }
23820 }
23821 }
23822
23823 impl ::std::str::FromStr for PackConnectionHttpBasicCredentialsType {
23824 type Err = self::error::ConversionError;
23825 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23826 match value {
23827 "httpBasic" => Ok(Self::HttpBasic),
23828 _ => Err("invalid value".into()),
23829 }
23830 }
23831 }
23832
23833 impl ::std::convert::TryFrom<&str> for PackConnectionHttpBasicCredentialsType {
23834 type Error = self::error::ConversionError;
23835 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23836 value.parse()
23837 }
23838 }
23839
23840 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHttpBasicCredentialsType {
23841 type Error = self::error::ConversionError;
23842 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23843 value.parse()
23844 }
23845 }
23846
23847 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHttpBasicCredentialsType {
23848 type Error = self::error::ConversionError;
23849 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23850 value.parse()
23851 }
23852 }
23853
23854 ///`PackConnectionHttpBasicMetadata`
23855 ///
23856 /// <details><summary>JSON schema</summary>
23857 ///
23858 /// ```json
23859 ///{
23860 /// "type": "object",
23861 /// "required": [
23862 /// "type"
23863 /// ],
23864 /// "properties": {
23865 /// "maskedPassword": {
23866 /// "type": "string"
23867 /// },
23868 /// "maskedUsername": {
23869 /// "type": "string"
23870 /// },
23871 /// "type": {
23872 /// "type": "string",
23873 /// "enum": [
23874 /// "httpBasic"
23875 /// ],
23876 /// "x-tsType": "PackConnectionType.HttpBasic"
23877 /// }
23878 /// },
23879 /// "additionalProperties": false,
23880 /// "x-schema-name": "PackConnectionHttpBasicMetadata"
23881 ///}
23882 /// ```
23883 /// </details>
23884 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23885 #[serde(deny_unknown_fields)]
23886 pub struct PackConnectionHttpBasicMetadata {
23887 #[serde(rename = "maskedPassword", default, skip_serializing_if = "::std::option::Option::is_none")]
23888 pub masked_password: ::std::option::Option<::std::string::String>,
23889 #[serde(rename = "maskedUsername", default, skip_serializing_if = "::std::option::Option::is_none")]
23890 pub masked_username: ::std::option::Option<::std::string::String>,
23891 #[serde(rename = "type")]
23892 pub type_: PackConnectionHttpBasicMetadataType,
23893 }
23894
23895 impl ::std::convert::From<&PackConnectionHttpBasicMetadata> for PackConnectionHttpBasicMetadata {
23896 fn from(value: &PackConnectionHttpBasicMetadata) -> Self {
23897 value.clone()
23898 }
23899 }
23900
23901 ///`PackConnectionHttpBasicMetadataType`
23902 ///
23903 /// <details><summary>JSON schema</summary>
23904 ///
23905 /// ```json
23906 ///{
23907 /// "type": "string",
23908 /// "enum": [
23909 /// "httpBasic"
23910 /// ],
23911 /// "x-tsType": "PackConnectionType.HttpBasic"
23912 ///}
23913 /// ```
23914 /// </details>
23915 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23916 pub enum PackConnectionHttpBasicMetadataType {
23917 #[serde(rename = "httpBasic")]
23918 HttpBasic,
23919 }
23920
23921 impl ::std::convert::From<&Self> for PackConnectionHttpBasicMetadataType {
23922 fn from(value: &PackConnectionHttpBasicMetadataType) -> Self {
23923 value.clone()
23924 }
23925 }
23926
23927 impl ::std::fmt::Display for PackConnectionHttpBasicMetadataType {
23928 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23929 match *self {
23930 Self::HttpBasic => f.write_str("httpBasic"),
23931 }
23932 }
23933 }
23934
23935 impl ::std::str::FromStr for PackConnectionHttpBasicMetadataType {
23936 type Err = self::error::ConversionError;
23937 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23938 match value {
23939 "httpBasic" => Ok(Self::HttpBasic),
23940 _ => Err("invalid value".into()),
23941 }
23942 }
23943 }
23944
23945 impl ::std::convert::TryFrom<&str> for PackConnectionHttpBasicMetadataType {
23946 type Error = self::error::ConversionError;
23947 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23948 value.parse()
23949 }
23950 }
23951
23952 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHttpBasicMetadataType {
23953 type Error = self::error::ConversionError;
23954 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23955 value.parse()
23956 }
23957 }
23958
23959 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHttpBasicMetadataType {
23960 type Error = self::error::ConversionError;
23961 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
23962 value.parse()
23963 }
23964 }
23965
23966 ///`PackConnectionHttpBasicPatch`
23967 ///
23968 /// <details><summary>JSON schema</summary>
23969 ///
23970 /// ```json
23971 ///{
23972 /// "type": "object",
23973 /// "required": [
23974 /// "type"
23975 /// ],
23976 /// "properties": {
23977 /// "password": {
23978 /// "type": "string",
23979 /// "x-allow-empty": true
23980 /// },
23981 /// "type": {
23982 /// "type": "string",
23983 /// "enum": [
23984 /// "httpBasic"
23985 /// ],
23986 /// "x-tsType": "PackConnectionType.HttpBasic"
23987 /// },
23988 /// "username": {
23989 /// "type": "string"
23990 /// }
23991 /// },
23992 /// "additionalProperties": false,
23993 /// "x-schema-name": "PackConnectionHttpBasicPatch"
23994 ///}
23995 /// ```
23996 /// </details>
23997 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23998 #[serde(deny_unknown_fields)]
23999 pub struct PackConnectionHttpBasicPatch {
24000 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24001 pub password: ::std::option::Option<::std::string::String>,
24002 #[serde(rename = "type")]
24003 pub type_: PackConnectionHttpBasicPatchType,
24004 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24005 pub username: ::std::option::Option<::std::string::String>,
24006 }
24007
24008 impl ::std::convert::From<&PackConnectionHttpBasicPatch> for PackConnectionHttpBasicPatch {
24009 fn from(value: &PackConnectionHttpBasicPatch) -> Self {
24010 value.clone()
24011 }
24012 }
24013
24014 ///`PackConnectionHttpBasicPatchType`
24015 ///
24016 /// <details><summary>JSON schema</summary>
24017 ///
24018 /// ```json
24019 ///{
24020 /// "type": "string",
24021 /// "enum": [
24022 /// "httpBasic"
24023 /// ],
24024 /// "x-tsType": "PackConnectionType.HttpBasic"
24025 ///}
24026 /// ```
24027 /// </details>
24028 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24029 pub enum PackConnectionHttpBasicPatchType {
24030 #[serde(rename = "httpBasic")]
24031 HttpBasic,
24032 }
24033
24034 impl ::std::convert::From<&Self> for PackConnectionHttpBasicPatchType {
24035 fn from(value: &PackConnectionHttpBasicPatchType) -> Self {
24036 value.clone()
24037 }
24038 }
24039
24040 impl ::std::fmt::Display for PackConnectionHttpBasicPatchType {
24041 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24042 match *self {
24043 Self::HttpBasic => f.write_str("httpBasic"),
24044 }
24045 }
24046 }
24047
24048 impl ::std::str::FromStr for PackConnectionHttpBasicPatchType {
24049 type Err = self::error::ConversionError;
24050 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24051 match value {
24052 "httpBasic" => Ok(Self::HttpBasic),
24053 _ => Err("invalid value".into()),
24054 }
24055 }
24056 }
24057
24058 impl ::std::convert::TryFrom<&str> for PackConnectionHttpBasicPatchType {
24059 type Error = self::error::ConversionError;
24060 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24061 value.parse()
24062 }
24063 }
24064
24065 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionHttpBasicPatchType {
24066 type Error = self::error::ConversionError;
24067 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24068 value.parse()
24069 }
24070 }
24071
24072 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionHttpBasicPatchType {
24073 type Error = self::error::ConversionError;
24074 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24075 value.parse()
24076 }
24077 }
24078
24079 ///`PackConnectionMultiHeaderCredentials`
24080 ///
24081 /// <details><summary>JSON schema</summary>
24082 ///
24083 /// ```json
24084 ///{
24085 /// "type": "object",
24086 /// "required": [
24087 /// "tokens",
24088 /// "type"
24089 /// ],
24090 /// "properties": {
24091 /// "tokens": {
24092 /// "type": "array",
24093 /// "items": {
24094 /// "type": "object",
24095 /// "required": [
24096 /// "key",
24097 /// "value"
24098 /// ],
24099 /// "properties": {
24100 /// "key": {
24101 /// "type": "string"
24102 /// },
24103 /// "value": {
24104 /// "type": "string"
24105 /// }
24106 /// },
24107 /// "additionalProperties": false
24108 /// }
24109 /// },
24110 /// "type": {
24111 /// "type": "string",
24112 /// "enum": [
24113 /// "multiHeader"
24114 /// ],
24115 /// "x-tsType": "PackConnectionType.MultiHeader"
24116 /// }
24117 /// },
24118 /// "additionalProperties": false,
24119 /// "x-schema-name": "PackConnectionMultiHeaderCredentials"
24120 ///}
24121 /// ```
24122 /// </details>
24123 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24124 #[serde(deny_unknown_fields)]
24125 pub struct PackConnectionMultiHeaderCredentials {
24126 pub tokens: ::std::vec::Vec<PackConnectionMultiHeaderCredentialsTokensItem>,
24127 #[serde(rename = "type")]
24128 pub type_: PackConnectionMultiHeaderCredentialsType,
24129 }
24130
24131 impl ::std::convert::From<&PackConnectionMultiHeaderCredentials> for PackConnectionMultiHeaderCredentials {
24132 fn from(value: &PackConnectionMultiHeaderCredentials) -> Self {
24133 value.clone()
24134 }
24135 }
24136
24137 ///`PackConnectionMultiHeaderCredentialsTokensItem`
24138 ///
24139 /// <details><summary>JSON schema</summary>
24140 ///
24141 /// ```json
24142 ///{
24143 /// "type": "object",
24144 /// "required": [
24145 /// "key",
24146 /// "value"
24147 /// ],
24148 /// "properties": {
24149 /// "key": {
24150 /// "type": "string"
24151 /// },
24152 /// "value": {
24153 /// "type": "string"
24154 /// }
24155 /// },
24156 /// "additionalProperties": false
24157 ///}
24158 /// ```
24159 /// </details>
24160 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24161 #[serde(deny_unknown_fields)]
24162 pub struct PackConnectionMultiHeaderCredentialsTokensItem {
24163 pub key: ::std::string::String,
24164 pub value: ::std::string::String,
24165 }
24166
24167 impl ::std::convert::From<&PackConnectionMultiHeaderCredentialsTokensItem> for PackConnectionMultiHeaderCredentialsTokensItem {
24168 fn from(value: &PackConnectionMultiHeaderCredentialsTokensItem) -> Self {
24169 value.clone()
24170 }
24171 }
24172
24173 ///`PackConnectionMultiHeaderCredentialsType`
24174 ///
24175 /// <details><summary>JSON schema</summary>
24176 ///
24177 /// ```json
24178 ///{
24179 /// "type": "string",
24180 /// "enum": [
24181 /// "multiHeader"
24182 /// ],
24183 /// "x-tsType": "PackConnectionType.MultiHeader"
24184 ///}
24185 /// ```
24186 /// </details>
24187 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24188 pub enum PackConnectionMultiHeaderCredentialsType {
24189 #[serde(rename = "multiHeader")]
24190 MultiHeader,
24191 }
24192
24193 impl ::std::convert::From<&Self> for PackConnectionMultiHeaderCredentialsType {
24194 fn from(value: &PackConnectionMultiHeaderCredentialsType) -> Self {
24195 value.clone()
24196 }
24197 }
24198
24199 impl ::std::fmt::Display for PackConnectionMultiHeaderCredentialsType {
24200 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24201 match *self {
24202 Self::MultiHeader => f.write_str("multiHeader"),
24203 }
24204 }
24205 }
24206
24207 impl ::std::str::FromStr for PackConnectionMultiHeaderCredentialsType {
24208 type Err = self::error::ConversionError;
24209 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24210 match value {
24211 "multiHeader" => Ok(Self::MultiHeader),
24212 _ => Err("invalid value".into()),
24213 }
24214 }
24215 }
24216
24217 impl ::std::convert::TryFrom<&str> for PackConnectionMultiHeaderCredentialsType {
24218 type Error = self::error::ConversionError;
24219 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24220 value.parse()
24221 }
24222 }
24223
24224 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionMultiHeaderCredentialsType {
24225 type Error = self::error::ConversionError;
24226 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24227 value.parse()
24228 }
24229 }
24230
24231 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionMultiHeaderCredentialsType {
24232 type Error = self::error::ConversionError;
24233 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24234 value.parse()
24235 }
24236 }
24237
24238 ///`PackConnectionMultiHeaderMetadata`
24239 ///
24240 /// <details><summary>JSON schema</summary>
24241 ///
24242 /// ```json
24243 ///{
24244 /// "type": "object",
24245 /// "required": [
24246 /// "headers",
24247 /// "presets",
24248 /// "type"
24249 /// ],
24250 /// "properties": {
24251 /// "headers": {
24252 /// "type": "array",
24253 /// "items": {
24254 /// "type": "object",
24255 /// "required": [
24256 /// "headerName",
24257 /// "maskedToken"
24258 /// ],
24259 /// "properties": {
24260 /// "headerName": {
24261 /// "type": "string"
24262 /// },
24263 /// "maskedToken": {
24264 /// "type": "string"
24265 /// },
24266 /// "tokenPrefix": {
24267 /// "type": "string"
24268 /// }
24269 /// },
24270 /// "additionalProperties": false
24271 /// }
24272 /// },
24273 /// "presets": {
24274 /// "type": "array",
24275 /// "items": {
24276 /// "type": "object",
24277 /// "required": [
24278 /// "headerName"
24279 /// ],
24280 /// "properties": {
24281 /// "headerName": {
24282 /// "type": "string"
24283 /// },
24284 /// "tokenPrefix": {
24285 /// "type": "string"
24286 /// }
24287 /// },
24288 /// "additionalProperties": false
24289 /// }
24290 /// },
24291 /// "type": {
24292 /// "type": "string",
24293 /// "enum": [
24294 /// "multiHeader"
24295 /// ],
24296 /// "x-tsType": "PackConnectionType.MultiHeader"
24297 /// }
24298 /// },
24299 /// "additionalProperties": false,
24300 /// "x-schema-name": "PackConnectionMultiHeaderMetadata"
24301 ///}
24302 /// ```
24303 /// </details>
24304 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24305 #[serde(deny_unknown_fields)]
24306 pub struct PackConnectionMultiHeaderMetadata {
24307 pub headers: ::std::vec::Vec<PackConnectionMultiHeaderMetadataHeadersItem>,
24308 pub presets: ::std::vec::Vec<PackConnectionMultiHeaderMetadataPresetsItem>,
24309 #[serde(rename = "type")]
24310 pub type_: PackConnectionMultiHeaderMetadataType,
24311 }
24312
24313 impl ::std::convert::From<&PackConnectionMultiHeaderMetadata> for PackConnectionMultiHeaderMetadata {
24314 fn from(value: &PackConnectionMultiHeaderMetadata) -> Self {
24315 value.clone()
24316 }
24317 }
24318
24319 ///`PackConnectionMultiHeaderMetadataHeadersItem`
24320 ///
24321 /// <details><summary>JSON schema</summary>
24322 ///
24323 /// ```json
24324 ///{
24325 /// "type": "object",
24326 /// "required": [
24327 /// "headerName",
24328 /// "maskedToken"
24329 /// ],
24330 /// "properties": {
24331 /// "headerName": {
24332 /// "type": "string"
24333 /// },
24334 /// "maskedToken": {
24335 /// "type": "string"
24336 /// },
24337 /// "tokenPrefix": {
24338 /// "type": "string"
24339 /// }
24340 /// },
24341 /// "additionalProperties": false
24342 ///}
24343 /// ```
24344 /// </details>
24345 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24346 #[serde(deny_unknown_fields)]
24347 pub struct PackConnectionMultiHeaderMetadataHeadersItem {
24348 #[serde(rename = "headerName")]
24349 pub header_name: ::std::string::String,
24350 #[serde(rename = "maskedToken")]
24351 pub masked_token: ::std::string::String,
24352 #[serde(rename = "tokenPrefix", default, skip_serializing_if = "::std::option::Option::is_none")]
24353 pub token_prefix: ::std::option::Option<::std::string::String>,
24354 }
24355
24356 impl ::std::convert::From<&PackConnectionMultiHeaderMetadataHeadersItem> for PackConnectionMultiHeaderMetadataHeadersItem {
24357 fn from(value: &PackConnectionMultiHeaderMetadataHeadersItem) -> Self {
24358 value.clone()
24359 }
24360 }
24361
24362 ///`PackConnectionMultiHeaderMetadataPresetsItem`
24363 ///
24364 /// <details><summary>JSON schema</summary>
24365 ///
24366 /// ```json
24367 ///{
24368 /// "type": "object",
24369 /// "required": [
24370 /// "headerName"
24371 /// ],
24372 /// "properties": {
24373 /// "headerName": {
24374 /// "type": "string"
24375 /// },
24376 /// "tokenPrefix": {
24377 /// "type": "string"
24378 /// }
24379 /// },
24380 /// "additionalProperties": false
24381 ///}
24382 /// ```
24383 /// </details>
24384 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24385 #[serde(deny_unknown_fields)]
24386 pub struct PackConnectionMultiHeaderMetadataPresetsItem {
24387 #[serde(rename = "headerName")]
24388 pub header_name: ::std::string::String,
24389 #[serde(rename = "tokenPrefix", default, skip_serializing_if = "::std::option::Option::is_none")]
24390 pub token_prefix: ::std::option::Option<::std::string::String>,
24391 }
24392
24393 impl ::std::convert::From<&PackConnectionMultiHeaderMetadataPresetsItem> for PackConnectionMultiHeaderMetadataPresetsItem {
24394 fn from(value: &PackConnectionMultiHeaderMetadataPresetsItem) -> Self {
24395 value.clone()
24396 }
24397 }
24398
24399 ///`PackConnectionMultiHeaderMetadataType`
24400 ///
24401 /// <details><summary>JSON schema</summary>
24402 ///
24403 /// ```json
24404 ///{
24405 /// "type": "string",
24406 /// "enum": [
24407 /// "multiHeader"
24408 /// ],
24409 /// "x-tsType": "PackConnectionType.MultiHeader"
24410 ///}
24411 /// ```
24412 /// </details>
24413 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24414 pub enum PackConnectionMultiHeaderMetadataType {
24415 #[serde(rename = "multiHeader")]
24416 MultiHeader,
24417 }
24418
24419 impl ::std::convert::From<&Self> for PackConnectionMultiHeaderMetadataType {
24420 fn from(value: &PackConnectionMultiHeaderMetadataType) -> Self {
24421 value.clone()
24422 }
24423 }
24424
24425 impl ::std::fmt::Display for PackConnectionMultiHeaderMetadataType {
24426 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24427 match *self {
24428 Self::MultiHeader => f.write_str("multiHeader"),
24429 }
24430 }
24431 }
24432
24433 impl ::std::str::FromStr for PackConnectionMultiHeaderMetadataType {
24434 type Err = self::error::ConversionError;
24435 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24436 match value {
24437 "multiHeader" => Ok(Self::MultiHeader),
24438 _ => Err("invalid value".into()),
24439 }
24440 }
24441 }
24442
24443 impl ::std::convert::TryFrom<&str> for PackConnectionMultiHeaderMetadataType {
24444 type Error = self::error::ConversionError;
24445 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24446 value.parse()
24447 }
24448 }
24449
24450 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionMultiHeaderMetadataType {
24451 type Error = self::error::ConversionError;
24452 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24453 value.parse()
24454 }
24455 }
24456
24457 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionMultiHeaderMetadataType {
24458 type Error = self::error::ConversionError;
24459 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24460 value.parse()
24461 }
24462 }
24463
24464 ///`PackConnectionMultiHeaderPatch`
24465 ///
24466 /// <details><summary>JSON schema</summary>
24467 ///
24468 /// ```json
24469 ///{
24470 /// "type": "object",
24471 /// "required": [
24472 /// "type"
24473 /// ],
24474 /// "properties": {
24475 /// "tokensToPatch": {
24476 /// "type": "array",
24477 /// "items": {
24478 /// "type": "object",
24479 /// "required": [
24480 /// "key",
24481 /// "value"
24482 /// ],
24483 /// "properties": {
24484 /// "key": {
24485 /// "type": "string"
24486 /// },
24487 /// "value": {
24488 /// "type": "string"
24489 /// }
24490 /// },
24491 /// "additionalProperties": false
24492 /// }
24493 /// },
24494 /// "type": {
24495 /// "type": "string",
24496 /// "enum": [
24497 /// "multiHeader"
24498 /// ],
24499 /// "x-tsType": "PackConnectionType.MultiHeader"
24500 /// }
24501 /// },
24502 /// "additionalProperties": false,
24503 /// "x-schema-name": "PackConnectionMultiHeaderPatch"
24504 ///}
24505 /// ```
24506 /// </details>
24507 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24508 #[serde(deny_unknown_fields)]
24509 pub struct PackConnectionMultiHeaderPatch {
24510 #[serde(rename = "tokensToPatch", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
24511 pub tokens_to_patch: ::std::vec::Vec<PackConnectionMultiHeaderPatchTokensToPatchItem>,
24512 #[serde(rename = "type")]
24513 pub type_: PackConnectionMultiHeaderPatchType,
24514 }
24515
24516 impl ::std::convert::From<&PackConnectionMultiHeaderPatch> for PackConnectionMultiHeaderPatch {
24517 fn from(value: &PackConnectionMultiHeaderPatch) -> Self {
24518 value.clone()
24519 }
24520 }
24521
24522 ///`PackConnectionMultiHeaderPatchTokensToPatchItem`
24523 ///
24524 /// <details><summary>JSON schema</summary>
24525 ///
24526 /// ```json
24527 ///{
24528 /// "type": "object",
24529 /// "required": [
24530 /// "key",
24531 /// "value"
24532 /// ],
24533 /// "properties": {
24534 /// "key": {
24535 /// "type": "string"
24536 /// },
24537 /// "value": {
24538 /// "type": "string"
24539 /// }
24540 /// },
24541 /// "additionalProperties": false
24542 ///}
24543 /// ```
24544 /// </details>
24545 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24546 #[serde(deny_unknown_fields)]
24547 pub struct PackConnectionMultiHeaderPatchTokensToPatchItem {
24548 pub key: ::std::string::String,
24549 pub value: ::std::string::String,
24550 }
24551
24552 impl ::std::convert::From<&PackConnectionMultiHeaderPatchTokensToPatchItem> for PackConnectionMultiHeaderPatchTokensToPatchItem {
24553 fn from(value: &PackConnectionMultiHeaderPatchTokensToPatchItem) -> Self {
24554 value.clone()
24555 }
24556 }
24557
24558 ///`PackConnectionMultiHeaderPatchType`
24559 ///
24560 /// <details><summary>JSON schema</summary>
24561 ///
24562 /// ```json
24563 ///{
24564 /// "type": "string",
24565 /// "enum": [
24566 /// "multiHeader"
24567 /// ],
24568 /// "x-tsType": "PackConnectionType.MultiHeader"
24569 ///}
24570 /// ```
24571 /// </details>
24572 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24573 pub enum PackConnectionMultiHeaderPatchType {
24574 #[serde(rename = "multiHeader")]
24575 MultiHeader,
24576 }
24577
24578 impl ::std::convert::From<&Self> for PackConnectionMultiHeaderPatchType {
24579 fn from(value: &PackConnectionMultiHeaderPatchType) -> Self {
24580 value.clone()
24581 }
24582 }
24583
24584 impl ::std::fmt::Display for PackConnectionMultiHeaderPatchType {
24585 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24586 match *self {
24587 Self::MultiHeader => f.write_str("multiHeader"),
24588 }
24589 }
24590 }
24591
24592 impl ::std::str::FromStr for PackConnectionMultiHeaderPatchType {
24593 type Err = self::error::ConversionError;
24594 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24595 match value {
24596 "multiHeader" => Ok(Self::MultiHeader),
24597 _ => Err("invalid value".into()),
24598 }
24599 }
24600 }
24601
24602 impl ::std::convert::TryFrom<&str> for PackConnectionMultiHeaderPatchType {
24603 type Error = self::error::ConversionError;
24604 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24605 value.parse()
24606 }
24607 }
24608
24609 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionMultiHeaderPatchType {
24610 type Error = self::error::ConversionError;
24611 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24612 value.parse()
24613 }
24614 }
24615
24616 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionMultiHeaderPatchType {
24617 type Error = self::error::ConversionError;
24618 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24619 value.parse()
24620 }
24621 }
24622
24623 ///`PackConnectionOauth2ClientCredentials`
24624 ///
24625 /// <details><summary>JSON schema</summary>
24626 ///
24627 /// ```json
24628 ///{
24629 /// "type": "object",
24630 /// "required": [
24631 /// "clientId",
24632 /// "clientSecret",
24633 /// "type"
24634 /// ],
24635 /// "properties": {
24636 /// "clientId": {
24637 /// "type": "string",
24638 /// "maxLength": 512
24639 /// },
24640 /// "clientSecret": {
24641 /// "type": "string",
24642 /// "maxLength": 512
24643 /// },
24644 /// "type": {
24645 /// "type": "string",
24646 /// "enum": [
24647 /// "oauth2ClientCredentials"
24648 /// ],
24649 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
24650 /// }
24651 /// },
24652 /// "additionalProperties": false,
24653 /// "x-schema-name": "PackConnectionOauth2ClientCredentials"
24654 ///}
24655 /// ```
24656 /// </details>
24657 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24658 #[serde(deny_unknown_fields)]
24659 pub struct PackConnectionOauth2ClientCredentials {
24660 #[serde(rename = "clientId")]
24661 pub client_id: PackConnectionOauth2ClientCredentialsClientId,
24662 #[serde(rename = "clientSecret")]
24663 pub client_secret: PackConnectionOauth2ClientCredentialsClientSecret,
24664 #[serde(rename = "type")]
24665 pub type_: PackConnectionOauth2ClientCredentialsType,
24666 }
24667
24668 impl ::std::convert::From<&PackConnectionOauth2ClientCredentials> for PackConnectionOauth2ClientCredentials {
24669 fn from(value: &PackConnectionOauth2ClientCredentials) -> Self {
24670 value.clone()
24671 }
24672 }
24673
24674 ///`PackConnectionOauth2ClientCredentialsClientId`
24675 ///
24676 /// <details><summary>JSON schema</summary>
24677 ///
24678 /// ```json
24679 ///{
24680 /// "type": "string",
24681 /// "maxLength": 512
24682 ///}
24683 /// ```
24684 /// </details>
24685 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24686 #[serde(transparent)]
24687 pub struct PackConnectionOauth2ClientCredentialsClientId(::std::string::String);
24688 impl ::std::ops::Deref for PackConnectionOauth2ClientCredentialsClientId {
24689 type Target = ::std::string::String;
24690 fn deref(&self) -> &::std::string::String {
24691 &self.0
24692 }
24693 }
24694
24695 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsClientId> for ::std::string::String {
24696 fn from(value: PackConnectionOauth2ClientCredentialsClientId) -> Self {
24697 value.0
24698 }
24699 }
24700
24701 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsClientId> for PackConnectionOauth2ClientCredentialsClientId {
24702 fn from(value: &PackConnectionOauth2ClientCredentialsClientId) -> Self {
24703 value.clone()
24704 }
24705 }
24706
24707 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsClientId {
24708 type Err = self::error::ConversionError;
24709 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24710 if value.chars().count() > 512usize {
24711 return Err("longer than 512 characters".into());
24712 }
24713 Ok(Self(value.to_string()))
24714 }
24715 }
24716
24717 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsClientId {
24718 type Error = self::error::ConversionError;
24719 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24720 value.parse()
24721 }
24722 }
24723
24724 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsClientId {
24725 type Error = self::error::ConversionError;
24726 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24727 value.parse()
24728 }
24729 }
24730
24731 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsClientId {
24732 type Error = self::error::ConversionError;
24733 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24734 value.parse()
24735 }
24736 }
24737
24738 impl<'de> ::serde::Deserialize<'de> for PackConnectionOauth2ClientCredentialsClientId {
24739 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24740 where
24741 D: ::serde::Deserializer<'de>,
24742 {
24743 ::std::string::String::deserialize(deserializer)?
24744 .parse()
24745 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
24746 }
24747 }
24748
24749 ///`PackConnectionOauth2ClientCredentialsClientSecret`
24750 ///
24751 /// <details><summary>JSON schema</summary>
24752 ///
24753 /// ```json
24754 ///{
24755 /// "type": "string",
24756 /// "maxLength": 512
24757 ///}
24758 /// ```
24759 /// </details>
24760 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24761 #[serde(transparent)]
24762 pub struct PackConnectionOauth2ClientCredentialsClientSecret(::std::string::String);
24763 impl ::std::ops::Deref for PackConnectionOauth2ClientCredentialsClientSecret {
24764 type Target = ::std::string::String;
24765 fn deref(&self) -> &::std::string::String {
24766 &self.0
24767 }
24768 }
24769
24770 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsClientSecret> for ::std::string::String {
24771 fn from(value: PackConnectionOauth2ClientCredentialsClientSecret) -> Self {
24772 value.0
24773 }
24774 }
24775
24776 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsClientSecret> for PackConnectionOauth2ClientCredentialsClientSecret {
24777 fn from(value: &PackConnectionOauth2ClientCredentialsClientSecret) -> Self {
24778 value.clone()
24779 }
24780 }
24781
24782 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsClientSecret {
24783 type Err = self::error::ConversionError;
24784 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24785 if value.chars().count() > 512usize {
24786 return Err("longer than 512 characters".into());
24787 }
24788 Ok(Self(value.to_string()))
24789 }
24790 }
24791
24792 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsClientSecret {
24793 type Error = self::error::ConversionError;
24794 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24795 value.parse()
24796 }
24797 }
24798
24799 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsClientSecret {
24800 type Error = self::error::ConversionError;
24801 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24802 value.parse()
24803 }
24804 }
24805
24806 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsClientSecret {
24807 type Error = self::error::ConversionError;
24808 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24809 value.parse()
24810 }
24811 }
24812
24813 impl<'de> ::serde::Deserialize<'de> for PackConnectionOauth2ClientCredentialsClientSecret {
24814 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24815 where
24816 D: ::serde::Deserializer<'de>,
24817 {
24818 ::std::string::String::deserialize(deserializer)?
24819 .parse()
24820 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
24821 }
24822 }
24823
24824 ///`PackConnectionOauth2ClientCredentialsMetadata`
24825 ///
24826 /// <details><summary>JSON schema</summary>
24827 ///
24828 /// ```json
24829 ///{
24830 /// "type": "object",
24831 /// "required": [
24832 /// "location",
24833 /// "maskedClientId",
24834 /// "maskedClientSecret",
24835 /// "type"
24836 /// ],
24837 /// "properties": {
24838 /// "location": {
24839 /// "$ref": "#/components/schemas/PackOAuth2ClientCredentialsLocation"
24840 /// },
24841 /// "maskedClientId": {
24842 /// "type": "string"
24843 /// },
24844 /// "maskedClientSecret": {
24845 /// "type": "string"
24846 /// },
24847 /// "type": {
24848 /// "type": "string",
24849 /// "enum": [
24850 /// "oauth2ClientCredentials"
24851 /// ],
24852 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
24853 /// }
24854 /// },
24855 /// "additionalProperties": false,
24856 /// "x-schema-name": "PackConnectionOauth2ClientCredentialsMetadata"
24857 ///}
24858 /// ```
24859 /// </details>
24860 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24861 #[serde(deny_unknown_fields)]
24862 pub struct PackConnectionOauth2ClientCredentialsMetadata {
24863 pub location: PackOAuth2ClientCredentialsLocation,
24864 #[serde(rename = "maskedClientId")]
24865 pub masked_client_id: ::std::string::String,
24866 #[serde(rename = "maskedClientSecret")]
24867 pub masked_client_secret: ::std::string::String,
24868 #[serde(rename = "type")]
24869 pub type_: PackConnectionOauth2ClientCredentialsMetadataType,
24870 }
24871
24872 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsMetadata> for PackConnectionOauth2ClientCredentialsMetadata {
24873 fn from(value: &PackConnectionOauth2ClientCredentialsMetadata) -> Self {
24874 value.clone()
24875 }
24876 }
24877
24878 ///`PackConnectionOauth2ClientCredentialsMetadataType`
24879 ///
24880 /// <details><summary>JSON schema</summary>
24881 ///
24882 /// ```json
24883 ///{
24884 /// "type": "string",
24885 /// "enum": [
24886 /// "oauth2ClientCredentials"
24887 /// ],
24888 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
24889 ///}
24890 /// ```
24891 /// </details>
24892 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24893 pub enum PackConnectionOauth2ClientCredentialsMetadataType {
24894 #[serde(rename = "oauth2ClientCredentials")]
24895 Oauth2ClientCredentials,
24896 }
24897
24898 impl ::std::convert::From<&Self> for PackConnectionOauth2ClientCredentialsMetadataType {
24899 fn from(value: &PackConnectionOauth2ClientCredentialsMetadataType) -> Self {
24900 value.clone()
24901 }
24902 }
24903
24904 impl ::std::fmt::Display for PackConnectionOauth2ClientCredentialsMetadataType {
24905 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24906 match *self {
24907 Self::Oauth2ClientCredentials => f.write_str("oauth2ClientCredentials"),
24908 }
24909 }
24910 }
24911
24912 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsMetadataType {
24913 type Err = self::error::ConversionError;
24914 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24915 match value {
24916 "oauth2ClientCredentials" => Ok(Self::Oauth2ClientCredentials),
24917 _ => Err("invalid value".into()),
24918 }
24919 }
24920 }
24921
24922 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsMetadataType {
24923 type Error = self::error::ConversionError;
24924 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24925 value.parse()
24926 }
24927 }
24928
24929 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsMetadataType {
24930 type Error = self::error::ConversionError;
24931 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24932 value.parse()
24933 }
24934 }
24935
24936 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsMetadataType {
24937 type Error = self::error::ConversionError;
24938 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
24939 value.parse()
24940 }
24941 }
24942
24943 ///`PackConnectionOauth2ClientCredentialsPatch`
24944 ///
24945 /// <details><summary>JSON schema</summary>
24946 ///
24947 /// ```json
24948 ///{
24949 /// "type": "object",
24950 /// "required": [
24951 /// "type"
24952 /// ],
24953 /// "properties": {
24954 /// "clientId": {
24955 /// "type": "string",
24956 /// "maxLength": 512
24957 /// },
24958 /// "clientSecret": {
24959 /// "type": "string",
24960 /// "maxLength": 512
24961 /// },
24962 /// "type": {
24963 /// "type": "string",
24964 /// "enum": [
24965 /// "oauth2ClientCredentials"
24966 /// ],
24967 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
24968 /// }
24969 /// },
24970 /// "additionalProperties": false,
24971 /// "x-schema-name": "PackConnectionOauth2ClientCredentialsPatch"
24972 ///}
24973 /// ```
24974 /// </details>
24975 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24976 #[serde(deny_unknown_fields)]
24977 pub struct PackConnectionOauth2ClientCredentialsPatch {
24978 #[serde(rename = "clientId", default, skip_serializing_if = "::std::option::Option::is_none")]
24979 pub client_id: ::std::option::Option<PackConnectionOauth2ClientCredentialsPatchClientId>,
24980 #[serde(rename = "clientSecret", default, skip_serializing_if = "::std::option::Option::is_none")]
24981 pub client_secret: ::std::option::Option<PackConnectionOauth2ClientCredentialsPatchClientSecret>,
24982 #[serde(rename = "type")]
24983 pub type_: PackConnectionOauth2ClientCredentialsPatchType,
24984 }
24985
24986 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsPatch> for PackConnectionOauth2ClientCredentialsPatch {
24987 fn from(value: &PackConnectionOauth2ClientCredentialsPatch) -> Self {
24988 value.clone()
24989 }
24990 }
24991
24992 ///`PackConnectionOauth2ClientCredentialsPatchClientId`
24993 ///
24994 /// <details><summary>JSON schema</summary>
24995 ///
24996 /// ```json
24997 ///{
24998 /// "type": "string",
24999 /// "maxLength": 512
25000 ///}
25001 /// ```
25002 /// </details>
25003 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25004 #[serde(transparent)]
25005 pub struct PackConnectionOauth2ClientCredentialsPatchClientId(::std::string::String);
25006 impl ::std::ops::Deref for PackConnectionOauth2ClientCredentialsPatchClientId {
25007 type Target = ::std::string::String;
25008 fn deref(&self) -> &::std::string::String {
25009 &self.0
25010 }
25011 }
25012
25013 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsPatchClientId> for ::std::string::String {
25014 fn from(value: PackConnectionOauth2ClientCredentialsPatchClientId) -> Self {
25015 value.0
25016 }
25017 }
25018
25019 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsPatchClientId> for PackConnectionOauth2ClientCredentialsPatchClientId {
25020 fn from(value: &PackConnectionOauth2ClientCredentialsPatchClientId) -> Self {
25021 value.clone()
25022 }
25023 }
25024
25025 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsPatchClientId {
25026 type Err = self::error::ConversionError;
25027 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25028 if value.chars().count() > 512usize {
25029 return Err("longer than 512 characters".into());
25030 }
25031 Ok(Self(value.to_string()))
25032 }
25033 }
25034
25035 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsPatchClientId {
25036 type Error = self::error::ConversionError;
25037 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25038 value.parse()
25039 }
25040 }
25041
25042 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsPatchClientId {
25043 type Error = self::error::ConversionError;
25044 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25045 value.parse()
25046 }
25047 }
25048
25049 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsPatchClientId {
25050 type Error = self::error::ConversionError;
25051 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25052 value.parse()
25053 }
25054 }
25055
25056 impl<'de> ::serde::Deserialize<'de> for PackConnectionOauth2ClientCredentialsPatchClientId {
25057 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
25058 where
25059 D: ::serde::Deserializer<'de>,
25060 {
25061 ::std::string::String::deserialize(deserializer)?
25062 .parse()
25063 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
25064 }
25065 }
25066
25067 ///`PackConnectionOauth2ClientCredentialsPatchClientSecret`
25068 ///
25069 /// <details><summary>JSON schema</summary>
25070 ///
25071 /// ```json
25072 ///{
25073 /// "type": "string",
25074 /// "maxLength": 512
25075 ///}
25076 /// ```
25077 /// </details>
25078 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25079 #[serde(transparent)]
25080 pub struct PackConnectionOauth2ClientCredentialsPatchClientSecret(::std::string::String);
25081 impl ::std::ops::Deref for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25082 type Target = ::std::string::String;
25083 fn deref(&self) -> &::std::string::String {
25084 &self.0
25085 }
25086 }
25087
25088 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsPatchClientSecret> for ::std::string::String {
25089 fn from(value: PackConnectionOauth2ClientCredentialsPatchClientSecret) -> Self {
25090 value.0
25091 }
25092 }
25093
25094 impl ::std::convert::From<&PackConnectionOauth2ClientCredentialsPatchClientSecret> for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25095 fn from(value: &PackConnectionOauth2ClientCredentialsPatchClientSecret) -> Self {
25096 value.clone()
25097 }
25098 }
25099
25100 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25101 type Err = self::error::ConversionError;
25102 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25103 if value.chars().count() > 512usize {
25104 return Err("longer than 512 characters".into());
25105 }
25106 Ok(Self(value.to_string()))
25107 }
25108 }
25109
25110 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25111 type Error = self::error::ConversionError;
25112 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25113 value.parse()
25114 }
25115 }
25116
25117 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25118 type Error = self::error::ConversionError;
25119 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25120 value.parse()
25121 }
25122 }
25123
25124 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25125 type Error = self::error::ConversionError;
25126 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25127 value.parse()
25128 }
25129 }
25130
25131 impl<'de> ::serde::Deserialize<'de> for PackConnectionOauth2ClientCredentialsPatchClientSecret {
25132 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
25133 where
25134 D: ::serde::Deserializer<'de>,
25135 {
25136 ::std::string::String::deserialize(deserializer)?
25137 .parse()
25138 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
25139 }
25140 }
25141
25142 ///`PackConnectionOauth2ClientCredentialsPatchType`
25143 ///
25144 /// <details><summary>JSON schema</summary>
25145 ///
25146 /// ```json
25147 ///{
25148 /// "type": "string",
25149 /// "enum": [
25150 /// "oauth2ClientCredentials"
25151 /// ],
25152 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
25153 ///}
25154 /// ```
25155 /// </details>
25156 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25157 pub enum PackConnectionOauth2ClientCredentialsPatchType {
25158 #[serde(rename = "oauth2ClientCredentials")]
25159 Oauth2ClientCredentials,
25160 }
25161
25162 impl ::std::convert::From<&Self> for PackConnectionOauth2ClientCredentialsPatchType {
25163 fn from(value: &PackConnectionOauth2ClientCredentialsPatchType) -> Self {
25164 value.clone()
25165 }
25166 }
25167
25168 impl ::std::fmt::Display for PackConnectionOauth2ClientCredentialsPatchType {
25169 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25170 match *self {
25171 Self::Oauth2ClientCredentials => f.write_str("oauth2ClientCredentials"),
25172 }
25173 }
25174 }
25175
25176 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsPatchType {
25177 type Err = self::error::ConversionError;
25178 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25179 match value {
25180 "oauth2ClientCredentials" => Ok(Self::Oauth2ClientCredentials),
25181 _ => Err("invalid value".into()),
25182 }
25183 }
25184 }
25185
25186 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsPatchType {
25187 type Error = self::error::ConversionError;
25188 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25189 value.parse()
25190 }
25191 }
25192
25193 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsPatchType {
25194 type Error = self::error::ConversionError;
25195 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25196 value.parse()
25197 }
25198 }
25199
25200 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsPatchType {
25201 type Error = self::error::ConversionError;
25202 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25203 value.parse()
25204 }
25205 }
25206
25207 ///`PackConnectionOauth2ClientCredentialsType`
25208 ///
25209 /// <details><summary>JSON schema</summary>
25210 ///
25211 /// ```json
25212 ///{
25213 /// "type": "string",
25214 /// "enum": [
25215 /// "oauth2ClientCredentials"
25216 /// ],
25217 /// "x-tsType": "PackConnectionType.OAuth2ClientCredentials"
25218 ///}
25219 /// ```
25220 /// </details>
25221 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25222 pub enum PackConnectionOauth2ClientCredentialsType {
25223 #[serde(rename = "oauth2ClientCredentials")]
25224 Oauth2ClientCredentials,
25225 }
25226
25227 impl ::std::convert::From<&Self> for PackConnectionOauth2ClientCredentialsType {
25228 fn from(value: &PackConnectionOauth2ClientCredentialsType) -> Self {
25229 value.clone()
25230 }
25231 }
25232
25233 impl ::std::fmt::Display for PackConnectionOauth2ClientCredentialsType {
25234 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25235 match *self {
25236 Self::Oauth2ClientCredentials => f.write_str("oauth2ClientCredentials"),
25237 }
25238 }
25239 }
25240
25241 impl ::std::str::FromStr for PackConnectionOauth2ClientCredentialsType {
25242 type Err = self::error::ConversionError;
25243 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25244 match value {
25245 "oauth2ClientCredentials" => Ok(Self::Oauth2ClientCredentials),
25246 _ => Err("invalid value".into()),
25247 }
25248 }
25249 }
25250
25251 impl ::std::convert::TryFrom<&str> for PackConnectionOauth2ClientCredentialsType {
25252 type Error = self::error::ConversionError;
25253 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25254 value.parse()
25255 }
25256 }
25257
25258 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionOauth2ClientCredentialsType {
25259 type Error = self::error::ConversionError;
25260 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25261 value.parse()
25262 }
25263 }
25264
25265 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionOauth2ClientCredentialsType {
25266 type Error = self::error::ConversionError;
25267 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25268 value.parse()
25269 }
25270 }
25271
25272 ///Type of Pack connections.
25273 ///
25274 /// <details><summary>JSON schema</summary>
25275 ///
25276 /// ```json
25277 ///{
25278 /// "description": "Type of Pack connections.",
25279 /// "type": "string",
25280 /// "enum": [
25281 /// "header",
25282 /// "multiHeader",
25283 /// "urlParam",
25284 /// "httpBasic",
25285 /// "custom",
25286 /// "oauth2ClientCredentials",
25287 /// "googleServiceAccount",
25288 /// "awsAssumeRole",
25289 /// "awsAccessKey"
25290 /// ],
25291 /// "x-schema-name": "PackConnectionType",
25292 /// "x-tsEnumNames": [
25293 /// "Header",
25294 /// "MultiHeader",
25295 /// "UrlParam",
25296 /// "HttpBasic",
25297 /// "Custom",
25298 /// "OAuth2ClientCredentials",
25299 /// "GoogleServiceAccount",
25300 /// "AwsAssumeRole",
25301 /// "AwsAccessKey"
25302 /// ]
25303 ///}
25304 /// ```
25305 /// </details>
25306 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25307 pub enum PackConnectionType {
25308 #[serde(rename = "header")]
25309 Header,
25310 #[serde(rename = "multiHeader")]
25311 MultiHeader,
25312 #[serde(rename = "urlParam")]
25313 UrlParam,
25314 #[serde(rename = "httpBasic")]
25315 HttpBasic,
25316 #[serde(rename = "custom")]
25317 Custom,
25318 #[serde(rename = "oauth2ClientCredentials")]
25319 Oauth2ClientCredentials,
25320 #[serde(rename = "googleServiceAccount")]
25321 GoogleServiceAccount,
25322 #[serde(rename = "awsAssumeRole")]
25323 AwsAssumeRole,
25324 #[serde(rename = "awsAccessKey")]
25325 AwsAccessKey,
25326 }
25327
25328 impl ::std::convert::From<&Self> for PackConnectionType {
25329 fn from(value: &PackConnectionType) -> Self {
25330 value.clone()
25331 }
25332 }
25333
25334 impl ::std::fmt::Display for PackConnectionType {
25335 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25336 match *self {
25337 Self::Header => f.write_str("header"),
25338 Self::MultiHeader => f.write_str("multiHeader"),
25339 Self::UrlParam => f.write_str("urlParam"),
25340 Self::HttpBasic => f.write_str("httpBasic"),
25341 Self::Custom => f.write_str("custom"),
25342 Self::Oauth2ClientCredentials => f.write_str("oauth2ClientCredentials"),
25343 Self::GoogleServiceAccount => f.write_str("googleServiceAccount"),
25344 Self::AwsAssumeRole => f.write_str("awsAssumeRole"),
25345 Self::AwsAccessKey => f.write_str("awsAccessKey"),
25346 }
25347 }
25348 }
25349
25350 impl ::std::str::FromStr for PackConnectionType {
25351 type Err = self::error::ConversionError;
25352 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25353 match value {
25354 "header" => Ok(Self::Header),
25355 "multiHeader" => Ok(Self::MultiHeader),
25356 "urlParam" => Ok(Self::UrlParam),
25357 "httpBasic" => Ok(Self::HttpBasic),
25358 "custom" => Ok(Self::Custom),
25359 "oauth2ClientCredentials" => Ok(Self::Oauth2ClientCredentials),
25360 "googleServiceAccount" => Ok(Self::GoogleServiceAccount),
25361 "awsAssumeRole" => Ok(Self::AwsAssumeRole),
25362 "awsAccessKey" => Ok(Self::AwsAccessKey),
25363 _ => Err("invalid value".into()),
25364 }
25365 }
25366 }
25367
25368 impl ::std::convert::TryFrom<&str> for PackConnectionType {
25369 type Error = self::error::ConversionError;
25370 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25371 value.parse()
25372 }
25373 }
25374
25375 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionType {
25376 type Error = self::error::ConversionError;
25377 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25378 value.parse()
25379 }
25380 }
25381
25382 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionType {
25383 type Error = self::error::ConversionError;
25384 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25385 value.parse()
25386 }
25387 }
25388
25389 ///`PackConnectionUrlParamCredentials`
25390 ///
25391 /// <details><summary>JSON schema</summary>
25392 ///
25393 /// ```json
25394 ///{
25395 /// "type": "object",
25396 /// "required": [
25397 /// "params",
25398 /// "type"
25399 /// ],
25400 /// "properties": {
25401 /// "params": {
25402 /// "type": "array",
25403 /// "items": {
25404 /// "type": "object",
25405 /// "required": [
25406 /// "key",
25407 /// "value"
25408 /// ],
25409 /// "properties": {
25410 /// "key": {
25411 /// "type": "string"
25412 /// },
25413 /// "value": {
25414 /// "type": "string"
25415 /// }
25416 /// },
25417 /// "additionalProperties": false
25418 /// }
25419 /// },
25420 /// "type": {
25421 /// "type": "string",
25422 /// "enum": [
25423 /// "urlParam"
25424 /// ],
25425 /// "x-tsType": "PackConnectionType.UrlParam"
25426 /// }
25427 /// },
25428 /// "additionalProperties": false,
25429 /// "x-schema-name": "PackConnectionUrlParamCredentials"
25430 ///}
25431 /// ```
25432 /// </details>
25433 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25434 #[serde(deny_unknown_fields)]
25435 pub struct PackConnectionUrlParamCredentials {
25436 pub params: ::std::vec::Vec<PackConnectionUrlParamCredentialsParamsItem>,
25437 #[serde(rename = "type")]
25438 pub type_: PackConnectionUrlParamCredentialsType,
25439 }
25440
25441 impl ::std::convert::From<&PackConnectionUrlParamCredentials> for PackConnectionUrlParamCredentials {
25442 fn from(value: &PackConnectionUrlParamCredentials) -> Self {
25443 value.clone()
25444 }
25445 }
25446
25447 ///`PackConnectionUrlParamCredentialsParamsItem`
25448 ///
25449 /// <details><summary>JSON schema</summary>
25450 ///
25451 /// ```json
25452 ///{
25453 /// "type": "object",
25454 /// "required": [
25455 /// "key",
25456 /// "value"
25457 /// ],
25458 /// "properties": {
25459 /// "key": {
25460 /// "type": "string"
25461 /// },
25462 /// "value": {
25463 /// "type": "string"
25464 /// }
25465 /// },
25466 /// "additionalProperties": false
25467 ///}
25468 /// ```
25469 /// </details>
25470 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25471 #[serde(deny_unknown_fields)]
25472 pub struct PackConnectionUrlParamCredentialsParamsItem {
25473 pub key: ::std::string::String,
25474 pub value: ::std::string::String,
25475 }
25476
25477 impl ::std::convert::From<&PackConnectionUrlParamCredentialsParamsItem> for PackConnectionUrlParamCredentialsParamsItem {
25478 fn from(value: &PackConnectionUrlParamCredentialsParamsItem) -> Self {
25479 value.clone()
25480 }
25481 }
25482
25483 ///`PackConnectionUrlParamCredentialsType`
25484 ///
25485 /// <details><summary>JSON schema</summary>
25486 ///
25487 /// ```json
25488 ///{
25489 /// "type": "string",
25490 /// "enum": [
25491 /// "urlParam"
25492 /// ],
25493 /// "x-tsType": "PackConnectionType.UrlParam"
25494 ///}
25495 /// ```
25496 /// </details>
25497 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25498 pub enum PackConnectionUrlParamCredentialsType {
25499 #[serde(rename = "urlParam")]
25500 UrlParam,
25501 }
25502
25503 impl ::std::convert::From<&Self> for PackConnectionUrlParamCredentialsType {
25504 fn from(value: &PackConnectionUrlParamCredentialsType) -> Self {
25505 value.clone()
25506 }
25507 }
25508
25509 impl ::std::fmt::Display for PackConnectionUrlParamCredentialsType {
25510 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25511 match *self {
25512 Self::UrlParam => f.write_str("urlParam"),
25513 }
25514 }
25515 }
25516
25517 impl ::std::str::FromStr for PackConnectionUrlParamCredentialsType {
25518 type Err = self::error::ConversionError;
25519 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25520 match value {
25521 "urlParam" => Ok(Self::UrlParam),
25522 _ => Err("invalid value".into()),
25523 }
25524 }
25525 }
25526
25527 impl ::std::convert::TryFrom<&str> for PackConnectionUrlParamCredentialsType {
25528 type Error = self::error::ConversionError;
25529 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25530 value.parse()
25531 }
25532 }
25533
25534 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionUrlParamCredentialsType {
25535 type Error = self::error::ConversionError;
25536 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25537 value.parse()
25538 }
25539 }
25540
25541 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionUrlParamCredentialsType {
25542 type Error = self::error::ConversionError;
25543 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25544 value.parse()
25545 }
25546 }
25547
25548 ///`PackConnectionUrlParamMetadata`
25549 ///
25550 /// <details><summary>JSON schema</summary>
25551 ///
25552 /// ```json
25553 ///{
25554 /// "type": "object",
25555 /// "required": [
25556 /// "domain",
25557 /// "params",
25558 /// "presetKeys",
25559 /// "type"
25560 /// ],
25561 /// "properties": {
25562 /// "domain": {
25563 /// "type": "string"
25564 /// },
25565 /// "params": {
25566 /// "type": "array",
25567 /// "items": {
25568 /// "type": "object",
25569 /// "required": [
25570 /// "key",
25571 /// "maskedValue"
25572 /// ],
25573 /// "properties": {
25574 /// "key": {
25575 /// "type": "string"
25576 /// },
25577 /// "maskedValue": {
25578 /// "type": "string"
25579 /// }
25580 /// },
25581 /// "additionalProperties": false
25582 /// }
25583 /// },
25584 /// "presetKeys": {
25585 /// "type": "array",
25586 /// "items": {
25587 /// "type": "string"
25588 /// }
25589 /// },
25590 /// "type": {
25591 /// "type": "string",
25592 /// "enum": [
25593 /// "urlParam"
25594 /// ],
25595 /// "x-tsType": "PackConnectionType.UrlParam"
25596 /// }
25597 /// },
25598 /// "additionalProperties": false,
25599 /// "x-schema-name": "PackConnectionUrlParamMetadata"
25600 ///}
25601 /// ```
25602 /// </details>
25603 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25604 #[serde(deny_unknown_fields)]
25605 pub struct PackConnectionUrlParamMetadata {
25606 pub domain: ::std::string::String,
25607 pub params: ::std::vec::Vec<PackConnectionUrlParamMetadataParamsItem>,
25608 #[serde(rename = "presetKeys")]
25609 pub preset_keys: ::std::vec::Vec<::std::string::String>,
25610 #[serde(rename = "type")]
25611 pub type_: PackConnectionUrlParamMetadataType,
25612 }
25613
25614 impl ::std::convert::From<&PackConnectionUrlParamMetadata> for PackConnectionUrlParamMetadata {
25615 fn from(value: &PackConnectionUrlParamMetadata) -> Self {
25616 value.clone()
25617 }
25618 }
25619
25620 ///`PackConnectionUrlParamMetadataParamsItem`
25621 ///
25622 /// <details><summary>JSON schema</summary>
25623 ///
25624 /// ```json
25625 ///{
25626 /// "type": "object",
25627 /// "required": [
25628 /// "key",
25629 /// "maskedValue"
25630 /// ],
25631 /// "properties": {
25632 /// "key": {
25633 /// "type": "string"
25634 /// },
25635 /// "maskedValue": {
25636 /// "type": "string"
25637 /// }
25638 /// },
25639 /// "additionalProperties": false
25640 ///}
25641 /// ```
25642 /// </details>
25643 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25644 #[serde(deny_unknown_fields)]
25645 pub struct PackConnectionUrlParamMetadataParamsItem {
25646 pub key: ::std::string::String,
25647 #[serde(rename = "maskedValue")]
25648 pub masked_value: ::std::string::String,
25649 }
25650
25651 impl ::std::convert::From<&PackConnectionUrlParamMetadataParamsItem> for PackConnectionUrlParamMetadataParamsItem {
25652 fn from(value: &PackConnectionUrlParamMetadataParamsItem) -> Self {
25653 value.clone()
25654 }
25655 }
25656
25657 ///`PackConnectionUrlParamMetadataType`
25658 ///
25659 /// <details><summary>JSON schema</summary>
25660 ///
25661 /// ```json
25662 ///{
25663 /// "type": "string",
25664 /// "enum": [
25665 /// "urlParam"
25666 /// ],
25667 /// "x-tsType": "PackConnectionType.UrlParam"
25668 ///}
25669 /// ```
25670 /// </details>
25671 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25672 pub enum PackConnectionUrlParamMetadataType {
25673 #[serde(rename = "urlParam")]
25674 UrlParam,
25675 }
25676
25677 impl ::std::convert::From<&Self> for PackConnectionUrlParamMetadataType {
25678 fn from(value: &PackConnectionUrlParamMetadataType) -> Self {
25679 value.clone()
25680 }
25681 }
25682
25683 impl ::std::fmt::Display for PackConnectionUrlParamMetadataType {
25684 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25685 match *self {
25686 Self::UrlParam => f.write_str("urlParam"),
25687 }
25688 }
25689 }
25690
25691 impl ::std::str::FromStr for PackConnectionUrlParamMetadataType {
25692 type Err = self::error::ConversionError;
25693 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25694 match value {
25695 "urlParam" => Ok(Self::UrlParam),
25696 _ => Err("invalid value".into()),
25697 }
25698 }
25699 }
25700
25701 impl ::std::convert::TryFrom<&str> for PackConnectionUrlParamMetadataType {
25702 type Error = self::error::ConversionError;
25703 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25704 value.parse()
25705 }
25706 }
25707
25708 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionUrlParamMetadataType {
25709 type Error = self::error::ConversionError;
25710 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25711 value.parse()
25712 }
25713 }
25714
25715 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionUrlParamMetadataType {
25716 type Error = self::error::ConversionError;
25717 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25718 value.parse()
25719 }
25720 }
25721
25722 ///`PackConnectionUrlParamPatch`
25723 ///
25724 /// <details><summary>JSON schema</summary>
25725 ///
25726 /// ```json
25727 ///{
25728 /// "type": "object",
25729 /// "required": [
25730 /// "type"
25731 /// ],
25732 /// "properties": {
25733 /// "paramsToPatch": {
25734 /// "type": "array",
25735 /// "items": {
25736 /// "type": "object",
25737 /// "required": [
25738 /// "key",
25739 /// "value"
25740 /// ],
25741 /// "properties": {
25742 /// "key": {
25743 /// "type": "string"
25744 /// },
25745 /// "value": {
25746 /// "type": "string"
25747 /// }
25748 /// },
25749 /// "additionalProperties": false
25750 /// }
25751 /// },
25752 /// "type": {
25753 /// "type": "string",
25754 /// "enum": [
25755 /// "urlParam"
25756 /// ],
25757 /// "x-tsType": "PackConnectionType.UrlParam"
25758 /// }
25759 /// },
25760 /// "additionalProperties": false,
25761 /// "x-schema-name": "PackConnectionUrlParamPatch"
25762 ///}
25763 /// ```
25764 /// </details>
25765 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25766 #[serde(deny_unknown_fields)]
25767 pub struct PackConnectionUrlParamPatch {
25768 #[serde(rename = "paramsToPatch", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
25769 pub params_to_patch: ::std::vec::Vec<PackConnectionUrlParamPatchParamsToPatchItem>,
25770 #[serde(rename = "type")]
25771 pub type_: PackConnectionUrlParamPatchType,
25772 }
25773
25774 impl ::std::convert::From<&PackConnectionUrlParamPatch> for PackConnectionUrlParamPatch {
25775 fn from(value: &PackConnectionUrlParamPatch) -> Self {
25776 value.clone()
25777 }
25778 }
25779
25780 ///`PackConnectionUrlParamPatchParamsToPatchItem`
25781 ///
25782 /// <details><summary>JSON schema</summary>
25783 ///
25784 /// ```json
25785 ///{
25786 /// "type": "object",
25787 /// "required": [
25788 /// "key",
25789 /// "value"
25790 /// ],
25791 /// "properties": {
25792 /// "key": {
25793 /// "type": "string"
25794 /// },
25795 /// "value": {
25796 /// "type": "string"
25797 /// }
25798 /// },
25799 /// "additionalProperties": false
25800 ///}
25801 /// ```
25802 /// </details>
25803 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25804 #[serde(deny_unknown_fields)]
25805 pub struct PackConnectionUrlParamPatchParamsToPatchItem {
25806 pub key: ::std::string::String,
25807 pub value: ::std::string::String,
25808 }
25809
25810 impl ::std::convert::From<&PackConnectionUrlParamPatchParamsToPatchItem> for PackConnectionUrlParamPatchParamsToPatchItem {
25811 fn from(value: &PackConnectionUrlParamPatchParamsToPatchItem) -> Self {
25812 value.clone()
25813 }
25814 }
25815
25816 ///`PackConnectionUrlParamPatchType`
25817 ///
25818 /// <details><summary>JSON schema</summary>
25819 ///
25820 /// ```json
25821 ///{
25822 /// "type": "string",
25823 /// "enum": [
25824 /// "urlParam"
25825 /// ],
25826 /// "x-tsType": "PackConnectionType.UrlParam"
25827 ///}
25828 /// ```
25829 /// </details>
25830 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25831 pub enum PackConnectionUrlParamPatchType {
25832 #[serde(rename = "urlParam")]
25833 UrlParam,
25834 }
25835
25836 impl ::std::convert::From<&Self> for PackConnectionUrlParamPatchType {
25837 fn from(value: &PackConnectionUrlParamPatchType) -> Self {
25838 value.clone()
25839 }
25840 }
25841
25842 impl ::std::fmt::Display for PackConnectionUrlParamPatchType {
25843 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25844 match *self {
25845 Self::UrlParam => f.write_str("urlParam"),
25846 }
25847 }
25848 }
25849
25850 impl ::std::str::FromStr for PackConnectionUrlParamPatchType {
25851 type Err = self::error::ConversionError;
25852 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25853 match value {
25854 "urlParam" => Ok(Self::UrlParam),
25855 _ => Err("invalid value".into()),
25856 }
25857 }
25858 }
25859
25860 impl ::std::convert::TryFrom<&str> for PackConnectionUrlParamPatchType {
25861 type Error = self::error::ConversionError;
25862 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25863 value.parse()
25864 }
25865 }
25866
25867 impl ::std::convert::TryFrom<&::std::string::String> for PackConnectionUrlParamPatchType {
25868 type Error = self::error::ConversionError;
25869 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25870 value.parse()
25871 }
25872 }
25873
25874 impl ::std::convert::TryFrom<::std::string::String> for PackConnectionUrlParamPatchType {
25875 type Error = self::error::ConversionError;
25876 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25877 value.parse()
25878 }
25879 }
25880
25881 ///Pack log generated by developer's custom logging with context.logger.
25882 ///
25883 /// <details><summary>JSON schema</summary>
25884 ///
25885 /// ```json
25886 ///{
25887 /// "description": "Pack log generated by developer's custom logging with
25888 /// context.logger.",
25889 /// "type": "object",
25890 /// "required": [
25891 /// "context",
25892 /// "level",
25893 /// "message",
25894 /// "type"
25895 /// ],
25896 /// "properties": {
25897 /// "context": {
25898 /// "$ref": "#/components/schemas/PackLogContext"
25899 /// },
25900 /// "level": {
25901 /// "$ref": "#/components/schemas/LogLevel"
25902 /// },
25903 /// "message": {
25904 /// "description": "The message that's passed into context.logger.",
25905 /// "examples": [
25906 /// "The formula is called!"
25907 /// ],
25908 /// "type": "string"
25909 /// },
25910 /// "type": {
25911 /// "type": "string",
25912 /// "enum": [
25913 /// "custom"
25914 /// ],
25915 /// "x-tsType": "PackLogType.Custom"
25916 /// }
25917 /// },
25918 /// "additionalProperties": false,
25919 /// "x-schema-name": "PackCustomLog"
25920 ///}
25921 /// ```
25922 /// </details>
25923 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25924 #[serde(deny_unknown_fields)]
25925 pub struct PackCustomLog {
25926 pub context: PackLogContext,
25927 pub level: LogLevel,
25928 ///The message that's passed into context.logger.
25929 pub message: ::std::string::String,
25930 #[serde(rename = "type")]
25931 pub type_: PackCustomLogType,
25932 }
25933
25934 impl ::std::convert::From<&PackCustomLog> for PackCustomLog {
25935 fn from(value: &PackCustomLog) -> Self {
25936 value.clone()
25937 }
25938 }
25939
25940 ///`PackCustomLogType`
25941 ///
25942 /// <details><summary>JSON schema</summary>
25943 ///
25944 /// ```json
25945 ///{
25946 /// "type": "string",
25947 /// "enum": [
25948 /// "custom"
25949 /// ],
25950 /// "x-tsType": "PackLogType.Custom"
25951 ///}
25952 /// ```
25953 /// </details>
25954 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25955 pub enum PackCustomLogType {
25956 #[serde(rename = "custom")]
25957 Custom,
25958 }
25959
25960 impl ::std::convert::From<&Self> for PackCustomLogType {
25961 fn from(value: &PackCustomLogType) -> Self {
25962 value.clone()
25963 }
25964 }
25965
25966 impl ::std::fmt::Display for PackCustomLogType {
25967 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25968 match *self {
25969 Self::Custom => f.write_str("custom"),
25970 }
25971 }
25972 }
25973
25974 impl ::std::str::FromStr for PackCustomLogType {
25975 type Err = self::error::ConversionError;
25976 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25977 match value {
25978 "custom" => Ok(Self::Custom),
25979 _ => Err("invalid value".into()),
25980 }
25981 }
25982 }
25983
25984 impl ::std::convert::TryFrom<&str> for PackCustomLogType {
25985 type Error = self::error::ConversionError;
25986 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25987 value.parse()
25988 }
25989 }
25990
25991 impl ::std::convert::TryFrom<&::std::string::String> for PackCustomLogType {
25992 type Error = self::error::ConversionError;
25993 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
25994 value.parse()
25995 }
25996 }
25997
25998 impl ::std::convert::TryFrom<::std::string::String> for PackCustomLogType {
25999 type Error = self::error::ConversionError;
26000 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26001 value.parse()
26002 }
26003 }
26004
26005 ///The full description of the Pack.
26006 ///
26007 /// <details><summary>JSON schema</summary>
26008 ///
26009 /// ```json
26010 ///{
26011 /// "description": "The full description of the Pack.",
26012 /// "examples": [
26013 /// "This Pack allows users to calculate the surface area and volume of a
26014 /// few common 3D shapes, like cubes and pyramids."
26015 /// ],
26016 /// "type": "string",
26017 /// "maxLength": 8192
26018 ///}
26019 /// ```
26020 /// </details>
26021 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26022 #[serde(transparent)]
26023 pub struct PackDescription(::std::string::String);
26024 impl ::std::ops::Deref for PackDescription {
26025 type Target = ::std::string::String;
26026 fn deref(&self) -> &::std::string::String {
26027 &self.0
26028 }
26029 }
26030
26031 impl ::std::convert::From<PackDescription> for ::std::string::String {
26032 fn from(value: PackDescription) -> Self {
26033 value.0
26034 }
26035 }
26036
26037 impl ::std::convert::From<&PackDescription> for PackDescription {
26038 fn from(value: &PackDescription) -> Self {
26039 value.clone()
26040 }
26041 }
26042
26043 impl ::std::str::FromStr for PackDescription {
26044 type Err = self::error::ConversionError;
26045 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26046 if value.chars().count() > 8192usize {
26047 return Err("longer than 8192 characters".into());
26048 }
26049 Ok(Self(value.to_string()))
26050 }
26051 }
26052
26053 impl ::std::convert::TryFrom<&str> for PackDescription {
26054 type Error = self::error::ConversionError;
26055 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26056 value.parse()
26057 }
26058 }
26059
26060 impl ::std::convert::TryFrom<&::std::string::String> for PackDescription {
26061 type Error = self::error::ConversionError;
26062 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26063 value.parse()
26064 }
26065 }
26066
26067 impl ::std::convert::TryFrom<::std::string::String> for PackDescription {
26068 type Error = self::error::ConversionError;
26069 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26070 value.parse()
26071 }
26072 }
26073
26074 impl<'de> ::serde::Deserialize<'de> for PackDescription {
26075 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
26076 where
26077 D: ::serde::Deserializer<'de>,
26078 {
26079 ::std::string::String::deserialize(deserializer)?
26080 .parse()
26081 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
26082 }
26083 }
26084
26085 ///Widest principal a Pack is available to.
26086 ///
26087 /// <details><summary>JSON schema</summary>
26088 ///
26089 /// ```json
26090 ///{
26091 /// "description": "Widest principal a Pack is available to.",
26092 /// "type": "string",
26093 /// "enum": [
26094 /// "public",
26095 /// "grammarlyInstitution",
26096 /// "workspace",
26097 /// "private"
26098 /// ],
26099 /// "x-schema-name": "PackDiscoverability",
26100 /// "x-tsEnumNames": [
26101 /// "Public",
26102 /// "GrammarlyInstitution",
26103 /// "Workspace",
26104 /// "Private"
26105 /// ]
26106 ///}
26107 /// ```
26108 /// </details>
26109 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26110 pub enum PackDiscoverability {
26111 #[serde(rename = "public")]
26112 Public,
26113 #[serde(rename = "grammarlyInstitution")]
26114 GrammarlyInstitution,
26115 #[serde(rename = "workspace")]
26116 Workspace,
26117 #[serde(rename = "private")]
26118 Private,
26119 }
26120
26121 impl ::std::convert::From<&Self> for PackDiscoverability {
26122 fn from(value: &PackDiscoverability) -> Self {
26123 value.clone()
26124 }
26125 }
26126
26127 impl ::std::fmt::Display for PackDiscoverability {
26128 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26129 match *self {
26130 Self::Public => f.write_str("public"),
26131 Self::GrammarlyInstitution => f.write_str("grammarlyInstitution"),
26132 Self::Workspace => f.write_str("workspace"),
26133 Self::Private => f.write_str("private"),
26134 }
26135 }
26136 }
26137
26138 impl ::std::str::FromStr for PackDiscoverability {
26139 type Err = self::error::ConversionError;
26140 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26141 match value {
26142 "public" => Ok(Self::Public),
26143 "grammarlyInstitution" => Ok(Self::GrammarlyInstitution),
26144 "workspace" => Ok(Self::Workspace),
26145 "private" => Ok(Self::Private),
26146 _ => Err("invalid value".into()),
26147 }
26148 }
26149 }
26150
26151 impl ::std::convert::TryFrom<&str> for PackDiscoverability {
26152 type Error = self::error::ConversionError;
26153 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26154 value.parse()
26155 }
26156 }
26157
26158 impl ::std::convert::TryFrom<&::std::string::String> for PackDiscoverability {
26159 type Error = self::error::ConversionError;
26160 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26161 value.parse()
26162 }
26163 }
26164
26165 impl ::std::convert::TryFrom<::std::string::String> for PackDiscoverability {
26166 type Error = self::error::ConversionError;
26167 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26168 value.parse()
26169 }
26170 }
26171
26172 ///`PackEntrypoint`
26173 ///
26174 /// <details><summary>JSON schema</summary>
26175 ///
26176 /// ```json
26177 ///{
26178 /// "type": "string",
26179 /// "enum": [
26180 /// "go",
26181 /// "docs"
26182 /// ],
26183 /// "x-schema-name": "PackEntrypoint",
26184 /// "x-tsEnumNames": [
26185 /// "Go",
26186 /// "Docs"
26187 /// ]
26188 ///}
26189 /// ```
26190 /// </details>
26191 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26192 pub enum PackEntrypoint {
26193 #[serde(rename = "go")]
26194 Go,
26195 #[serde(rename = "docs")]
26196 Docs,
26197 }
26198
26199 impl ::std::convert::From<&Self> for PackEntrypoint {
26200 fn from(value: &PackEntrypoint) -> Self {
26201 value.clone()
26202 }
26203 }
26204
26205 impl ::std::fmt::Display for PackEntrypoint {
26206 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26207 match *self {
26208 Self::Go => f.write_str("go"),
26209 Self::Docs => f.write_str("docs"),
26210 }
26211 }
26212 }
26213
26214 impl ::std::str::FromStr for PackEntrypoint {
26215 type Err = self::error::ConversionError;
26216 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26217 match value {
26218 "go" => Ok(Self::Go),
26219 "docs" => Ok(Self::Docs),
26220 _ => Err("invalid value".into()),
26221 }
26222 }
26223 }
26224
26225 impl ::std::convert::TryFrom<&str> for PackEntrypoint {
26226 type Error = self::error::ConversionError;
26227 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26228 value.parse()
26229 }
26230 }
26231
26232 impl ::std::convert::TryFrom<&::std::string::String> for PackEntrypoint {
26233 type Error = self::error::ConversionError;
26234 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26235 value.parse()
26236 }
26237 }
26238
26239 impl ::std::convert::TryFrom<::std::string::String> for PackEntrypoint {
26240 type Error = self::error::ConversionError;
26241 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26242 value.parse()
26243 }
26244 }
26245
26246 ///A Pack's featured doc.
26247 ///
26248 /// <details><summary>JSON schema</summary>
26249 ///
26250 /// ```json
26251 ///{
26252 /// "description": "A Pack's featured doc.",
26253 /// "type": "object",
26254 /// "required": [
26255 /// "doc",
26256 /// "isPinned"
26257 /// ],
26258 /// "properties": {
26259 /// "doc": {
26260 /// "$ref": "#/components/schemas/DocReference"
26261 /// },
26262 /// "docStatus": {
26263 /// "$ref": "#/components/schemas/FeaturedDocStatus"
26264 /// },
26265 /// "isPinned": {
26266 /// "description": "Whether or not this featured doc is pinned.",
26267 /// "type": "boolean"
26268 /// },
26269 /// "publishedUrl": {
26270 /// "description": "The URL of the published doc, if available.",
26271 /// "type": "string",
26272 /// "format": "url"
26273 /// }
26274 /// },
26275 /// "additionalProperties": false,
26276 /// "x-schema-name": "PackFeaturedDoc"
26277 ///}
26278 /// ```
26279 /// </details>
26280 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26281 #[serde(deny_unknown_fields)]
26282 pub struct PackFeaturedDoc {
26283 pub doc: DocReference,
26284 #[serde(rename = "docStatus", default, skip_serializing_if = "::std::option::Option::is_none")]
26285 pub doc_status: ::std::option::Option<FeaturedDocStatus>,
26286 ///Whether or not this featured doc is pinned.
26287 #[serde(rename = "isPinned")]
26288 pub is_pinned: bool,
26289 ///The URL of the published doc, if available.
26290 #[serde(rename = "publishedUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
26291 pub published_url: ::std::option::Option<::std::string::String>,
26292 }
26293
26294 impl ::std::convert::From<&PackFeaturedDoc> for PackFeaturedDoc {
26295 fn from(value: &PackFeaturedDoc) -> Self {
26296 value.clone()
26297 }
26298 }
26299
26300 ///Item representing a featured doc in the update Pack featured docs
26301 /// request.
26302 ///
26303 /// <details><summary>JSON schema</summary>
26304 ///
26305 /// ```json
26306 ///{
26307 /// "description": "Item representing a featured doc in the update Pack
26308 /// featured docs request.",
26309 /// "type": "object",
26310 /// "required": [
26311 /// "url"
26312 /// ],
26313 /// "properties": {
26314 /// "isPinned": {
26315 /// "description": "Whether or not the current doc should be pinned.",
26316 /// "type": "boolean"
26317 /// },
26318 /// "url": {
26319 /// "description": "A URL to a doc.",
26320 /// "type": "string"
26321 /// }
26322 /// },
26323 /// "additionalProperties": false,
26324 /// "x-schema-name": "PackFeaturedDocRequestItem"
26325 ///}
26326 /// ```
26327 /// </details>
26328 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26329 #[serde(deny_unknown_fields)]
26330 pub struct PackFeaturedDocRequestItem {
26331 ///Whether or not the current doc should be pinned.
26332 #[serde(rename = "isPinned", default, skip_serializing_if = "::std::option::Option::is_none")]
26333 pub is_pinned: ::std::option::Option<bool>,
26334 ///A URL to a doc.
26335 pub url: ::std::string::String,
26336 }
26337
26338 impl ::std::convert::From<&PackFeaturedDocRequestItem> for PackFeaturedDocRequestItem {
26339 fn from(value: &PackFeaturedDocRequestItem) -> Self {
26340 value.clone()
26341 }
26342 }
26343
26344 ///List of a Pack's featured docs.
26345 ///
26346 /// <details><summary>JSON schema</summary>
26347 ///
26348 /// ```json
26349 ///{
26350 /// "description": "List of a Pack's featured docs.",
26351 /// "type": "object",
26352 /// "required": [
26353 /// "items"
26354 /// ],
26355 /// "properties": {
26356 /// "items": {
26357 /// "description": "A list of featured docs for the Pack.",
26358 /// "type": "array",
26359 /// "items": {
26360 /// "$ref": "#/components/schemas/PackFeaturedDoc"
26361 /// }
26362 /// }
26363 /// },
26364 /// "additionalProperties": false,
26365 /// "x-schema-name": "PackFeaturedDocsResponse"
26366 ///}
26367 /// ```
26368 /// </details>
26369 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26370 #[serde(deny_unknown_fields)]
26371 pub struct PackFeaturedDocsResponse {
26372 ///A list of featured docs for the Pack.
26373 pub items: ::std::vec::Vec<PackFeaturedDoc>,
26374 }
26375
26376 impl ::std::convert::From<&PackFeaturedDocsResponse> for PackFeaturedDocsResponse {
26377 fn from(value: &PackFeaturedDocsResponse) -> Self {
26378 value.clone()
26379 }
26380 }
26381
26382 ///System logs of Pack calls to context.fetcher.
26383 ///
26384 /// <details><summary>JSON schema</summary>
26385 ///
26386 /// ```json
26387 ///{
26388 /// "description": "System logs of Pack calls to context.fetcher.",
26389 /// "type": "object",
26390 /// "required": [
26391 /// "context",
26392 /// "type"
26393 /// ],
26394 /// "properties": {
26395 /// "baseUrl": {
26396 /// "description": "base URL of the fetcher request, with all query
26397 /// parameters stripped off.",
26398 /// "examples": [
26399 /// "https://coda.io/api"
26400 /// ],
26401 /// "type": "string"
26402 /// },
26403 /// "cacheHit": {
26404 /// "description": "true if the fetcher request hits catche instead of
26405 /// actually requesting the remote service.",
26406 /// "type": "boolean"
26407 /// },
26408 /// "context": {
26409 /// "$ref": "#/components/schemas/PackLogContext"
26410 /// },
26411 /// "duration": {
26412 /// "description": "Duration of the fetcher request in miliseconds.",
26413 /// "type": "number"
26414 /// },
26415 /// "method": {
26416 /// "type": "string",
26417 /// "enum": [
26418 /// "GET",
26419 /// "POST",
26420 /// "PUT",
26421 /// "DELETE",
26422 /// "PATCH",
26423 /// "HEAD"
26424 /// ]
26425 /// },
26426 /// "requestSizeBytes": {
26427 /// "description": "The number of bytes in the HTTP request sent",
26428 /// "type": "number"
26429 /// },
26430 /// "responseCode": {
26431 /// "type": "number"
26432 /// },
26433 /// "responseSizeBytes": {
26434 /// "description": "The number of bytes in the HTTP response received",
26435 /// "type": "number"
26436 /// },
26437 /// "type": {
26438 /// "type": "string",
26439 /// "enum": [
26440 /// "fetcher"
26441 /// ],
26442 /// "x-tsType": "PackLogType.Fetcher"
26443 /// }
26444 /// },
26445 /// "additionalProperties": false,
26446 /// "x-schema-name": "PackFetcherLog"
26447 ///}
26448 /// ```
26449 /// </details>
26450 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26451 #[serde(deny_unknown_fields)]
26452 pub struct PackFetcherLog {
26453 ///base URL of the fetcher request, with all query parameters stripped
26454 /// off.
26455 #[serde(rename = "baseUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
26456 pub base_url: ::std::option::Option<::std::string::String>,
26457 ///true if the fetcher request hits catche instead of actually
26458 /// requesting the remote service.
26459 #[serde(rename = "cacheHit", default, skip_serializing_if = "::std::option::Option::is_none")]
26460 pub cache_hit: ::std::option::Option<bool>,
26461 pub context: PackLogContext,
26462 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26463 pub duration: ::std::option::Option<f64>,
26464 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26465 pub method: ::std::option::Option<PackFetcherLogMethod>,
26466 #[serde(rename = "requestSizeBytes", default, skip_serializing_if = "::std::option::Option::is_none")]
26467 pub request_size_bytes: ::std::option::Option<f64>,
26468 #[serde(rename = "responseCode", default, skip_serializing_if = "::std::option::Option::is_none")]
26469 pub response_code: ::std::option::Option<f64>,
26470 #[serde(rename = "responseSizeBytes", default, skip_serializing_if = "::std::option::Option::is_none")]
26471 pub response_size_bytes: ::std::option::Option<f64>,
26472 #[serde(rename = "type")]
26473 pub type_: PackFetcherLogType,
26474 }
26475
26476 impl ::std::convert::From<&PackFetcherLog> for PackFetcherLog {
26477 fn from(value: &PackFetcherLog) -> Self {
26478 value.clone()
26479 }
26480 }
26481
26482 ///Details for pack fetcher logs
26483 ///
26484 /// <details><summary>JSON schema</summary>
26485 ///
26486 /// ```json
26487 ///{
26488 /// "description": "Details for pack fetcher logs",
26489 /// "type": "object",
26490 /// "required": [
26491 /// "request",
26492 /// "type"
26493 /// ],
26494 /// "properties": {
26495 /// "request": {
26496 /// "type": "string"
26497 /// },
26498 /// "response": {
26499 /// "type": "string"
26500 /// },
26501 /// "type": {
26502 /// "type": "string",
26503 /// "enum": [
26504 /// "fetcher"
26505 /// ],
26506 /// "x-tsType": "PackLogType.Fetcher"
26507 /// }
26508 /// },
26509 /// "additionalProperties": false,
26510 /// "x-schema-name": "PackFetcherLogDetails"
26511 ///}
26512 /// ```
26513 /// </details>
26514 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26515 #[serde(deny_unknown_fields)]
26516 pub struct PackFetcherLogDetails {
26517 pub request: ::std::string::String,
26518 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26519 pub response: ::std::option::Option<::std::string::String>,
26520 #[serde(rename = "type")]
26521 pub type_: PackFetcherLogDetailsType,
26522 }
26523
26524 impl ::std::convert::From<&PackFetcherLogDetails> for PackFetcherLogDetails {
26525 fn from(value: &PackFetcherLogDetails) -> Self {
26526 value.clone()
26527 }
26528 }
26529
26530 ///`PackFetcherLogDetailsType`
26531 ///
26532 /// <details><summary>JSON schema</summary>
26533 ///
26534 /// ```json
26535 ///{
26536 /// "type": "string",
26537 /// "enum": [
26538 /// "fetcher"
26539 /// ],
26540 /// "x-tsType": "PackLogType.Fetcher"
26541 ///}
26542 /// ```
26543 /// </details>
26544 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26545 pub enum PackFetcherLogDetailsType {
26546 #[serde(rename = "fetcher")]
26547 Fetcher,
26548 }
26549
26550 impl ::std::convert::From<&Self> for PackFetcherLogDetailsType {
26551 fn from(value: &PackFetcherLogDetailsType) -> Self {
26552 value.clone()
26553 }
26554 }
26555
26556 impl ::std::fmt::Display for PackFetcherLogDetailsType {
26557 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26558 match *self {
26559 Self::Fetcher => f.write_str("fetcher"),
26560 }
26561 }
26562 }
26563
26564 impl ::std::str::FromStr for PackFetcherLogDetailsType {
26565 type Err = self::error::ConversionError;
26566 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26567 match value {
26568 "fetcher" => Ok(Self::Fetcher),
26569 _ => Err("invalid value".into()),
26570 }
26571 }
26572 }
26573
26574 impl ::std::convert::TryFrom<&str> for PackFetcherLogDetailsType {
26575 type Error = self::error::ConversionError;
26576 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26577 value.parse()
26578 }
26579 }
26580
26581 impl ::std::convert::TryFrom<&::std::string::String> for PackFetcherLogDetailsType {
26582 type Error = self::error::ConversionError;
26583 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26584 value.parse()
26585 }
26586 }
26587
26588 impl ::std::convert::TryFrom<::std::string::String> for PackFetcherLogDetailsType {
26589 type Error = self::error::ConversionError;
26590 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26591 value.parse()
26592 }
26593 }
26594
26595 ///`PackFetcherLogMethod`
26596 ///
26597 /// <details><summary>JSON schema</summary>
26598 ///
26599 /// ```json
26600 ///{
26601 /// "type": "string",
26602 /// "enum": [
26603 /// "GET",
26604 /// "POST",
26605 /// "PUT",
26606 /// "DELETE",
26607 /// "PATCH",
26608 /// "HEAD"
26609 /// ]
26610 ///}
26611 /// ```
26612 /// </details>
26613 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26614 pub enum PackFetcherLogMethod {
26615 #[serde(rename = "GET")]
26616 Get,
26617 #[serde(rename = "POST")]
26618 Post,
26619 #[serde(rename = "PUT")]
26620 Put,
26621 #[serde(rename = "DELETE")]
26622 Delete,
26623 #[serde(rename = "PATCH")]
26624 Patch,
26625 #[serde(rename = "HEAD")]
26626 Head,
26627 }
26628
26629 impl ::std::convert::From<&Self> for PackFetcherLogMethod {
26630 fn from(value: &PackFetcherLogMethod) -> Self {
26631 value.clone()
26632 }
26633 }
26634
26635 impl ::std::fmt::Display for PackFetcherLogMethod {
26636 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26637 match *self {
26638 Self::Get => f.write_str("GET"),
26639 Self::Post => f.write_str("POST"),
26640 Self::Put => f.write_str("PUT"),
26641 Self::Delete => f.write_str("DELETE"),
26642 Self::Patch => f.write_str("PATCH"),
26643 Self::Head => f.write_str("HEAD"),
26644 }
26645 }
26646 }
26647
26648 impl ::std::str::FromStr for PackFetcherLogMethod {
26649 type Err = self::error::ConversionError;
26650 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26651 match value {
26652 "GET" => Ok(Self::Get),
26653 "POST" => Ok(Self::Post),
26654 "PUT" => Ok(Self::Put),
26655 "DELETE" => Ok(Self::Delete),
26656 "PATCH" => Ok(Self::Patch),
26657 "HEAD" => Ok(Self::Head),
26658 _ => Err("invalid value".into()),
26659 }
26660 }
26661 }
26662
26663 impl ::std::convert::TryFrom<&str> for PackFetcherLogMethod {
26664 type Error = self::error::ConversionError;
26665 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26666 value.parse()
26667 }
26668 }
26669
26670 impl ::std::convert::TryFrom<&::std::string::String> for PackFetcherLogMethod {
26671 type Error = self::error::ConversionError;
26672 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26673 value.parse()
26674 }
26675 }
26676
26677 impl ::std::convert::TryFrom<::std::string::String> for PackFetcherLogMethod {
26678 type Error = self::error::ConversionError;
26679 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26680 value.parse()
26681 }
26682 }
26683
26684 ///`PackFetcherLogType`
26685 ///
26686 /// <details><summary>JSON schema</summary>
26687 ///
26688 /// ```json
26689 ///{
26690 /// "type": "string",
26691 /// "enum": [
26692 /// "fetcher"
26693 /// ],
26694 /// "x-tsType": "PackLogType.Fetcher"
26695 ///}
26696 /// ```
26697 /// </details>
26698 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26699 pub enum PackFetcherLogType {
26700 #[serde(rename = "fetcher")]
26701 Fetcher,
26702 }
26703
26704 impl ::std::convert::From<&Self> for PackFetcherLogType {
26705 fn from(value: &PackFetcherLogType) -> Self {
26706 value.clone()
26707 }
26708 }
26709
26710 impl ::std::fmt::Display for PackFetcherLogType {
26711 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26712 match *self {
26713 Self::Fetcher => f.write_str("fetcher"),
26714 }
26715 }
26716 }
26717
26718 impl ::std::str::FromStr for PackFetcherLogType {
26719 type Err = self::error::ConversionError;
26720 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26721 match value {
26722 "fetcher" => Ok(Self::Fetcher),
26723 _ => Err("invalid value".into()),
26724 }
26725 }
26726 }
26727
26728 impl ::std::convert::TryFrom<&str> for PackFetcherLogType {
26729 type Error = self::error::ConversionError;
26730 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26731 value.parse()
26732 }
26733 }
26734
26735 impl ::std::convert::TryFrom<&::std::string::String> for PackFetcherLogType {
26736 type Error = self::error::ConversionError;
26737 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26738 value.parse()
26739 }
26740 }
26741
26742 impl ::std::convert::TryFrom<::std::string::String> for PackFetcherLogType {
26743 type Error = self::error::ConversionError;
26744 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
26745 value.parse()
26746 }
26747 }
26748
26749 ///A collection of analytics for Coda Packs formulas over a date range.
26750 ///
26751 /// <details><summary>JSON schema</summary>
26752 ///
26753 /// ```json
26754 ///{
26755 /// "description": "A collection of analytics for Coda Packs formulas over
26756 /// a date range.",
26757 /// "type": "object",
26758 /// "required": [
26759 /// "items"
26760 /// ],
26761 /// "properties": {
26762 /// "items": {
26763 /// "type": "array",
26764 /// "items": {
26765 /// "$ref": "#/components/schemas/PackFormulaAnalyticsItem"
26766 /// }
26767 /// },
26768 /// "nextPageLink": {
26769 /// "allOf": [
26770 /// {
26771 /// "$ref": "#/components/schemas/nextPageLink"
26772 /// },
26773 /// {
26774 /// "examples": [
26775 /// "https://coda.io/apis/v1/analytics/packs/:packId/formulas?pageToken=xyz"
26776 /// ],
26777 /// "type": "string"
26778 /// }
26779 /// ]
26780 /// },
26781 /// "nextPageToken": {
26782 /// "$ref": "#/components/schemas/nextPageToken"
26783 /// }
26784 /// },
26785 /// "additionalProperties": false,
26786 /// "x-schema-name": "PackFormulaAnalyticsCollection"
26787 ///}
26788 /// ```
26789 /// </details>
26790 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26791 #[serde(deny_unknown_fields)]
26792 pub struct PackFormulaAnalyticsCollection {
26793 pub items: ::std::vec::Vec<PackFormulaAnalyticsItem>,
26794 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
26795 pub next_page_link: ::std::option::Option<NextPageLink>,
26796 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
26797 pub next_page_token: ::std::option::Option<NextPageToken>,
26798 }
26799
26800 impl ::std::convert::From<&PackFormulaAnalyticsCollection> for PackFormulaAnalyticsCollection {
26801 fn from(value: &PackFormulaAnalyticsCollection) -> Self {
26802 value.clone()
26803 }
26804 }
26805
26806 ///Analytics data for a Coda Pack formula.
26807 ///
26808 /// <details><summary>JSON schema</summary>
26809 ///
26810 /// ```json
26811 ///{
26812 /// "description": "Analytics data for a Coda Pack formula.",
26813 /// "type": "object",
26814 /// "required": [
26815 /// "formula",
26816 /// "metrics"
26817 /// ],
26818 /// "properties": {
26819 /// "formula": {
26820 /// "$ref": "#/components/schemas/PackFormulaIdentifier"
26821 /// },
26822 /// "metrics": {
26823 /// "type": "array",
26824 /// "items": {
26825 /// "$ref": "#/components/schemas/PackFormulaAnalyticsMetrics"
26826 /// }
26827 /// }
26828 /// },
26829 /// "additionalProperties": false,
26830 /// "x-schema-name": "PackFormulaAnalyticsItem"
26831 ///}
26832 /// ```
26833 /// </details>
26834 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26835 #[serde(deny_unknown_fields)]
26836 pub struct PackFormulaAnalyticsItem {
26837 pub formula: PackFormulaIdentifier,
26838 pub metrics: ::std::vec::Vec<PackFormulaAnalyticsMetrics>,
26839 }
26840
26841 impl ::std::convert::From<&PackFormulaAnalyticsItem> for PackFormulaAnalyticsItem {
26842 fn from(value: &PackFormulaAnalyticsItem) -> Self {
26843 value.clone()
26844 }
26845 }
26846
26847 ///Analytics metrics for a Coda Pack formula.
26848 ///
26849 /// <details><summary>JSON schema</summary>
26850 ///
26851 /// ```json
26852 ///{
26853 /// "description": "Analytics metrics for a Coda Pack formula.",
26854 /// "type": "object",
26855 /// "required": [
26856 /// "date",
26857 /// "docsActivelyUsing",
26858 /// "docsActivelyUsing30Day",
26859 /// "docsActivelyUsing7Day",
26860 /// "docsActivelyUsing90Day",
26861 /// "docsActivelyUsingAllTime",
26862 /// "errors",
26863 /// "formulaInvocations",
26864 /// "workspacesActivelyUsing",
26865 /// "workspacesActivelyUsing30Day",
26866 /// "workspacesActivelyUsing7Day",
26867 /// "workspacesActivelyUsing90Day",
26868 /// "workspacesActivelyUsingAllTime"
26869 /// ],
26870 /// "properties": {
26871 /// "date": {
26872 /// "description": "Date of the analytics data.",
26873 /// "examples": [
26874 /// "2020-09-02"
26875 /// ],
26876 /// "type": "string",
26877 /// "format": "date"
26878 /// },
26879 /// "docsActivelyUsing": {
26880 /// "description": "Number of unique docs that have invoked a formula
26881 /// from this Pack in the past day.",
26882 /// "examples": [
26883 /// 50
26884 /// ],
26885 /// "type": "integer"
26886 /// },
26887 /// "docsActivelyUsing30Day": {
26888 /// "description": "Number of unique docs that have invoked a formula
26889 /// from this Pack in the past 30 days.",
26890 /// "examples": [
26891 /// 200
26892 /// ],
26893 /// "type": "integer"
26894 /// },
26895 /// "docsActivelyUsing7Day": {
26896 /// "description": "Number of unique docs that have invoked a formula
26897 /// from this Pack in the past 7 days.",
26898 /// "examples": [
26899 /// 100
26900 /// ],
26901 /// "type": "integer"
26902 /// },
26903 /// "docsActivelyUsing90Day": {
26904 /// "description": "Number of unique docs that have invoked a formula
26905 /// from this Pack in the past 90 days.",
26906 /// "examples": [
26907 /// 300
26908 /// ],
26909 /// "type": "integer"
26910 /// },
26911 /// "docsActivelyUsingAllTime": {
26912 /// "description": "Number of unique docs that have invoked a formula
26913 /// from this Pack ever.",
26914 /// "examples": [
26915 /// 500
26916 /// ],
26917 /// "type": "integer"
26918 /// },
26919 /// "errors": {
26920 /// "description": "Number of errors from invocations.",
26921 /// "examples": [
26922 /// 5
26923 /// ],
26924 /// "type": "integer"
26925 /// },
26926 /// "formulaInvocations": {
26927 /// "description": "Number of times this formula has been invoked.",
26928 /// "examples": [
26929 /// 123
26930 /// ],
26931 /// "type": "integer"
26932 /// },
26933 /// "medianLatencyMs": {
26934 /// "description": "Median latency of an invocation in milliseconds.
26935 /// Only present for daily metrics.",
26936 /// "examples": [
26937 /// 500
26938 /// ],
26939 /// "type": "integer"
26940 /// },
26941 /// "medianResponseSizeBytes": {
26942 /// "description": "Median response size in bytes. Only present for
26943 /// daily metrics.",
26944 /// "examples": [
26945 /// 300
26946 /// ],
26947 /// "type": "integer"
26948 /// },
26949 /// "revenueUsd": {
26950 /// "description": "Amount of revenue (in USD) that the Pack has
26951 /// produced.",
26952 /// "type": "string"
26953 /// },
26954 /// "workspacesActivelyTrialing": {
26955 /// "description": "Number of unique workspaces that are currently
26956 /// involved in a trial.",
26957 /// "type": "integer"
26958 /// },
26959 /// "workspacesActivelyTrialing30Day": {
26960 /// "description": "Number of unique workspaces that have been involved
26961 /// in a trial in the last 30 days.",
26962 /// "type": "integer"
26963 /// },
26964 /// "workspacesActivelyTrialing7Day": {
26965 /// "description": "Number of unique workspaces that have been involved
26966 /// in a trial in the last 7 days.",
26967 /// "type": "integer"
26968 /// },
26969 /// "workspacesActivelyTrialing90Day": {
26970 /// "description": "Number of unique workspaces that have been involved
26971 /// in a trial in the last 90 days.",
26972 /// "type": "integer"
26973 /// },
26974 /// "workspacesActivelyTrialingAllTime": {
26975 /// "description": "Number of unique workspaces that have been involved
26976 /// in a trial ever.",
26977 /// "type": "integer"
26978 /// },
26979 /// "workspacesActivelyUsing": {
26980 /// "description": "Number of unique workspaces that have invoked a
26981 /// formula from this Pack in the past day.",
26982 /// "examples": [
26983 /// 10
26984 /// ],
26985 /// "type": "integer"
26986 /// },
26987 /// "workspacesActivelyUsing30Day": {
26988 /// "description": "Number of unique workspaces that have invoked a
26989 /// formula from this Pack in the past 30 days.",
26990 /// "examples": [
26991 /// 20
26992 /// ],
26993 /// "type": "integer"
26994 /// },
26995 /// "workspacesActivelyUsing7Day": {
26996 /// "description": "Number of unique workspaces that have invoked a
26997 /// formula from this Pack in the past 7 days.",
26998 /// "examples": [
26999 /// 15
27000 /// ],
27001 /// "type": "integer"
27002 /// },
27003 /// "workspacesActivelyUsing90Day": {
27004 /// "description": "Number of unique workspaces that have invoked a
27005 /// formula from this Pack in the past 90 days.",
27006 /// "examples": [
27007 /// 30
27008 /// ],
27009 /// "type": "integer"
27010 /// },
27011 /// "workspacesActivelyUsingAllTime": {
27012 /// "description": "Number of unique workspaces that have invoked a
27013 /// formula from this Pack ever.",
27014 /// "examples": [
27015 /// 50
27016 /// ],
27017 /// "type": "integer"
27018 /// },
27019 /// "workspacesNewlySubscribed": {
27020 /// "description": "Number of unique workspaces that have recently
27021 /// subscribed to the Pack.",
27022 /// "type": "integer"
27023 /// },
27024 /// "workspacesWithActiveSubscriptions": {
27025 /// "description": "Number of unique workspaces that are currently
27026 /// subscribed to the Pack.",
27027 /// "type": "integer"
27028 /// },
27029 /// "workspacesWithSuccessfulTrials": {
27030 /// "description": "Number of unique workspaces that subscribed after
27031 /// undertaking a Pack trial.",
27032 /// "type": "integer"
27033 /// }
27034 /// },
27035 /// "additionalProperties": false,
27036 /// "x-schema-name": "PackFormulaAnalyticsMetrics"
27037 ///}
27038 /// ```
27039 /// </details>
27040 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27041 #[serde(deny_unknown_fields)]
27042 pub struct PackFormulaAnalyticsMetrics {
27043 ///Date of the analytics data.
27044 pub date: ::chrono::naive::NaiveDate,
27045 ///Number of unique docs that have invoked a formula from this Pack in
27046 /// the past day.
27047 #[serde(rename = "docsActivelyUsing")]
27048 pub docs_actively_using: i64,
27049 ///Number of unique docs that have invoked a formula from this Pack in
27050 /// the past 30 days.
27051 #[serde(rename = "docsActivelyUsing30Day")]
27052 pub docs_actively_using30_day: i64,
27053 ///Number of unique docs that have invoked a formula from this Pack in
27054 /// the past 7 days.
27055 #[serde(rename = "docsActivelyUsing7Day")]
27056 pub docs_actively_using7_day: i64,
27057 ///Number of unique docs that have invoked a formula from this Pack in
27058 /// the past 90 days.
27059 #[serde(rename = "docsActivelyUsing90Day")]
27060 pub docs_actively_using90_day: i64,
27061 ///Number of unique docs that have invoked a formula from this Pack
27062 /// ever.
27063 #[serde(rename = "docsActivelyUsingAllTime")]
27064 pub docs_actively_using_all_time: i64,
27065 ///Number of errors from invocations.
27066 pub errors: i64,
27067 ///Number of times this formula has been invoked.
27068 #[serde(rename = "formulaInvocations")]
27069 pub formula_invocations: i64,
27070 ///Median latency of an invocation in milliseconds. Only present for
27071 /// daily metrics.
27072 #[serde(rename = "medianLatencyMs", default, skip_serializing_if = "::std::option::Option::is_none")]
27073 pub median_latency_ms: ::std::option::Option<i64>,
27074 ///Median response size in bytes. Only present for daily metrics.
27075 #[serde(rename = "medianResponseSizeBytes", default, skip_serializing_if = "::std::option::Option::is_none")]
27076 pub median_response_size_bytes: ::std::option::Option<i64>,
27077 ///Amount of revenue (in USD) that the Pack has produced.
27078 #[serde(rename = "revenueUsd", default, skip_serializing_if = "::std::option::Option::is_none")]
27079 pub revenue_usd: ::std::option::Option<::std::string::String>,
27080 ///Number of unique workspaces that are currently involved in a trial.
27081 #[serde(rename = "workspacesActivelyTrialing", default, skip_serializing_if = "::std::option::Option::is_none")]
27082 pub workspaces_actively_trialing: ::std::option::Option<i64>,
27083 ///Number of unique workspaces that have been involved in a trial in
27084 /// the last 30 days.
27085 #[serde(rename = "workspacesActivelyTrialing30Day", default, skip_serializing_if = "::std::option::Option::is_none")]
27086 pub workspaces_actively_trialing30_day: ::std::option::Option<i64>,
27087 ///Number of unique workspaces that have been involved in a trial in
27088 /// the last 7 days.
27089 #[serde(rename = "workspacesActivelyTrialing7Day", default, skip_serializing_if = "::std::option::Option::is_none")]
27090 pub workspaces_actively_trialing7_day: ::std::option::Option<i64>,
27091 ///Number of unique workspaces that have been involved in a trial in
27092 /// the last 90 days.
27093 #[serde(rename = "workspacesActivelyTrialing90Day", default, skip_serializing_if = "::std::option::Option::is_none")]
27094 pub workspaces_actively_trialing90_day: ::std::option::Option<i64>,
27095 ///Number of unique workspaces that have been involved in a trial ever.
27096 #[serde(rename = "workspacesActivelyTrialingAllTime", default, skip_serializing_if = "::std::option::Option::is_none")]
27097 pub workspaces_actively_trialing_all_time: ::std::option::Option<i64>,
27098 ///Number of unique workspaces that have invoked a formula from this
27099 /// Pack in the past day.
27100 #[serde(rename = "workspacesActivelyUsing")]
27101 pub workspaces_actively_using: i64,
27102 ///Number of unique workspaces that have invoked a formula from this
27103 /// Pack in the past 30 days.
27104 #[serde(rename = "workspacesActivelyUsing30Day")]
27105 pub workspaces_actively_using30_day: i64,
27106 ///Number of unique workspaces that have invoked a formula from this
27107 /// Pack in the past 7 days.
27108 #[serde(rename = "workspacesActivelyUsing7Day")]
27109 pub workspaces_actively_using7_day: i64,
27110 ///Number of unique workspaces that have invoked a formula from this
27111 /// Pack in the past 90 days.
27112 #[serde(rename = "workspacesActivelyUsing90Day")]
27113 pub workspaces_actively_using90_day: i64,
27114 ///Number of unique workspaces that have invoked a formula from this
27115 /// Pack ever.
27116 #[serde(rename = "workspacesActivelyUsingAllTime")]
27117 pub workspaces_actively_using_all_time: i64,
27118 ///Number of unique workspaces that have recently subscribed to the
27119 /// Pack.
27120 #[serde(rename = "workspacesNewlySubscribed", default, skip_serializing_if = "::std::option::Option::is_none")]
27121 pub workspaces_newly_subscribed: ::std::option::Option<i64>,
27122 ///Number of unique workspaces that are currently subscribed to the
27123 /// Pack.
27124 #[serde(rename = "workspacesWithActiveSubscriptions", default, skip_serializing_if = "::std::option::Option::is_none")]
27125 pub workspaces_with_active_subscriptions: ::std::option::Option<i64>,
27126 ///Number of unique workspaces that subscribed after undertaking a Pack
27127 /// trial.
27128 #[serde(rename = "workspacesWithSuccessfulTrials", default, skip_serializing_if = "::std::option::Option::is_none")]
27129 pub workspaces_with_successful_trials: ::std::option::Option<i64>,
27130 }
27131
27132 impl ::std::convert::From<&PackFormulaAnalyticsMetrics> for PackFormulaAnalyticsMetrics {
27133 fn from(value: &PackFormulaAnalyticsMetrics) -> Self {
27134 value.clone()
27135 }
27136 }
27137
27138 ///Determines how the Pack formula analytics returned are sorted.
27139 ///
27140 /// <details><summary>JSON schema</summary>
27141 ///
27142 /// ```json
27143 ///{
27144 /// "description": "Determines how the Pack formula analytics returned are
27145 /// sorted.",
27146 /// "type": "string",
27147 /// "enum": [
27148 /// "date",
27149 /// "formulaName",
27150 /// "formulaType",
27151 /// "formulaInvocations",
27152 /// "medianLatencyMs",
27153 /// "medianResponseSizeBytes",
27154 /// "errors",
27155 /// "docsActivelyUsing",
27156 /// "docsActivelyUsing7Day",
27157 /// "docsActivelyUsing30Day",
27158 /// "docsActivelyUsing90Day",
27159 /// "docsActivelyUsingAllTime",
27160 /// "workspacesActivelyUsing",
27161 /// "workspacesActivelyUsing7Day",
27162 /// "workspacesActivelyUsing30Day",
27163 /// "workspacesActivelyUsing90Day",
27164 /// "workspacesActivelyUsingAllTime"
27165 /// ],
27166 /// "x-schema-name": "PackFormulaAnalyticsOrderBy",
27167 /// "x-tsEnumNames": [
27168 /// "AnalyticsDate",
27169 /// "FormulaName",
27170 /// "FormulaType",
27171 /// "FormulaInvocations",
27172 /// "MedianLatencyMs",
27173 /// "MedianResponseSizeBytes",
27174 /// "Errors",
27175 /// "DocsActivelyUsing",
27176 /// "DocsActivelyUsing7Day",
27177 /// "DocsActivelyUsing30Day",
27178 /// "DocsActivelyUsing90Day",
27179 /// "DocsActivelyUsingAllTime",
27180 /// "WorkspacesActivelyUsing",
27181 /// "WorkspacesActivelyUsing7Day",
27182 /// "WorkspacesActivelyUsing30Day",
27183 /// "WorkspacesActivelyUsing90Day",
27184 /// "WorkspacesActivelyUsingAllTime"
27185 /// ]
27186 ///}
27187 /// ```
27188 /// </details>
27189 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27190 pub enum PackFormulaAnalyticsOrderBy {
27191 #[serde(rename = "date")]
27192 Date,
27193 #[serde(rename = "formulaName")]
27194 FormulaName,
27195 #[serde(rename = "formulaType")]
27196 FormulaType,
27197 #[serde(rename = "formulaInvocations")]
27198 FormulaInvocations,
27199 #[serde(rename = "medianLatencyMs")]
27200 MedianLatencyMs,
27201 #[serde(rename = "medianResponseSizeBytes")]
27202 MedianResponseSizeBytes,
27203 #[serde(rename = "errors")]
27204 Errors,
27205 #[serde(rename = "docsActivelyUsing")]
27206 DocsActivelyUsing,
27207 #[serde(rename = "docsActivelyUsing7Day")]
27208 DocsActivelyUsing7Day,
27209 #[serde(rename = "docsActivelyUsing30Day")]
27210 DocsActivelyUsing30Day,
27211 #[serde(rename = "docsActivelyUsing90Day")]
27212 DocsActivelyUsing90Day,
27213 #[serde(rename = "docsActivelyUsingAllTime")]
27214 DocsActivelyUsingAllTime,
27215 #[serde(rename = "workspacesActivelyUsing")]
27216 WorkspacesActivelyUsing,
27217 #[serde(rename = "workspacesActivelyUsing7Day")]
27218 WorkspacesActivelyUsing7Day,
27219 #[serde(rename = "workspacesActivelyUsing30Day")]
27220 WorkspacesActivelyUsing30Day,
27221 #[serde(rename = "workspacesActivelyUsing90Day")]
27222 WorkspacesActivelyUsing90Day,
27223 #[serde(rename = "workspacesActivelyUsingAllTime")]
27224 WorkspacesActivelyUsingAllTime,
27225 }
27226
27227 impl ::std::convert::From<&Self> for PackFormulaAnalyticsOrderBy {
27228 fn from(value: &PackFormulaAnalyticsOrderBy) -> Self {
27229 value.clone()
27230 }
27231 }
27232
27233 impl ::std::fmt::Display for PackFormulaAnalyticsOrderBy {
27234 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27235 match *self {
27236 Self::Date => f.write_str("date"),
27237 Self::FormulaName => f.write_str("formulaName"),
27238 Self::FormulaType => f.write_str("formulaType"),
27239 Self::FormulaInvocations => f.write_str("formulaInvocations"),
27240 Self::MedianLatencyMs => f.write_str("medianLatencyMs"),
27241 Self::MedianResponseSizeBytes => f.write_str("medianResponseSizeBytes"),
27242 Self::Errors => f.write_str("errors"),
27243 Self::DocsActivelyUsing => f.write_str("docsActivelyUsing"),
27244 Self::DocsActivelyUsing7Day => f.write_str("docsActivelyUsing7Day"),
27245 Self::DocsActivelyUsing30Day => f.write_str("docsActivelyUsing30Day"),
27246 Self::DocsActivelyUsing90Day => f.write_str("docsActivelyUsing90Day"),
27247 Self::DocsActivelyUsingAllTime => f.write_str("docsActivelyUsingAllTime"),
27248 Self::WorkspacesActivelyUsing => f.write_str("workspacesActivelyUsing"),
27249 Self::WorkspacesActivelyUsing7Day => f.write_str("workspacesActivelyUsing7Day"),
27250 Self::WorkspacesActivelyUsing30Day => f.write_str("workspacesActivelyUsing30Day"),
27251 Self::WorkspacesActivelyUsing90Day => f.write_str("workspacesActivelyUsing90Day"),
27252 Self::WorkspacesActivelyUsingAllTime => f.write_str("workspacesActivelyUsingAllTime"),
27253 }
27254 }
27255 }
27256
27257 impl ::std::str::FromStr for PackFormulaAnalyticsOrderBy {
27258 type Err = self::error::ConversionError;
27259 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27260 match value {
27261 "date" => Ok(Self::Date),
27262 "formulaName" => Ok(Self::FormulaName),
27263 "formulaType" => Ok(Self::FormulaType),
27264 "formulaInvocations" => Ok(Self::FormulaInvocations),
27265 "medianLatencyMs" => Ok(Self::MedianLatencyMs),
27266 "medianResponseSizeBytes" => Ok(Self::MedianResponseSizeBytes),
27267 "errors" => Ok(Self::Errors),
27268 "docsActivelyUsing" => Ok(Self::DocsActivelyUsing),
27269 "docsActivelyUsing7Day" => Ok(Self::DocsActivelyUsing7Day),
27270 "docsActivelyUsing30Day" => Ok(Self::DocsActivelyUsing30Day),
27271 "docsActivelyUsing90Day" => Ok(Self::DocsActivelyUsing90Day),
27272 "docsActivelyUsingAllTime" => Ok(Self::DocsActivelyUsingAllTime),
27273 "workspacesActivelyUsing" => Ok(Self::WorkspacesActivelyUsing),
27274 "workspacesActivelyUsing7Day" => Ok(Self::WorkspacesActivelyUsing7Day),
27275 "workspacesActivelyUsing30Day" => Ok(Self::WorkspacesActivelyUsing30Day),
27276 "workspacesActivelyUsing90Day" => Ok(Self::WorkspacesActivelyUsing90Day),
27277 "workspacesActivelyUsingAllTime" => Ok(Self::WorkspacesActivelyUsingAllTime),
27278 _ => Err("invalid value".into()),
27279 }
27280 }
27281 }
27282
27283 impl ::std::convert::TryFrom<&str> for PackFormulaAnalyticsOrderBy {
27284 type Error = self::error::ConversionError;
27285 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27286 value.parse()
27287 }
27288 }
27289
27290 impl ::std::convert::TryFrom<&::std::string::String> for PackFormulaAnalyticsOrderBy {
27291 type Error = self::error::ConversionError;
27292 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27293 value.parse()
27294 }
27295 }
27296
27297 impl ::std::convert::TryFrom<::std::string::String> for PackFormulaAnalyticsOrderBy {
27298 type Error = self::error::ConversionError;
27299 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27300 value.parse()
27301 }
27302 }
27303
27304 ///`PackFormulaIdentifier`
27305 ///
27306 /// <details><summary>JSON schema</summary>
27307 ///
27308 /// ```json
27309 ///{
27310 /// "type": "object",
27311 /// "required": [
27312 /// "name",
27313 /// "type"
27314 /// ],
27315 /// "properties": {
27316 /// "name": {
27317 /// "description": "The Pack formula name.",
27318 /// "examples": [
27319 /// "SquareRoot"
27320 /// ],
27321 /// "type": "string"
27322 /// },
27323 /// "type": {
27324 /// "$ref": "#/components/schemas/PackFormulaType"
27325 /// }
27326 /// },
27327 /// "additionalProperties": false,
27328 /// "x-schema-name": "PackFormulaIdentifier"
27329 ///}
27330 /// ```
27331 /// </details>
27332 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27333 #[serde(deny_unknown_fields)]
27334 pub struct PackFormulaIdentifier {
27335 ///The Pack formula name.
27336 pub name: ::std::string::String,
27337 #[serde(rename = "type")]
27338 pub type_: PackFormulaType,
27339 }
27340
27341 impl ::std::convert::From<&PackFormulaIdentifier> for PackFormulaIdentifier {
27342 fn from(value: &PackFormulaIdentifier) -> Self {
27343 value.clone()
27344 }
27345 }
27346
27347 ///`PackFormulaType`
27348 ///
27349 /// <details><summary>JSON schema</summary>
27350 ///
27351 /// ```json
27352 ///{
27353 /// "type": "string",
27354 /// "enum": [
27355 /// "action",
27356 /// "formula",
27357 /// "sync",
27358 /// "metadata"
27359 /// ],
27360 /// "x-schema-name": "PackFormulaType",
27361 /// "x-tsEnumNames": [
27362 /// "Action",
27363 /// "Formula",
27364 /// "Sync",
27365 /// "Metadata"
27366 /// ]
27367 ///}
27368 /// ```
27369 /// </details>
27370 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27371 pub enum PackFormulaType {
27372 #[serde(rename = "action")]
27373 Action,
27374 #[serde(rename = "formula")]
27375 Formula,
27376 #[serde(rename = "sync")]
27377 Sync,
27378 #[serde(rename = "metadata")]
27379 Metadata,
27380 }
27381
27382 impl ::std::convert::From<&Self> for PackFormulaType {
27383 fn from(value: &PackFormulaType) -> Self {
27384 value.clone()
27385 }
27386 }
27387
27388 impl ::std::fmt::Display for PackFormulaType {
27389 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27390 match *self {
27391 Self::Action => f.write_str("action"),
27392 Self::Formula => f.write_str("formula"),
27393 Self::Sync => f.write_str("sync"),
27394 Self::Metadata => f.write_str("metadata"),
27395 }
27396 }
27397 }
27398
27399 impl ::std::str::FromStr for PackFormulaType {
27400 type Err = self::error::ConversionError;
27401 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27402 match value {
27403 "action" => Ok(Self::Action),
27404 "formula" => Ok(Self::Formula),
27405 "sync" => Ok(Self::Sync),
27406 "metadata" => Ok(Self::Metadata),
27407 _ => Err("invalid value".into()),
27408 }
27409 }
27410 }
27411
27412 impl ::std::convert::TryFrom<&str> for PackFormulaType {
27413 type Error = self::error::ConversionError;
27414 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27415 value.parse()
27416 }
27417 }
27418
27419 impl ::std::convert::TryFrom<&::std::string::String> for PackFormulaType {
27420 type Error = self::error::ConversionError;
27421 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27422 value.parse()
27423 }
27424 }
27425
27426 impl ::std::convert::TryFrom<::std::string::String> for PackFormulaType {
27427 type Error = self::error::ConversionError;
27428 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27429 value.parse()
27430 }
27431 }
27432
27433 ///`PackGlobalPrincipal`
27434 ///
27435 /// <details><summary>JSON schema</summary>
27436 ///
27437 /// ```json
27438 ///{
27439 /// "type": "object",
27440 /// "required": [
27441 /// "type"
27442 /// ],
27443 /// "properties": {
27444 /// "type": {
27445 /// "type": "string",
27446 /// "enum": [
27447 /// "worldwide"
27448 /// ],
27449 /// "x-tsType": "PackPrincipalType.Worldwide"
27450 /// }
27451 /// },
27452 /// "additionalProperties": false,
27453 /// "x-schema-name": "PackGlobalPrincipal"
27454 ///}
27455 /// ```
27456 /// </details>
27457 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27458 #[serde(deny_unknown_fields)]
27459 pub struct PackGlobalPrincipal {
27460 #[serde(rename = "type")]
27461 pub type_: PackGlobalPrincipalType,
27462 }
27463
27464 impl ::std::convert::From<&PackGlobalPrincipal> for PackGlobalPrincipal {
27465 fn from(value: &PackGlobalPrincipal) -> Self {
27466 value.clone()
27467 }
27468 }
27469
27470 ///`PackGlobalPrincipalType`
27471 ///
27472 /// <details><summary>JSON schema</summary>
27473 ///
27474 /// ```json
27475 ///{
27476 /// "type": "string",
27477 /// "enum": [
27478 /// "worldwide"
27479 /// ],
27480 /// "x-tsType": "PackPrincipalType.Worldwide"
27481 ///}
27482 /// ```
27483 /// </details>
27484 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27485 pub enum PackGlobalPrincipalType {
27486 #[serde(rename = "worldwide")]
27487 Worldwide,
27488 }
27489
27490 impl ::std::convert::From<&Self> for PackGlobalPrincipalType {
27491 fn from(value: &PackGlobalPrincipalType) -> Self {
27492 value.clone()
27493 }
27494 }
27495
27496 impl ::std::fmt::Display for PackGlobalPrincipalType {
27497 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27498 match *self {
27499 Self::Worldwide => f.write_str("worldwide"),
27500 }
27501 }
27502 }
27503
27504 impl ::std::str::FromStr for PackGlobalPrincipalType {
27505 type Err = self::error::ConversionError;
27506 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27507 match value {
27508 "worldwide" => Ok(Self::Worldwide),
27509 _ => Err("invalid value".into()),
27510 }
27511 }
27512 }
27513
27514 impl ::std::convert::TryFrom<&str> for PackGlobalPrincipalType {
27515 type Error = self::error::ConversionError;
27516 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27517 value.parse()
27518 }
27519 }
27520
27521 impl ::std::convert::TryFrom<&::std::string::String> for PackGlobalPrincipalType {
27522 type Error = self::error::ConversionError;
27523 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27524 value.parse()
27525 }
27526 }
27527
27528 impl ::std::convert::TryFrom<::std::string::String> for PackGlobalPrincipalType {
27529 type Error = self::error::ConversionError;
27530 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27531 value.parse()
27532 }
27533 }
27534
27535 ///`PackGrammarlyInstitutionPrincipal`
27536 ///
27537 /// <details><summary>JSON schema</summary>
27538 ///
27539 /// ```json
27540 ///{
27541 /// "type": "object",
27542 /// "required": [
27543 /// "grammarlyInstitutionId",
27544 /// "type"
27545 /// ],
27546 /// "properties": {
27547 /// "grammarlyInstitutionId": {
27548 /// "type": "integer",
27549 /// "format": "int64",
27550 /// "minimum": 1.0
27551 /// },
27552 /// "type": {
27553 /// "type": "string",
27554 /// "enum": [
27555 /// "grammarlyInstitution"
27556 /// ],
27557 /// "x-tsType": "PackPrincipalType.GrammarlyInstitution"
27558 /// }
27559 /// },
27560 /// "additionalProperties": false,
27561 /// "x-schema-name": "PackGrammarlyInstitutionPrincipal"
27562 ///}
27563 /// ```
27564 /// </details>
27565 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27566 #[serde(deny_unknown_fields)]
27567 pub struct PackGrammarlyInstitutionPrincipal {
27568 #[serde(rename = "grammarlyInstitutionId")]
27569 pub grammarly_institution_id: ::std::num::NonZeroU64,
27570 #[serde(rename = "type")]
27571 pub type_: PackGrammarlyInstitutionPrincipalType,
27572 }
27573
27574 impl ::std::convert::From<&PackGrammarlyInstitutionPrincipal> for PackGrammarlyInstitutionPrincipal {
27575 fn from(value: &PackGrammarlyInstitutionPrincipal) -> Self {
27576 value.clone()
27577 }
27578 }
27579
27580 ///`PackGrammarlyInstitutionPrincipalType`
27581 ///
27582 /// <details><summary>JSON schema</summary>
27583 ///
27584 /// ```json
27585 ///{
27586 /// "type": "string",
27587 /// "enum": [
27588 /// "grammarlyInstitution"
27589 /// ],
27590 /// "x-tsType": "PackPrincipalType.GrammarlyInstitution"
27591 ///}
27592 /// ```
27593 /// </details>
27594 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27595 pub enum PackGrammarlyInstitutionPrincipalType {
27596 #[serde(rename = "grammarlyInstitution")]
27597 GrammarlyInstitution,
27598 }
27599
27600 impl ::std::convert::From<&Self> for PackGrammarlyInstitutionPrincipalType {
27601 fn from(value: &PackGrammarlyInstitutionPrincipalType) -> Self {
27602 value.clone()
27603 }
27604 }
27605
27606 impl ::std::fmt::Display for PackGrammarlyInstitutionPrincipalType {
27607 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27608 match *self {
27609 Self::GrammarlyInstitution => f.write_str("grammarlyInstitution"),
27610 }
27611 }
27612 }
27613
27614 impl ::std::str::FromStr for PackGrammarlyInstitutionPrincipalType {
27615 type Err = self::error::ConversionError;
27616 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27617 match value {
27618 "grammarlyInstitution" => Ok(Self::GrammarlyInstitution),
27619 _ => Err("invalid value".into()),
27620 }
27621 }
27622 }
27623
27624 impl ::std::convert::TryFrom<&str> for PackGrammarlyInstitutionPrincipalType {
27625 type Error = self::error::ConversionError;
27626 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27627 value.parse()
27628 }
27629 }
27630
27631 impl ::std::convert::TryFrom<&::std::string::String> for PackGrammarlyInstitutionPrincipalType {
27632 type Error = self::error::ConversionError;
27633 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27634 value.parse()
27635 }
27636 }
27637
27638 impl ::std::convert::TryFrom<::std::string::String> for PackGrammarlyInstitutionPrincipalType {
27639 type Error = self::error::ConversionError;
27640 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27641 value.parse()
27642 }
27643 }
27644
27645 ///A Pack image file.
27646 ///
27647 /// <details><summary>JSON schema</summary>
27648 ///
27649 /// ```json
27650 ///{
27651 /// "description": "A Pack image file.",
27652 /// "type": "object",
27653 /// "required": [
27654 /// "assetId",
27655 /// "filename",
27656 /// "imageUrl"
27657 /// ],
27658 /// "properties": {
27659 /// "altText": {
27660 /// "description": "The alt text for the image.",
27661 /// "type": "string"
27662 /// },
27663 /// "assetId": {
27664 /// "description": "The asset id of the Pack's image.",
27665 /// "type": "string"
27666 /// },
27667 /// "filename": {
27668 /// "description": "The name of the image file.",
27669 /// "type": "string"
27670 /// },
27671 /// "imageUrl": {
27672 /// "description": "The URL to the image file.",
27673 /// "type": "string",
27674 /// "format": "url"
27675 /// },
27676 /// "mimeType": {
27677 /// "description": "The media type of the image.",
27678 /// "examples": [
27679 /// "image/jpeg"
27680 /// ],
27681 /// "type": "string"
27682 /// }
27683 /// },
27684 /// "additionalProperties": false,
27685 /// "x-schema-name": "PackImageFile"
27686 ///}
27687 /// ```
27688 /// </details>
27689 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27690 #[serde(deny_unknown_fields)]
27691 pub struct PackImageFile {
27692 ///The alt text for the image.
27693 #[serde(rename = "altText", default, skip_serializing_if = "::std::option::Option::is_none")]
27694 pub alt_text: ::std::option::Option<::std::string::String>,
27695 ///The asset id of the Pack's image.
27696 #[serde(rename = "assetId")]
27697 pub asset_id: ::std::string::String,
27698 ///The name of the image file.
27699 pub filename: ::std::string::String,
27700 ///The URL to the image file.
27701 #[serde(rename = "imageUrl")]
27702 pub image_url: ::std::string::String,
27703 ///The media type of the image.
27704 #[serde(rename = "mimeType", default, skip_serializing_if = "::std::option::Option::is_none")]
27705 pub mime_type: ::std::option::Option<::std::string::String>,
27706 }
27707
27708 impl ::std::convert::From<&PackImageFile> for PackImageFile {
27709 fn from(value: &PackImageFile) -> Self {
27710 value.clone()
27711 }
27712 }
27713
27714 ///Pack log generated by an executing ingestion. Contains metadata helpful
27715 /// for debugging
27716 ///
27717 /// <details><summary>JSON schema</summary>
27718 ///
27719 /// ```json
27720 ///{
27721 /// "description": "Pack log generated by an executing ingestion. Contains
27722 /// metadata helpful for debugging",
27723 /// "type": "object",
27724 /// "required": [
27725 /// "context",
27726 /// "level",
27727 /// "message",
27728 /// "type"
27729 /// ],
27730 /// "properties": {
27731 /// "context": {
27732 /// "$ref": "#/components/schemas/PackLogContext"
27733 /// },
27734 /// "level": {
27735 /// "$ref": "#/components/schemas/LogLevel"
27736 /// },
27737 /// "message": {
27738 /// "description": "The message that's passed into context.logger.",
27739 /// "examples": [
27740 /// "The formula is called!"
27741 /// ],
27742 /// "type": "string"
27743 /// },
27744 /// "type": {
27745 /// "type": "string",
27746 /// "enum": [
27747 /// "ingestionDebug"
27748 /// ],
27749 /// "x-tsType": "PackLogType.IngestionDebug"
27750 /// }
27751 /// },
27752 /// "additionalProperties": false,
27753 /// "x-schema-name": "PackIngestionDebugLog"
27754 ///}
27755 /// ```
27756 /// </details>
27757 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27758 #[serde(deny_unknown_fields)]
27759 pub struct PackIngestionDebugLog {
27760 pub context: PackLogContext,
27761 pub level: LogLevel,
27762 ///The message that's passed into context.logger.
27763 pub message: ::std::string::String,
27764 #[serde(rename = "type")]
27765 pub type_: PackIngestionDebugLogType,
27766 }
27767
27768 impl ::std::convert::From<&PackIngestionDebugLog> for PackIngestionDebugLog {
27769 fn from(value: &PackIngestionDebugLog) -> Self {
27770 value.clone()
27771 }
27772 }
27773
27774 ///`PackIngestionDebugLogType`
27775 ///
27776 /// <details><summary>JSON schema</summary>
27777 ///
27778 /// ```json
27779 ///{
27780 /// "type": "string",
27781 /// "enum": [
27782 /// "ingestionDebug"
27783 /// ],
27784 /// "x-tsType": "PackLogType.IngestionDebug"
27785 ///}
27786 /// ```
27787 /// </details>
27788 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27789 pub enum PackIngestionDebugLogType {
27790 #[serde(rename = "ingestionDebug")]
27791 IngestionDebug,
27792 }
27793
27794 impl ::std::convert::From<&Self> for PackIngestionDebugLogType {
27795 fn from(value: &PackIngestionDebugLogType) -> Self {
27796 value.clone()
27797 }
27798 }
27799
27800 impl ::std::fmt::Display for PackIngestionDebugLogType {
27801 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27802 match *self {
27803 Self::IngestionDebug => f.write_str("ingestionDebug"),
27804 }
27805 }
27806 }
27807
27808 impl ::std::str::FromStr for PackIngestionDebugLogType {
27809 type Err = self::error::ConversionError;
27810 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27811 match value {
27812 "ingestionDebug" => Ok(Self::IngestionDebug),
27813 _ => Err("invalid value".into()),
27814 }
27815 }
27816 }
27817
27818 impl ::std::convert::TryFrom<&str> for PackIngestionDebugLogType {
27819 type Error = self::error::ConversionError;
27820 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27821 value.parse()
27822 }
27823 }
27824
27825 impl ::std::convert::TryFrom<&::std::string::String> for PackIngestionDebugLogType {
27826 type Error = self::error::ConversionError;
27827 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27828 value.parse()
27829 }
27830 }
27831
27832 impl ::std::convert::TryFrom<::std::string::String> for PackIngestionDebugLogType {
27833 type Error = self::error::ConversionError;
27834 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27835 value.parse()
27836 }
27837 }
27838
27839 ///Pack log generated by an executing ingestion.
27840 ///
27841 /// <details><summary>JSON schema</summary>
27842 ///
27843 /// ```json
27844 ///{
27845 /// "description": "Pack log generated by an executing ingestion.",
27846 /// "type": "object",
27847 /// "required": [
27848 /// "context",
27849 /// "level",
27850 /// "message",
27851 /// "type"
27852 /// ],
27853 /// "properties": {
27854 /// "context": {
27855 /// "$ref": "#/components/schemas/PackLogContext"
27856 /// },
27857 /// "level": {
27858 /// "$ref": "#/components/schemas/LogLevel"
27859 /// },
27860 /// "message": {
27861 /// "description": "The message that's passed into context.logger.",
27862 /// "examples": [
27863 /// "The formula is called!"
27864 /// ],
27865 /// "type": "string"
27866 /// },
27867 /// "type": {
27868 /// "type": "string",
27869 /// "enum": [
27870 /// "ingestionLifecycle"
27871 /// ],
27872 /// "x-tsType": "PackLogType.IngestionLifecycle"
27873 /// }
27874 /// },
27875 /// "additionalProperties": false,
27876 /// "x-schema-name": "PackIngestionLifecycleLog"
27877 ///}
27878 /// ```
27879 /// </details>
27880 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27881 #[serde(deny_unknown_fields)]
27882 pub struct PackIngestionLifecycleLog {
27883 pub context: PackLogContext,
27884 pub level: LogLevel,
27885 ///The message that's passed into context.logger.
27886 pub message: ::std::string::String,
27887 #[serde(rename = "type")]
27888 pub type_: PackIngestionLifecycleLogType,
27889 }
27890
27891 impl ::std::convert::From<&PackIngestionLifecycleLog> for PackIngestionLifecycleLog {
27892 fn from(value: &PackIngestionLifecycleLog) -> Self {
27893 value.clone()
27894 }
27895 }
27896
27897 ///`PackIngestionLifecycleLogType`
27898 ///
27899 /// <details><summary>JSON schema</summary>
27900 ///
27901 /// ```json
27902 ///{
27903 /// "type": "string",
27904 /// "enum": [
27905 /// "ingestionLifecycle"
27906 /// ],
27907 /// "x-tsType": "PackLogType.IngestionLifecycle"
27908 ///}
27909 /// ```
27910 /// </details>
27911 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27912 pub enum PackIngestionLifecycleLogType {
27913 #[serde(rename = "ingestionLifecycle")]
27914 IngestionLifecycle,
27915 }
27916
27917 impl ::std::convert::From<&Self> for PackIngestionLifecycleLogType {
27918 fn from(value: &PackIngestionLifecycleLogType) -> Self {
27919 value.clone()
27920 }
27921 }
27922
27923 impl ::std::fmt::Display for PackIngestionLifecycleLogType {
27924 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27925 match *self {
27926 Self::IngestionLifecycle => f.write_str("ingestionLifecycle"),
27927 }
27928 }
27929 }
27930
27931 impl ::std::str::FromStr for PackIngestionLifecycleLogType {
27932 type Err = self::error::ConversionError;
27933 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27934 match value {
27935 "ingestionLifecycle" => Ok(Self::IngestionLifecycle),
27936 _ => Err("invalid value".into()),
27937 }
27938 }
27939 }
27940
27941 impl ::std::convert::TryFrom<&str> for PackIngestionLifecycleLogType {
27942 type Error = self::error::ConversionError;
27943 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27944 value.parse()
27945 }
27946 }
27947
27948 impl ::std::convert::TryFrom<&::std::string::String> for PackIngestionLifecycleLogType {
27949 type Error = self::error::ConversionError;
27950 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27951 value.parse()
27952 }
27953 }
27954
27955 impl ::std::convert::TryFrom<::std::string::String> for PackIngestionLifecycleLogType {
27956 type Error = self::error::ConversionError;
27957 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
27958 value.parse()
27959 }
27960 }
27961
27962 ///Coda internal logs from the packs infrastructure. Only visible to
27963 /// Codans.
27964 ///
27965 /// <details><summary>JSON schema</summary>
27966 ///
27967 /// ```json
27968 ///{
27969 /// "description": "Coda internal logs from the packs infrastructure. Only
27970 /// visible to Codans.",
27971 /// "type": "object",
27972 /// "required": [
27973 /// "context",
27974 /// "level",
27975 /// "message",
27976 /// "type"
27977 /// ],
27978 /// "properties": {
27979 /// "context": {
27980 /// "$ref": "#/components/schemas/PackLogContext"
27981 /// },
27982 /// "level": {
27983 /// "$ref": "#/components/schemas/LogLevel"
27984 /// },
27985 /// "message": {
27986 /// "description": "The log message.",
27987 /// "type": "string"
27988 /// },
27989 /// "type": {
27990 /// "type": "string",
27991 /// "enum": [
27992 /// "internal"
27993 /// ],
27994 /// "x-tsType": "PackLogType.Internal"
27995 /// }
27996 /// },
27997 /// "additionalProperties": false,
27998 /// "x-schema-name": "PackInternalLog"
27999 ///}
28000 /// ```
28001 /// </details>
28002 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28003 #[serde(deny_unknown_fields)]
28004 pub struct PackInternalLog {
28005 pub context: PackLogContext,
28006 pub level: LogLevel,
28007 ///The log message.
28008 pub message: ::std::string::String,
28009 #[serde(rename = "type")]
28010 pub type_: PackInternalLogType,
28011 }
28012
28013 impl ::std::convert::From<&PackInternalLog> for PackInternalLog {
28014 fn from(value: &PackInternalLog) -> Self {
28015 value.clone()
28016 }
28017 }
28018
28019 ///`PackInternalLogType`
28020 ///
28021 /// <details><summary>JSON schema</summary>
28022 ///
28023 /// ```json
28024 ///{
28025 /// "type": "string",
28026 /// "enum": [
28027 /// "internal"
28028 /// ],
28029 /// "x-tsType": "PackLogType.Internal"
28030 ///}
28031 /// ```
28032 /// </details>
28033 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28034 pub enum PackInternalLogType {
28035 #[serde(rename = "internal")]
28036 Internal,
28037 }
28038
28039 impl ::std::convert::From<&Self> for PackInternalLogType {
28040 fn from(value: &PackInternalLogType) -> Self {
28041 value.clone()
28042 }
28043 }
28044
28045 impl ::std::fmt::Display for PackInternalLogType {
28046 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28047 match *self {
28048 Self::Internal => f.write_str("internal"),
28049 }
28050 }
28051 }
28052
28053 impl ::std::str::FromStr for PackInternalLogType {
28054 type Err = self::error::ConversionError;
28055 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28056 match value {
28057 "internal" => Ok(Self::Internal),
28058 _ => Err("invalid value".into()),
28059 }
28060 }
28061 }
28062
28063 impl ::std::convert::TryFrom<&str> for PackInternalLogType {
28064 type Error = self::error::ConversionError;
28065 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28066 value.parse()
28067 }
28068 }
28069
28070 impl ::std::convert::TryFrom<&::std::string::String> for PackInternalLogType {
28071 type Error = self::error::ConversionError;
28072 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28073 value.parse()
28074 }
28075 }
28076
28077 impl ::std::convert::TryFrom<::std::string::String> for PackInternalLogType {
28078 type Error = self::error::ConversionError;
28079 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28080 value.parse()
28081 }
28082 }
28083
28084 ///Metadata about a Pack invitation.
28085 ///
28086 /// <details><summary>JSON schema</summary>
28087 ///
28088 /// ```json
28089 ///{
28090 /// "description": "Metadata about a Pack invitation.",
28091 /// "type": "object",
28092 /// "required": [
28093 /// "access",
28094 /// "createdAt",
28095 /// "expiresAt",
28096 /// "invitationId",
28097 /// "inviteeEmail",
28098 /// "inviterUserId",
28099 /// "packId"
28100 /// ],
28101 /// "properties": {
28102 /// "access": {
28103 /// "$ref": "#/components/schemas/PackAccessType"
28104 /// },
28105 /// "createdAt": {
28106 /// "description": "Timestamp when the invitation was created",
28107 /// "type": "string",
28108 /// "format": "date-time"
28109 /// },
28110 /// "expiresAt": {
28111 /// "description": "Timestamp when the invitation expires",
28112 /// "type": "string",
28113 /// "format": "date-time"
28114 /// },
28115 /// "invitationId": {
28116 /// "description": "ID of the invitation",
28117 /// "examples": [
28118 /// "550e8400-e29b-41d4-a716-446655440000"
28119 /// ],
28120 /// "type": "string"
28121 /// },
28122 /// "inviteeEmail": {
28123 /// "description": "Email address of the invited user",
28124 /// "examples": [
28125 /// "user@example.com"
28126 /// ],
28127 /// "type": "string"
28128 /// },
28129 /// "inviterUserId": {
28130 /// "description": "User ID of the user who created this invitation",
28131 /// "examples": [
28132 /// 456
28133 /// ],
28134 /// "type": "integer"
28135 /// },
28136 /// "packId": {
28137 /// "description": "ID of the Pack",
28138 /// "examples": [
28139 /// 123
28140 /// ],
28141 /// "type": "number"
28142 /// }
28143 /// },
28144 /// "additionalProperties": false,
28145 /// "x-schema-name": "PackInvitation"
28146 ///}
28147 /// ```
28148 /// </details>
28149 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28150 #[serde(deny_unknown_fields)]
28151 pub struct PackInvitation {
28152 pub access: PackAccessType,
28153 ///Timestamp when the invitation was created
28154 #[serde(rename = "createdAt")]
28155 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
28156 ///Timestamp when the invitation expires
28157 #[serde(rename = "expiresAt")]
28158 pub expires_at: ::chrono::DateTime<::chrono::offset::Utc>,
28159 ///ID of the invitation
28160 #[serde(rename = "invitationId")]
28161 pub invitation_id: ::std::string::String,
28162 ///Email address of the invited user
28163 #[serde(rename = "inviteeEmail")]
28164 pub invitee_email: ::std::string::String,
28165 ///User ID of the user who created this invitation
28166 #[serde(rename = "inviterUserId")]
28167 pub inviter_user_id: i64,
28168 #[serde(rename = "packId")]
28169 pub pack_id: f64,
28170 }
28171
28172 impl ::std::convert::From<&PackInvitation> for PackInvitation {
28173 fn from(value: &PackInvitation) -> Self {
28174 value.clone()
28175 }
28176 }
28177
28178 ///List of Pack invitations.
28179 ///
28180 /// <details><summary>JSON schema</summary>
28181 ///
28182 /// ```json
28183 ///{
28184 /// "description": "List of Pack invitations.",
28185 /// "type": "object",
28186 /// "required": [
28187 /// "items"
28188 /// ],
28189 /// "properties": {
28190 /// "items": {
28191 /// "type": "array",
28192 /// "items": {
28193 /// "$ref": "#/components/schemas/PackInvitation"
28194 /// }
28195 /// },
28196 /// "nextPageLink": {
28197 /// "description": "URL for fetching the next page of results",
28198 /// "type": [
28199 /// "string",
28200 /// "null"
28201 /// ],
28202 /// "format": "url"
28203 /// },
28204 /// "nextPageToken": {
28205 /// "description": "Token for fetching the next page of results",
28206 /// "type": [
28207 /// "string",
28208 /// "null"
28209 /// ]
28210 /// }
28211 /// },
28212 /// "additionalProperties": false,
28213 /// "x-schema-name": "PackInvitationList"
28214 ///}
28215 /// ```
28216 /// </details>
28217 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28218 #[serde(deny_unknown_fields)]
28219 pub struct PackInvitationList {
28220 pub items: ::std::vec::Vec<PackInvitation>,
28221 ///URL for fetching the next page of results
28222 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
28223 pub next_page_link: ::std::option::Option<::std::string::String>,
28224 ///Token for fetching the next page of results
28225 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
28226 pub next_page_token: ::std::option::Option<::std::string::String>,
28227 }
28228
28229 impl ::std::convert::From<&PackInvitationList> for PackInvitationList {
28230 fn from(value: &PackInvitationList) -> Self {
28231 value.clone()
28232 }
28233 }
28234
28235 ///Pack invitation with Pack metadata.
28236 ///
28237 /// <details><summary>JSON schema</summary>
28238 ///
28239 /// ```json
28240 ///{
28241 /// "description": "Pack invitation with Pack metadata.",
28242 /// "type": "object",
28243 /// "required": [
28244 /// "invitation",
28245 /// "makers",
28246 /// "networkDomains",
28247 /// "pack"
28248 /// ],
28249 /// "properties": {
28250 /// "invitation": {
28251 /// "$ref": "#/components/schemas/PackInvitation"
28252 /// },
28253 /// "makers": {
28254 /// "type": "array",
28255 /// "items": {
28256 /// "$ref": "#/components/schemas/Maker"
28257 /// }
28258 /// },
28259 /// "networkDomains": {
28260 /// "description": "Network domain of the Pack",
28261 /// "type": "array",
28262 /// "items": {
28263 /// "type": "string"
28264 /// }
28265 /// },
28266 /// "pack": {
28267 /// "$ref": "#/components/schemas/PackSummary"
28268 /// }
28269 /// },
28270 /// "additionalProperties": false,
28271 /// "x-schema-name": "PackInvitationWithPack"
28272 ///}
28273 /// ```
28274 /// </details>
28275 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28276 #[serde(deny_unknown_fields)]
28277 pub struct PackInvitationWithPack {
28278 pub invitation: PackInvitation,
28279 pub makers: ::std::vec::Vec<Maker>,
28280 ///Network domain of the Pack
28281 #[serde(rename = "networkDomains")]
28282 pub network_domains: ::std::vec::Vec<::std::string::String>,
28283 pub pack: PackSummary,
28284 }
28285
28286 impl ::std::convert::From<&PackInvitationWithPack> for PackInvitationWithPack {
28287 fn from(value: &PackInvitationWithPack) -> Self {
28288 value.clone()
28289 }
28290 }
28291
28292 ///List of Pack invitations with Pack metadata.
28293 ///
28294 /// <details><summary>JSON schema</summary>
28295 ///
28296 /// ```json
28297 ///{
28298 /// "description": "List of Pack invitations with Pack metadata.",
28299 /// "type": "object",
28300 /// "required": [
28301 /// "items"
28302 /// ],
28303 /// "properties": {
28304 /// "items": {
28305 /// "type": "array",
28306 /// "items": {
28307 /// "$ref": "#/components/schemas/PackInvitationWithPack"
28308 /// }
28309 /// },
28310 /// "nextPageLink": {
28311 /// "description": "URL for fetching the next page of results",
28312 /// "type": [
28313 /// "string",
28314 /// "null"
28315 /// ],
28316 /// "format": "url"
28317 /// },
28318 /// "nextPageToken": {
28319 /// "description": "Token for fetching the next page of results",
28320 /// "type": [
28321 /// "string",
28322 /// "null"
28323 /// ]
28324 /// }
28325 /// },
28326 /// "additionalProperties": false,
28327 /// "x-schema-name": "PackInvitationWithPackList"
28328 ///}
28329 /// ```
28330 /// </details>
28331 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28332 #[serde(deny_unknown_fields)]
28333 pub struct PackInvitationWithPackList {
28334 pub items: ::std::vec::Vec<PackInvitationWithPack>,
28335 ///URL for fetching the next page of results
28336 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
28337 pub next_page_link: ::std::option::Option<::std::string::String>,
28338 ///Token for fetching the next page of results
28339 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
28340 pub next_page_token: ::std::option::Option<::std::string::String>,
28341 }
28342
28343 impl ::std::convert::From<&PackInvitationWithPackList> for PackInvitationWithPackList {
28344 fn from(value: &PackInvitationWithPackList) -> Self {
28345 value.clone()
28346 }
28347 }
28348
28349 ///System logs of the invocations of the Pack.
28350 ///
28351 /// <details><summary>JSON schema</summary>
28352 ///
28353 /// ```json
28354 ///{
28355 /// "description": "System logs of the invocations of the Pack.",
28356 /// "type": "object",
28357 /// "required": [
28358 /// "context",
28359 /// "type"
28360 /// ],
28361 /// "properties": {
28362 /// "cacheHit": {
28363 /// "description": "True if the formula returned a prior result without
28364 /// executing.",
28365 /// "type": "boolean"
28366 /// },
28367 /// "context": {
28368 /// "$ref": "#/components/schemas/PackLogContext"
28369 /// },
28370 /// "duration": {
28371 /// "description": "Duration of the formula exeuction in miliseconds.",
28372 /// "type": "number"
28373 /// },
28374 /// "error": {
28375 /// "description": "Error info if this invocation resulted in an
28376 /// error.",
28377 /// "type": "object",
28378 /// "required": [
28379 /// "message"
28380 /// ],
28381 /// "properties": {
28382 /// "message": {
28383 /// "type": "string"
28384 /// },
28385 /// "stack": {
28386 /// "type": "string"
28387 /// }
28388 /// },
28389 /// "additionalProperties": false
28390 /// },
28391 /// "type": {
28392 /// "type": "string",
28393 /// "enum": [
28394 /// "invocation"
28395 /// ],
28396 /// "x-tsType": "PackLogType.Invocation"
28397 /// }
28398 /// },
28399 /// "additionalProperties": false,
28400 /// "x-schema-name": "PackInvocationLog"
28401 ///}
28402 /// ```
28403 /// </details>
28404 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28405 #[serde(deny_unknown_fields)]
28406 pub struct PackInvocationLog {
28407 ///True if the formula returned a prior result without executing.
28408 #[serde(rename = "cacheHit", default, skip_serializing_if = "::std::option::Option::is_none")]
28409 pub cache_hit: ::std::option::Option<bool>,
28410 pub context: PackLogContext,
28411 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28412 pub duration: ::std::option::Option<f64>,
28413 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28414 pub error: ::std::option::Option<PackInvocationLogError>,
28415 #[serde(rename = "type")]
28416 pub type_: PackInvocationLogType,
28417 }
28418
28419 impl ::std::convert::From<&PackInvocationLog> for PackInvocationLog {
28420 fn from(value: &PackInvocationLog) -> Self {
28421 value.clone()
28422 }
28423 }
28424
28425 ///Details for pack invocation logs
28426 ///
28427 /// <details><summary>JSON schema</summary>
28428 ///
28429 /// ```json
28430 ///{
28431 /// "description": "Details for pack invocation logs",
28432 /// "type": "object",
28433 /// "required": [
28434 /// "type"
28435 /// ],
28436 /// "properties": {
28437 /// "completionJson": {
28438 /// "description": "Only used by sync invocations.",
28439 /// "type": "string"
28440 /// },
28441 /// "continuationJson": {
28442 /// "description": "Only used by sync invocations.",
28443 /// "type": "string"
28444 /// },
28445 /// "deletedItemIdsJson": {
28446 /// "description": "Only used by sync invocations.",
28447 /// "type": "string"
28448 /// },
28449 /// "permissionsContextJson": {
28450 /// "description": "Only used by sync invocations.",
28451 /// "type": "string"
28452 /// },
28453 /// "result": {
28454 /// "type": "object",
28455 /// "required": [
28456 /// "boolVal",
28457 /// "dateVal",
28458 /// "doubleVal",
28459 /// "int64Val",
28460 /// "objectVal",
28461 /// "stringVal"
28462 /// ],
28463 /// "properties": {
28464 /// "boolVal": {
28465 /// "type": "boolean"
28466 /// },
28467 /// "dateVal": {
28468 /// "type": "number"
28469 /// },
28470 /// "doubleVal": {
28471 /// "type": "number"
28472 /// },
28473 /// "int64Val": {
28474 /// "type": "number"
28475 /// },
28476 /// "objectVal": {
28477 /// "type": "string"
28478 /// },
28479 /// "stringVal": {
28480 /// "type": "string"
28481 /// }
28482 /// },
28483 /// "additionalProperties": false
28484 /// },
28485 /// "resultDetail": {
28486 /// "description": "Supplementary information about the result.",
28487 /// "type": "string"
28488 /// },
28489 /// "type": {
28490 /// "type": "string",
28491 /// "enum": [
28492 /// "invocation"
28493 /// ],
28494 /// "x-tsType": "PackLogType.Invocation"
28495 /// }
28496 /// },
28497 /// "additionalProperties": false,
28498 /// "x-schema-name": "PackInvocationLogDetails"
28499 ///}
28500 /// ```
28501 /// </details>
28502 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28503 #[serde(deny_unknown_fields)]
28504 pub struct PackInvocationLogDetails {
28505 ///Only used by sync invocations.
28506 #[serde(rename = "completionJson", default, skip_serializing_if = "::std::option::Option::is_none")]
28507 pub completion_json: ::std::option::Option<::std::string::String>,
28508 ///Only used by sync invocations.
28509 #[serde(rename = "continuationJson", default, skip_serializing_if = "::std::option::Option::is_none")]
28510 pub continuation_json: ::std::option::Option<::std::string::String>,
28511 ///Only used by sync invocations.
28512 #[serde(rename = "deletedItemIdsJson", default, skip_serializing_if = "::std::option::Option::is_none")]
28513 pub deleted_item_ids_json: ::std::option::Option<::std::string::String>,
28514 ///Only used by sync invocations.
28515 #[serde(rename = "permissionsContextJson", default, skip_serializing_if = "::std::option::Option::is_none")]
28516 pub permissions_context_json: ::std::option::Option<::std::string::String>,
28517 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28518 pub result: ::std::option::Option<PackInvocationLogDetailsResult>,
28519 ///Supplementary information about the result.
28520 #[serde(rename = "resultDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
28521 pub result_detail: ::std::option::Option<::std::string::String>,
28522 #[serde(rename = "type")]
28523 pub type_: PackInvocationLogDetailsType,
28524 }
28525
28526 impl ::std::convert::From<&PackInvocationLogDetails> for PackInvocationLogDetails {
28527 fn from(value: &PackInvocationLogDetails) -> Self {
28528 value.clone()
28529 }
28530 }
28531
28532 ///`PackInvocationLogDetailsResult`
28533 ///
28534 /// <details><summary>JSON schema</summary>
28535 ///
28536 /// ```json
28537 ///{
28538 /// "type": "object",
28539 /// "required": [
28540 /// "boolVal",
28541 /// "dateVal",
28542 /// "doubleVal",
28543 /// "int64Val",
28544 /// "objectVal",
28545 /// "stringVal"
28546 /// ],
28547 /// "properties": {
28548 /// "boolVal": {
28549 /// "type": "boolean"
28550 /// },
28551 /// "dateVal": {
28552 /// "type": "number"
28553 /// },
28554 /// "doubleVal": {
28555 /// "type": "number"
28556 /// },
28557 /// "int64Val": {
28558 /// "type": "number"
28559 /// },
28560 /// "objectVal": {
28561 /// "type": "string"
28562 /// },
28563 /// "stringVal": {
28564 /// "type": "string"
28565 /// }
28566 /// },
28567 /// "additionalProperties": false
28568 ///}
28569 /// ```
28570 /// </details>
28571 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28572 #[serde(deny_unknown_fields)]
28573 pub struct PackInvocationLogDetailsResult {
28574 #[serde(rename = "boolVal")]
28575 pub bool_val: bool,
28576 #[serde(rename = "dateVal")]
28577 pub date_val: f64,
28578 #[serde(rename = "doubleVal")]
28579 pub double_val: f64,
28580 #[serde(rename = "int64Val")]
28581 pub int64_val: f64,
28582 #[serde(rename = "objectVal")]
28583 pub object_val: ::std::string::String,
28584 #[serde(rename = "stringVal")]
28585 pub string_val: ::std::string::String,
28586 }
28587
28588 impl ::std::convert::From<&PackInvocationLogDetailsResult> for PackInvocationLogDetailsResult {
28589 fn from(value: &PackInvocationLogDetailsResult) -> Self {
28590 value.clone()
28591 }
28592 }
28593
28594 ///`PackInvocationLogDetailsType`
28595 ///
28596 /// <details><summary>JSON schema</summary>
28597 ///
28598 /// ```json
28599 ///{
28600 /// "type": "string",
28601 /// "enum": [
28602 /// "invocation"
28603 /// ],
28604 /// "x-tsType": "PackLogType.Invocation"
28605 ///}
28606 /// ```
28607 /// </details>
28608 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28609 pub enum PackInvocationLogDetailsType {
28610 #[serde(rename = "invocation")]
28611 Invocation,
28612 }
28613
28614 impl ::std::convert::From<&Self> for PackInvocationLogDetailsType {
28615 fn from(value: &PackInvocationLogDetailsType) -> Self {
28616 value.clone()
28617 }
28618 }
28619
28620 impl ::std::fmt::Display for PackInvocationLogDetailsType {
28621 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28622 match *self {
28623 Self::Invocation => f.write_str("invocation"),
28624 }
28625 }
28626 }
28627
28628 impl ::std::str::FromStr for PackInvocationLogDetailsType {
28629 type Err = self::error::ConversionError;
28630 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28631 match value {
28632 "invocation" => Ok(Self::Invocation),
28633 _ => Err("invalid value".into()),
28634 }
28635 }
28636 }
28637
28638 impl ::std::convert::TryFrom<&str> for PackInvocationLogDetailsType {
28639 type Error = self::error::ConversionError;
28640 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28641 value.parse()
28642 }
28643 }
28644
28645 impl ::std::convert::TryFrom<&::std::string::String> for PackInvocationLogDetailsType {
28646 type Error = self::error::ConversionError;
28647 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28648 value.parse()
28649 }
28650 }
28651
28652 impl ::std::convert::TryFrom<::std::string::String> for PackInvocationLogDetailsType {
28653 type Error = self::error::ConversionError;
28654 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28655 value.parse()
28656 }
28657 }
28658
28659 ///Error info if this invocation resulted in an error.
28660 ///
28661 /// <details><summary>JSON schema</summary>
28662 ///
28663 /// ```json
28664 ///{
28665 /// "description": "Error info if this invocation resulted in an error.",
28666 /// "type": "object",
28667 /// "required": [
28668 /// "message"
28669 /// ],
28670 /// "properties": {
28671 /// "message": {
28672 /// "type": "string"
28673 /// },
28674 /// "stack": {
28675 /// "type": "string"
28676 /// }
28677 /// },
28678 /// "additionalProperties": false
28679 ///}
28680 /// ```
28681 /// </details>
28682 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28683 #[serde(deny_unknown_fields)]
28684 pub struct PackInvocationLogError {
28685 pub message: ::std::string::String,
28686 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28687 pub stack: ::std::option::Option<::std::string::String>,
28688 }
28689
28690 impl ::std::convert::From<&PackInvocationLogError> for PackInvocationLogError {
28691 fn from(value: &PackInvocationLogError) -> Self {
28692 value.clone()
28693 }
28694 }
28695
28696 ///`PackInvocationLogType`
28697 ///
28698 /// <details><summary>JSON schema</summary>
28699 ///
28700 /// ```json
28701 ///{
28702 /// "type": "string",
28703 /// "enum": [
28704 /// "invocation"
28705 /// ],
28706 /// "x-tsType": "PackLogType.Invocation"
28707 ///}
28708 /// ```
28709 /// </details>
28710 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28711 pub enum PackInvocationLogType {
28712 #[serde(rename = "invocation")]
28713 Invocation,
28714 }
28715
28716 impl ::std::convert::From<&Self> for PackInvocationLogType {
28717 fn from(value: &PackInvocationLogType) -> Self {
28718 value.clone()
28719 }
28720 }
28721
28722 impl ::std::fmt::Display for PackInvocationLogType {
28723 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28724 match *self {
28725 Self::Invocation => f.write_str("invocation"),
28726 }
28727 }
28728 }
28729
28730 impl ::std::str::FromStr for PackInvocationLogType {
28731 type Err = self::error::ConversionError;
28732 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28733 match value {
28734 "invocation" => Ok(Self::Invocation),
28735 _ => Err("invalid value".into()),
28736 }
28737 }
28738 }
28739
28740 impl ::std::convert::TryFrom<&str> for PackInvocationLogType {
28741 type Error = self::error::ConversionError;
28742 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28743 value.parse()
28744 }
28745 }
28746
28747 impl ::std::convert::TryFrom<&::std::string::String> for PackInvocationLogType {
28748 type Error = self::error::ConversionError;
28749 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28750 value.parse()
28751 }
28752 }
28753
28754 impl ::std::convert::TryFrom<::std::string::String> for PackInvocationLogType {
28755 type Error = self::error::ConversionError;
28756 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
28757 value.parse()
28758 }
28759 }
28760
28761 ///A Pack listing.
28762 ///
28763 /// <details><summary>JSON schema</summary>
28764 ///
28765 /// ```json
28766 ///{
28767 /// "description": "A Pack listing.",
28768 /// "type": "object",
28769 /// "required": [
28770 /// "categories",
28771 /// "description",
28772 /// "externalMetadataUrl",
28773 /// "logo",
28774 /// "logoUrl",
28775 /// "makers",
28776 /// "name",
28777 /// "packId",
28778 /// "packVersion",
28779 /// "sdkVersion",
28780 /// "shortDescription"
28781 /// ],
28782 /// "properties": {
28783 /// "agentDescription": {
28784 /// "description": "A full description for the pack as an agent.",
28785 /// "examples": [
28786 /// "Chat with a comprehensive tool that can calculate cool geometric
28787 /// formulas like surface area, volume, and other mathematical operations.
28788 /// This agent can help with complex calculations and provide detailed
28789 /// explanations."
28790 /// ],
28791 /// "type": "string"
28792 /// },
28793 /// "agentImages": {
28794 /// "description": "The agent images for the Pack.",
28795 /// "type": "array",
28796 /// "items": {
28797 /// "$ref": "#/components/schemas/PackImageFile"
28798 /// }
28799 /// },
28800 /// "agentShortDescription": {
28801 /// "description": "A short description for the pack as an agent.",
28802 /// "examples": [
28803 /// "Chat with a tool that can calculate cool geometric formulas like
28804 /// surface area."
28805 /// ],
28806 /// "type": "string"
28807 /// },
28808 /// "bundledPackPlan": {
28809 /// "$ref": "#/components/schemas/BundledPackPlan"
28810 /// },
28811 /// "categories": {
28812 /// "description": "Publishing Categories associated with this Pack.",
28813 /// "type": "array",
28814 /// "items": {
28815 /// "$ref": "#/components/schemas/PublishingCategory"
28816 /// }
28817 /// },
28818 /// "certified": {
28819 /// "description": "Denotes if the pack is certified by Coda.",
28820 /// "type": "boolean"
28821 /// },
28822 /// "certifiedAgent": {
28823 /// "description": "Denotes if the pack is certified by Grammarly to be
28824 /// optimized for agent usage.",
28825 /// "type": "boolean"
28826 /// },
28827 /// "cover": {
28828 /// "$ref": "#/components/schemas/PackImageFile"
28829 /// },
28830 /// "coverUrl": {
28831 /// "description": "The link to the cover photo of the Pack.",
28832 /// "deprecated": true,
28833 /// "type": "string",
28834 /// "format": "url"
28835 /// },
28836 /// "description": {
28837 /// "description": "The full description of the Pack.",
28838 /// "examples": [
28839 /// "This Pack allows users to calculate the surface area and volume
28840 /// of a few common 3D shapes, like cubes and pyramids."
28841 /// ],
28842 /// "type": "string",
28843 /// "maxLength": 8192
28844 /// },
28845 /// "exampleImages": {
28846 /// "description": "The example images for the Pack.",
28847 /// "type": "array",
28848 /// "items": {
28849 /// "$ref": "#/components/schemas/PackImageFile"
28850 /// }
28851 /// },
28852 /// "externalMetadataUrl": {
28853 /// "description": "The URL where complete metadata about the contents
28854 /// of the Pack version can be downloaded.",
28855 /// "examples": [
28856 /// "https://codahosted.io/packs/12345/1.2.3/metadata/0c892064aa5cb.json"
28857 /// ],
28858 /// "type": "string"
28859 /// },
28860 /// "lastReleasedAt": {
28861 /// "description": "The timestamp of the latest release of this Pack.",
28862 /// "examples": [
28863 /// "2018-04-11T00:18:57.946Z"
28864 /// ],
28865 /// "type": "string",
28866 /// "format": "date-time"
28867 /// },
28868 /// "logo": {
28869 /// "$ref": "#/components/schemas/PackImageFile"
28870 /// },
28871 /// "logoUrl": {
28872 /// "description": "The link to the logo of the Pack.",
28873 /// "deprecated": true,
28874 /// "type": "string",
28875 /// "format": "url"
28876 /// },
28877 /// "makers": {
28878 /// "description": "Makers associated with this Pack.",
28879 /// "type": "array",
28880 /// "items": {
28881 /// "$ref": "#/components/schemas/MakerSummary"
28882 /// }
28883 /// },
28884 /// "minimumFeatureSet": {
28885 /// "$ref": "#/components/schemas/FeatureSet"
28886 /// },
28887 /// "name": {
28888 /// "description": "The name of the Pack.",
28889 /// "examples": [
28890 /// "Cool Geometry Formulas"
28891 /// ],
28892 /// "type": "string"
28893 /// },
28894 /// "packId": {
28895 /// "description": "ID of the Pack.",
28896 /// "examples": [
28897 /// 1003
28898 /// ],
28899 /// "type": "number"
28900 /// },
28901 /// "packVersion": {
28902 /// "description": "The version of the Pack.",
28903 /// "examples": [
28904 /// "1.0.3"
28905 /// ],
28906 /// "type": "string"
28907 /// },
28908 /// "privacyPolicyUrl": {
28909 /// "description": "A Privacy Policy URL for the Pack.",
28910 /// "type": "string",
28911 /// "format": "url"
28912 /// },
28913 /// "releaseId": {
28914 /// "description": "The current release number of the Pack if released,
28915 /// otherwise undefined.",
28916 /// "examples": [
28917 /// 2
28918 /// ],
28919 /// "type": "number"
28920 /// },
28921 /// "sdkVersion": {
28922 /// "description": "What Packs SDK version was this version built on.",
28923 /// "examples": [
28924 /// "1.5.1"
28925 /// ],
28926 /// "type": "string"
28927 /// },
28928 /// "shortDescription": {
28929 /// "description": "A short version of the description of the Pack.",
28930 /// "examples": [
28931 /// "Calculate cool geometric formulas like surface area."
28932 /// ],
28933 /// "type": "string"
28934 /// },
28935 /// "sourceCodeVisibility": {
28936 /// "$ref": "#/components/schemas/PackSourceCodeVisibility"
28937 /// },
28938 /// "standardPackPlan": {
28939 /// "$ref": "#/components/schemas/StandardPackPlan"
28940 /// },
28941 /// "supportEmail": {
28942 /// "description": "A contact email for the Pack.",
28943 /// "examples": [
28944 /// "user@email.com"
28945 /// ],
28946 /// "type": "string"
28947 /// },
28948 /// "termsOfServiceUrl": {
28949 /// "description": "A Terms of Service URL for the Pack.",
28950 /// "type": "string",
28951 /// "format": "url"
28952 /// },
28953 /// "unrestrictedFeatureSet": {
28954 /// "$ref": "#/components/schemas/FeatureSet"
28955 /// }
28956 /// },
28957 /// "additionalProperties": false,
28958 /// "x-schema-name": "PackListing"
28959 ///}
28960 /// ```
28961 /// </details>
28962 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28963 #[serde(deny_unknown_fields)]
28964 pub struct PackListing {
28965 ///A full description for the pack as an agent.
28966 #[serde(rename = "agentDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
28967 pub agent_description: ::std::option::Option<::std::string::String>,
28968 ///The agent images for the Pack.
28969 #[serde(rename = "agentImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
28970 pub agent_images: ::std::vec::Vec<PackImageFile>,
28971 ///A short description for the pack as an agent.
28972 #[serde(rename = "agentShortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
28973 pub agent_short_description: ::std::option::Option<::std::string::String>,
28974 #[serde(rename = "bundledPackPlan", default, skip_serializing_if = "::std::option::Option::is_none")]
28975 pub bundled_pack_plan: ::std::option::Option<BundledPackPlan>,
28976 ///Publishing Categories associated with this Pack.
28977 pub categories: ::std::vec::Vec<PublishingCategory>,
28978 ///Denotes if the pack is certified by Coda.
28979 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28980 pub certified: ::std::option::Option<bool>,
28981 ///Denotes if the pack is certified by Grammarly to be optimized for
28982 /// agent usage.
28983 #[serde(rename = "certifiedAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
28984 pub certified_agent: ::std::option::Option<bool>,
28985 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28986 pub cover: ::std::option::Option<PackImageFile>,
28987 ///The link to the cover photo of the Pack.
28988 #[serde(rename = "coverUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
28989 pub cover_url: ::std::option::Option<::std::string::String>,
28990 ///The full description of the Pack.
28991 pub description: PackListingDescription,
28992 ///The example images for the Pack.
28993 #[serde(rename = "exampleImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
28994 pub example_images: ::std::vec::Vec<PackImageFile>,
28995 ///The URL where complete metadata about the contents of the Pack
28996 /// version can be downloaded.
28997 #[serde(rename = "externalMetadataUrl")]
28998 pub external_metadata_url: ::std::string::String,
28999 ///The timestamp of the latest release of this Pack.
29000 #[serde(rename = "lastReleasedAt", default, skip_serializing_if = "::std::option::Option::is_none")]
29001 pub last_released_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
29002 pub logo: PackImageFile,
29003 ///The link to the logo of the Pack.
29004 #[serde(rename = "logoUrl")]
29005 pub logo_url: ::std::string::String,
29006 ///Makers associated with this Pack.
29007 pub makers: ::std::vec::Vec<MakerSummary>,
29008 #[serde(rename = "minimumFeatureSet", default, skip_serializing_if = "::std::option::Option::is_none")]
29009 pub minimum_feature_set: ::std::option::Option<FeatureSet>,
29010 ///The name of the Pack.
29011 pub name: ::std::string::String,
29012 #[serde(rename = "packId")]
29013 pub pack_id: f64,
29014 ///The version of the Pack.
29015 #[serde(rename = "packVersion")]
29016 pub pack_version: ::std::string::String,
29017 ///A Privacy Policy URL for the Pack.
29018 #[serde(rename = "privacyPolicyUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29019 pub privacy_policy_url: ::std::option::Option<::std::string::String>,
29020 #[serde(rename = "releaseId", default, skip_serializing_if = "::std::option::Option::is_none")]
29021 pub release_id: ::std::option::Option<f64>,
29022 ///What Packs SDK version was this version built on.
29023 #[serde(rename = "sdkVersion")]
29024 pub sdk_version: ::std::string::String,
29025 ///A short version of the description of the Pack.
29026 #[serde(rename = "shortDescription")]
29027 pub short_description: ::std::string::String,
29028 #[serde(rename = "sourceCodeVisibility", default, skip_serializing_if = "::std::option::Option::is_none")]
29029 pub source_code_visibility: ::std::option::Option<PackSourceCodeVisibility>,
29030 #[serde(rename = "standardPackPlan", default, skip_serializing_if = "::std::option::Option::is_none")]
29031 pub standard_pack_plan: ::std::option::Option<StandardPackPlan>,
29032 ///A contact email for the Pack.
29033 #[serde(rename = "supportEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
29034 pub support_email: ::std::option::Option<::std::string::String>,
29035 ///A Terms of Service URL for the Pack.
29036 #[serde(rename = "termsOfServiceUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29037 pub terms_of_service_url: ::std::option::Option<::std::string::String>,
29038 #[serde(rename = "unrestrictedFeatureSet", default, skip_serializing_if = "::std::option::Option::is_none")]
29039 pub unrestricted_feature_set: ::std::option::Option<FeatureSet>,
29040 }
29041
29042 impl ::std::convert::From<&PackListing> for PackListing {
29043 fn from(value: &PackListing) -> Self {
29044 value.clone()
29045 }
29046 }
29047
29048 ///The full description of the Pack.
29049 ///
29050 /// <details><summary>JSON schema</summary>
29051 ///
29052 /// ```json
29053 ///{
29054 /// "description": "The full description of the Pack.",
29055 /// "examples": [
29056 /// "This Pack allows users to calculate the surface area and volume of a
29057 /// few common 3D shapes, like cubes and pyramids."
29058 /// ],
29059 /// "type": "string",
29060 /// "maxLength": 8192
29061 ///}
29062 /// ```
29063 /// </details>
29064 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29065 #[serde(transparent)]
29066 pub struct PackListingDescription(::std::string::String);
29067 impl ::std::ops::Deref for PackListingDescription {
29068 type Target = ::std::string::String;
29069 fn deref(&self) -> &::std::string::String {
29070 &self.0
29071 }
29072 }
29073
29074 impl ::std::convert::From<PackListingDescription> for ::std::string::String {
29075 fn from(value: PackListingDescription) -> Self {
29076 value.0
29077 }
29078 }
29079
29080 impl ::std::convert::From<&PackListingDescription> for PackListingDescription {
29081 fn from(value: &PackListingDescription) -> Self {
29082 value.clone()
29083 }
29084 }
29085
29086 impl ::std::str::FromStr for PackListingDescription {
29087 type Err = self::error::ConversionError;
29088 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29089 if value.chars().count() > 8192usize {
29090 return Err("longer than 8192 characters".into());
29091 }
29092 Ok(Self(value.to_string()))
29093 }
29094 }
29095
29096 impl ::std::convert::TryFrom<&str> for PackListingDescription {
29097 type Error = self::error::ConversionError;
29098 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29099 value.parse()
29100 }
29101 }
29102
29103 impl ::std::convert::TryFrom<&::std::string::String> for PackListingDescription {
29104 type Error = self::error::ConversionError;
29105 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29106 value.parse()
29107 }
29108 }
29109
29110 impl ::std::convert::TryFrom<::std::string::String> for PackListingDescription {
29111 type Error = self::error::ConversionError;
29112 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29113 value.parse()
29114 }
29115 }
29116
29117 impl<'de> ::serde::Deserialize<'de> for PackListingDescription {
29118 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
29119 where
29120 D: ::serde::Deserializer<'de>,
29121 {
29122 ::std::string::String::deserialize(deserializer)?
29123 .parse()
29124 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
29125 }
29126 }
29127
29128 ///A detailed Pack listing.
29129 ///
29130 /// <details><summary>JSON schema</summary>
29131 ///
29132 /// ```json
29133 ///{
29134 /// "description": "A detailed Pack listing.",
29135 /// "type": "object",
29136 /// "required": [
29137 /// "categories",
29138 /// "description",
29139 /// "discoverability",
29140 /// "externalMetadataUrl",
29141 /// "logo",
29142 /// "logoUrl",
29143 /// "makers",
29144 /// "name",
29145 /// "packId",
29146 /// "packVersion",
29147 /// "sdkVersion",
29148 /// "shortDescription",
29149 /// "userAccess"
29150 /// ],
29151 /// "properties": {
29152 /// "agentDescription": {
29153 /// "description": "A full description for the pack as an agent.",
29154 /// "examples": [
29155 /// "Chat with a comprehensive tool that can calculate cool geometric
29156 /// formulas like surface area, volume, and other mathematical operations.
29157 /// This agent can help with complex calculations and provide detailed
29158 /// explanations."
29159 /// ],
29160 /// "type": "string"
29161 /// },
29162 /// "agentImages": {
29163 /// "description": "The agent images for the Pack.",
29164 /// "type": "array",
29165 /// "items": {
29166 /// "$ref": "#/components/schemas/PackImageFile"
29167 /// }
29168 /// },
29169 /// "agentShortDescription": {
29170 /// "description": "A short description for the pack as an agent.",
29171 /// "examples": [
29172 /// "Chat with a tool that can calculate cool geometric formulas like
29173 /// surface area."
29174 /// ],
29175 /// "type": "string"
29176 /// },
29177 /// "bundledPackPlan": {
29178 /// "$ref": "#/components/schemas/BundledPackPlan"
29179 /// },
29180 /// "categories": {
29181 /// "description": "Publishing Categories associated with this Pack.",
29182 /// "type": "array",
29183 /// "items": {
29184 /// "$ref": "#/components/schemas/PublishingCategory"
29185 /// }
29186 /// },
29187 /// "certified": {
29188 /// "description": "Denotes if the pack is certified by Coda.",
29189 /// "type": "boolean"
29190 /// },
29191 /// "certifiedAgent": {
29192 /// "description": "Denotes if the pack is certified by Grammarly to be
29193 /// optimized for agent usage.",
29194 /// "type": "boolean"
29195 /// },
29196 /// "codaHelpCenterUrl": {
29197 /// "description": "The URL of a Coda Help Center article with
29198 /// documentation about the Pack. This will only exist for select
29199 /// Coda-authored Packs.",
29200 /// "type": "string"
29201 /// },
29202 /// "configuration": {
29203 /// "$ref": "#/components/schemas/PackConfigurationEntry"
29204 /// },
29205 /// "cover": {
29206 /// "$ref": "#/components/schemas/PackImageFile"
29207 /// },
29208 /// "coverUrl": {
29209 /// "description": "The link to the cover photo of the Pack.",
29210 /// "deprecated": true,
29211 /// "type": "string",
29212 /// "format": "url"
29213 /// },
29214 /// "description": {
29215 /// "description": "The full description of the Pack.",
29216 /// "examples": [
29217 /// "This Pack allows users to calculate the surface area and volume
29218 /// of a few common 3D shapes, like cubes and pyramids."
29219 /// ],
29220 /// "type": "string",
29221 /// "maxLength": 8192
29222 /// },
29223 /// "discoverability": {
29224 /// "$ref": "#/components/schemas/PackDiscoverability"
29225 /// },
29226 /// "exampleImages": {
29227 /// "description": "The example images for the Pack.",
29228 /// "type": "array",
29229 /// "items": {
29230 /// "$ref": "#/components/schemas/PackImageFile"
29231 /// }
29232 /// },
29233 /// "externalMetadataUrl": {
29234 /// "description": "The URL where complete metadata about the contents
29235 /// of the Pack version can be downloaded.",
29236 /// "examples": [
29237 /// "https://codahosted.io/packs/12345/1.2.3/metadata/0c892064aa5cb.json"
29238 /// ],
29239 /// "type": "string"
29240 /// },
29241 /// "lastReleasedAt": {
29242 /// "description": "The timestamp of the latest release of this Pack.",
29243 /// "examples": [
29244 /// "2018-04-11T00:18:57.946Z"
29245 /// ],
29246 /// "type": "string",
29247 /// "format": "date-time"
29248 /// },
29249 /// "logo": {
29250 /// "$ref": "#/components/schemas/PackImageFile"
29251 /// },
29252 /// "logoUrl": {
29253 /// "description": "The link to the logo of the Pack.",
29254 /// "deprecated": true,
29255 /// "type": "string",
29256 /// "format": "url"
29257 /// },
29258 /// "makers": {
29259 /// "description": "Makers associated with this Pack.",
29260 /// "type": "array",
29261 /// "items": {
29262 /// "$ref": "#/components/schemas/MakerSummary"
29263 /// }
29264 /// },
29265 /// "minimumFeatureSet": {
29266 /// "$ref": "#/components/schemas/FeatureSet"
29267 /// },
29268 /// "name": {
29269 /// "description": "The name of the Pack.",
29270 /// "examples": [
29271 /// "Cool Geometry Formulas"
29272 /// ],
29273 /// "type": "string"
29274 /// },
29275 /// "packId": {
29276 /// "description": "ID of the Pack.",
29277 /// "examples": [
29278 /// 1003
29279 /// ],
29280 /// "type": "number"
29281 /// },
29282 /// "packVersion": {
29283 /// "description": "The version of the Pack.",
29284 /// "examples": [
29285 /// "1.0.3"
29286 /// ],
29287 /// "type": "string"
29288 /// },
29289 /// "privacyPolicyUrl": {
29290 /// "description": "A Privacy Policy URL for the Pack.",
29291 /// "type": "string",
29292 /// "format": "url"
29293 /// },
29294 /// "releaseId": {
29295 /// "description": "The current release number of the Pack if released,
29296 /// otherwise undefined.",
29297 /// "examples": [
29298 /// 2
29299 /// ],
29300 /// "type": "number"
29301 /// },
29302 /// "sdkVersion": {
29303 /// "description": "What Packs SDK version was this version built on.",
29304 /// "examples": [
29305 /// "1.5.1"
29306 /// ],
29307 /// "type": "string"
29308 /// },
29309 /// "shortDescription": {
29310 /// "description": "A short version of the description of the Pack.",
29311 /// "examples": [
29312 /// "Calculate cool geometric formulas like surface area."
29313 /// ],
29314 /// "type": "string"
29315 /// },
29316 /// "sourceCodeVisibility": {
29317 /// "$ref": "#/components/schemas/PackSourceCodeVisibility"
29318 /// },
29319 /// "standardPackPlan": {
29320 /// "$ref": "#/components/schemas/StandardPackPlan"
29321 /// },
29322 /// "supportEmail": {
29323 /// "description": "A contact email for the Pack.",
29324 /// "examples": [
29325 /// "user@email.com"
29326 /// ],
29327 /// "type": "string"
29328 /// },
29329 /// "termsOfServiceUrl": {
29330 /// "description": "A Terms of Service URL for the Pack.",
29331 /// "type": "string",
29332 /// "format": "url"
29333 /// },
29334 /// "unrestrictedFeatureSet": {
29335 /// "$ref": "#/components/schemas/FeatureSet"
29336 /// },
29337 /// "userAccess": {
29338 /// "$ref": "#/components/schemas/PackUserAccess"
29339 /// }
29340 /// },
29341 /// "additionalProperties": false,
29342 /// "x-schema-name": "PackListingDetail"
29343 ///}
29344 /// ```
29345 /// </details>
29346 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29347 #[serde(deny_unknown_fields)]
29348 pub struct PackListingDetail {
29349 ///A full description for the pack as an agent.
29350 #[serde(rename = "agentDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
29351 pub agent_description: ::std::option::Option<::std::string::String>,
29352 ///The agent images for the Pack.
29353 #[serde(rename = "agentImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
29354 pub agent_images: ::std::vec::Vec<PackImageFile>,
29355 ///A short description for the pack as an agent.
29356 #[serde(rename = "agentShortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
29357 pub agent_short_description: ::std::option::Option<::std::string::String>,
29358 #[serde(rename = "bundledPackPlan", default, skip_serializing_if = "::std::option::Option::is_none")]
29359 pub bundled_pack_plan: ::std::option::Option<BundledPackPlan>,
29360 ///Publishing Categories associated with this Pack.
29361 pub categories: ::std::vec::Vec<PublishingCategory>,
29362 ///Denotes if the pack is certified by Coda.
29363 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29364 pub certified: ::std::option::Option<bool>,
29365 ///Denotes if the pack is certified by Grammarly to be optimized for
29366 /// agent usage.
29367 #[serde(rename = "certifiedAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
29368 pub certified_agent: ::std::option::Option<bool>,
29369 ///The URL of a Coda Help Center article with documentation about the
29370 /// Pack. This will only exist for select Coda-authored Packs.
29371 #[serde(rename = "codaHelpCenterUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29372 pub coda_help_center_url: ::std::option::Option<::std::string::String>,
29373 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29374 pub configuration: ::std::option::Option<PackConfigurationEntry>,
29375 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29376 pub cover: ::std::option::Option<PackImageFile>,
29377 ///The link to the cover photo of the Pack.
29378 #[serde(rename = "coverUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29379 pub cover_url: ::std::option::Option<::std::string::String>,
29380 ///The full description of the Pack.
29381 pub description: PackListingDetailDescription,
29382 pub discoverability: PackDiscoverability,
29383 ///The example images for the Pack.
29384 #[serde(rename = "exampleImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
29385 pub example_images: ::std::vec::Vec<PackImageFile>,
29386 ///The URL where complete metadata about the contents of the Pack
29387 /// version can be downloaded.
29388 #[serde(rename = "externalMetadataUrl")]
29389 pub external_metadata_url: ::std::string::String,
29390 ///The timestamp of the latest release of this Pack.
29391 #[serde(rename = "lastReleasedAt", default, skip_serializing_if = "::std::option::Option::is_none")]
29392 pub last_released_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
29393 pub logo: PackImageFile,
29394 ///The link to the logo of the Pack.
29395 #[serde(rename = "logoUrl")]
29396 pub logo_url: ::std::string::String,
29397 ///Makers associated with this Pack.
29398 pub makers: ::std::vec::Vec<MakerSummary>,
29399 #[serde(rename = "minimumFeatureSet", default, skip_serializing_if = "::std::option::Option::is_none")]
29400 pub minimum_feature_set: ::std::option::Option<FeatureSet>,
29401 ///The name of the Pack.
29402 pub name: ::std::string::String,
29403 #[serde(rename = "packId")]
29404 pub pack_id: f64,
29405 ///The version of the Pack.
29406 #[serde(rename = "packVersion")]
29407 pub pack_version: ::std::string::String,
29408 ///A Privacy Policy URL for the Pack.
29409 #[serde(rename = "privacyPolicyUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29410 pub privacy_policy_url: ::std::option::Option<::std::string::String>,
29411 #[serde(rename = "releaseId", default, skip_serializing_if = "::std::option::Option::is_none")]
29412 pub release_id: ::std::option::Option<f64>,
29413 ///What Packs SDK version was this version built on.
29414 #[serde(rename = "sdkVersion")]
29415 pub sdk_version: ::std::string::String,
29416 ///A short version of the description of the Pack.
29417 #[serde(rename = "shortDescription")]
29418 pub short_description: ::std::string::String,
29419 #[serde(rename = "sourceCodeVisibility", default, skip_serializing_if = "::std::option::Option::is_none")]
29420 pub source_code_visibility: ::std::option::Option<PackSourceCodeVisibility>,
29421 #[serde(rename = "standardPackPlan", default, skip_serializing_if = "::std::option::Option::is_none")]
29422 pub standard_pack_plan: ::std::option::Option<StandardPackPlan>,
29423 ///A contact email for the Pack.
29424 #[serde(rename = "supportEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
29425 pub support_email: ::std::option::Option<::std::string::String>,
29426 ///A Terms of Service URL for the Pack.
29427 #[serde(rename = "termsOfServiceUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
29428 pub terms_of_service_url: ::std::option::Option<::std::string::String>,
29429 #[serde(rename = "unrestrictedFeatureSet", default, skip_serializing_if = "::std::option::Option::is_none")]
29430 pub unrestricted_feature_set: ::std::option::Option<FeatureSet>,
29431 #[serde(rename = "userAccess")]
29432 pub user_access: PackUserAccess,
29433 }
29434
29435 impl ::std::convert::From<&PackListingDetail> for PackListingDetail {
29436 fn from(value: &PackListingDetail) -> Self {
29437 value.clone()
29438 }
29439 }
29440
29441 ///The full description of the Pack.
29442 ///
29443 /// <details><summary>JSON schema</summary>
29444 ///
29445 /// ```json
29446 ///{
29447 /// "description": "The full description of the Pack.",
29448 /// "examples": [
29449 /// "This Pack allows users to calculate the surface area and volume of a
29450 /// few common 3D shapes, like cubes and pyramids."
29451 /// ],
29452 /// "type": "string",
29453 /// "maxLength": 8192
29454 ///}
29455 /// ```
29456 /// </details>
29457 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29458 #[serde(transparent)]
29459 pub struct PackListingDetailDescription(::std::string::String);
29460 impl ::std::ops::Deref for PackListingDetailDescription {
29461 type Target = ::std::string::String;
29462 fn deref(&self) -> &::std::string::String {
29463 &self.0
29464 }
29465 }
29466
29467 impl ::std::convert::From<PackListingDetailDescription> for ::std::string::String {
29468 fn from(value: PackListingDetailDescription) -> Self {
29469 value.0
29470 }
29471 }
29472
29473 impl ::std::convert::From<&PackListingDetailDescription> for PackListingDetailDescription {
29474 fn from(value: &PackListingDetailDescription) -> Self {
29475 value.clone()
29476 }
29477 }
29478
29479 impl ::std::str::FromStr for PackListingDetailDescription {
29480 type Err = self::error::ConversionError;
29481 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29482 if value.chars().count() > 8192usize {
29483 return Err("longer than 8192 characters".into());
29484 }
29485 Ok(Self(value.to_string()))
29486 }
29487 }
29488
29489 impl ::std::convert::TryFrom<&str> for PackListingDetailDescription {
29490 type Error = self::error::ConversionError;
29491 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29492 value.parse()
29493 }
29494 }
29495
29496 impl ::std::convert::TryFrom<&::std::string::String> for PackListingDetailDescription {
29497 type Error = self::error::ConversionError;
29498 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29499 value.parse()
29500 }
29501 }
29502
29503 impl ::std::convert::TryFrom<::std::string::String> for PackListingDetailDescription {
29504 type Error = self::error::ConversionError;
29505 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29506 value.parse()
29507 }
29508 }
29509
29510 impl<'de> ::serde::Deserialize<'de> for PackListingDetailDescription {
29511 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
29512 where
29513 D: ::serde::Deserializer<'de>,
29514 {
29515 ::std::string::String::deserialize(deserializer)?
29516 .parse()
29517 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
29518 }
29519 }
29520
29521 ///Type of context in which a Pack is being installed.
29522 ///
29523 /// <details><summary>JSON schema</summary>
29524 ///
29525 /// ```json
29526 ///{
29527 /// "description": "Type of context in which a Pack is being installed.",
29528 /// "type": "string",
29529 /// "enum": [
29530 /// "workspace",
29531 /// "doc"
29532 /// ],
29533 /// "x-schema-name": "PackListingInstallContextType",
29534 /// "x-tsEnumNames": [
29535 /// "Workspace",
29536 /// "Doc"
29537 /// ]
29538 ///}
29539 /// ```
29540 /// </details>
29541 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29542 pub enum PackListingInstallContextType {
29543 #[serde(rename = "workspace")]
29544 Workspace,
29545 #[serde(rename = "doc")]
29546 Doc,
29547 }
29548
29549 impl ::std::convert::From<&Self> for PackListingInstallContextType {
29550 fn from(value: &PackListingInstallContextType) -> Self {
29551 value.clone()
29552 }
29553 }
29554
29555 impl ::std::fmt::Display for PackListingInstallContextType {
29556 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29557 match *self {
29558 Self::Workspace => f.write_str("workspace"),
29559 Self::Doc => f.write_str("doc"),
29560 }
29561 }
29562 }
29563
29564 impl ::std::str::FromStr for PackListingInstallContextType {
29565 type Err = self::error::ConversionError;
29566 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29567 match value {
29568 "workspace" => Ok(Self::Workspace),
29569 "doc" => Ok(Self::Doc),
29570 _ => Err("invalid value".into()),
29571 }
29572 }
29573 }
29574
29575 impl ::std::convert::TryFrom<&str> for PackListingInstallContextType {
29576 type Error = self::error::ConversionError;
29577 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29578 value.parse()
29579 }
29580 }
29581
29582 impl ::std::convert::TryFrom<&::std::string::String> for PackListingInstallContextType {
29583 type Error = self::error::ConversionError;
29584 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29585 value.parse()
29586 }
29587 }
29588
29589 impl ::std::convert::TryFrom<::std::string::String> for PackListingInstallContextType {
29590 type Error = self::error::ConversionError;
29591 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29592 value.parse()
29593 }
29594 }
29595
29596 ///A list of Pack listings.
29597 ///
29598 /// <details><summary>JSON schema</summary>
29599 ///
29600 /// ```json
29601 ///{
29602 /// "description": "A list of Pack listings.",
29603 /// "type": "object",
29604 /// "required": [
29605 /// "items"
29606 /// ],
29607 /// "properties": {
29608 /// "items": {
29609 /// "type": "array",
29610 /// "items": {
29611 /// "$ref": "#/components/schemas/PackListing"
29612 /// }
29613 /// },
29614 /// "nextPageLink": {
29615 /// "allOf": [
29616 /// {
29617 /// "$ref": "#/components/schemas/nextPageLink"
29618 /// },
29619 /// {
29620 /// "examples": [
29621 /// "https://coda.io/apis/v1/packs/listings?pageToken=xyz"
29622 /// ],
29623 /// "type": "string"
29624 /// }
29625 /// ]
29626 /// },
29627 /// "nextPageToken": {
29628 /// "$ref": "#/components/schemas/nextPageToken"
29629 /// }
29630 /// },
29631 /// "additionalProperties": false,
29632 /// "x-schema-name": "PackListingList"
29633 ///}
29634 /// ```
29635 /// </details>
29636 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29637 #[serde(deny_unknown_fields)]
29638 pub struct PackListingList {
29639 pub items: ::std::vec::Vec<PackListing>,
29640 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
29641 pub next_page_link: ::std::option::Option<NextPageLink>,
29642 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
29643 pub next_page_token: ::std::option::Option<NextPageToken>,
29644 }
29645
29646 impl ::std::convert::From<&PackListingList> for PackListingList {
29647 fn from(value: &PackListingList) -> Self {
29648 value.clone()
29649 }
29650 }
29651
29652 ///Determines how the Pack listings returned are sorted.
29653 ///
29654 /// <details><summary>JSON schema</summary>
29655 ///
29656 /// ```json
29657 ///{
29658 /// "description": "Determines how the Pack listings returned are sorted.",
29659 /// "type": "string",
29660 /// "enum": [
29661 /// "packId",
29662 /// "name",
29663 /// "packVersion",
29664 /// "packVersionModifiedAt",
29665 /// "agentDirectorySort"
29666 /// ],
29667 /// "x-schema-name": "PackListingsSortBy",
29668 /// "x-tsEnumNames": [
29669 /// "PackId",
29670 /// "Name",
29671 /// "PackVersion",
29672 /// "PackVersionModifiedAt",
29673 /// "AgentDirectorySort"
29674 /// ]
29675 ///}
29676 /// ```
29677 /// </details>
29678 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29679 pub enum PackListingsSortBy {
29680 #[serde(rename = "packId")]
29681 PackId,
29682 #[serde(rename = "name")]
29683 Name,
29684 #[serde(rename = "packVersion")]
29685 PackVersion,
29686 #[serde(rename = "packVersionModifiedAt")]
29687 PackVersionModifiedAt,
29688 #[serde(rename = "agentDirectorySort")]
29689 AgentDirectorySort,
29690 }
29691
29692 impl ::std::convert::From<&Self> for PackListingsSortBy {
29693 fn from(value: &PackListingsSortBy) -> Self {
29694 value.clone()
29695 }
29696 }
29697
29698 impl ::std::fmt::Display for PackListingsSortBy {
29699 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29700 match *self {
29701 Self::PackId => f.write_str("packId"),
29702 Self::Name => f.write_str("name"),
29703 Self::PackVersion => f.write_str("packVersion"),
29704 Self::PackVersionModifiedAt => f.write_str("packVersionModifiedAt"),
29705 Self::AgentDirectorySort => f.write_str("agentDirectorySort"),
29706 }
29707 }
29708 }
29709
29710 impl ::std::str::FromStr for PackListingsSortBy {
29711 type Err = self::error::ConversionError;
29712 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29713 match value {
29714 "packId" => Ok(Self::PackId),
29715 "name" => Ok(Self::Name),
29716 "packVersion" => Ok(Self::PackVersion),
29717 "packVersionModifiedAt" => Ok(Self::PackVersionModifiedAt),
29718 "agentDirectorySort" => Ok(Self::AgentDirectorySort),
29719 _ => Err("invalid value".into()),
29720 }
29721 }
29722 }
29723
29724 impl ::std::convert::TryFrom<&str> for PackListingsSortBy {
29725 type Error = self::error::ConversionError;
29726 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29727 value.parse()
29728 }
29729 }
29730
29731 impl ::std::convert::TryFrom<&::std::string::String> for PackListingsSortBy {
29732 type Error = self::error::ConversionError;
29733 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29734 value.parse()
29735 }
29736 }
29737
29738 impl ::std::convert::TryFrom<::std::string::String> for PackListingsSortBy {
29739 type Error = self::error::ConversionError;
29740 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
29741 value.parse()
29742 }
29743 }
29744
29745 ///A record of Pack log.
29746 ///
29747 /// <details><summary>JSON schema</summary>
29748 ///
29749 /// ```json
29750 ///{
29751 /// "description": "A record of Pack log.",
29752 /// "oneOf": [
29753 /// {
29754 /// "$ref": "#/components/schemas/PackCustomLog"
29755 /// },
29756 /// {
29757 /// "$ref": "#/components/schemas/PackInvocationLog"
29758 /// },
29759 /// {
29760 /// "$ref": "#/components/schemas/PackFetcherLog"
29761 /// },
29762 /// {
29763 /// "$ref": "#/components/schemas/PackInternalLog"
29764 /// },
29765 /// {
29766 /// "$ref": "#/components/schemas/PackAuthLog"
29767 /// },
29768 /// {
29769 /// "$ref": "#/components/schemas/PackIngestionLifecycleLog"
29770 /// },
29771 /// {
29772 /// "$ref": "#/components/schemas/PackIngestionDebugLog"
29773 /// },
29774 /// {
29775 /// "$ref": "#/components/schemas/PackAgentRuntimeLog"
29776 /// },
29777 /// {
29778 /// "$ref": "#/components/schemas/PackMcpLog"
29779 /// }
29780 /// ],
29781 /// "x-schema-name": "PackLog"
29782 ///}
29783 /// ```
29784 /// </details>
29785 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29786 #[serde(untagged)]
29787 pub enum PackLog {
29788 CustomLog(PackCustomLog),
29789 InvocationLog(PackInvocationLog),
29790 FetcherLog(PackFetcherLog),
29791 InternalLog(PackInternalLog),
29792 AuthLog(PackAuthLog),
29793 IngestionLifecycleLog(PackIngestionLifecycleLog),
29794 IngestionDebugLog(PackIngestionDebugLog),
29795 AgentRuntimeLog(PackAgentRuntimeLog),
29796 McpLog(PackMcpLog),
29797 }
29798
29799 impl ::std::convert::From<&Self> for PackLog {
29800 fn from(value: &PackLog) -> Self {
29801 value.clone()
29802 }
29803 }
29804
29805 impl ::std::convert::From<PackCustomLog> for PackLog {
29806 fn from(value: PackCustomLog) -> Self {
29807 Self::CustomLog(value)
29808 }
29809 }
29810
29811 impl ::std::convert::From<PackInvocationLog> for PackLog {
29812 fn from(value: PackInvocationLog) -> Self {
29813 Self::InvocationLog(value)
29814 }
29815 }
29816
29817 impl ::std::convert::From<PackFetcherLog> for PackLog {
29818 fn from(value: PackFetcherLog) -> Self {
29819 Self::FetcherLog(value)
29820 }
29821 }
29822
29823 impl ::std::convert::From<PackInternalLog> for PackLog {
29824 fn from(value: PackInternalLog) -> Self {
29825 Self::InternalLog(value)
29826 }
29827 }
29828
29829 impl ::std::convert::From<PackAuthLog> for PackLog {
29830 fn from(value: PackAuthLog) -> Self {
29831 Self::AuthLog(value)
29832 }
29833 }
29834
29835 impl ::std::convert::From<PackIngestionLifecycleLog> for PackLog {
29836 fn from(value: PackIngestionLifecycleLog) -> Self {
29837 Self::IngestionLifecycleLog(value)
29838 }
29839 }
29840
29841 impl ::std::convert::From<PackIngestionDebugLog> for PackLog {
29842 fn from(value: PackIngestionDebugLog) -> Self {
29843 Self::IngestionDebugLog(value)
29844 }
29845 }
29846
29847 impl ::std::convert::From<PackAgentRuntimeLog> for PackLog {
29848 fn from(value: PackAgentRuntimeLog) -> Self {
29849 Self::AgentRuntimeLog(value)
29850 }
29851 }
29852
29853 impl ::std::convert::From<PackMcpLog> for PackLog {
29854 fn from(value: PackMcpLog) -> Self {
29855 Self::McpLog(value)
29856 }
29857 }
29858
29859 ///Logging context that comes with a Pack log.
29860 ///
29861 /// <details><summary>JSON schema</summary>
29862 ///
29863 /// ```json
29864 ///{
29865 /// "description": "Logging context that comes with a Pack log.",
29866 /// "type": "object",
29867 /// "required": [
29868 /// "connectionId",
29869 /// "createdAt",
29870 /// "detailsKey",
29871 /// "docId",
29872 /// "formulaName",
29873 /// "logId",
29874 /// "packId",
29875 /// "packVersion",
29876 /// "requestId",
29877 /// "requestType",
29878 /// "userId"
29879 /// ],
29880 /// "properties": {
29881 /// "additionalMetadata": {
29882 /// "description": "Additional metadata for the ingestion log.",
29883 /// "type": "object"
29884 /// },
29885 /// "agentInstanceId": {
29886 /// "description": "Agent instance id.",
29887 /// "type": "string"
29888 /// },
29889 /// "agentSessionId": {
29890 /// "description": "Agent chat session id.",
29891 /// "type": "string"
29892 /// },
29893 /// "autocompleteParameterName": {
29894 /// "description": "If this formula invocation was for a parameter
29895 /// auto-complete, this names the parameter.",
29896 /// "type": "string"
29897 /// },
29898 /// "connectionId": {
29899 /// "type": "string"
29900 /// },
29901 /// "connectionName": {
29902 /// "type": "string"
29903 /// },
29904 /// "createdAt": {
29905 /// "description": "Creation time of the log.",
29906 /// "examples": [
29907 /// "2018-04-11T00:18:57.946Z"
29908 /// ],
29909 /// "type": "string",
29910 /// "format": "date-time"
29911 /// },
29912 /// "detailsKey": {
29913 /// "description": "Key to be used in fetching log details.",
29914 /// "type": "string"
29915 /// },
29916 /// "docColumnId": {
29917 /// "description": "Doc canvas column id where the formula was fired
29918 /// from.",
29919 /// "type": "string"
29920 /// },
29921 /// "docId": {
29922 /// "type": "string"
29923 /// },
29924 /// "docObjectId": {
29925 /// "description": "Doc canvas object id where the formula was fired
29926 /// from.",
29927 /// "type": "string"
29928 /// },
29929 /// "docRowId": {
29930 /// "description": "Doc canvas row id where the formula was fired
29931 /// from.",
29932 /// "type": "string"
29933 /// },
29934 /// "executingAgentInstanceId": {
29935 /// "description": "Executing agent instance id.",
29936 /// "type": "string"
29937 /// },
29938 /// "formulaName": {
29939 /// "type": "string"
29940 /// },
29941 /// "ingestionChildExecutionIndex": {
29942 /// "description": "Child execution id for this ingestion log.",
29943 /// "type": "number"
29944 /// },
29945 /// "ingestionExecutionAttempt": {
29946 /// "description": "Execution attempt for this ingestion log.",
29947 /// "type": "integer"
29948 /// },
29949 /// "ingestionExecutionId": {
29950 /// "description": "Unique identifier of the ingestion execution that
29951 /// triggered this log.",
29952 /// "type": "string"
29953 /// },
29954 /// "ingestionId": {
29955 /// "description": "Unique identifier of the ingestion that triggered
29956 /// this log.",
29957 /// "type": "string"
29958 /// },
29959 /// "ingestionParentItemId": {
29960 /// "description": "Parent item id for this ingestion log.",
29961 /// "type": "string"
29962 /// },
29963 /// "ingestionParentStage": {
29964 /// "description": "An ingestion lifecycle stage that this ingestion
29965 /// log is bundled under.",
29966 /// "type": "string"
29967 /// },
29968 /// "ingestionProcessId": {
29969 /// "description": "Unique identifier of the ingestion processing call
29970 /// that triggered this log.",
29971 /// "type": "string"
29972 /// },
29973 /// "ingestionStage": {
29974 /// "description": "Stage along the ingestion lifecycle that this log
29975 /// was created in.",
29976 /// "type": "string"
29977 /// },
29978 /// "invocationSource": {
29979 /// "description": "If this formula was invoked by something other than
29980 /// a user action, this should say what that was.",
29981 /// "type": "string"
29982 /// },
29983 /// "isContinuedSyncTable": {
29984 /// "description": "True if this is an execution of a sync table which
29985 /// received a pagination parameter.",
29986 /// "type": "boolean"
29987 /// },
29988 /// "isSyncTable": {
29989 /// "description": "True if this is a formula invocation loading a page
29990 /// of a sync table, or metadata for a sync table (like creating a dynamic
29991 /// schema).",
29992 /// "type": "boolean"
29993 /// },
29994 /// "logId": {
29995 /// "description": "Unique identifier of this log record.",
29996 /// "type": "string"
29997 /// },
29998 /// "packId": {
29999 /// "type": "string"
30000 /// },
30001 /// "packVersion": {
30002 /// "type": "string"
30003 /// },
30004 /// "requestId": {
30005 /// "description": "A unique identifier of the Pack invocation that can
30006 /// be used to associate all log types generated in one call of a Pack
30007 /// formula.\n",
30008 /// "type": "string"
30009 /// },
30010 /// "requestType": {
30011 /// "$ref": "#/components/schemas/PackLogRequestType"
30012 /// },
30013 /// "rootIngestionId": {
30014 /// "description": "Unique identifier of the root ingestion that
30015 /// triggered this log.",
30016 /// "type": "string"
30017 /// },
30018 /// "userId": {
30019 /// "type": "string"
30020 /// }
30021 /// },
30022 /// "additionalProperties": false,
30023 /// "x-schema-name": "PackLogContext"
30024 ///}
30025 /// ```
30026 /// </details>
30027 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30028 #[serde(deny_unknown_fields)]
30029 pub struct PackLogContext {
30030 ///Additional metadata for the ingestion log.
30031 #[serde(rename = "additionalMetadata", default, skip_serializing_if = "::serde_json::Map::is_empty")]
30032 pub additional_metadata: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
30033 ///Agent instance id.
30034 #[serde(rename = "agentInstanceId", default, skip_serializing_if = "::std::option::Option::is_none")]
30035 pub agent_instance_id: ::std::option::Option<::std::string::String>,
30036 ///Agent chat session id.
30037 #[serde(rename = "agentSessionId", default, skip_serializing_if = "::std::option::Option::is_none")]
30038 pub agent_session_id: ::std::option::Option<::std::string::String>,
30039 ///If this formula invocation was for a parameter auto-complete, this
30040 /// names the parameter.
30041 #[serde(rename = "autocompleteParameterName", default, skip_serializing_if = "::std::option::Option::is_none")]
30042 pub autocomplete_parameter_name: ::std::option::Option<::std::string::String>,
30043 #[serde(rename = "connectionId")]
30044 pub connection_id: ::std::string::String,
30045 #[serde(rename = "connectionName", default, skip_serializing_if = "::std::option::Option::is_none")]
30046 pub connection_name: ::std::option::Option<::std::string::String>,
30047 ///Creation time of the log.
30048 #[serde(rename = "createdAt")]
30049 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
30050 ///Key to be used in fetching log details.
30051 #[serde(rename = "detailsKey")]
30052 pub details_key: ::std::string::String,
30053 ///Doc canvas column id where the formula was fired from.
30054 #[serde(rename = "docColumnId", default, skip_serializing_if = "::std::option::Option::is_none")]
30055 pub doc_column_id: ::std::option::Option<::std::string::String>,
30056 #[serde(rename = "docId")]
30057 pub doc_id: ::std::string::String,
30058 ///Doc canvas object id where the formula was fired from.
30059 #[serde(rename = "docObjectId", default, skip_serializing_if = "::std::option::Option::is_none")]
30060 pub doc_object_id: ::std::option::Option<::std::string::String>,
30061 ///Doc canvas row id where the formula was fired from.
30062 #[serde(rename = "docRowId", default, skip_serializing_if = "::std::option::Option::is_none")]
30063 pub doc_row_id: ::std::option::Option<::std::string::String>,
30064 ///Executing agent instance id.
30065 #[serde(rename = "executingAgentInstanceId", default, skip_serializing_if = "::std::option::Option::is_none")]
30066 pub executing_agent_instance_id: ::std::option::Option<::std::string::String>,
30067 #[serde(rename = "formulaName")]
30068 pub formula_name: ::std::string::String,
30069 #[serde(rename = "ingestionChildExecutionIndex", default, skip_serializing_if = "::std::option::Option::is_none")]
30070 pub ingestion_child_execution_index: ::std::option::Option<f64>,
30071 ///Execution attempt for this ingestion log.
30072 #[serde(rename = "ingestionExecutionAttempt", default, skip_serializing_if = "::std::option::Option::is_none")]
30073 pub ingestion_execution_attempt: ::std::option::Option<i64>,
30074 ///Unique identifier of the ingestion execution that triggered this
30075 /// log.
30076 #[serde(rename = "ingestionExecutionId", default, skip_serializing_if = "::std::option::Option::is_none")]
30077 pub ingestion_execution_id: ::std::option::Option<::std::string::String>,
30078 ///Unique identifier of the ingestion that triggered this log.
30079 #[serde(rename = "ingestionId", default, skip_serializing_if = "::std::option::Option::is_none")]
30080 pub ingestion_id: ::std::option::Option<::std::string::String>,
30081 ///Parent item id for this ingestion log.
30082 #[serde(rename = "ingestionParentItemId", default, skip_serializing_if = "::std::option::Option::is_none")]
30083 pub ingestion_parent_item_id: ::std::option::Option<::std::string::String>,
30084 ///An ingestion lifecycle stage that this ingestion log is bundled
30085 /// under.
30086 #[serde(rename = "ingestionParentStage", default, skip_serializing_if = "::std::option::Option::is_none")]
30087 pub ingestion_parent_stage: ::std::option::Option<::std::string::String>,
30088 ///Unique identifier of the ingestion processing call that triggered
30089 /// this log.
30090 #[serde(rename = "ingestionProcessId", default, skip_serializing_if = "::std::option::Option::is_none")]
30091 pub ingestion_process_id: ::std::option::Option<::std::string::String>,
30092 ///Stage along the ingestion lifecycle that this log was created in.
30093 #[serde(rename = "ingestionStage", default, skip_serializing_if = "::std::option::Option::is_none")]
30094 pub ingestion_stage: ::std::option::Option<::std::string::String>,
30095 ///If this formula was invoked by something other than a user action,
30096 /// this should say what that was.
30097 #[serde(rename = "invocationSource", default, skip_serializing_if = "::std::option::Option::is_none")]
30098 pub invocation_source: ::std::option::Option<::std::string::String>,
30099 ///True if this is an execution of a sync table which received a
30100 /// pagination parameter.
30101 #[serde(rename = "isContinuedSyncTable", default, skip_serializing_if = "::std::option::Option::is_none")]
30102 pub is_continued_sync_table: ::std::option::Option<bool>,
30103 ///True if this is a formula invocation loading a page of a sync table,
30104 /// or metadata for a sync table (like creating a dynamic schema).
30105 #[serde(rename = "isSyncTable", default, skip_serializing_if = "::std::option::Option::is_none")]
30106 pub is_sync_table: ::std::option::Option<bool>,
30107 ///Unique identifier of this log record.
30108 #[serde(rename = "logId")]
30109 pub log_id: ::std::string::String,
30110 #[serde(rename = "packId")]
30111 pub pack_id: ::std::string::String,
30112 #[serde(rename = "packVersion")]
30113 pub pack_version: ::std::string::String,
30114 ///A unique identifier of the Pack invocation that can be used to
30115 /// associate all log types generated in one call of a Pack formula.
30116 #[serde(rename = "requestId")]
30117 pub request_id: ::std::string::String,
30118 #[serde(rename = "requestType")]
30119 pub request_type: PackLogRequestType,
30120 ///Unique identifier of the root ingestion that triggered this log.
30121 #[serde(rename = "rootIngestionId", default, skip_serializing_if = "::std::option::Option::is_none")]
30122 pub root_ingestion_id: ::std::option::Option<::std::string::String>,
30123 #[serde(rename = "userId")]
30124 pub user_id: ::std::string::String,
30125 }
30126
30127 impl ::std::convert::From<&PackLogContext> for PackLogContext {
30128 fn from(value: &PackLogContext) -> Self {
30129 value.clone()
30130 }
30131 }
30132
30133 ///Details for a pack log.
30134 ///
30135 /// <details><summary>JSON schema</summary>
30136 ///
30137 /// ```json
30138 ///{
30139 /// "description": "Details for a pack log.",
30140 /// "oneOf": [
30141 /// {
30142 /// "$ref": "#/components/schemas/PackFetcherLogDetails"
30143 /// },
30144 /// {
30145 /// "$ref": "#/components/schemas/PackInvocationLogDetails"
30146 /// },
30147 /// {
30148 /// "$ref": "#/components/schemas/PackAgentRuntimeLogDetails"
30149 /// }
30150 /// ],
30151 /// "x-schema-name": "PackLogDetails"
30152 ///}
30153 /// ```
30154 /// </details>
30155 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30156 #[serde(untagged)]
30157 pub enum PackLogDetails {
30158 FetcherLogDetails(PackFetcherLogDetails),
30159 InvocationLogDetails(PackInvocationLogDetails),
30160 AgentRuntimeLogDetails(PackAgentRuntimeLogDetails),
30161 }
30162
30163 impl ::std::convert::From<&Self> for PackLogDetails {
30164 fn from(value: &PackLogDetails) -> Self {
30165 value.clone()
30166 }
30167 }
30168
30169 impl ::std::convert::From<PackFetcherLogDetails> for PackLogDetails {
30170 fn from(value: PackFetcherLogDetails) -> Self {
30171 Self::FetcherLogDetails(value)
30172 }
30173 }
30174
30175 impl ::std::convert::From<PackInvocationLogDetails> for PackLogDetails {
30176 fn from(value: PackInvocationLogDetails) -> Self {
30177 Self::InvocationLogDetails(value)
30178 }
30179 }
30180
30181 impl ::std::convert::From<PackAgentRuntimeLogDetails> for PackLogDetails {
30182 fn from(value: PackAgentRuntimeLogDetails) -> Self {
30183 Self::AgentRuntimeLogDetails(value)
30184 }
30185 }
30186
30187 ///The context request type where a Pack log is generated.
30188 ///
30189 /// <details><summary>JSON schema</summary>
30190 ///
30191 /// ```json
30192 ///{
30193 /// "description": "The context request type where a Pack log is
30194 /// generated.",
30195 /// "type": "string",
30196 /// "enum": [
30197 /// "unknown",
30198 /// "connectionNameMetadataRequest",
30199 /// "parameterAutocompleteMetadataRequest",
30200 /// "postAuthSetupMetadataRequest",
30201 /// "propertyOptionsMetadataRequest",
30202 /// "getSyncTableSchemaMetadataRequest",
30203 /// "getDynamicSyncTableNameMetadataRequest",
30204 /// "listSyncTableDynamicUrlsMetadataRequest",
30205 /// "searchSyncTableDynamicUrlsMetadataRequest",
30206 /// "getDynamicSyncTableDisplayUrlMetadataRequest",
30207 /// "getIdentifiersForConnectionRequest",
30208 /// "invokeFormulaRequest",
30209 /// "invokeSyncFormulaRequest",
30210 /// "invokeSyncUpdateFormulaRequest",
30211 /// "invokeExecuteGetPermissionsRequest",
30212 /// "validateParametersMetadataRequest",
30213 /// "mcp"
30214 /// ],
30215 /// "x-schema-name": "PackLogRequestType",
30216 /// "x-tsEnumNames": [
30217 /// "Unknown",
30218 /// "ConnectionNameMetadataRequest",
30219 /// "ParameterAutocompleteMetadataRequest",
30220 /// "PostAuthSetupMetadataRequest",
30221 /// "PropertyOptionsMetadataRequest",
30222 /// "GetSyncTableSchemaMetadataRequest",
30223 /// "GetDynamicSyncTableNameMetadataRequest",
30224 /// "ListSyncTableDynamicUrlsMetadataRequest",
30225 /// "SearchSyncTableDynamicUrlsMetadataRequest",
30226 /// "GetDynamicSyncTableDisplayUrlMetadataRequest",
30227 /// "ValidateParametersMetadataRequest",
30228 /// "GetIdentifiersForConnectionRequest",
30229 /// "InvokeFormulaRequest",
30230 /// "InvokeSyncFormulaRequest",
30231 /// "InvokeSyncUpdateFormulaRequest",
30232 /// "InvokeExecuteGetPermissionsRequest",
30233 /// "Mcp"
30234 /// ]
30235 ///}
30236 /// ```
30237 /// </details>
30238 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30239 pub enum PackLogRequestType {
30240 #[serde(rename = "unknown")]
30241 Unknown,
30242 #[serde(rename = "connectionNameMetadataRequest")]
30243 ConnectionNameMetadataRequest,
30244 #[serde(rename = "parameterAutocompleteMetadataRequest")]
30245 ParameterAutocompleteMetadataRequest,
30246 #[serde(rename = "postAuthSetupMetadataRequest")]
30247 PostAuthSetupMetadataRequest,
30248 #[serde(rename = "propertyOptionsMetadataRequest")]
30249 PropertyOptionsMetadataRequest,
30250 #[serde(rename = "getSyncTableSchemaMetadataRequest")]
30251 GetSyncTableSchemaMetadataRequest,
30252 #[serde(rename = "getDynamicSyncTableNameMetadataRequest")]
30253 GetDynamicSyncTableNameMetadataRequest,
30254 #[serde(rename = "listSyncTableDynamicUrlsMetadataRequest")]
30255 ListSyncTableDynamicUrlsMetadataRequest,
30256 #[serde(rename = "searchSyncTableDynamicUrlsMetadataRequest")]
30257 SearchSyncTableDynamicUrlsMetadataRequest,
30258 #[serde(rename = "getDynamicSyncTableDisplayUrlMetadataRequest")]
30259 GetDynamicSyncTableDisplayUrlMetadataRequest,
30260 #[serde(rename = "getIdentifiersForConnectionRequest")]
30261 GetIdentifiersForConnectionRequest,
30262 #[serde(rename = "invokeFormulaRequest")]
30263 InvokeFormulaRequest,
30264 #[serde(rename = "invokeSyncFormulaRequest")]
30265 InvokeSyncFormulaRequest,
30266 #[serde(rename = "invokeSyncUpdateFormulaRequest")]
30267 InvokeSyncUpdateFormulaRequest,
30268 #[serde(rename = "invokeExecuteGetPermissionsRequest")]
30269 InvokeExecuteGetPermissionsRequest,
30270 #[serde(rename = "validateParametersMetadataRequest")]
30271 ValidateParametersMetadataRequest,
30272 #[serde(rename = "mcp")]
30273 Mcp,
30274 }
30275
30276 impl ::std::convert::From<&Self> for PackLogRequestType {
30277 fn from(value: &PackLogRequestType) -> Self {
30278 value.clone()
30279 }
30280 }
30281
30282 impl ::std::fmt::Display for PackLogRequestType {
30283 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30284 match *self {
30285 Self::Unknown => f.write_str("unknown"),
30286 Self::ConnectionNameMetadataRequest => f.write_str("connectionNameMetadataRequest"),
30287 Self::ParameterAutocompleteMetadataRequest => f.write_str("parameterAutocompleteMetadataRequest"),
30288 Self::PostAuthSetupMetadataRequest => f.write_str("postAuthSetupMetadataRequest"),
30289 Self::PropertyOptionsMetadataRequest => f.write_str("propertyOptionsMetadataRequest"),
30290 Self::GetSyncTableSchemaMetadataRequest => f.write_str("getSyncTableSchemaMetadataRequest"),
30291 Self::GetDynamicSyncTableNameMetadataRequest => f.write_str("getDynamicSyncTableNameMetadataRequest"),
30292 Self::ListSyncTableDynamicUrlsMetadataRequest => f.write_str("listSyncTableDynamicUrlsMetadataRequest"),
30293 Self::SearchSyncTableDynamicUrlsMetadataRequest => f.write_str("searchSyncTableDynamicUrlsMetadataRequest"),
30294 Self::GetDynamicSyncTableDisplayUrlMetadataRequest => f.write_str("getDynamicSyncTableDisplayUrlMetadataRequest"),
30295 Self::GetIdentifiersForConnectionRequest => f.write_str("getIdentifiersForConnectionRequest"),
30296 Self::InvokeFormulaRequest => f.write_str("invokeFormulaRequest"),
30297 Self::InvokeSyncFormulaRequest => f.write_str("invokeSyncFormulaRequest"),
30298 Self::InvokeSyncUpdateFormulaRequest => f.write_str("invokeSyncUpdateFormulaRequest"),
30299 Self::InvokeExecuteGetPermissionsRequest => f.write_str("invokeExecuteGetPermissionsRequest"),
30300 Self::ValidateParametersMetadataRequest => f.write_str("validateParametersMetadataRequest"),
30301 Self::Mcp => f.write_str("mcp"),
30302 }
30303 }
30304 }
30305
30306 impl ::std::str::FromStr for PackLogRequestType {
30307 type Err = self::error::ConversionError;
30308 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30309 match value {
30310 "unknown" => Ok(Self::Unknown),
30311 "connectionNameMetadataRequest" => Ok(Self::ConnectionNameMetadataRequest),
30312 "parameterAutocompleteMetadataRequest" => Ok(Self::ParameterAutocompleteMetadataRequest),
30313 "postAuthSetupMetadataRequest" => Ok(Self::PostAuthSetupMetadataRequest),
30314 "propertyOptionsMetadataRequest" => Ok(Self::PropertyOptionsMetadataRequest),
30315 "getSyncTableSchemaMetadataRequest" => Ok(Self::GetSyncTableSchemaMetadataRequest),
30316 "getDynamicSyncTableNameMetadataRequest" => Ok(Self::GetDynamicSyncTableNameMetadataRequest),
30317 "listSyncTableDynamicUrlsMetadataRequest" => Ok(Self::ListSyncTableDynamicUrlsMetadataRequest),
30318 "searchSyncTableDynamicUrlsMetadataRequest" => Ok(Self::SearchSyncTableDynamicUrlsMetadataRequest),
30319 "getDynamicSyncTableDisplayUrlMetadataRequest" => Ok(Self::GetDynamicSyncTableDisplayUrlMetadataRequest),
30320 "getIdentifiersForConnectionRequest" => Ok(Self::GetIdentifiersForConnectionRequest),
30321 "invokeFormulaRequest" => Ok(Self::InvokeFormulaRequest),
30322 "invokeSyncFormulaRequest" => Ok(Self::InvokeSyncFormulaRequest),
30323 "invokeSyncUpdateFormulaRequest" => Ok(Self::InvokeSyncUpdateFormulaRequest),
30324 "invokeExecuteGetPermissionsRequest" => Ok(Self::InvokeExecuteGetPermissionsRequest),
30325 "validateParametersMetadataRequest" => Ok(Self::ValidateParametersMetadataRequest),
30326 "mcp" => Ok(Self::Mcp),
30327 _ => Err("invalid value".into()),
30328 }
30329 }
30330 }
30331
30332 impl ::std::convert::TryFrom<&str> for PackLogRequestType {
30333 type Error = self::error::ConversionError;
30334 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30335 value.parse()
30336 }
30337 }
30338
30339 impl ::std::convert::TryFrom<&::std::string::String> for PackLogRequestType {
30340 type Error = self::error::ConversionError;
30341 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30342 value.parse()
30343 }
30344 }
30345
30346 impl ::std::convert::TryFrom<::std::string::String> for PackLogRequestType {
30347 type Error = self::error::ConversionError;
30348 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30349 value.parse()
30350 }
30351 }
30352
30353 ///`PackLogType`
30354 ///
30355 /// <details><summary>JSON schema</summary>
30356 ///
30357 /// ```json
30358 ///{
30359 /// "type": "string",
30360 /// "enum": [
30361 /// "custom",
30362 /// "fetcher",
30363 /// "invocation",
30364 /// "internal",
30365 /// "auth",
30366 /// "ingestionLifecycle",
30367 /// "ingestionDebug",
30368 /// "agentRuntime",
30369 /// "mcp"
30370 /// ],
30371 /// "x-schema-name": "PackLogType",
30372 /// "x-tsEnumNames": [
30373 /// "Custom",
30374 /// "Fetcher",
30375 /// "Invocation",
30376 /// "Internal",
30377 /// "Auth",
30378 /// "IngestionLifecycle",
30379 /// "IngestionDebug",
30380 /// "AgentRuntime",
30381 /// "Mcp"
30382 /// ]
30383 ///}
30384 /// ```
30385 /// </details>
30386 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30387 pub enum PackLogType {
30388 #[serde(rename = "custom")]
30389 Custom,
30390 #[serde(rename = "fetcher")]
30391 Fetcher,
30392 #[serde(rename = "invocation")]
30393 Invocation,
30394 #[serde(rename = "internal")]
30395 Internal,
30396 #[serde(rename = "auth")]
30397 Auth,
30398 #[serde(rename = "ingestionLifecycle")]
30399 IngestionLifecycle,
30400 #[serde(rename = "ingestionDebug")]
30401 IngestionDebug,
30402 #[serde(rename = "agentRuntime")]
30403 AgentRuntime,
30404 #[serde(rename = "mcp")]
30405 Mcp,
30406 }
30407
30408 impl ::std::convert::From<&Self> for PackLogType {
30409 fn from(value: &PackLogType) -> Self {
30410 value.clone()
30411 }
30412 }
30413
30414 impl ::std::fmt::Display for PackLogType {
30415 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30416 match *self {
30417 Self::Custom => f.write_str("custom"),
30418 Self::Fetcher => f.write_str("fetcher"),
30419 Self::Invocation => f.write_str("invocation"),
30420 Self::Internal => f.write_str("internal"),
30421 Self::Auth => f.write_str("auth"),
30422 Self::IngestionLifecycle => f.write_str("ingestionLifecycle"),
30423 Self::IngestionDebug => f.write_str("ingestionDebug"),
30424 Self::AgentRuntime => f.write_str("agentRuntime"),
30425 Self::Mcp => f.write_str("mcp"),
30426 }
30427 }
30428 }
30429
30430 impl ::std::str::FromStr for PackLogType {
30431 type Err = self::error::ConversionError;
30432 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30433 match value {
30434 "custom" => Ok(Self::Custom),
30435 "fetcher" => Ok(Self::Fetcher),
30436 "invocation" => Ok(Self::Invocation),
30437 "internal" => Ok(Self::Internal),
30438 "auth" => Ok(Self::Auth),
30439 "ingestionLifecycle" => Ok(Self::IngestionLifecycle),
30440 "ingestionDebug" => Ok(Self::IngestionDebug),
30441 "agentRuntime" => Ok(Self::AgentRuntime),
30442 "mcp" => Ok(Self::Mcp),
30443 _ => Err("invalid value".into()),
30444 }
30445 }
30446 }
30447
30448 impl ::std::convert::TryFrom<&str> for PackLogType {
30449 type Error = self::error::ConversionError;
30450 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30451 value.parse()
30452 }
30453 }
30454
30455 impl ::std::convert::TryFrom<&::std::string::String> for PackLogType {
30456 type Error = self::error::ConversionError;
30457 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30458 value.parse()
30459 }
30460 }
30461
30462 impl ::std::convert::TryFrom<::std::string::String> for PackLogType {
30463 type Error = self::error::ConversionError;
30464 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30465 value.parse()
30466 }
30467 }
30468
30469 ///List of Pack logs.
30470 ///
30471 /// <details><summary>JSON schema</summary>
30472 ///
30473 /// ```json
30474 ///{
30475 /// "description": "List of Pack logs.",
30476 /// "type": "object",
30477 /// "required": [
30478 /// "items"
30479 /// ],
30480 /// "properties": {
30481 /// "items": {
30482 /// "type": "array",
30483 /// "items": {
30484 /// "$ref": "#/components/schemas/PackLog"
30485 /// }
30486 /// },
30487 /// "nextPageLink": {
30488 /// "allOf": [
30489 /// {
30490 /// "$ref": "#/components/schemas/nextPageLink"
30491 /// },
30492 /// {
30493 /// "examples": [
30494 /// "https://coda.io/apis/v1/packs/1/logs?pageToken=xyz"
30495 /// ],
30496 /// "type": "string"
30497 /// }
30498 /// ]
30499 /// },
30500 /// "nextPageToken": {
30501 /// "$ref": "#/components/schemas/nextPageToken"
30502 /// }
30503 /// },
30504 /// "additionalProperties": false,
30505 /// "x-schema-name": "PackLogsList"
30506 ///}
30507 /// ```
30508 /// </details>
30509 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30510 #[serde(deny_unknown_fields)]
30511 pub struct PackLogsList {
30512 pub items: ::std::vec::Vec<PackLog>,
30513 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
30514 pub next_page_link: ::std::option::Option<NextPageLink>,
30515 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
30516 pub next_page_token: ::std::option::Option<NextPageToken>,
30517 }
30518
30519 impl ::std::convert::From<&PackLogsList> for PackLogsList {
30520 fn from(value: &PackLogsList) -> Self {
30521 value.clone()
30522 }
30523 }
30524
30525 ///Pack log generated by an MCP (Model Context Protocol) operation.
30526 ///
30527 /// <details><summary>JSON schema</summary>
30528 ///
30529 /// ```json
30530 ///{
30531 /// "description": "Pack log generated by an MCP (Model Context Protocol)
30532 /// operation.",
30533 /// "type": "object",
30534 /// "required": [
30535 /// "context",
30536 /// "type"
30537 /// ],
30538 /// "properties": {
30539 /// "context": {
30540 /// "$ref": "#/components/schemas/PackLogContext"
30541 /// },
30542 /// "error": {
30543 /// "description": "Error info if this invocation resulted in an
30544 /// error.",
30545 /// "type": "object",
30546 /// "required": [
30547 /// "message"
30548 /// ],
30549 /// "properties": {
30550 /// "message": {
30551 /// "type": "string"
30552 /// },
30553 /// "stack": {
30554 /// "type": "string"
30555 /// }
30556 /// },
30557 /// "additionalProperties": false
30558 /// },
30559 /// "message": {
30560 /// "description": "A descriptive message about the MCP operation.",
30561 /// "type": "string"
30562 /// },
30563 /// "type": {
30564 /// "type": "string",
30565 /// "enum": [
30566 /// "mcp"
30567 /// ],
30568 /// "x-tsType": "PackLogType.Mcp"
30569 /// }
30570 /// },
30571 /// "additionalProperties": false,
30572 /// "x-schema-name": "PackMcpLog"
30573 ///}
30574 /// ```
30575 /// </details>
30576 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30577 #[serde(deny_unknown_fields)]
30578 pub struct PackMcpLog {
30579 pub context: PackLogContext,
30580 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30581 pub error: ::std::option::Option<PackMcpLogError>,
30582 ///A descriptive message about the MCP operation.
30583 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30584 pub message: ::std::option::Option<::std::string::String>,
30585 #[serde(rename = "type")]
30586 pub type_: PackMcpLogType,
30587 }
30588
30589 impl ::std::convert::From<&PackMcpLog> for PackMcpLog {
30590 fn from(value: &PackMcpLog) -> Self {
30591 value.clone()
30592 }
30593 }
30594
30595 ///Error info if this invocation resulted in an error.
30596 ///
30597 /// <details><summary>JSON schema</summary>
30598 ///
30599 /// ```json
30600 ///{
30601 /// "description": "Error info if this invocation resulted in an error.",
30602 /// "type": "object",
30603 /// "required": [
30604 /// "message"
30605 /// ],
30606 /// "properties": {
30607 /// "message": {
30608 /// "type": "string"
30609 /// },
30610 /// "stack": {
30611 /// "type": "string"
30612 /// }
30613 /// },
30614 /// "additionalProperties": false
30615 ///}
30616 /// ```
30617 /// </details>
30618 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30619 #[serde(deny_unknown_fields)]
30620 pub struct PackMcpLogError {
30621 pub message: ::std::string::String,
30622 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30623 pub stack: ::std::option::Option<::std::string::String>,
30624 }
30625
30626 impl ::std::convert::From<&PackMcpLogError> for PackMcpLogError {
30627 fn from(value: &PackMcpLogError) -> Self {
30628 value.clone()
30629 }
30630 }
30631
30632 ///`PackMcpLogType`
30633 ///
30634 /// <details><summary>JSON schema</summary>
30635 ///
30636 /// ```json
30637 ///{
30638 /// "type": "string",
30639 /// "enum": [
30640 /// "mcp"
30641 /// ],
30642 /// "x-tsType": "PackLogType.Mcp"
30643 ///}
30644 /// ```
30645 /// </details>
30646 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30647 pub enum PackMcpLogType {
30648 #[serde(rename = "mcp")]
30649 Mcp,
30650 }
30651
30652 impl ::std::convert::From<&Self> for PackMcpLogType {
30653 fn from(value: &PackMcpLogType) -> Self {
30654 value.clone()
30655 }
30656 }
30657
30658 impl ::std::fmt::Display for PackMcpLogType {
30659 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30660 match *self {
30661 Self::Mcp => f.write_str("mcp"),
30662 }
30663 }
30664 }
30665
30666 impl ::std::str::FromStr for PackMcpLogType {
30667 type Err = self::error::ConversionError;
30668 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30669 match value {
30670 "mcp" => Ok(Self::Mcp),
30671 _ => Err("invalid value".into()),
30672 }
30673 }
30674 }
30675
30676 impl ::std::convert::TryFrom<&str> for PackMcpLogType {
30677 type Error = self::error::ConversionError;
30678 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30679 value.parse()
30680 }
30681 }
30682
30683 impl ::std::convert::TryFrom<&::std::string::String> for PackMcpLogType {
30684 type Error = self::error::ConversionError;
30685 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30686 value.parse()
30687 }
30688 }
30689
30690 impl ::std::convert::TryFrom<::std::string::String> for PackMcpLogType {
30691 type Error = self::error::ConversionError;
30692 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30693 value.parse()
30694 }
30695 }
30696
30697 ///The name of the Pack.
30698 ///
30699 /// <details><summary>JSON schema</summary>
30700 ///
30701 /// ```json
30702 ///{
30703 /// "description": "The name of the Pack.",
30704 /// "examples": [
30705 /// "Cool Geometry Formulas"
30706 /// ],
30707 /// "type": "string",
30708 /// "maxLength": 128
30709 ///}
30710 /// ```
30711 /// </details>
30712 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30713 #[serde(transparent)]
30714 pub struct PackName(::std::string::String);
30715 impl ::std::ops::Deref for PackName {
30716 type Target = ::std::string::String;
30717 fn deref(&self) -> &::std::string::String {
30718 &self.0
30719 }
30720 }
30721
30722 impl ::std::convert::From<PackName> for ::std::string::String {
30723 fn from(value: PackName) -> Self {
30724 value.0
30725 }
30726 }
30727
30728 impl ::std::convert::From<&PackName> for PackName {
30729 fn from(value: &PackName) -> Self {
30730 value.clone()
30731 }
30732 }
30733
30734 impl ::std::str::FromStr for PackName {
30735 type Err = self::error::ConversionError;
30736 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30737 if value.chars().count() > 128usize {
30738 return Err("longer than 128 characters".into());
30739 }
30740 Ok(Self(value.to_string()))
30741 }
30742 }
30743
30744 impl ::std::convert::TryFrom<&str> for PackName {
30745 type Error = self::error::ConversionError;
30746 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30747 value.parse()
30748 }
30749 }
30750
30751 impl ::std::convert::TryFrom<&::std::string::String> for PackName {
30752 type Error = self::error::ConversionError;
30753 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30754 value.parse()
30755 }
30756 }
30757
30758 impl ::std::convert::TryFrom<::std::string::String> for PackName {
30759 type Error = self::error::ConversionError;
30760 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30761 value.parse()
30762 }
30763 }
30764
30765 impl<'de> ::serde::Deserialize<'de> for PackName {
30766 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
30767 where
30768 D: ::serde::Deserializer<'de>,
30769 {
30770 ::std::string::String::deserialize(deserializer)?
30771 .parse()
30772 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
30773 }
30774 }
30775
30776 ///Location of including OAuth2 client credentials in a request.
30777 ///
30778 /// <details><summary>JSON schema</summary>
30779 ///
30780 /// ```json
30781 ///{
30782 /// "description": "Location of including OAuth2 client credentials in a
30783 /// request.",
30784 /// "type": "string",
30785 /// "enum": [
30786 /// "automatic",
30787 /// "body",
30788 /// "header"
30789 /// ],
30790 /// "x-schema-name": "PackOAuth2ClientCredentialsLocation",
30791 /// "x-tsEnumNames": [
30792 /// "Automatic",
30793 /// "Body",
30794 /// "Header"
30795 /// ]
30796 ///}
30797 /// ```
30798 /// </details>
30799 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30800 pub enum PackOAuth2ClientCredentialsLocation {
30801 #[serde(rename = "automatic")]
30802 Automatic,
30803 #[serde(rename = "body")]
30804 Body,
30805 #[serde(rename = "header")]
30806 Header,
30807 }
30808
30809 impl ::std::convert::From<&Self> for PackOAuth2ClientCredentialsLocation {
30810 fn from(value: &PackOAuth2ClientCredentialsLocation) -> Self {
30811 value.clone()
30812 }
30813 }
30814
30815 impl ::std::fmt::Display for PackOAuth2ClientCredentialsLocation {
30816 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30817 match *self {
30818 Self::Automatic => f.write_str("automatic"),
30819 Self::Body => f.write_str("body"),
30820 Self::Header => f.write_str("header"),
30821 }
30822 }
30823 }
30824
30825 impl ::std::str::FromStr for PackOAuth2ClientCredentialsLocation {
30826 type Err = self::error::ConversionError;
30827 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30828 match value {
30829 "automatic" => Ok(Self::Automatic),
30830 "body" => Ok(Self::Body),
30831 "header" => Ok(Self::Header),
30832 _ => Err("invalid value".into()),
30833 }
30834 }
30835 }
30836
30837 impl ::std::convert::TryFrom<&str> for PackOAuth2ClientCredentialsLocation {
30838 type Error = self::error::ConversionError;
30839 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30840 value.parse()
30841 }
30842 }
30843
30844 impl ::std::convert::TryFrom<&::std::string::String> for PackOAuth2ClientCredentialsLocation {
30845 type Error = self::error::ConversionError;
30846 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30847 value.parse()
30848 }
30849 }
30850
30851 impl ::std::convert::TryFrom<::std::string::String> for PackOAuth2ClientCredentialsLocation {
30852 type Error = self::error::ConversionError;
30853 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
30854 value.parse()
30855 }
30856 }
30857
30858 ///The Pack OAuth configuration metadata.
30859 ///
30860 /// <details><summary>JSON schema</summary>
30861 ///
30862 /// ```json
30863 ///{
30864 /// "description": "The Pack OAuth configuration metadata.",
30865 /// "type": "object",
30866 /// "required": [
30867 /// "authorizationUrl",
30868 /// "maskedClientId",
30869 /// "maskedClientSecret",
30870 /// "redirectUri",
30871 /// "tokenUrl"
30872 /// ],
30873 /// "properties": {
30874 /// "authorizationUrl": {
30875 /// "description": "Authorization URL of the OAuth provider.",
30876 /// "type": "string"
30877 /// },
30878 /// "maskedClientId": {
30879 /// "description": "Masked OAuth client id. If not set, empty string
30880 /// will be returned.",
30881 /// "type": "string"
30882 /// },
30883 /// "maskedClientSecret": {
30884 /// "description": "Masked OAuth client secret. If not set, empty
30885 /// string will be returned.",
30886 /// "type": "string"
30887 /// },
30888 /// "redirectUri": {
30889 /// "description": "Redirect URI of the Pack.",
30890 /// "type": "string"
30891 /// },
30892 /// "scopes": {
30893 /// "description": "Optional scopes of the OAuth client.",
30894 /// "type": "string"
30895 /// },
30896 /// "tokenPrefix": {
30897 /// "description": "Optional token prefix that's used to make the API
30898 /// request.",
30899 /// "type": "string"
30900 /// },
30901 /// "tokenUrl": {
30902 /// "description": "Token URL of the OAuth provider.",
30903 /// "type": "string"
30904 /// }
30905 /// },
30906 /// "additionalProperties": false,
30907 /// "x-schema-name": "PackOauthConfigMetadata"
30908 ///}
30909 /// ```
30910 /// </details>
30911 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30912 #[serde(deny_unknown_fields)]
30913 pub struct PackOauthConfigMetadata {
30914 ///Authorization URL of the OAuth provider.
30915 #[serde(rename = "authorizationUrl")]
30916 pub authorization_url: ::std::string::String,
30917 ///Masked OAuth client id. If not set, empty string will be returned.
30918 #[serde(rename = "maskedClientId")]
30919 pub masked_client_id: ::std::string::String,
30920 ///Masked OAuth client secret. If not set, empty string will be
30921 /// returned.
30922 #[serde(rename = "maskedClientSecret")]
30923 pub masked_client_secret: ::std::string::String,
30924 ///Redirect URI of the Pack.
30925 #[serde(rename = "redirectUri")]
30926 pub redirect_uri: ::std::string::String,
30927 ///Optional scopes of the OAuth client.
30928 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30929 pub scopes: ::std::option::Option<::std::string::String>,
30930 ///Optional token prefix that's used to make the API request.
30931 #[serde(rename = "tokenPrefix", default, skip_serializing_if = "::std::option::Option::is_none")]
30932 pub token_prefix: ::std::option::Option<::std::string::String>,
30933 ///Token URL of the OAuth provider.
30934 #[serde(rename = "tokenUrl")]
30935 pub token_url: ::std::string::String,
30936 }
30937
30938 impl ::std::convert::From<&PackOauthConfigMetadata> for PackOauthConfigMetadata {
30939 fn from(value: &PackOauthConfigMetadata) -> Self {
30940 value.clone()
30941 }
30942 }
30943
30944 ///Describes restrictions that a user's organization has placed on a pack
30945 /// for Coda Brain ingestions
30946 ///
30947 /// <details><summary>JSON schema</summary>
30948 ///
30949 /// ```json
30950 ///{
30951 /// "description": "Describes restrictions that a user's organization has
30952 /// placed on a pack for Coda Brain ingestions",
30953 /// "type": "object",
30954 /// "required": [
30955 /// "canRequestAccess",
30956 /// "hasRequestedAccess",
30957 /// "requiresConfiguration"
30958 /// ],
30959 /// "properties": {
30960 /// "allowedConfigurations": {
30961 /// "type": "array",
30962 /// "items": {
30963 /// "$ref": "#/components/schemas/PackConfigurationEntry"
30964 /// }
30965 /// },
30966 /// "allowedPackIds": {
30967 /// "type": "array",
30968 /// "items": {
30969 /// "type": "number"
30970 /// }
30971 /// },
30972 /// "canRequestAccess": {
30973 /// "type": "boolean"
30974 /// },
30975 /// "hasRequestedAccess": {
30976 /// "type": "boolean"
30977 /// },
30978 /// "requiresConfiguration": {
30979 /// "type": "boolean"
30980 /// }
30981 /// },
30982 /// "additionalProperties": false,
30983 /// "x-schema-name": "PackOrganizationAccessForCodaBrain"
30984 ///}
30985 /// ```
30986 /// </details>
30987 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30988 #[serde(deny_unknown_fields)]
30989 pub struct PackOrganizationAccessForCodaBrain {
30990 #[serde(rename = "allowedConfigurations", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
30991 pub allowed_configurations: ::std::vec::Vec<PackConfigurationEntry>,
30992 #[serde(rename = "allowedPackIds", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
30993 pub allowed_pack_ids: ::std::vec::Vec<f64>,
30994 #[serde(rename = "canRequestAccess")]
30995 pub can_request_access: bool,
30996 #[serde(rename = "hasRequestedAccess")]
30997 pub has_requested_access: bool,
30998 #[serde(rename = "requiresConfiguration")]
30999 pub requires_configuration: bool,
31000 }
31001
31002 impl ::std::convert::From<&PackOrganizationAccessForCodaBrain> for PackOrganizationAccessForCodaBrain {
31003 fn from(value: &PackOrganizationAccessForCodaBrain) -> Self {
31004 value.clone()
31005 }
31006 }
31007
31008 ///Describes restrictions that a user's organization has placed on a pack
31009 ///
31010 /// <details><summary>JSON schema</summary>
31011 ///
31012 /// ```json
31013 ///{
31014 /// "description": "Describes restrictions that a user's organization has
31015 /// placed on a pack",
31016 /// "type": "object",
31017 /// "required": [
31018 /// "canRequestAccess",
31019 /// "hasRequestedAccess",
31020 /// "requiresConfiguration"
31021 /// ],
31022 /// "properties": {
31023 /// "allowedConfigurations": {
31024 /// "type": "array",
31025 /// "items": {
31026 /// "$ref": "#/components/schemas/PackConfigurationEntry"
31027 /// }
31028 /// },
31029 /// "allowedPackIds": {
31030 /// "type": "array",
31031 /// "items": {
31032 /// "type": "number"
31033 /// }
31034 /// },
31035 /// "canRequestAccess": {
31036 /// "type": "boolean"
31037 /// },
31038 /// "hasRequestedAccess": {
31039 /// "type": "boolean"
31040 /// },
31041 /// "incompatibleDocFolder": {
31042 /// "$ref": "#/components/schemas/FolderReference"
31043 /// },
31044 /// "incompatibleDocOwner": {
31045 /// "$ref": "#/components/schemas/UserSummary"
31046 /// },
31047 /// "incompatibleDocPermissions": {
31048 /// "type": "array",
31049 /// "items": {
31050 /// "$ref": "#/components/schemas/Permission"
31051 /// }
31052 /// },
31053 /// "isDocOwner": {
31054 /// "type": "boolean"
31055 /// },
31056 /// "requiresConfiguration": {
31057 /// "type": "boolean"
31058 /// }
31059 /// },
31060 /// "additionalProperties": false,
31061 /// "x-schema-name": "PackOrganizationAccessForDocs"
31062 ///}
31063 /// ```
31064 /// </details>
31065 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31066 #[serde(deny_unknown_fields)]
31067 pub struct PackOrganizationAccessForDocs {
31068 #[serde(rename = "allowedConfigurations", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
31069 pub allowed_configurations: ::std::vec::Vec<PackConfigurationEntry>,
31070 #[serde(rename = "allowedPackIds", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
31071 pub allowed_pack_ids: ::std::vec::Vec<f64>,
31072 #[serde(rename = "canRequestAccess")]
31073 pub can_request_access: bool,
31074 #[serde(rename = "hasRequestedAccess")]
31075 pub has_requested_access: bool,
31076 #[serde(rename = "incompatibleDocFolder", default, skip_serializing_if = "::std::option::Option::is_none")]
31077 pub incompatible_doc_folder: ::std::option::Option<FolderReference>,
31078 #[serde(rename = "incompatibleDocOwner", default, skip_serializing_if = "::std::option::Option::is_none")]
31079 pub incompatible_doc_owner: ::std::option::Option<UserSummary>,
31080 #[serde(rename = "incompatibleDocPermissions", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
31081 pub incompatible_doc_permissions: ::std::vec::Vec<Permission>,
31082 #[serde(rename = "isDocOwner", default, skip_serializing_if = "::std::option::Option::is_none")]
31083 pub is_doc_owner: ::std::option::Option<bool>,
31084 #[serde(rename = "requiresConfiguration")]
31085 pub requires_configuration: bool,
31086 }
31087
31088 impl ::std::convert::From<&PackOrganizationAccessForDocs> for PackOrganizationAccessForDocs {
31089 fn from(value: &PackOrganizationAccessForDocs) -> Self {
31090 value.clone()
31091 }
31092 }
31093
31094 ///Metadata about a Pack permission.
31095 ///
31096 /// <details><summary>JSON schema</summary>
31097 ///
31098 /// ```json
31099 ///{
31100 /// "description": "Metadata about a Pack permission.",
31101 /// "type": "object",
31102 /// "required": [
31103 /// "access",
31104 /// "id",
31105 /// "principal"
31106 /// ],
31107 /// "properties": {
31108 /// "access": {
31109 /// "$ref": "#/components/schemas/PackAccessType"
31110 /// },
31111 /// "id": {
31112 /// "description": "Id for the Permission",
31113 /// "type": "string"
31114 /// },
31115 /// "principal": {
31116 /// "$ref": "#/components/schemas/PackPrincipal"
31117 /// }
31118 /// },
31119 /// "additionalProperties": false,
31120 /// "x-schema-name": "PackPermission"
31121 ///}
31122 /// ```
31123 /// </details>
31124 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31125 #[serde(deny_unknown_fields)]
31126 pub struct PackPermission {
31127 pub access: PackAccessType,
31128 ///Id for the Permission
31129 pub id: ::std::string::String,
31130 pub principal: PackPrincipal,
31131 }
31132
31133 impl ::std::convert::From<&PackPermission> for PackPermission {
31134 fn from(value: &PackPermission) -> Self {
31135 value.clone()
31136 }
31137 }
31138
31139 ///List of Pack permissions.
31140 ///
31141 /// <details><summary>JSON schema</summary>
31142 ///
31143 /// ```json
31144 ///{
31145 /// "description": "List of Pack permissions.",
31146 /// "type": "object",
31147 /// "required": [
31148 /// "items",
31149 /// "permissionUsers"
31150 /// ],
31151 /// "properties": {
31152 /// "items": {
31153 /// "type": "array",
31154 /// "items": {
31155 /// "$ref": "#/components/schemas/PackPermission"
31156 /// }
31157 /// },
31158 /// "permissionUsers": {
31159 /// "type": "array",
31160 /// "items": {
31161 /// "$ref": "#/components/schemas/UserSummary"
31162 /// }
31163 /// }
31164 /// },
31165 /// "additionalProperties": false,
31166 /// "x-schema-name": "PackPermissionList"
31167 ///}
31168 /// ```
31169 /// </details>
31170 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31171 #[serde(deny_unknown_fields)]
31172 pub struct PackPermissionList {
31173 pub items: ::std::vec::Vec<PackPermission>,
31174 #[serde(rename = "permissionUsers")]
31175 pub permission_users: ::std::vec::Vec<UserSummary>,
31176 }
31177
31178 impl ::std::convert::From<&PackPermissionList> for PackPermissionList {
31179 fn from(value: &PackPermissionList) -> Self {
31180 value.clone()
31181 }
31182 }
31183
31184 ///Currency needed to subscribe to the Pack.
31185 ///
31186 /// <details><summary>JSON schema</summary>
31187 ///
31188 /// ```json
31189 ///{
31190 /// "description": "Currency needed to subscribe to the Pack.",
31191 /// "type": "string",
31192 /// "enum": [
31193 /// "USD"
31194 /// ],
31195 /// "x-schema-name": "PackPlanCurrency",
31196 /// "x-tsEnumNames": [
31197 /// "Usd"
31198 /// ]
31199 ///}
31200 /// ```
31201 /// </details>
31202 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31203 pub enum PackPlanCurrency {
31204 #[serde(rename = "USD")]
31205 Usd,
31206 }
31207
31208 impl ::std::convert::From<&Self> for PackPlanCurrency {
31209 fn from(value: &PackPlanCurrency) -> Self {
31210 value.clone()
31211 }
31212 }
31213
31214 impl ::std::fmt::Display for PackPlanCurrency {
31215 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31216 match *self {
31217 Self::Usd => f.write_str("USD"),
31218 }
31219 }
31220 }
31221
31222 impl ::std::str::FromStr for PackPlanCurrency {
31223 type Err = self::error::ConversionError;
31224 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31225 match value {
31226 "USD" => Ok(Self::Usd),
31227 _ => Err("invalid value".into()),
31228 }
31229 }
31230 }
31231
31232 impl ::std::convert::TryFrom<&str> for PackPlanCurrency {
31233 type Error = self::error::ConversionError;
31234 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31235 value.parse()
31236 }
31237 }
31238
31239 impl ::std::convert::TryFrom<&::std::string::String> for PackPlanCurrency {
31240 type Error = self::error::ConversionError;
31241 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31242 value.parse()
31243 }
31244 }
31245
31246 impl ::std::convert::TryFrom<::std::string::String> for PackPlanCurrency {
31247 type Error = self::error::ConversionError;
31248 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31249 value.parse()
31250 }
31251 }
31252
31253 ///Type of pricing used to subscribe to a Pack.
31254 ///
31255 /// <details><summary>JSON schema</summary>
31256 ///
31257 /// ```json
31258 ///{
31259 /// "description": "Type of pricing used to subscribe to a Pack.",
31260 /// "type": "string",
31261 /// "enum": [
31262 /// "Free",
31263 /// "MonthlyDocMaker",
31264 /// "BundledWithTier"
31265 /// ],
31266 /// "x-schema-name": "PackPlanPricingType",
31267 /// "x-tsEnumNames": [
31268 /// "Free",
31269 /// "MonthlyDocMaker",
31270 /// "BundledWithTier"
31271 /// ]
31272 ///}
31273 /// ```
31274 /// </details>
31275 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31276 pub enum PackPlanPricingType {
31277 Free,
31278 MonthlyDocMaker,
31279 BundledWithTier,
31280 }
31281
31282 impl ::std::convert::From<&Self> for PackPlanPricingType {
31283 fn from(value: &PackPlanPricingType) -> Self {
31284 value.clone()
31285 }
31286 }
31287
31288 impl ::std::fmt::Display for PackPlanPricingType {
31289 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31290 match *self {
31291 Self::Free => f.write_str("Free"),
31292 Self::MonthlyDocMaker => f.write_str("MonthlyDocMaker"),
31293 Self::BundledWithTier => f.write_str("BundledWithTier"),
31294 }
31295 }
31296 }
31297
31298 impl ::std::str::FromStr for PackPlanPricingType {
31299 type Err = self::error::ConversionError;
31300 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31301 match value {
31302 "Free" => Ok(Self::Free),
31303 "MonthlyDocMaker" => Ok(Self::MonthlyDocMaker),
31304 "BundledWithTier" => Ok(Self::BundledWithTier),
31305 _ => Err("invalid value".into()),
31306 }
31307 }
31308 }
31309
31310 impl ::std::convert::TryFrom<&str> for PackPlanPricingType {
31311 type Error = self::error::ConversionError;
31312 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31313 value.parse()
31314 }
31315 }
31316
31317 impl ::std::convert::TryFrom<&::std::string::String> for PackPlanPricingType {
31318 type Error = self::error::ConversionError;
31319 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31320 value.parse()
31321 }
31322 }
31323
31324 impl ::std::convert::TryFrom<::std::string::String> for PackPlanPricingType {
31325 type Error = self::error::ConversionError;
31326 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31327 value.parse()
31328 }
31329 }
31330
31331 ///Metadata about a Pack principal.
31332 ///
31333 /// <details><summary>JSON schema</summary>
31334 ///
31335 /// ```json
31336 ///{
31337 /// "description": "Metadata about a Pack principal.",
31338 /// "oneOf": [
31339 /// {
31340 /// "$ref": "#/components/schemas/PackUserPrincipal"
31341 /// },
31342 /// {
31343 /// "$ref": "#/components/schemas/PackWorkspacePrincipal"
31344 /// },
31345 /// {
31346 /// "$ref": "#/components/schemas/PackGlobalPrincipal"
31347 /// },
31348 /// {
31349 /// "$ref": "#/components/schemas/PackGrammarlyInstitutionPrincipal"
31350 /// }
31351 /// ],
31352 /// "x-schema-name": "PackPrincipal"
31353 ///}
31354 /// ```
31355 /// </details>
31356 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31357 #[serde(untagged)]
31358 pub enum PackPrincipal {
31359 UserPrincipal(PackUserPrincipal),
31360 WorkspacePrincipal(PackWorkspacePrincipal),
31361 GlobalPrincipal(PackGlobalPrincipal),
31362 GrammarlyInstitutionPrincipal(PackGrammarlyInstitutionPrincipal),
31363 }
31364
31365 impl ::std::convert::From<&Self> for PackPrincipal {
31366 fn from(value: &PackPrincipal) -> Self {
31367 value.clone()
31368 }
31369 }
31370
31371 impl ::std::convert::From<PackUserPrincipal> for PackPrincipal {
31372 fn from(value: PackUserPrincipal) -> Self {
31373 Self::UserPrincipal(value)
31374 }
31375 }
31376
31377 impl ::std::convert::From<PackWorkspacePrincipal> for PackPrincipal {
31378 fn from(value: PackWorkspacePrincipal) -> Self {
31379 Self::WorkspacePrincipal(value)
31380 }
31381 }
31382
31383 impl ::std::convert::From<PackGlobalPrincipal> for PackPrincipal {
31384 fn from(value: PackGlobalPrincipal) -> Self {
31385 Self::GlobalPrincipal(value)
31386 }
31387 }
31388
31389 impl ::std::convert::From<PackGrammarlyInstitutionPrincipal> for PackPrincipal {
31390 fn from(value: PackGrammarlyInstitutionPrincipal) -> Self {
31391 Self::GrammarlyInstitutionPrincipal(value)
31392 }
31393 }
31394
31395 ///Type of Pack permissions.
31396 ///
31397 /// <details><summary>JSON schema</summary>
31398 ///
31399 /// ```json
31400 ///{
31401 /// "description": "Type of Pack permissions.",
31402 /// "type": "string",
31403 /// "enum": [
31404 /// "user",
31405 /// "workspace",
31406 /// "worldwide",
31407 /// "grammarlyInstitution"
31408 /// ],
31409 /// "x-schema-name": "PackPrincipalType",
31410 /// "x-tsEnumNames": [
31411 /// "User",
31412 /// "Workspace",
31413 /// "Worldwide",
31414 /// "GrammarlyInstitution"
31415 /// ]
31416 ///}
31417 /// ```
31418 /// </details>
31419 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31420 pub enum PackPrincipalType {
31421 #[serde(rename = "user")]
31422 User,
31423 #[serde(rename = "workspace")]
31424 Workspace,
31425 #[serde(rename = "worldwide")]
31426 Worldwide,
31427 #[serde(rename = "grammarlyInstitution")]
31428 GrammarlyInstitution,
31429 }
31430
31431 impl ::std::convert::From<&Self> for PackPrincipalType {
31432 fn from(value: &PackPrincipalType) -> Self {
31433 value.clone()
31434 }
31435 }
31436
31437 impl ::std::fmt::Display for PackPrincipalType {
31438 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31439 match *self {
31440 Self::User => f.write_str("user"),
31441 Self::Workspace => f.write_str("workspace"),
31442 Self::Worldwide => f.write_str("worldwide"),
31443 Self::GrammarlyInstitution => f.write_str("grammarlyInstitution"),
31444 }
31445 }
31446 }
31447
31448 impl ::std::str::FromStr for PackPrincipalType {
31449 type Err = self::error::ConversionError;
31450 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31451 match value {
31452 "user" => Ok(Self::User),
31453 "workspace" => Ok(Self::Workspace),
31454 "worldwide" => Ok(Self::Worldwide),
31455 "grammarlyInstitution" => Ok(Self::GrammarlyInstitution),
31456 _ => Err("invalid value".into()),
31457 }
31458 }
31459 }
31460
31461 impl ::std::convert::TryFrom<&str> for PackPrincipalType {
31462 type Error = self::error::ConversionError;
31463 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31464 value.parse()
31465 }
31466 }
31467
31468 impl ::std::convert::TryFrom<&::std::string::String> for PackPrincipalType {
31469 type Error = self::error::ConversionError;
31470 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31471 value.parse()
31472 }
31473 }
31474
31475 impl ::std::convert::TryFrom<::std::string::String> for PackPrincipalType {
31476 type Error = self::error::ConversionError;
31477 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31478 value.parse()
31479 }
31480 }
31481
31482 ///Rate limit in Pack settings.
31483 ///
31484 /// <details><summary>JSON schema</summary>
31485 ///
31486 /// ```json
31487 ///{
31488 /// "description": "Rate limit in Pack settings.",
31489 /// "type": "object",
31490 /// "required": [
31491 /// "intervalSeconds",
31492 /// "operationsPerInterval"
31493 /// ],
31494 /// "properties": {
31495 /// "intervalSeconds": {
31496 /// "description": "The rate limit interval in seconds.",
31497 /// "examples": [
31498 /// 3600
31499 /// ],
31500 /// "type": "integer",
31501 /// "maximum": 86400.0,
31502 /// "minimum": 1.0
31503 /// },
31504 /// "operationsPerInterval": {
31505 /// "description": "The maximum number of Pack operations that can be
31506 /// performed in a given interval.",
31507 /// "examples": [
31508 /// 20
31509 /// ],
31510 /// "type": "integer",
31511 /// "minimum": 0.0
31512 /// }
31513 /// },
31514 /// "additionalProperties": false,
31515 /// "x-schema-name": "PackRateLimit"
31516 ///}
31517 /// ```
31518 /// </details>
31519 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31520 #[serde(deny_unknown_fields)]
31521 pub struct PackRateLimit {
31522 ///The rate limit interval in seconds.
31523 #[serde(rename = "intervalSeconds")]
31524 pub interval_seconds: ::std::num::NonZeroU64,
31525 ///The maximum number of Pack operations that can be performed in a
31526 /// given interval.
31527 #[serde(rename = "operationsPerInterval")]
31528 pub operations_per_interval: u64,
31529 }
31530
31531 impl ::std::convert::From<&PackRateLimit> for PackRateLimit {
31532 fn from(value: &PackRateLimit) -> Self {
31533 value.clone()
31534 }
31535 }
31536
31537 ///Details about a Pack release.
31538 ///
31539 /// <details><summary>JSON schema</summary>
31540 ///
31541 /// ```json
31542 ///{
31543 /// "description": "Details about a Pack release.",
31544 /// "type": "object",
31545 /// "required": [
31546 /// "createdAt",
31547 /// "packId",
31548 /// "packVersion",
31549 /// "releaseId",
31550 /// "releaseNotes",
31551 /// "sdkVersion"
31552 /// ],
31553 /// "properties": {
31554 /// "createdAt": {
31555 /// "description": "Timestamp for when the release was created.",
31556 /// "examples": [
31557 /// "2018-04-11T00:18:57.946Z"
31558 /// ],
31559 /// "type": "string",
31560 /// "format": "date-time"
31561 /// },
31562 /// "packId": {
31563 /// "description": "ID of the Packs.",
31564 /// "examples": [
31565 /// 1003
31566 /// ],
31567 /// "type": "number"
31568 /// },
31569 /// "packVersion": {
31570 /// "description": "The semantic format of the Pack version.",
31571 /// "examples": [
31572 /// "1.0.3"
31573 /// ],
31574 /// "type": "string"
31575 /// },
31576 /// "releaseId": {
31577 /// "description": "The release number of the Pack version if it has
31578 /// one.",
31579 /// "examples": [
31580 /// 2
31581 /// ],
31582 /// "type": "number"
31583 /// },
31584 /// "releaseNotes": {
31585 /// "description": "Developer notes.",
31586 /// "examples": [
31587 /// "The first release."
31588 /// ],
31589 /// "type": "string"
31590 /// },
31591 /// "sdkVersion": {
31592 /// "description": "What Packs SDK version was this version built on.",
31593 /// "examples": [
31594 /// "1.5.1"
31595 /// ],
31596 /// "type": "string"
31597 /// }
31598 /// },
31599 /// "additionalProperties": false,
31600 /// "x-schema-name": "PackRelease"
31601 ///}
31602 /// ```
31603 /// </details>
31604 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31605 #[serde(deny_unknown_fields)]
31606 pub struct PackRelease {
31607 ///Timestamp for when the release was created.
31608 #[serde(rename = "createdAt")]
31609 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
31610 #[serde(rename = "packId")]
31611 pub pack_id: f64,
31612 ///The semantic format of the Pack version.
31613 #[serde(rename = "packVersion")]
31614 pub pack_version: ::std::string::String,
31615 #[serde(rename = "releaseId")]
31616 pub release_id: f64,
31617 ///Developer notes.
31618 #[serde(rename = "releaseNotes")]
31619 pub release_notes: ::std::string::String,
31620 ///What Packs SDK version was this version built on.
31621 #[serde(rename = "sdkVersion")]
31622 pub sdk_version: ::std::string::String,
31623 }
31624
31625 impl ::std::convert::From<&PackRelease> for PackRelease {
31626 fn from(value: &PackRelease) -> Self {
31627 value.clone()
31628 }
31629 }
31630
31631 ///List of Pack releases.
31632 ///
31633 /// <details><summary>JSON schema</summary>
31634 ///
31635 /// ```json
31636 ///{
31637 /// "description": "List of Pack releases.",
31638 /// "type": "object",
31639 /// "required": [
31640 /// "items"
31641 /// ],
31642 /// "properties": {
31643 /// "items": {
31644 /// "type": "array",
31645 /// "items": {
31646 /// "$ref": "#/components/schemas/PackRelease"
31647 /// }
31648 /// },
31649 /// "nextPageLink": {
31650 /// "allOf": [
31651 /// {
31652 /// "$ref": "#/components/schemas/nextPageLink"
31653 /// },
31654 /// {
31655 /// "examples": [
31656 /// "https://coda.io/apis/v1/packs/1/releases?pageToken=xyz"
31657 /// ],
31658 /// "type": "string"
31659 /// }
31660 /// ]
31661 /// },
31662 /// "nextPageToken": {
31663 /// "$ref": "#/components/schemas/nextPageToken"
31664 /// }
31665 /// },
31666 /// "additionalProperties": false,
31667 /// "x-schema-name": "PackReleaseList"
31668 ///}
31669 /// ```
31670 /// </details>
31671 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31672 #[serde(deny_unknown_fields)]
31673 pub struct PackReleaseList {
31674 pub items: ::std::vec::Vec<PackRelease>,
31675 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
31676 pub next_page_link: ::std::option::Option<NextPageLink>,
31677 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
31678 pub next_page_token: ::std::option::Option<NextPageToken>,
31679 }
31680
31681 impl ::std::convert::From<&PackReleaseList> for PackReleaseList {
31682 fn from(value: &PackReleaseList) -> Self {
31683 value.clone()
31684 }
31685 }
31686
31687 ///A short version of the description of the Pack.
31688 ///
31689 /// <details><summary>JSON schema</summary>
31690 ///
31691 /// ```json
31692 ///{
31693 /// "description": "A short version of the description of the Pack.",
31694 /// "examples": [
31695 /// "Calculate cool geometric formulas like surface area."
31696 /// ],
31697 /// "type": "string",
31698 /// "maxLength": 256
31699 ///}
31700 /// ```
31701 /// </details>
31702 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31703 #[serde(transparent)]
31704 pub struct PackShortDescription(::std::string::String);
31705 impl ::std::ops::Deref for PackShortDescription {
31706 type Target = ::std::string::String;
31707 fn deref(&self) -> &::std::string::String {
31708 &self.0
31709 }
31710 }
31711
31712 impl ::std::convert::From<PackShortDescription> for ::std::string::String {
31713 fn from(value: PackShortDescription) -> Self {
31714 value.0
31715 }
31716 }
31717
31718 impl ::std::convert::From<&PackShortDescription> for PackShortDescription {
31719 fn from(value: &PackShortDescription) -> Self {
31720 value.clone()
31721 }
31722 }
31723
31724 impl ::std::str::FromStr for PackShortDescription {
31725 type Err = self::error::ConversionError;
31726 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31727 if value.chars().count() > 256usize {
31728 return Err("longer than 256 characters".into());
31729 }
31730 Ok(Self(value.to_string()))
31731 }
31732 }
31733
31734 impl ::std::convert::TryFrom<&str> for PackShortDescription {
31735 type Error = self::error::ConversionError;
31736 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31737 value.parse()
31738 }
31739 }
31740
31741 impl ::std::convert::TryFrom<&::std::string::String> for PackShortDescription {
31742 type Error = self::error::ConversionError;
31743 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31744 value.parse()
31745 }
31746 }
31747
31748 impl ::std::convert::TryFrom<::std::string::String> for PackShortDescription {
31749 type Error = self::error::ConversionError;
31750 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31751 value.parse()
31752 }
31753 }
31754
31755 impl<'de> ::serde::Deserialize<'de> for PackShortDescription {
31756 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
31757 where
31758 D: ::serde::Deserializer<'de>,
31759 {
31760 ::std::string::String::deserialize(deserializer)?
31761 .parse()
31762 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
31763 }
31764 }
31765
31766 ///`PackSource`
31767 ///
31768 /// <details><summary>JSON schema</summary>
31769 ///
31770 /// ```json
31771 ///{
31772 /// "type": "string",
31773 /// "enum": [
31774 /// "web",
31775 /// "cli"
31776 /// ],
31777 /// "x-schema-name": "PackSource",
31778 /// "x-tsEnumNames": [
31779 /// "Web",
31780 /// "Cli"
31781 /// ]
31782 ///}
31783 /// ```
31784 /// </details>
31785 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31786 pub enum PackSource {
31787 #[serde(rename = "web")]
31788 Web,
31789 #[serde(rename = "cli")]
31790 Cli,
31791 }
31792
31793 impl ::std::convert::From<&Self> for PackSource {
31794 fn from(value: &PackSource) -> Self {
31795 value.clone()
31796 }
31797 }
31798
31799 impl ::std::fmt::Display for PackSource {
31800 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31801 match *self {
31802 Self::Web => f.write_str("web"),
31803 Self::Cli => f.write_str("cli"),
31804 }
31805 }
31806 }
31807
31808 impl ::std::str::FromStr for PackSource {
31809 type Err = self::error::ConversionError;
31810 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31811 match value {
31812 "web" => Ok(Self::Web),
31813 "cli" => Ok(Self::Cli),
31814 _ => Err("invalid value".into()),
31815 }
31816 }
31817 }
31818
31819 impl ::std::convert::TryFrom<&str> for PackSource {
31820 type Error = self::error::ConversionError;
31821 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31822 value.parse()
31823 }
31824 }
31825
31826 impl ::std::convert::TryFrom<&::std::string::String> for PackSource {
31827 type Error = self::error::ConversionError;
31828 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31829 value.parse()
31830 }
31831 }
31832
31833 impl ::std::convert::TryFrom<::std::string::String> for PackSource {
31834 type Error = self::error::ConversionError;
31835 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
31836 value.parse()
31837 }
31838 }
31839
31840 ///Details about a Pack's source code.
31841 ///
31842 /// <details><summary>JSON schema</summary>
31843 ///
31844 /// ```json
31845 ///{
31846 /// "description": "Details about a Pack's source code.",
31847 /// "type": "object",
31848 /// "required": [
31849 /// "filename",
31850 /// "url"
31851 /// ],
31852 /// "properties": {
31853 /// "filename": {
31854 /// "description": "name of the file",
31855 /// "examples": [
31856 /// "main.ts"
31857 /// ],
31858 /// "type": "string"
31859 /// },
31860 /// "url": {
31861 /// "description": "The URL to download the source code from",
31862 /// "examples": [
31863 /// "https://coda-us-west-2-prod-packs.s3.us-west-2.amazonaws.com/packs/123/1/main.ts"
31864 /// ],
31865 /// "type": "string"
31866 /// }
31867 /// },
31868 /// "additionalProperties": false,
31869 /// "x-schema-name": "PackSourceCode"
31870 ///}
31871 /// ```
31872 /// </details>
31873 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31874 #[serde(deny_unknown_fields)]
31875 pub struct PackSourceCode {
31876 ///name of the file
31877 pub filename: ::std::string::String,
31878 ///The URL to download the source code from
31879 pub url: ::std::string::String,
31880 }
31881
31882 impl ::std::convert::From<&PackSourceCode> for PackSourceCode {
31883 fn from(value: &PackSourceCode) -> Self {
31884 value.clone()
31885 }
31886 }
31887
31888 ///Information indicating where to upload the Pack source code, and an
31889 /// endpoint to mark the upload as complete.
31890 ///
31891 /// <details><summary>JSON schema</summary>
31892 ///
31893 /// ```json
31894 ///{
31895 /// "description": "Information indicating where to upload the Pack source
31896 /// code, and an endpoint to mark the upload as complete.",
31897 /// "type": "object",
31898 /// "required": [
31899 /// "files"
31900 /// ],
31901 /// "properties": {
31902 /// "files": {
31903 /// "type": "array",
31904 /// "items": {
31905 /// "$ref": "#/components/schemas/PackSourceCode"
31906 /// }
31907 /// }
31908 /// },
31909 /// "additionalProperties": false,
31910 /// "x-schema-name": "PackSourceCodeInfo"
31911 ///}
31912 /// ```
31913 /// </details>
31914 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31915 #[serde(deny_unknown_fields)]
31916 pub struct PackSourceCodeInfo {
31917 pub files: ::std::vec::Vec<PackSourceCode>,
31918 }
31919
31920 impl ::std::convert::From<&PackSourceCodeInfo> for PackSourceCodeInfo {
31921 fn from(value: &PackSourceCodeInfo) -> Self {
31922 value.clone()
31923 }
31924 }
31925
31926 ///Payload for noting a Pack source code upload is complete.
31927 ///
31928 /// <details><summary>JSON schema</summary>
31929 ///
31930 /// ```json
31931 ///{
31932 /// "description": "Payload for noting a Pack source code upload is
31933 /// complete.",
31934 /// "type": "object",
31935 /// "required": [
31936 /// "codeHash",
31937 /// "filename"
31938 /// ],
31939 /// "properties": {
31940 /// "codeHash": {
31941 /// "description": "A SHA-256 hash of the source code used to identify
31942 /// duplicate uploads.",
31943 /// "examples": [
31944 /// 123456
31945 /// ],
31946 /// "type": "string"
31947 /// },
31948 /// "filename": {
31949 /// "examples": [
31950 /// "main.ts"
31951 /// ],
31952 /// "type": "string"
31953 /// }
31954 /// },
31955 /// "additionalProperties": false,
31956 /// "x-schema-name": "PackSourceCodeUploadCompleteRequest"
31957 ///}
31958 /// ```
31959 /// </details>
31960 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31961 #[serde(deny_unknown_fields)]
31962 pub struct PackSourceCodeUploadCompleteRequest {
31963 ///A SHA-256 hash of the source code used to identify duplicate
31964 /// uploads.
31965 #[serde(rename = "codeHash")]
31966 pub code_hash: ::std::string::String,
31967 pub filename: ::std::string::String,
31968 }
31969
31970 impl ::std::convert::From<&PackSourceCodeUploadCompleteRequest> for PackSourceCodeUploadCompleteRequest {
31971 fn from(value: &PackSourceCodeUploadCompleteRequest) -> Self {
31972 value.clone()
31973 }
31974 }
31975
31976 ///Response for noting a Pack source code upload is complete.
31977 ///
31978 /// <details><summary>JSON schema</summary>
31979 ///
31980 /// ```json
31981 ///{
31982 /// "description": "Response for noting a Pack source code upload is
31983 /// complete.",
31984 /// "type": "object",
31985 /// "required": [
31986 /// "requestId"
31987 /// ],
31988 /// "properties": {
31989 /// "requestId": {
31990 /// "description": "An arbitrary unique identifier for this request.",
31991 /// "examples": [
31992 /// "abc-123-def-456"
31993 /// ],
31994 /// "type": "string"
31995 /// }
31996 /// },
31997 /// "additionalProperties": false,
31998 /// "x-schema-name": "PackSourceCodeUploadCompleteResponse"
31999 ///}
32000 /// ```
32001 /// </details>
32002 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32003 #[serde(deny_unknown_fields)]
32004 pub struct PackSourceCodeUploadCompleteResponse {
32005 ///An arbitrary unique identifier for this request.
32006 #[serde(rename = "requestId")]
32007 pub request_id: ::std::string::String,
32008 }
32009
32010 impl ::std::convert::From<&PackSourceCodeUploadCompleteResponse> for PackSourceCodeUploadCompleteResponse {
32011 fn from(value: &PackSourceCodeUploadCompleteResponse) -> Self {
32012 value.clone()
32013 }
32014 }
32015
32016 ///Detail about why this request was rejected.
32017 ///
32018 /// <details><summary>JSON schema</summary>
32019 ///
32020 /// ```json
32021 ///{
32022 /// "description": "Detail about why this request was rejected.",
32023 /// "type": "object",
32024 /// "properties": {
32025 /// "validationErrors": {
32026 /// "type": "array",
32027 /// "items": {
32028 /// "$ref": "#/components/schemas/ValidationError"
32029 /// }
32030 /// }
32031 /// },
32032 /// "additionalProperties": false
32033 ///}
32034 /// ```
32035 /// </details>
32036 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32037 #[serde(deny_unknown_fields)]
32038 pub struct PackSourceCodeUploadCompleteResponseCodaDetail {
32039 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
32040 pub validation_errors: ::std::vec::Vec<ValidationError>,
32041 }
32042
32043 impl ::std::convert::From<&PackSourceCodeUploadCompleteResponseCodaDetail> for PackSourceCodeUploadCompleteResponseCodaDetail {
32044 fn from(value: &PackSourceCodeUploadCompleteResponseCodaDetail) -> Self {
32045 value.clone()
32046 }
32047 }
32048
32049 impl ::std::default::Default for PackSourceCodeUploadCompleteResponseCodaDetail {
32050 fn default() -> Self {
32051 Self {
32052 validation_errors: Default::default(),
32053 }
32054 }
32055 }
32056
32057 ///Information indicating where to upload the Pack source code, and an
32058 /// endpoint to mark the upload as complete.
32059 ///
32060 /// <details><summary>JSON schema</summary>
32061 ///
32062 /// ```json
32063 ///{
32064 /// "description": "Information indicating where to upload the Pack source
32065 /// code, and an endpoint to mark the upload as complete.",
32066 /// "type": "object",
32067 /// "required": [
32068 /// "headers",
32069 /// "uploadUrl",
32070 /// "uploadedPathName"
32071 /// ],
32072 /// "properties": {
32073 /// "headers": {
32074 /// "description": "Key-value pairs of authorization headers to include
32075 /// in the upload request.",
32076 /// "examples": [
32077 /// "{\"header1\": \"value1\"}"
32078 /// ],
32079 /// "type": "object",
32080 /// "additionalProperties": {
32081 /// "type": "string"
32082 /// }
32083 /// },
32084 /// "uploadUrl": {
32085 /// "description": "A signed URL to be used for uploading a Pack source
32086 /// code.",
32087 /// "examples": [
32088 /// "https://coda-us-west-2-prod-packs-upload.s3-accelerate.amazonaws.com/packUploads/123/1/main.ts"
32089 /// ],
32090 /// "type": "string",
32091 /// "format": "url"
32092 /// },
32093 /// "uploadedPathName": {
32094 /// "description": "An endpoint to mark the upload as complete.",
32095 /// "examples": [
32096 /// "/packs/123/versions/1/sourceCode/uploadComplete"
32097 /// ],
32098 /// "type": "string"
32099 /// }
32100 /// },
32101 /// "additionalProperties": false,
32102 /// "x-schema-name": "PackSourceCodeUploadInfo"
32103 ///}
32104 /// ```
32105 /// </details>
32106 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32107 #[serde(deny_unknown_fields)]
32108 pub struct PackSourceCodeUploadInfo {
32109 ///Key-value pairs of authorization headers to include in the upload
32110 /// request.
32111 pub headers: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
32112 ///A signed URL to be used for uploading a Pack source code.
32113 #[serde(rename = "uploadUrl")]
32114 pub upload_url: ::std::string::String,
32115 ///An endpoint to mark the upload as complete.
32116 #[serde(rename = "uploadedPathName")]
32117 pub uploaded_path_name: ::std::string::String,
32118 }
32119
32120 impl ::std::convert::From<&PackSourceCodeUploadInfo> for PackSourceCodeUploadInfo {
32121 fn from(value: &PackSourceCodeUploadInfo) -> Self {
32122 value.clone()
32123 }
32124 }
32125
32126 ///Visibility of a pack's source code.
32127 ///
32128 /// <details><summary>JSON schema</summary>
32129 ///
32130 /// ```json
32131 ///{
32132 /// "description": "Visibility of a pack's source code.",
32133 /// "type": "string",
32134 /// "enum": [
32135 /// "private",
32136 /// "shared"
32137 /// ],
32138 /// "x-schema-name": "PackSourceCodeVisibility",
32139 /// "x-tsEnumNames": [
32140 /// "Private",
32141 /// "Shared"
32142 /// ]
32143 ///}
32144 /// ```
32145 /// </details>
32146 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32147 pub enum PackSourceCodeVisibility {
32148 #[serde(rename = "private")]
32149 Private,
32150 #[serde(rename = "shared")]
32151 Shared,
32152 }
32153
32154 impl ::std::convert::From<&Self> for PackSourceCodeVisibility {
32155 fn from(value: &PackSourceCodeVisibility) -> Self {
32156 value.clone()
32157 }
32158 }
32159
32160 impl ::std::fmt::Display for PackSourceCodeVisibility {
32161 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32162 match *self {
32163 Self::Private => f.write_str("private"),
32164 Self::Shared => f.write_str("shared"),
32165 }
32166 }
32167 }
32168
32169 impl ::std::str::FromStr for PackSourceCodeVisibility {
32170 type Err = self::error::ConversionError;
32171 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32172 match value {
32173 "private" => Ok(Self::Private),
32174 "shared" => Ok(Self::Shared),
32175 _ => Err("invalid value".into()),
32176 }
32177 }
32178 }
32179
32180 impl ::std::convert::TryFrom<&str> for PackSourceCodeVisibility {
32181 type Error = self::error::ConversionError;
32182 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32183 value.parse()
32184 }
32185 }
32186
32187 impl ::std::convert::TryFrom<&::std::string::String> for PackSourceCodeVisibility {
32188 type Error = self::error::ConversionError;
32189 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32190 value.parse()
32191 }
32192 }
32193
32194 impl ::std::convert::TryFrom<::std::string::String> for PackSourceCodeVisibility {
32195 type Error = self::error::ConversionError;
32196 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32197 value.parse()
32198 }
32199 }
32200
32201 ///Summary of a Pack.
32202 ///
32203 /// <details><summary>JSON schema</summary>
32204 ///
32205 /// ```json
32206 ///{
32207 /// "description": "Summary of a Pack.",
32208 /// "type": "object",
32209 /// "required": [
32210 /// "categories",
32211 /// "description",
32212 /// "id",
32213 /// "name",
32214 /// "shortDescription",
32215 /// "workspaceId"
32216 /// ],
32217 /// "properties": {
32218 /// "agentDescription": {
32219 /// "description": "A full description for the pack as an agent.",
32220 /// "examples": [
32221 /// "Chat with a comprehensive tool that can calculate cool geometric
32222 /// formulas like surface area, volume, and other mathematical operations.
32223 /// This agent can help with complex calculations and provide detailed
32224 /// explanations."
32225 /// ],
32226 /// "type": "string",
32227 /// "maxLength": 8192,
32228 /// "x-allow-empty": true
32229 /// },
32230 /// "agentImages": {
32231 /// "description": "The agent images for the Pack.",
32232 /// "type": "array",
32233 /// "items": {
32234 /// "$ref": "#/components/schemas/PackImageFile"
32235 /// }
32236 /// },
32237 /// "agentShortDescription": {
32238 /// "description": "A short description for the pack as an agent.",
32239 /// "examples": [
32240 /// "Chat with a tool that can calculate cool geometric formulas like
32241 /// surface area."
32242 /// ],
32243 /// "type": "string",
32244 /// "maxLength": 256
32245 /// },
32246 /// "categories": {
32247 /// "description": "Publishing categories associated with this Pack.",
32248 /// "type": "array",
32249 /// "items": {
32250 /// "$ref": "#/components/schemas/PublishingCategory"
32251 /// }
32252 /// },
32253 /// "certified": {
32254 /// "description": "Denotes if the pack is certified by Coda.",
32255 /// "type": "boolean"
32256 /// },
32257 /// "certifiedAgent": {
32258 /// "description": "Denotes if the pack is certified by Grammarly to be
32259 /// optimized for agent usage.",
32260 /// "type": "boolean"
32261 /// },
32262 /// "coverUrl": {
32263 /// "description": "The link to the cover photo of the Pack.",
32264 /// "type": "string",
32265 /// "format": "url"
32266 /// },
32267 /// "description": {
32268 /// "description": "The full description of the Pack.",
32269 /// "examples": [
32270 /// "This Pack allows users to calculate the surface area and volume
32271 /// of a few common 3D shapes, like cubes and pyramids."
32272 /// ],
32273 /// "type": "string",
32274 /// "maxLength": 8192
32275 /// },
32276 /// "exampleImages": {
32277 /// "description": "The example images for the Pack.",
32278 /// "type": "array",
32279 /// "items": {
32280 /// "$ref": "#/components/schemas/PackImageFile"
32281 /// }
32282 /// },
32283 /// "id": {
32284 /// "description": "ID of the Pack.",
32285 /// "examples": [
32286 /// 1003
32287 /// ],
32288 /// "type": "number"
32289 /// },
32290 /// "logoUrl": {
32291 /// "description": "The link to the logo of the Pack.",
32292 /// "type": "string",
32293 /// "format": "url"
32294 /// },
32295 /// "name": {
32296 /// "description": "The name of the Pack.",
32297 /// "examples": [
32298 /// "Cool Geometry Formulas"
32299 /// ],
32300 /// "type": "string",
32301 /// "maxLength": 128
32302 /// },
32303 /// "packEntrypoints": {
32304 /// "description": "Pack entrypoints where this pack is available",
32305 /// "type": "array",
32306 /// "items": {
32307 /// "$ref": "#/components/schemas/PackEntrypoint"
32308 /// }
32309 /// },
32310 /// "privacyPolicyUrl": {
32311 /// "description": "A Privacy Policy URL for the Pack.",
32312 /// "type": "string",
32313 /// "format": "url",
32314 /// "maxLength": 512
32315 /// },
32316 /// "shortDescription": {
32317 /// "description": "A short version of the description of the Pack.",
32318 /// "examples": [
32319 /// "Calculate cool geometric formulas like surface area."
32320 /// ],
32321 /// "type": "string",
32322 /// "maxLength": 256
32323 /// },
32324 /// "sourceCodeVisibility": {
32325 /// "$ref": "#/components/schemas/PackSourceCodeVisibility"
32326 /// },
32327 /// "supportEmail": {
32328 /// "description": "A contact email for the Pack.",
32329 /// "examples": [
32330 /// "user@email.com"
32331 /// ],
32332 /// "type": "string",
32333 /// "maxLength": 512
32334 /// },
32335 /// "termsOfServiceUrl": {
32336 /// "description": "A Terms of Service URL for the Pack.",
32337 /// "type": "string",
32338 /// "format": "url",
32339 /// "maxLength": 512
32340 /// },
32341 /// "workspaceId": {
32342 /// "description": "The parent workspace for the Pack.",
32343 /// "examples": [
32344 /// "ws-asdf"
32345 /// ],
32346 /// "type": "string"
32347 /// }
32348 /// },
32349 /// "additionalProperties": false,
32350 /// "x-schema-name": "PackSummary"
32351 ///}
32352 /// ```
32353 /// </details>
32354 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32355 #[serde(deny_unknown_fields)]
32356 pub struct PackSummary {
32357 ///A full description for the pack as an agent.
32358 #[serde(rename = "agentDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
32359 pub agent_description: ::std::option::Option<PackSummaryAgentDescription>,
32360 ///The agent images for the Pack.
32361 #[serde(rename = "agentImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
32362 pub agent_images: ::std::vec::Vec<PackImageFile>,
32363 ///A short description for the pack as an agent.
32364 #[serde(rename = "agentShortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
32365 pub agent_short_description: ::std::option::Option<PackSummaryAgentShortDescription>,
32366 ///Publishing categories associated with this Pack.
32367 pub categories: ::std::vec::Vec<PublishingCategory>,
32368 ///Denotes if the pack is certified by Coda.
32369 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32370 pub certified: ::std::option::Option<bool>,
32371 ///Denotes if the pack is certified by Grammarly to be optimized for
32372 /// agent usage.
32373 #[serde(rename = "certifiedAgent", default, skip_serializing_if = "::std::option::Option::is_none")]
32374 pub certified_agent: ::std::option::Option<bool>,
32375 ///The link to the cover photo of the Pack.
32376 #[serde(rename = "coverUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
32377 pub cover_url: ::std::option::Option<::std::string::String>,
32378 ///The full description of the Pack.
32379 pub description: PackSummaryDescription,
32380 ///The example images for the Pack.
32381 #[serde(rename = "exampleImages", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
32382 pub example_images: ::std::vec::Vec<PackImageFile>,
32383 pub id: f64,
32384 ///The link to the logo of the Pack.
32385 #[serde(rename = "logoUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
32386 pub logo_url: ::std::option::Option<::std::string::String>,
32387 ///The name of the Pack.
32388 pub name: PackSummaryName,
32389 ///Pack entrypoints where this pack is available
32390 #[serde(rename = "packEntrypoints", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
32391 pub pack_entrypoints: ::std::vec::Vec<PackEntrypoint>,
32392 ///A Privacy Policy URL for the Pack.
32393 #[serde(rename = "privacyPolicyUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
32394 pub privacy_policy_url: ::std::option::Option<::std::string::String>,
32395 ///A short version of the description of the Pack.
32396 #[serde(rename = "shortDescription")]
32397 pub short_description: PackSummaryShortDescription,
32398 #[serde(rename = "sourceCodeVisibility", default, skip_serializing_if = "::std::option::Option::is_none")]
32399 pub source_code_visibility: ::std::option::Option<PackSourceCodeVisibility>,
32400 ///A contact email for the Pack.
32401 #[serde(rename = "supportEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
32402 pub support_email: ::std::option::Option<PackSummarySupportEmail>,
32403 ///A Terms of Service URL for the Pack.
32404 #[serde(rename = "termsOfServiceUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
32405 pub terms_of_service_url: ::std::option::Option<::std::string::String>,
32406 ///The parent workspace for the Pack.
32407 #[serde(rename = "workspaceId")]
32408 pub workspace_id: ::std::string::String,
32409 }
32410
32411 impl ::std::convert::From<&PackSummary> for PackSummary {
32412 fn from(value: &PackSummary) -> Self {
32413 value.clone()
32414 }
32415 }
32416
32417 ///A full description for the pack as an agent.
32418 ///
32419 /// <details><summary>JSON schema</summary>
32420 ///
32421 /// ```json
32422 ///{
32423 /// "description": "A full description for the pack as an agent.",
32424 /// "examples": [
32425 /// "Chat with a comprehensive tool that can calculate cool geometric
32426 /// formulas like surface area, volume, and other mathematical operations.
32427 /// This agent can help with complex calculations and provide detailed
32428 /// explanations."
32429 /// ],
32430 /// "type": "string",
32431 /// "maxLength": 8192,
32432 /// "x-allow-empty": true
32433 ///}
32434 /// ```
32435 /// </details>
32436 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32437 #[serde(transparent)]
32438 pub struct PackSummaryAgentDescription(::std::string::String);
32439 impl ::std::ops::Deref for PackSummaryAgentDescription {
32440 type Target = ::std::string::String;
32441 fn deref(&self) -> &::std::string::String {
32442 &self.0
32443 }
32444 }
32445
32446 impl ::std::convert::From<PackSummaryAgentDescription> for ::std::string::String {
32447 fn from(value: PackSummaryAgentDescription) -> Self {
32448 value.0
32449 }
32450 }
32451
32452 impl ::std::convert::From<&PackSummaryAgentDescription> for PackSummaryAgentDescription {
32453 fn from(value: &PackSummaryAgentDescription) -> Self {
32454 value.clone()
32455 }
32456 }
32457
32458 impl ::std::str::FromStr for PackSummaryAgentDescription {
32459 type Err = self::error::ConversionError;
32460 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32461 if value.chars().count() > 8192usize {
32462 return Err("longer than 8192 characters".into());
32463 }
32464 Ok(Self(value.to_string()))
32465 }
32466 }
32467
32468 impl ::std::convert::TryFrom<&str> for PackSummaryAgentDescription {
32469 type Error = self::error::ConversionError;
32470 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32471 value.parse()
32472 }
32473 }
32474
32475 impl ::std::convert::TryFrom<&::std::string::String> for PackSummaryAgentDescription {
32476 type Error = self::error::ConversionError;
32477 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32478 value.parse()
32479 }
32480 }
32481
32482 impl ::std::convert::TryFrom<::std::string::String> for PackSummaryAgentDescription {
32483 type Error = self::error::ConversionError;
32484 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32485 value.parse()
32486 }
32487 }
32488
32489 impl<'de> ::serde::Deserialize<'de> for PackSummaryAgentDescription {
32490 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32491 where
32492 D: ::serde::Deserializer<'de>,
32493 {
32494 ::std::string::String::deserialize(deserializer)?
32495 .parse()
32496 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32497 }
32498 }
32499
32500 ///A short description for the pack as an agent.
32501 ///
32502 /// <details><summary>JSON schema</summary>
32503 ///
32504 /// ```json
32505 ///{
32506 /// "description": "A short description for the pack as an agent.",
32507 /// "examples": [
32508 /// "Chat with a tool that can calculate cool geometric formulas like
32509 /// surface area."
32510 /// ],
32511 /// "type": "string",
32512 /// "maxLength": 256
32513 ///}
32514 /// ```
32515 /// </details>
32516 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32517 #[serde(transparent)]
32518 pub struct PackSummaryAgentShortDescription(::std::string::String);
32519 impl ::std::ops::Deref for PackSummaryAgentShortDescription {
32520 type Target = ::std::string::String;
32521 fn deref(&self) -> &::std::string::String {
32522 &self.0
32523 }
32524 }
32525
32526 impl ::std::convert::From<PackSummaryAgentShortDescription> for ::std::string::String {
32527 fn from(value: PackSummaryAgentShortDescription) -> Self {
32528 value.0
32529 }
32530 }
32531
32532 impl ::std::convert::From<&PackSummaryAgentShortDescription> for PackSummaryAgentShortDescription {
32533 fn from(value: &PackSummaryAgentShortDescription) -> Self {
32534 value.clone()
32535 }
32536 }
32537
32538 impl ::std::str::FromStr for PackSummaryAgentShortDescription {
32539 type Err = self::error::ConversionError;
32540 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32541 if value.chars().count() > 256usize {
32542 return Err("longer than 256 characters".into());
32543 }
32544 Ok(Self(value.to_string()))
32545 }
32546 }
32547
32548 impl ::std::convert::TryFrom<&str> for PackSummaryAgentShortDescription {
32549 type Error = self::error::ConversionError;
32550 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32551 value.parse()
32552 }
32553 }
32554
32555 impl ::std::convert::TryFrom<&::std::string::String> for PackSummaryAgentShortDescription {
32556 type Error = self::error::ConversionError;
32557 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32558 value.parse()
32559 }
32560 }
32561
32562 impl ::std::convert::TryFrom<::std::string::String> for PackSummaryAgentShortDescription {
32563 type Error = self::error::ConversionError;
32564 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32565 value.parse()
32566 }
32567 }
32568
32569 impl<'de> ::serde::Deserialize<'de> for PackSummaryAgentShortDescription {
32570 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32571 where
32572 D: ::serde::Deserializer<'de>,
32573 {
32574 ::std::string::String::deserialize(deserializer)?
32575 .parse()
32576 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32577 }
32578 }
32579
32580 ///The full description of the Pack.
32581 ///
32582 /// <details><summary>JSON schema</summary>
32583 ///
32584 /// ```json
32585 ///{
32586 /// "description": "The full description of the Pack.",
32587 /// "examples": [
32588 /// "This Pack allows users to calculate the surface area and volume of a
32589 /// few common 3D shapes, like cubes and pyramids."
32590 /// ],
32591 /// "type": "string",
32592 /// "maxLength": 8192
32593 ///}
32594 /// ```
32595 /// </details>
32596 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32597 #[serde(transparent)]
32598 pub struct PackSummaryDescription(::std::string::String);
32599 impl ::std::ops::Deref for PackSummaryDescription {
32600 type Target = ::std::string::String;
32601 fn deref(&self) -> &::std::string::String {
32602 &self.0
32603 }
32604 }
32605
32606 impl ::std::convert::From<PackSummaryDescription> for ::std::string::String {
32607 fn from(value: PackSummaryDescription) -> Self {
32608 value.0
32609 }
32610 }
32611
32612 impl ::std::convert::From<&PackSummaryDescription> for PackSummaryDescription {
32613 fn from(value: &PackSummaryDescription) -> Self {
32614 value.clone()
32615 }
32616 }
32617
32618 impl ::std::str::FromStr for PackSummaryDescription {
32619 type Err = self::error::ConversionError;
32620 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32621 if value.chars().count() > 8192usize {
32622 return Err("longer than 8192 characters".into());
32623 }
32624 Ok(Self(value.to_string()))
32625 }
32626 }
32627
32628 impl ::std::convert::TryFrom<&str> for PackSummaryDescription {
32629 type Error = self::error::ConversionError;
32630 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32631 value.parse()
32632 }
32633 }
32634
32635 impl ::std::convert::TryFrom<&::std::string::String> for PackSummaryDescription {
32636 type Error = self::error::ConversionError;
32637 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32638 value.parse()
32639 }
32640 }
32641
32642 impl ::std::convert::TryFrom<::std::string::String> for PackSummaryDescription {
32643 type Error = self::error::ConversionError;
32644 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32645 value.parse()
32646 }
32647 }
32648
32649 impl<'de> ::serde::Deserialize<'de> for PackSummaryDescription {
32650 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32651 where
32652 D: ::serde::Deserializer<'de>,
32653 {
32654 ::std::string::String::deserialize(deserializer)?
32655 .parse()
32656 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32657 }
32658 }
32659
32660 ///List of Pack summaries.
32661 ///
32662 /// <details><summary>JSON schema</summary>
32663 ///
32664 /// ```json
32665 ///{
32666 /// "description": "List of Pack summaries.",
32667 /// "type": "object",
32668 /// "required": [
32669 /// "items"
32670 /// ],
32671 /// "properties": {
32672 /// "items": {
32673 /// "type": "array",
32674 /// "items": {
32675 /// "$ref": "#/components/schemas/PackSummary"
32676 /// }
32677 /// },
32678 /// "nextPageLink": {
32679 /// "allOf": [
32680 /// {
32681 /// "$ref": "#/components/schemas/nextPageLink"
32682 /// },
32683 /// {
32684 /// "examples": [
32685 /// "https://coda.io/apis/v1/packs?pageToken=xyz"
32686 /// ],
32687 /// "type": "string"
32688 /// }
32689 /// ]
32690 /// },
32691 /// "nextPageToken": {
32692 /// "$ref": "#/components/schemas/nextPageToken"
32693 /// }
32694 /// },
32695 /// "additionalProperties": false,
32696 /// "x-schema-name": "PackSummaryList"
32697 ///}
32698 /// ```
32699 /// </details>
32700 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32701 #[serde(deny_unknown_fields)]
32702 pub struct PackSummaryList {
32703 pub items: ::std::vec::Vec<PackSummary>,
32704 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
32705 pub next_page_link: ::std::option::Option<NextPageLink>,
32706 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
32707 pub next_page_token: ::std::option::Option<NextPageToken>,
32708 }
32709
32710 impl ::std::convert::From<&PackSummaryList> for PackSummaryList {
32711 fn from(value: &PackSummaryList) -> Self {
32712 value.clone()
32713 }
32714 }
32715
32716 ///The name of the Pack.
32717 ///
32718 /// <details><summary>JSON schema</summary>
32719 ///
32720 /// ```json
32721 ///{
32722 /// "description": "The name of the Pack.",
32723 /// "examples": [
32724 /// "Cool Geometry Formulas"
32725 /// ],
32726 /// "type": "string",
32727 /// "maxLength": 128
32728 ///}
32729 /// ```
32730 /// </details>
32731 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32732 #[serde(transparent)]
32733 pub struct PackSummaryName(::std::string::String);
32734 impl ::std::ops::Deref for PackSummaryName {
32735 type Target = ::std::string::String;
32736 fn deref(&self) -> &::std::string::String {
32737 &self.0
32738 }
32739 }
32740
32741 impl ::std::convert::From<PackSummaryName> for ::std::string::String {
32742 fn from(value: PackSummaryName) -> Self {
32743 value.0
32744 }
32745 }
32746
32747 impl ::std::convert::From<&PackSummaryName> for PackSummaryName {
32748 fn from(value: &PackSummaryName) -> Self {
32749 value.clone()
32750 }
32751 }
32752
32753 impl ::std::str::FromStr for PackSummaryName {
32754 type Err = self::error::ConversionError;
32755 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32756 if value.chars().count() > 128usize {
32757 return Err("longer than 128 characters".into());
32758 }
32759 Ok(Self(value.to_string()))
32760 }
32761 }
32762
32763 impl ::std::convert::TryFrom<&str> for PackSummaryName {
32764 type Error = self::error::ConversionError;
32765 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32766 value.parse()
32767 }
32768 }
32769
32770 impl ::std::convert::TryFrom<&::std::string::String> for PackSummaryName {
32771 type Error = self::error::ConversionError;
32772 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32773 value.parse()
32774 }
32775 }
32776
32777 impl ::std::convert::TryFrom<::std::string::String> for PackSummaryName {
32778 type Error = self::error::ConversionError;
32779 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32780 value.parse()
32781 }
32782 }
32783
32784 impl<'de> ::serde::Deserialize<'de> for PackSummaryName {
32785 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32786 where
32787 D: ::serde::Deserializer<'de>,
32788 {
32789 ::std::string::String::deserialize(deserializer)?
32790 .parse()
32791 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32792 }
32793 }
32794
32795 ///A short version of the description of the Pack.
32796 ///
32797 /// <details><summary>JSON schema</summary>
32798 ///
32799 /// ```json
32800 ///{
32801 /// "description": "A short version of the description of the Pack.",
32802 /// "examples": [
32803 /// "Calculate cool geometric formulas like surface area."
32804 /// ],
32805 /// "type": "string",
32806 /// "maxLength": 256
32807 ///}
32808 /// ```
32809 /// </details>
32810 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32811 #[serde(transparent)]
32812 pub struct PackSummaryShortDescription(::std::string::String);
32813 impl ::std::ops::Deref for PackSummaryShortDescription {
32814 type Target = ::std::string::String;
32815 fn deref(&self) -> &::std::string::String {
32816 &self.0
32817 }
32818 }
32819
32820 impl ::std::convert::From<PackSummaryShortDescription> for ::std::string::String {
32821 fn from(value: PackSummaryShortDescription) -> Self {
32822 value.0
32823 }
32824 }
32825
32826 impl ::std::convert::From<&PackSummaryShortDescription> for PackSummaryShortDescription {
32827 fn from(value: &PackSummaryShortDescription) -> Self {
32828 value.clone()
32829 }
32830 }
32831
32832 impl ::std::str::FromStr for PackSummaryShortDescription {
32833 type Err = self::error::ConversionError;
32834 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32835 if value.chars().count() > 256usize {
32836 return Err("longer than 256 characters".into());
32837 }
32838 Ok(Self(value.to_string()))
32839 }
32840 }
32841
32842 impl ::std::convert::TryFrom<&str> for PackSummaryShortDescription {
32843 type Error = self::error::ConversionError;
32844 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32845 value.parse()
32846 }
32847 }
32848
32849 impl ::std::convert::TryFrom<&::std::string::String> for PackSummaryShortDescription {
32850 type Error = self::error::ConversionError;
32851 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32852 value.parse()
32853 }
32854 }
32855
32856 impl ::std::convert::TryFrom<::std::string::String> for PackSummaryShortDescription {
32857 type Error = self::error::ConversionError;
32858 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32859 value.parse()
32860 }
32861 }
32862
32863 impl<'de> ::serde::Deserialize<'de> for PackSummaryShortDescription {
32864 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32865 where
32866 D: ::serde::Deserializer<'de>,
32867 {
32868 ::std::string::String::deserialize(deserializer)?
32869 .parse()
32870 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32871 }
32872 }
32873
32874 ///A contact email for the Pack.
32875 ///
32876 /// <details><summary>JSON schema</summary>
32877 ///
32878 /// ```json
32879 ///{
32880 /// "description": "A contact email for the Pack.",
32881 /// "examples": [
32882 /// "user@email.com"
32883 /// ],
32884 /// "type": "string",
32885 /// "maxLength": 512
32886 ///}
32887 /// ```
32888 /// </details>
32889 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32890 #[serde(transparent)]
32891 pub struct PackSummarySupportEmail(::std::string::String);
32892 impl ::std::ops::Deref for PackSummarySupportEmail {
32893 type Target = ::std::string::String;
32894 fn deref(&self) -> &::std::string::String {
32895 &self.0
32896 }
32897 }
32898
32899 impl ::std::convert::From<PackSummarySupportEmail> for ::std::string::String {
32900 fn from(value: PackSummarySupportEmail) -> Self {
32901 value.0
32902 }
32903 }
32904
32905 impl ::std::convert::From<&PackSummarySupportEmail> for PackSummarySupportEmail {
32906 fn from(value: &PackSummarySupportEmail) -> Self {
32907 value.clone()
32908 }
32909 }
32910
32911 impl ::std::str::FromStr for PackSummarySupportEmail {
32912 type Err = self::error::ConversionError;
32913 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32914 if value.chars().count() > 512usize {
32915 return Err("longer than 512 characters".into());
32916 }
32917 Ok(Self(value.to_string()))
32918 }
32919 }
32920
32921 impl ::std::convert::TryFrom<&str> for PackSummarySupportEmail {
32922 type Error = self::error::ConversionError;
32923 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32924 value.parse()
32925 }
32926 }
32927
32928 impl ::std::convert::TryFrom<&::std::string::String> for PackSummarySupportEmail {
32929 type Error = self::error::ConversionError;
32930 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32931 value.parse()
32932 }
32933 }
32934
32935 impl ::std::convert::TryFrom<::std::string::String> for PackSummarySupportEmail {
32936 type Error = self::error::ConversionError;
32937 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
32938 value.parse()
32939 }
32940 }
32941
32942 impl<'de> ::serde::Deserialize<'de> for PackSummarySupportEmail {
32943 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
32944 where
32945 D: ::serde::Deserializer<'de>,
32946 {
32947 ::std::string::String::deserialize(deserializer)?
32948 .parse()
32949 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
32950 }
32951 }
32952
32953 ///A contact email for the Pack.
32954 ///
32955 /// <details><summary>JSON schema</summary>
32956 ///
32957 /// ```json
32958 ///{
32959 /// "description": "A contact email for the Pack.",
32960 /// "examples": [
32961 /// "user@email.com"
32962 /// ],
32963 /// "type": "string",
32964 /// "maxLength": 512
32965 ///}
32966 /// ```
32967 /// </details>
32968 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
32969 #[serde(transparent)]
32970 pub struct PackSupportEmail(::std::string::String);
32971 impl ::std::ops::Deref for PackSupportEmail {
32972 type Target = ::std::string::String;
32973 fn deref(&self) -> &::std::string::String {
32974 &self.0
32975 }
32976 }
32977
32978 impl ::std::convert::From<PackSupportEmail> for ::std::string::String {
32979 fn from(value: PackSupportEmail) -> Self {
32980 value.0
32981 }
32982 }
32983
32984 impl ::std::convert::From<&PackSupportEmail> for PackSupportEmail {
32985 fn from(value: &PackSupportEmail) -> Self {
32986 value.clone()
32987 }
32988 }
32989
32990 impl ::std::str::FromStr for PackSupportEmail {
32991 type Err = self::error::ConversionError;
32992 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32993 if value.chars().count() > 512usize {
32994 return Err("longer than 512 characters".into());
32995 }
32996 Ok(Self(value.to_string()))
32997 }
32998 }
32999
33000 impl ::std::convert::TryFrom<&str> for PackSupportEmail {
33001 type Error = self::error::ConversionError;
33002 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33003 value.parse()
33004 }
33005 }
33006
33007 impl ::std::convert::TryFrom<&::std::string::String> for PackSupportEmail {
33008 type Error = self::error::ConversionError;
33009 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
33010 value.parse()
33011 }
33012 }
33013
33014 impl ::std::convert::TryFrom<::std::string::String> for PackSupportEmail {
33015 type Error = self::error::ConversionError;
33016 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
33017 value.parse()
33018 }
33019 }
33020
33021 impl<'de> ::serde::Deserialize<'de> for PackSupportEmail {
33022 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33023 where
33024 D: ::serde::Deserializer<'de>,
33025 {
33026 ::std::string::String::deserialize(deserializer)?
33027 .parse()
33028 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
33029 }
33030 }
33031
33032 ///Credentials of a Pack connection.
33033 ///
33034 /// <details><summary>JSON schema</summary>
33035 ///
33036 /// ```json
33037 ///{
33038 /// "description": "Credentials of a Pack connection.",
33039 /// "oneOf": [
33040 /// {
33041 /// "$ref": "#/components/schemas/PackConnectionHeaderCredentials"
33042 /// },
33043 /// {
33044 /// "$ref": "#/components/schemas/PackConnectionMultiHeaderCredentials"
33045 /// },
33046 /// {
33047 /// "$ref": "#/components/schemas/PackConnectionUrlParamCredentials"
33048 /// },
33049 /// {
33050 /// "$ref": "#/components/schemas/PackConnectionHttpBasicCredentials"
33051 /// },
33052 /// {
33053 /// "$ref": "#/components/schemas/PackConnectionCustomCredentials"
33054 /// },
33055 /// {
33056 /// "$ref":
33057 /// "#/components/schemas/PackConnectionOauth2ClientCredentials"
33058 /// },
33059 /// {
33060 /// "$ref":
33061 /// "#/components/schemas/PackConnectionGoogleServiceAccountCredentials"
33062 /// },
33063 /// {
33064 /// "$ref":
33065 /// "#/components/schemas/PackConnectionAwsAssumeRoleCredentials"
33066 /// },
33067 /// {
33068 /// "$ref":
33069 /// "#/components/schemas/PackConnectionAwsAccessKeyCredentials"
33070 /// }
33071 /// ],
33072 /// "x-schema-name": "PackSystemConnectionCredentials"
33073 ///}
33074 /// ```
33075 /// </details>
33076 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33077 #[serde(untagged)]
33078 pub enum PackSystemConnectionCredentials {
33079 HeaderCredentials(PackConnectionHeaderCredentials),
33080 MultiHeaderCredentials(PackConnectionMultiHeaderCredentials),
33081 UrlParamCredentials(PackConnectionUrlParamCredentials),
33082 HttpBasicCredentials(PackConnectionHttpBasicCredentials),
33083 CustomCredentials(PackConnectionCustomCredentials),
33084 Oauth2ClientCredentials(PackConnectionOauth2ClientCredentials),
33085 GoogleServiceAccountCredentials(PackConnectionGoogleServiceAccountCredentials),
33086 AwsAssumeRoleCredentials(PackConnectionAwsAssumeRoleCredentials),
33087 AwsAccessKeyCredentials(PackConnectionAwsAccessKeyCredentials),
33088 }
33089
33090 impl ::std::convert::From<&Self> for PackSystemConnectionCredentials {
33091 fn from(value: &PackSystemConnectionCredentials) -> Self {
33092 value.clone()
33093 }
33094 }
33095
33096 impl ::std::convert::From<PackConnectionHeaderCredentials> for PackSystemConnectionCredentials {
33097 fn from(value: PackConnectionHeaderCredentials) -> Self {
33098 Self::HeaderCredentials(value)
33099 }
33100 }
33101
33102 impl ::std::convert::From<PackConnectionMultiHeaderCredentials> for PackSystemConnectionCredentials {
33103 fn from(value: PackConnectionMultiHeaderCredentials) -> Self {
33104 Self::MultiHeaderCredentials(value)
33105 }
33106 }
33107
33108 impl ::std::convert::From<PackConnectionUrlParamCredentials> for PackSystemConnectionCredentials {
33109 fn from(value: PackConnectionUrlParamCredentials) -> Self {
33110 Self::UrlParamCredentials(value)
33111 }
33112 }
33113
33114 impl ::std::convert::From<PackConnectionHttpBasicCredentials> for PackSystemConnectionCredentials {
33115 fn from(value: PackConnectionHttpBasicCredentials) -> Self {
33116 Self::HttpBasicCredentials(value)
33117 }
33118 }
33119
33120 impl ::std::convert::From<PackConnectionCustomCredentials> for PackSystemConnectionCredentials {
33121 fn from(value: PackConnectionCustomCredentials) -> Self {
33122 Self::CustomCredentials(value)
33123 }
33124 }
33125
33126 impl ::std::convert::From<PackConnectionOauth2ClientCredentials> for PackSystemConnectionCredentials {
33127 fn from(value: PackConnectionOauth2ClientCredentials) -> Self {
33128 Self::Oauth2ClientCredentials(value)
33129 }
33130 }
33131
33132 impl ::std::convert::From<PackConnectionGoogleServiceAccountCredentials> for PackSystemConnectionCredentials {
33133 fn from(value: PackConnectionGoogleServiceAccountCredentials) -> Self {
33134 Self::GoogleServiceAccountCredentials(value)
33135 }
33136 }
33137
33138 impl ::std::convert::From<PackConnectionAwsAssumeRoleCredentials> for PackSystemConnectionCredentials {
33139 fn from(value: PackConnectionAwsAssumeRoleCredentials) -> Self {
33140 Self::AwsAssumeRoleCredentials(value)
33141 }
33142 }
33143
33144 impl ::std::convert::From<PackConnectionAwsAccessKeyCredentials> for PackSystemConnectionCredentials {
33145 fn from(value: PackConnectionAwsAccessKeyCredentials) -> Self {
33146 Self::AwsAccessKeyCredentials(value)
33147 }
33148 }
33149
33150 ///Metadata of a Pack system connection.
33151 ///
33152 /// <details><summary>JSON schema</summary>
33153 ///
33154 /// ```json
33155 ///{
33156 /// "description": "Metadata of a Pack system connection.",
33157 /// "oneOf": [
33158 /// {
33159 /// "$ref": "#/components/schemas/PackConnectionHeaderMetadata"
33160 /// },
33161 /// {
33162 /// "$ref": "#/components/schemas/PackConnectionMultiHeaderMetadata"
33163 /// },
33164 /// {
33165 /// "$ref": "#/components/schemas/PackConnectionUrlParamMetadata"
33166 /// },
33167 /// {
33168 /// "$ref": "#/components/schemas/PackConnectionHttpBasicMetadata"
33169 /// },
33170 /// {
33171 /// "$ref": "#/components/schemas/PackConnectionCustomMetadata"
33172 /// },
33173 /// {
33174 /// "$ref":
33175 /// "#/components/schemas/PackConnectionOauth2ClientCredentialsMetadata"
33176 /// },
33177 /// {
33178 /// "$ref":
33179 /// "#/components/schemas/PackConnectionGoogleServiceAccountMetadata"
33180 /// },
33181 /// {
33182 /// "$ref": "#/components/schemas/PackConnectionAwsAssumeRoleMetadata"
33183 /// },
33184 /// {
33185 /// "$ref": "#/components/schemas/PackConnectionAwsAccessKeyMetadata"
33186 /// }
33187 /// ],
33188 /// "x-schema-name": "PackSystemConnectionMetadata"
33189 ///}
33190 /// ```
33191 /// </details>
33192 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33193 #[serde(untagged)]
33194 pub enum PackSystemConnectionMetadata {
33195 HeaderMetadata(PackConnectionHeaderMetadata),
33196 MultiHeaderMetadata(PackConnectionMultiHeaderMetadata),
33197 UrlParamMetadata(PackConnectionUrlParamMetadata),
33198 HttpBasicMetadata(PackConnectionHttpBasicMetadata),
33199 CustomMetadata(PackConnectionCustomMetadata),
33200 Oauth2ClientCredentialsMetadata(PackConnectionOauth2ClientCredentialsMetadata),
33201 GoogleServiceAccountMetadata(PackConnectionGoogleServiceAccountMetadata),
33202 AwsAssumeRoleMetadata(PackConnectionAwsAssumeRoleMetadata),
33203 AwsAccessKeyMetadata(PackConnectionAwsAccessKeyMetadata),
33204 }
33205
33206 impl ::std::convert::From<&Self> for PackSystemConnectionMetadata {
33207 fn from(value: &PackSystemConnectionMetadata) -> Self {
33208 value.clone()
33209 }
33210 }
33211
33212 impl ::std::convert::From<PackConnectionHeaderMetadata> for PackSystemConnectionMetadata {
33213 fn from(value: PackConnectionHeaderMetadata) -> Self {
33214 Self::HeaderMetadata(value)
33215 }
33216 }
33217
33218 impl ::std::convert::From<PackConnectionMultiHeaderMetadata> for PackSystemConnectionMetadata {
33219 fn from(value: PackConnectionMultiHeaderMetadata) -> Self {
33220 Self::MultiHeaderMetadata(value)
33221 }
33222 }
33223
33224 impl ::std::convert::From<PackConnectionUrlParamMetadata> for PackSystemConnectionMetadata {
33225 fn from(value: PackConnectionUrlParamMetadata) -> Self {
33226 Self::UrlParamMetadata(value)
33227 }
33228 }
33229
33230 impl ::std::convert::From<PackConnectionHttpBasicMetadata> for PackSystemConnectionMetadata {
33231 fn from(value: PackConnectionHttpBasicMetadata) -> Self {
33232 Self::HttpBasicMetadata(value)
33233 }
33234 }
33235
33236 impl ::std::convert::From<PackConnectionCustomMetadata> for PackSystemConnectionMetadata {
33237 fn from(value: PackConnectionCustomMetadata) -> Self {
33238 Self::CustomMetadata(value)
33239 }
33240 }
33241
33242 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsMetadata> for PackSystemConnectionMetadata {
33243 fn from(value: PackConnectionOauth2ClientCredentialsMetadata) -> Self {
33244 Self::Oauth2ClientCredentialsMetadata(value)
33245 }
33246 }
33247
33248 impl ::std::convert::From<PackConnectionGoogleServiceAccountMetadata> for PackSystemConnectionMetadata {
33249 fn from(value: PackConnectionGoogleServiceAccountMetadata) -> Self {
33250 Self::GoogleServiceAccountMetadata(value)
33251 }
33252 }
33253
33254 impl ::std::convert::From<PackConnectionAwsAssumeRoleMetadata> for PackSystemConnectionMetadata {
33255 fn from(value: PackConnectionAwsAssumeRoleMetadata) -> Self {
33256 Self::AwsAssumeRoleMetadata(value)
33257 }
33258 }
33259
33260 impl ::std::convert::From<PackConnectionAwsAccessKeyMetadata> for PackSystemConnectionMetadata {
33261 fn from(value: PackConnectionAwsAccessKeyMetadata) -> Self {
33262 Self::AwsAccessKeyMetadata(value)
33263 }
33264 }
33265
33266 ///The access capabilities the current user has for this Pack.
33267 ///
33268 /// <details><summary>JSON schema</summary>
33269 ///
33270 /// ```json
33271 ///{
33272 /// "description": "The access capabilities the current user has for this
33273 /// Pack.",
33274 /// "examples": [
33275 /// "{\"canEdit\": false, \"canTest\": false, \"canView\": true,
33276 /// \"canInstall\": true}"
33277 /// ],
33278 /// "type": "object",
33279 /// "required": [
33280 /// "canConnectAccount",
33281 /// "canEdit",
33282 /// "canInstall",
33283 /// "canPurchase",
33284 /// "canTest",
33285 /// "canView",
33286 /// "requiresTrial"
33287 /// ],
33288 /// "properties": {
33289 /// "canConnectAccount": {
33290 /// "type": "boolean"
33291 /// },
33292 /// "canEdit": {
33293 /// "type": "boolean"
33294 /// },
33295 /// "canInstall": {
33296 /// "type": "boolean"
33297 /// },
33298 /// "canPurchase": {
33299 /// "type": "boolean"
33300 /// },
33301 /// "canTest": {
33302 /// "type": "boolean"
33303 /// },
33304 /// "canView": {
33305 /// "type": "boolean"
33306 /// },
33307 /// "ingestionLimitSettings": {
33308 /// "$ref": "#/components/schemas/IngestionLimitSettings"
33309 /// },
33310 /// "organization": {
33311 /// "oneOf": [
33312 /// {
33313 /// "$ref": "#/components/schemas/PackOrganizationAccessForDocs"
33314 /// },
33315 /// {
33316 /// "$ref":
33317 /// "#/components/schemas/PackOrganizationAccessForCodaBrain"
33318 /// }
33319 /// ]
33320 /// },
33321 /// "requiresTrial": {
33322 /// "type": "boolean"
33323 /// }
33324 /// },
33325 /// "additionalProperties": false,
33326 /// "x-schema-name": "PackUserAccess"
33327 ///}
33328 /// ```
33329 /// </details>
33330 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33331 #[serde(deny_unknown_fields)]
33332 pub struct PackUserAccess {
33333 #[serde(rename = "canConnectAccount")]
33334 pub can_connect_account: bool,
33335 #[serde(rename = "canEdit")]
33336 pub can_edit: bool,
33337 #[serde(rename = "canInstall")]
33338 pub can_install: bool,
33339 #[serde(rename = "canPurchase")]
33340 pub can_purchase: bool,
33341 #[serde(rename = "canTest")]
33342 pub can_test: bool,
33343 #[serde(rename = "canView")]
33344 pub can_view: bool,
33345 #[serde(rename = "ingestionLimitSettings", default, skip_serializing_if = "::std::option::Option::is_none")]
33346 pub ingestion_limit_settings: ::std::option::Option<IngestionLimitSettings>,
33347 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
33348 pub organization: ::std::option::Option<PackUserAccessOrganization>,
33349 #[serde(rename = "requiresTrial")]
33350 pub requires_trial: bool,
33351 }
33352
33353 impl ::std::convert::From<&PackUserAccess> for PackUserAccess {
33354 fn from(value: &PackUserAccess) -> Self {
33355 value.clone()
33356 }
33357 }
33358
33359 ///`PackUserAccessOrganization`
33360 ///
33361 /// <details><summary>JSON schema</summary>
33362 ///
33363 /// ```json
33364 ///{
33365 /// "oneOf": [
33366 /// {
33367 /// "$ref": "#/components/schemas/PackOrganizationAccessForDocs"
33368 /// },
33369 /// {
33370 /// "$ref": "#/components/schemas/PackOrganizationAccessForCodaBrain"
33371 /// }
33372 /// ]
33373 ///}
33374 /// ```
33375 /// </details>
33376 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33377 #[serde(untagged)]
33378 pub enum PackUserAccessOrganization {
33379 Docs(PackOrganizationAccessForDocs),
33380 CodaBrain(PackOrganizationAccessForCodaBrain),
33381 }
33382
33383 impl ::std::convert::From<&Self> for PackUserAccessOrganization {
33384 fn from(value: &PackUserAccessOrganization) -> Self {
33385 value.clone()
33386 }
33387 }
33388
33389 impl ::std::convert::From<PackOrganizationAccessForDocs> for PackUserAccessOrganization {
33390 fn from(value: PackOrganizationAccessForDocs) -> Self {
33391 Self::Docs(value)
33392 }
33393 }
33394
33395 impl ::std::convert::From<PackOrganizationAccessForCodaBrain> for PackUserAccessOrganization {
33396 fn from(value: PackOrganizationAccessForCodaBrain) -> Self {
33397 Self::CodaBrain(value)
33398 }
33399 }
33400
33401 ///`PackUserPrincipal`
33402 ///
33403 /// <details><summary>JSON schema</summary>
33404 ///
33405 /// ```json
33406 ///{
33407 /// "type": "object",
33408 /// "required": [
33409 /// "email",
33410 /// "type"
33411 /// ],
33412 /// "properties": {
33413 /// "email": {
33414 /// "type": "string"
33415 /// },
33416 /// "type": {
33417 /// "type": "string",
33418 /// "enum": [
33419 /// "user"
33420 /// ],
33421 /// "x-tsType": "PackPrincipalType.User"
33422 /// }
33423 /// },
33424 /// "additionalProperties": false,
33425 /// "x-schema-name": "PackUserPrincipal"
33426 ///}
33427 /// ```
33428 /// </details>
33429 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33430 #[serde(deny_unknown_fields)]
33431 pub struct PackUserPrincipal {
33432 pub email: ::std::string::String,
33433 #[serde(rename = "type")]
33434 pub type_: PackUserPrincipalType,
33435 }
33436
33437 impl ::std::convert::From<&PackUserPrincipal> for PackUserPrincipal {
33438 fn from(value: &PackUserPrincipal) -> Self {
33439 value.clone()
33440 }
33441 }
33442
33443 ///`PackUserPrincipalType`
33444 ///
33445 /// <details><summary>JSON schema</summary>
33446 ///
33447 /// ```json
33448 ///{
33449 /// "type": "string",
33450 /// "enum": [
33451 /// "user"
33452 /// ],
33453 /// "x-tsType": "PackPrincipalType.User"
33454 ///}
33455 /// ```
33456 /// </details>
33457 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33458 pub enum PackUserPrincipalType {
33459 #[serde(rename = "user")]
33460 User,
33461 }
33462
33463 impl ::std::convert::From<&Self> for PackUserPrincipalType {
33464 fn from(value: &PackUserPrincipalType) -> Self {
33465 value.clone()
33466 }
33467 }
33468
33469 impl ::std::fmt::Display for PackUserPrincipalType {
33470 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33471 match *self {
33472 Self::User => f.write_str("user"),
33473 }
33474 }
33475 }
33476
33477 impl ::std::str::FromStr for PackUserPrincipalType {
33478 type Err = self::error::ConversionError;
33479 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33480 match value {
33481 "user" => Ok(Self::User),
33482 _ => Err("invalid value".into()),
33483 }
33484 }
33485 }
33486
33487 impl ::std::convert::TryFrom<&str> for PackUserPrincipalType {
33488 type Error = self::error::ConversionError;
33489 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33490 value.parse()
33491 }
33492 }
33493
33494 impl ::std::convert::TryFrom<&::std::string::String> for PackUserPrincipalType {
33495 type Error = self::error::ConversionError;
33496 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
33497 value.parse()
33498 }
33499 }
33500
33501 impl ::std::convert::TryFrom<::std::string::String> for PackUserPrincipalType {
33502 type Error = self::error::ConversionError;
33503 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
33504 value.parse()
33505 }
33506 }
33507
33508 ///Details about a Pack version.
33509 ///
33510 /// <details><summary>JSON schema</summary>
33511 ///
33512 /// ```json
33513 ///{
33514 /// "description": "Details about a Pack version.",
33515 /// "type": "object",
33516 /// "required": [
33517 /// "buildNotes",
33518 /// "createdAt",
33519 /// "creationUserLoginId",
33520 /// "packId",
33521 /// "packVersion"
33522 /// ],
33523 /// "properties": {
33524 /// "buildNotes": {
33525 /// "description": "Developer notes.",
33526 /// "examples": [
33527 /// "Adding a new formula."
33528 /// ],
33529 /// "type": "string"
33530 /// },
33531 /// "createdAt": {
33532 /// "description": "Timestamp for when the version was created.",
33533 /// "examples": [
33534 /// "2018-04-11T00:18:57.946Z"
33535 /// ],
33536 /// "type": "string",
33537 /// "format": "date-time"
33538 /// },
33539 /// "creationUserLoginId": {
33540 /// "description": "The login ID of creation user of the Pack
33541 /// version.",
33542 /// "examples": [
33543 /// "api@coda.io"
33544 /// ],
33545 /// "type": "string"
33546 /// },
33547 /// "packId": {
33548 /// "description": "ID of the Pack.",
33549 /// "examples": [
33550 /// 1003
33551 /// ],
33552 /// "type": "number"
33553 /// },
33554 /// "packVersion": {
33555 /// "description": "The semantic format of the Pack version.",
33556 /// "examples": [
33557 /// "1.0.3"
33558 /// ],
33559 /// "type": "string"
33560 /// },
33561 /// "releaseId": {
33562 /// "description": "The release number of the Pack version if it has
33563 /// one.",
33564 /// "examples": [
33565 /// 2
33566 /// ],
33567 /// "type": "number"
33568 /// },
33569 /// "sdkVersion": {
33570 /// "description": "What Packs SDK version was this version built on.",
33571 /// "examples": [
33572 /// "1.5.1"
33573 /// ],
33574 /// "type": "string"
33575 /// },
33576 /// "source": {
33577 /// "$ref": "#/components/schemas/PackSource"
33578 /// }
33579 /// },
33580 /// "additionalProperties": false,
33581 /// "x-schema-name": "PackVersion"
33582 ///}
33583 /// ```
33584 /// </details>
33585 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33586 #[serde(deny_unknown_fields)]
33587 pub struct PackVersion {
33588 ///Developer notes.
33589 #[serde(rename = "buildNotes")]
33590 pub build_notes: ::std::string::String,
33591 ///Timestamp for when the version was created.
33592 #[serde(rename = "createdAt")]
33593 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
33594 ///The login ID of creation user of the Pack version.
33595 #[serde(rename = "creationUserLoginId")]
33596 pub creation_user_login_id: ::std::string::String,
33597 #[serde(rename = "packId")]
33598 pub pack_id: f64,
33599 ///The semantic format of the Pack version.
33600 #[serde(rename = "packVersion")]
33601 pub pack_version: ::std::string::String,
33602 #[serde(rename = "releaseId", default, skip_serializing_if = "::std::option::Option::is_none")]
33603 pub release_id: ::std::option::Option<f64>,
33604 ///What Packs SDK version was this version built on.
33605 #[serde(rename = "sdkVersion", default, skip_serializing_if = "::std::option::Option::is_none")]
33606 pub sdk_version: ::std::option::Option<::std::string::String>,
33607 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
33608 pub source: ::std::option::Option<PackSource>,
33609 }
33610
33611 impl ::std::convert::From<&PackVersion> for PackVersion {
33612 fn from(value: &PackVersion) -> Self {
33613 value.clone()
33614 }
33615 }
33616
33617 ///Info about the diff between two Pack versions.
33618 ///
33619 /// <details><summary>JSON schema</summary>
33620 ///
33621 /// ```json
33622 ///{
33623 /// "description": "Info about the diff between two Pack versions.",
33624 /// "type": "object",
33625 /// "required": [
33626 /// "findingDetails",
33627 /// "findings"
33628 /// ],
33629 /// "properties": {
33630 /// "findingDetails": {
33631 /// "type": "array",
33632 /// "items": {
33633 /// "type": "object",
33634 /// "required": [
33635 /// "finding",
33636 /// "path"
33637 /// ],
33638 /// "properties": {
33639 /// "finding": {
33640 /// "type": "string"
33641 /// },
33642 /// "path": {
33643 /// "type": "string"
33644 /// }
33645 /// },
33646 /// "additionalProperties": false
33647 /// }
33648 /// },
33649 /// "findings": {
33650 /// "description": "List of changes from the previous version to the
33651 /// next version.",
33652 /// "deprecated": true,
33653 /// "type": "array",
33654 /// "items": {
33655 /// "type": "string"
33656 /// }
33657 /// }
33658 /// },
33659 /// "additionalProperties": false,
33660 /// "x-schema-name": "PackVersionDiffs"
33661 ///}
33662 /// ```
33663 /// </details>
33664 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33665 #[serde(deny_unknown_fields)]
33666 pub struct PackVersionDiffs {
33667 #[serde(rename = "findingDetails")]
33668 pub finding_details: ::std::vec::Vec<PackVersionDiffsFindingDetailsItem>,
33669 ///List of changes from the previous version to the next version.
33670 pub findings: ::std::vec::Vec<::std::string::String>,
33671 }
33672
33673 impl ::std::convert::From<&PackVersionDiffs> for PackVersionDiffs {
33674 fn from(value: &PackVersionDiffs) -> Self {
33675 value.clone()
33676 }
33677 }
33678
33679 ///`PackVersionDiffsFindingDetailsItem`
33680 ///
33681 /// <details><summary>JSON schema</summary>
33682 ///
33683 /// ```json
33684 ///{
33685 /// "type": "object",
33686 /// "required": [
33687 /// "finding",
33688 /// "path"
33689 /// ],
33690 /// "properties": {
33691 /// "finding": {
33692 /// "type": "string"
33693 /// },
33694 /// "path": {
33695 /// "type": "string"
33696 /// }
33697 /// },
33698 /// "additionalProperties": false
33699 ///}
33700 /// ```
33701 /// </details>
33702 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33703 #[serde(deny_unknown_fields)]
33704 pub struct PackVersionDiffsFindingDetailsItem {
33705 pub finding: ::std::string::String,
33706 pub path: ::std::string::String,
33707 }
33708
33709 impl ::std::convert::From<&PackVersionDiffsFindingDetailsItem> for PackVersionDiffsFindingDetailsItem {
33710 fn from(value: &PackVersionDiffsFindingDetailsItem) -> Self {
33711 value.clone()
33712 }
33713 }
33714
33715 ///List of Pack versions.
33716 ///
33717 /// <details><summary>JSON schema</summary>
33718 ///
33719 /// ```json
33720 ///{
33721 /// "description": "List of Pack versions.",
33722 /// "type": "object",
33723 /// "required": [
33724 /// "creationUsers",
33725 /// "items"
33726 /// ],
33727 /// "properties": {
33728 /// "creationUsers": {
33729 /// "type": "array",
33730 /// "items": {
33731 /// "$ref": "#/components/schemas/UserSummary"
33732 /// }
33733 /// },
33734 /// "items": {
33735 /// "type": "array",
33736 /// "items": {
33737 /// "$ref": "#/components/schemas/PackVersion"
33738 /// }
33739 /// },
33740 /// "nextPageLink": {
33741 /// "allOf": [
33742 /// {
33743 /// "$ref": "#/components/schemas/nextPageLink"
33744 /// },
33745 /// {
33746 /// "examples": [
33747 /// "https://coda.io/apis/v1/packs/1/versions?pageToken=xyz"
33748 /// ],
33749 /// "type": "string"
33750 /// }
33751 /// ]
33752 /// },
33753 /// "nextPageToken": {
33754 /// "$ref": "#/components/schemas/nextPageToken"
33755 /// }
33756 /// },
33757 /// "additionalProperties": false,
33758 /// "x-schema-name": "PackVersionList"
33759 ///}
33760 /// ```
33761 /// </details>
33762 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33763 #[serde(deny_unknown_fields)]
33764 pub struct PackVersionList {
33765 #[serde(rename = "creationUsers")]
33766 pub creation_users: ::std::vec::Vec<UserSummary>,
33767 pub items: ::std::vec::Vec<PackVersion>,
33768 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
33769 pub next_page_link: ::std::option::Option<NextPageLink>,
33770 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
33771 pub next_page_token: ::std::option::Option<NextPageToken>,
33772 }
33773
33774 impl ::std::convert::From<&PackVersionList> for PackVersionList {
33775 fn from(value: &PackVersionList) -> Self {
33776 value.clone()
33777 }
33778 }
33779
33780 ///An HTTP error resulting from an unsuccessful request.
33781 ///
33782 /// <details><summary>JSON schema</summary>
33783 ///
33784 /// ```json
33785 ///{
33786 /// "description": "An HTTP error resulting from an unsuccessful request.",
33787 /// "required": [
33788 /// "message",
33789 /// "statusCode",
33790 /// "statusMessage"
33791 /// ],
33792 /// "properties": {
33793 /// "codaDetail": {
33794 /// "description": "Detail about why this request was rejected.",
33795 /// "type": "object",
33796 /// "properties": {
33797 /// "validationErrors": {
33798 /// "type": "array",
33799 /// "items": {
33800 /// "$ref": "#/components/schemas/ValidationError"
33801 /// }
33802 /// }
33803 /// },
33804 /// "additionalProperties": false
33805 /// },
33806 /// "message": {
33807 /// "description": "Any additional context on the error, or the same as
33808 /// `statusMessage` otherwise.",
33809 /// "examples": [
33810 /// "Bad Request"
33811 /// ],
33812 /// "type": "string"
33813 /// },
33814 /// "statusCode": {
33815 /// "description": "HTTP status code of the error.",
33816 /// "examples": [
33817 /// 400
33818 /// ],
33819 /// "type": "number"
33820 /// },
33821 /// "statusMessage": {
33822 /// "description": "HTTP status message of the error.",
33823 /// "examples": [
33824 /// "Bad Request"
33825 /// ],
33826 /// "type": "string"
33827 /// }
33828 /// },
33829 /// "additionalProperties": false
33830 ///}
33831 /// ```
33832 /// </details>
33833 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33834 #[serde(deny_unknown_fields)]
33835 pub struct PackVersionUploadCompleteResponse {
33836 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
33837 pub coda_detail: ::std::option::Option<PackVersionUploadCompleteResponseCodaDetail>,
33838 ///Any additional context on the error, or the same as `statusMessage`
33839 /// otherwise.
33840 pub message: ::std::string::String,
33841 #[serde(rename = "statusCode")]
33842 pub status_code: f64,
33843 ///HTTP status message of the error.
33844 #[serde(rename = "statusMessage")]
33845 pub status_message: ::std::string::String,
33846 }
33847
33848 impl ::std::convert::From<&PackVersionUploadCompleteResponse> for PackVersionUploadCompleteResponse {
33849 fn from(value: &PackVersionUploadCompleteResponse) -> Self {
33850 value.clone()
33851 }
33852 }
33853
33854 ///Detail about why this request was rejected.
33855 ///
33856 /// <details><summary>JSON schema</summary>
33857 ///
33858 /// ```json
33859 ///{
33860 /// "description": "Detail about why this request was rejected.",
33861 /// "type": "object",
33862 /// "properties": {
33863 /// "validationErrors": {
33864 /// "type": "array",
33865 /// "items": {
33866 /// "$ref": "#/components/schemas/ValidationError"
33867 /// }
33868 /// }
33869 /// },
33870 /// "additionalProperties": false
33871 ///}
33872 /// ```
33873 /// </details>
33874 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33875 #[serde(deny_unknown_fields)]
33876 pub struct PackVersionUploadCompleteResponseCodaDetail {
33877 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
33878 pub validation_errors: ::std::vec::Vec<ValidationError>,
33879 }
33880
33881 impl ::std::convert::From<&PackVersionUploadCompleteResponseCodaDetail> for PackVersionUploadCompleteResponseCodaDetail {
33882 fn from(value: &PackVersionUploadCompleteResponseCodaDetail) -> Self {
33883 value.clone()
33884 }
33885 }
33886
33887 impl ::std::default::Default for PackVersionUploadCompleteResponseCodaDetail {
33888 fn default() -> Self {
33889 Self {
33890 validation_errors: Default::default(),
33891 }
33892 }
33893 }
33894
33895 ///Information indicating where to upload the Pack version definition.
33896 ///
33897 /// <details><summary>JSON schema</summary>
33898 ///
33899 /// ```json
33900 ///{
33901 /// "description": "Information indicating where to upload the Pack version
33902 /// definition.",
33903 /// "type": "object",
33904 /// "required": [
33905 /// "headers",
33906 /// "uploadUrl"
33907 /// ],
33908 /// "properties": {
33909 /// "headers": {
33910 /// "description": "Key-value pairs of authorization headers to include
33911 /// in the upload request.",
33912 /// "examples": [
33913 /// "{\"header1\": \"value1\"}"
33914 /// ],
33915 /// "type": "object",
33916 /// "additionalProperties": {
33917 /// "type": "string"
33918 /// }
33919 /// },
33920 /// "uploadUrl": {
33921 /// "description": "A URL to be used for uploading a Pack version
33922 /// definition.",
33923 /// "examples": [
33924 /// "https://coda-us-west-2-prod-packs-upload.s3.amazonaws.com/packs/123/versions/1.0.0"
33925 /// ],
33926 /// "type": "string"
33927 /// }
33928 /// },
33929 /// "additionalProperties": false,
33930 /// "x-schema-name": "PackVersionUploadInfo"
33931 ///}
33932 /// ```
33933 /// </details>
33934 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33935 #[serde(deny_unknown_fields)]
33936 pub struct PackVersionUploadInfo {
33937 ///Key-value pairs of authorization headers to include in the upload
33938 /// request.
33939 pub headers: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
33940 ///A URL to be used for uploading a Pack version definition.
33941 #[serde(rename = "uploadUrl")]
33942 pub upload_url: ::std::string::String,
33943 }
33944
33945 impl ::std::convert::From<&PackVersionUploadInfo> for PackVersionUploadInfo {
33946 fn from(value: &PackVersionUploadInfo) -> Self {
33947 value.clone()
33948 }
33949 }
33950
33951 ///`PackWorkspacePrincipal`
33952 ///
33953 /// <details><summary>JSON schema</summary>
33954 ///
33955 /// ```json
33956 ///{
33957 /// "type": "object",
33958 /// "required": [
33959 /// "type",
33960 /// "workspaceId"
33961 /// ],
33962 /// "properties": {
33963 /// "type": {
33964 /// "type": "string",
33965 /// "enum": [
33966 /// "workspace"
33967 /// ],
33968 /// "x-tsType": "PackPrincipalType.Workspace"
33969 /// },
33970 /// "workspaceId": {
33971 /// "type": "string"
33972 /// }
33973 /// },
33974 /// "additionalProperties": false,
33975 /// "x-schema-name": "PackWorkspacePrincipal"
33976 ///}
33977 /// ```
33978 /// </details>
33979 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33980 #[serde(deny_unknown_fields)]
33981 pub struct PackWorkspacePrincipal {
33982 #[serde(rename = "type")]
33983 pub type_: PackWorkspacePrincipalType,
33984 #[serde(rename = "workspaceId")]
33985 pub workspace_id: ::std::string::String,
33986 }
33987
33988 impl ::std::convert::From<&PackWorkspacePrincipal> for PackWorkspacePrincipal {
33989 fn from(value: &PackWorkspacePrincipal) -> Self {
33990 value.clone()
33991 }
33992 }
33993
33994 ///`PackWorkspacePrincipalType`
33995 ///
33996 /// <details><summary>JSON schema</summary>
33997 ///
33998 /// ```json
33999 ///{
34000 /// "type": "string",
34001 /// "enum": [
34002 /// "workspace"
34003 /// ],
34004 /// "x-tsType": "PackPrincipalType.Workspace"
34005 ///}
34006 /// ```
34007 /// </details>
34008 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34009 pub enum PackWorkspacePrincipalType {
34010 #[serde(rename = "workspace")]
34011 Workspace,
34012 }
34013
34014 impl ::std::convert::From<&Self> for PackWorkspacePrincipalType {
34015 fn from(value: &PackWorkspacePrincipalType) -> Self {
34016 value.clone()
34017 }
34018 }
34019
34020 impl ::std::fmt::Display for PackWorkspacePrincipalType {
34021 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34022 match *self {
34023 Self::Workspace => f.write_str("workspace"),
34024 }
34025 }
34026 }
34027
34028 impl ::std::str::FromStr for PackWorkspacePrincipalType {
34029 type Err = self::error::ConversionError;
34030 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34031 match value {
34032 "workspace" => Ok(Self::Workspace),
34033 _ => Err("invalid value".into()),
34034 }
34035 }
34036 }
34037
34038 impl ::std::convert::TryFrom<&str> for PackWorkspacePrincipalType {
34039 type Error = self::error::ConversionError;
34040 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34041 value.parse()
34042 }
34043 }
34044
34045 impl ::std::convert::TryFrom<&::std::string::String> for PackWorkspacePrincipalType {
34046 type Error = self::error::ConversionError;
34047 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34048 value.parse()
34049 }
34050 }
34051
34052 impl ::std::convert::TryFrom<::std::string::String> for PackWorkspacePrincipalType {
34053 type Error = self::error::ConversionError;
34054 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34055 value.parse()
34056 }
34057 }
34058
34059 ///Determines how the Packs returned are sorted.
34060 ///
34061 /// <details><summary>JSON schema</summary>
34062 ///
34063 /// ```json
34064 ///{
34065 /// "description": "Determines how the Packs returned are sorted.",
34066 /// "type": "string",
34067 /// "enum": [
34068 /// "title",
34069 /// "createdAt",
34070 /// "updatedAt"
34071 /// ],
34072 /// "x-schema-name": "PacksSortBy",
34073 /// "x-tsEnumNames": [
34074 /// "Title",
34075 /// "CreatedAt",
34076 /// "UpdatedAt"
34077 /// ]
34078 ///}
34079 /// ```
34080 /// </details>
34081 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34082 pub enum PacksSortBy {
34083 #[serde(rename = "title")]
34084 Title,
34085 #[serde(rename = "createdAt")]
34086 CreatedAt,
34087 #[serde(rename = "updatedAt")]
34088 UpdatedAt,
34089 }
34090
34091 impl ::std::convert::From<&Self> for PacksSortBy {
34092 fn from(value: &PacksSortBy) -> Self {
34093 value.clone()
34094 }
34095 }
34096
34097 impl ::std::fmt::Display for PacksSortBy {
34098 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34099 match *self {
34100 Self::Title => f.write_str("title"),
34101 Self::CreatedAt => f.write_str("createdAt"),
34102 Self::UpdatedAt => f.write_str("updatedAt"),
34103 }
34104 }
34105 }
34106
34107 impl ::std::str::FromStr for PacksSortBy {
34108 type Err = self::error::ConversionError;
34109 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34110 match value {
34111 "title" => Ok(Self::Title),
34112 "createdAt" => Ok(Self::CreatedAt),
34113 "updatedAt" => Ok(Self::UpdatedAt),
34114 _ => Err("invalid value".into()),
34115 }
34116 }
34117 }
34118
34119 impl ::std::convert::TryFrom<&str> for PacksSortBy {
34120 type Error = self::error::ConversionError;
34121 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34122 value.parse()
34123 }
34124 }
34125
34126 impl ::std::convert::TryFrom<&::std::string::String> for PacksSortBy {
34127 type Error = self::error::ConversionError;
34128 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34129 value.parse()
34130 }
34131 }
34132
34133 impl ::std::convert::TryFrom<::std::string::String> for PacksSortBy {
34134 type Error = self::error::ConversionError;
34135 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34136 value.parse()
34137 }
34138 }
34139
34140 ///Metadata about a page.
34141 ///
34142 /// <details><summary>JSON schema</summary>
34143 ///
34144 /// ```json
34145 ///{
34146 /// "description": "Metadata about a page.",
34147 /// "type": "object",
34148 /// "required": [
34149 /// "browserLink",
34150 /// "children",
34151 /// "contentType",
34152 /// "href",
34153 /// "id",
34154 /// "isEffectivelyHidden",
34155 /// "isHidden",
34156 /// "name",
34157 /// "type"
34158 /// ],
34159 /// "properties": {
34160 /// "authors": {
34161 /// "description": "Authors of the page",
34162 /// "type": "array",
34163 /// "items": {
34164 /// "$ref": "#/components/schemas/PersonValue"
34165 /// }
34166 /// },
34167 /// "browserLink": {
34168 /// "description": "Browser-friendly link to the page.",
34169 /// "examples": [
34170 /// "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO"
34171 /// ],
34172 /// "type": "string",
34173 /// "format": "url"
34174 /// },
34175 /// "children": {
34176 /// "type": "array",
34177 /// "items": {
34178 /// "$ref": "#/components/schemas/PageReference"
34179 /// }
34180 /// },
34181 /// "contentType": {
34182 /// "$ref": "#/components/schemas/PageTypeEnum"
34183 /// },
34184 /// "createdAt": {
34185 /// "description": "Timestamp for when the page was created.",
34186 /// "examples": [
34187 /// "2018-04-11T00:18:57.946Z"
34188 /// ],
34189 /// "type": "string",
34190 /// "format": "date-time"
34191 /// },
34192 /// "createdBy": {
34193 /// "$ref": "#/components/schemas/PersonValue"
34194 /// },
34195 /// "href": {
34196 /// "description": "API link to the page.",
34197 /// "examples": [
34198 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO"
34199 /// ],
34200 /// "type": "string",
34201 /// "format": "url"
34202 /// },
34203 /// "icon": {
34204 /// "$ref": "#/components/schemas/Icon"
34205 /// },
34206 /// "id": {
34207 /// "description": "ID of the page.",
34208 /// "examples": [
34209 /// "canvas-IjkLmnO"
34210 /// ],
34211 /// "type": "string"
34212 /// },
34213 /// "image": {
34214 /// "$ref": "#/components/schemas/Image"
34215 /// },
34216 /// "isEffectivelyHidden": {
34217 /// "description": "Whether the page or any of its parents is hidden in
34218 /// the UI.",
34219 /// "examples": [
34220 /// true
34221 /// ],
34222 /// "type": "boolean"
34223 /// },
34224 /// "isHidden": {
34225 /// "description": "Whether the page is hidden in the UI.",
34226 /// "examples": [
34227 /// true
34228 /// ],
34229 /// "type": "boolean"
34230 /// },
34231 /// "name": {
34232 /// "description": "Name of the page.",
34233 /// "examples": [
34234 /// "Launch Status"
34235 /// ],
34236 /// "type": "string"
34237 /// },
34238 /// "parent": {
34239 /// "$ref": "#/components/schemas/PageReference"
34240 /// },
34241 /// "subtitle": {
34242 /// "description": "Subtitle of the page.",
34243 /// "examples": [
34244 /// "See the status of launch-related tasks."
34245 /// ],
34246 /// "type": "string"
34247 /// },
34248 /// "type": {
34249 /// "description": "The type of this resource.",
34250 /// "type": "string",
34251 /// "enum": [
34252 /// "page"
34253 /// ],
34254 /// "x-tsType": "Type.Page"
34255 /// },
34256 /// "updatedAt": {
34257 /// "description": "Timestamp for when page content was last
34258 /// modified.",
34259 /// "examples": [
34260 /// "2018-04-11T00:18:57.946Z"
34261 /// ],
34262 /// "type": "string",
34263 /// "format": "date-time"
34264 /// },
34265 /// "updatedBy": {
34266 /// "$ref": "#/components/schemas/PersonValue"
34267 /// }
34268 /// },
34269 /// "additionalProperties": false,
34270 /// "x-schema-name": "Page"
34271 ///}
34272 /// ```
34273 /// </details>
34274 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34275 #[serde(deny_unknown_fields)]
34276 pub struct Page {
34277 ///Authors of the page
34278 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
34279 pub authors: ::std::vec::Vec<PersonValue>,
34280 ///Browser-friendly link to the page.
34281 #[serde(rename = "browserLink")]
34282 pub browser_link: ::std::string::String,
34283 pub children: ::std::vec::Vec<PageReference>,
34284 #[serde(rename = "contentType")]
34285 pub content_type: PageTypeEnum,
34286 ///Timestamp for when the page was created.
34287 #[serde(rename = "createdAt", default, skip_serializing_if = "::std::option::Option::is_none")]
34288 pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
34289 #[serde(rename = "createdBy", default, skip_serializing_if = "::std::option::Option::is_none")]
34290 pub created_by: ::std::option::Option<PersonValue>,
34291 ///API link to the page.
34292 pub href: ::std::string::String,
34293 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34294 pub icon: ::std::option::Option<Icon>,
34295 ///ID of the page.
34296 pub id: ::std::string::String,
34297 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34298 pub image: ::std::option::Option<Image>,
34299 ///Whether the page or any of its parents is hidden in the UI.
34300 #[serde(rename = "isEffectivelyHidden")]
34301 pub is_effectively_hidden: bool,
34302 ///Whether the page is hidden in the UI.
34303 #[serde(rename = "isHidden")]
34304 pub is_hidden: bool,
34305 ///Name of the page.
34306 pub name: ::std::string::String,
34307 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34308 pub parent: ::std::option::Option<PageReference>,
34309 ///Subtitle of the page.
34310 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34311 pub subtitle: ::std::option::Option<::std::string::String>,
34312 ///The type of this resource.
34313 #[serde(rename = "type")]
34314 pub type_: PageType,
34315 ///Timestamp for when page content was last modified.
34316 #[serde(rename = "updatedAt", default, skip_serializing_if = "::std::option::Option::is_none")]
34317 pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
34318 #[serde(rename = "updatedBy", default, skip_serializing_if = "::std::option::Option::is_none")]
34319 pub updated_by: ::std::option::Option<PersonValue>,
34320 }
34321
34322 impl ::std::convert::From<&Page> for Page {
34323 fn from(value: &Page) -> Self {
34324 value.clone()
34325 }
34326 }
34327
34328 ///List of analytics for pages within a Coda doc over a date range.
34329 ///
34330 /// <details><summary>JSON schema</summary>
34331 ///
34332 /// ```json
34333 ///{
34334 /// "description": "List of analytics for pages within a Coda doc over a
34335 /// date range.",
34336 /// "type": "object",
34337 /// "required": [
34338 /// "items"
34339 /// ],
34340 /// "properties": {
34341 /// "items": {
34342 /// "type": "array",
34343 /// "items": {
34344 /// "$ref": "#/components/schemas/PageAnalyticsItem"
34345 /// }
34346 /// },
34347 /// "nextPageLink": {
34348 /// "allOf": [
34349 /// {
34350 /// "$ref": "#/components/schemas/nextPageLink"
34351 /// },
34352 /// {
34353 /// "examples": [
34354 /// "https://coda.io/apis/v1/analytics/docs/DOC_ID/pages?pageToken=xyz"
34355 /// ],
34356 /// "type": "string"
34357 /// }
34358 /// ]
34359 /// },
34360 /// "nextPageToken": {
34361 /// "$ref": "#/components/schemas/nextPageToken"
34362 /// }
34363 /// },
34364 /// "additionalProperties": false,
34365 /// "x-schema-name": "PageAnalyticsCollection"
34366 ///}
34367 /// ```
34368 /// </details>
34369 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34370 #[serde(deny_unknown_fields)]
34371 pub struct PageAnalyticsCollection {
34372 pub items: ::std::vec::Vec<PageAnalyticsItem>,
34373 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
34374 pub next_page_link: ::std::option::Option<NextPageLink>,
34375 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
34376 pub next_page_token: ::std::option::Option<NextPageToken>,
34377 }
34378
34379 impl ::std::convert::From<&PageAnalyticsCollection> for PageAnalyticsCollection {
34380 fn from(value: &PageAnalyticsCollection) -> Self {
34381 value.clone()
34382 }
34383 }
34384
34385 ///Metadata about a page relevant to analytics.
34386 ///
34387 /// <details><summary>JSON schema</summary>
34388 ///
34389 /// ```json
34390 ///{
34391 /// "description": "Metadata about a page relevant to analytics.",
34392 /// "required": [
34393 /// "id",
34394 /// "name"
34395 /// ],
34396 /// "properties": {
34397 /// "icon": {
34398 /// "$ref": "#/components/schemas/Icon"
34399 /// },
34400 /// "id": {
34401 /// "description": "ID of the page.",
34402 /// "examples": [
34403 /// "section-IjkLmnO"
34404 /// ],
34405 /// "type": "string"
34406 /// },
34407 /// "name": {
34408 /// "description": "Name of the page.",
34409 /// "examples": [
34410 /// "Launch Status"
34411 /// ],
34412 /// "type": "string"
34413 /// }
34414 /// },
34415 /// "additionalProperties": false,
34416 /// "x-schema-name": "PageAnalyticsDetails"
34417 ///}
34418 /// ```
34419 /// </details>
34420 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34421 #[serde(deny_unknown_fields)]
34422 pub struct PageAnalyticsDetails {
34423 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34424 pub icon: ::std::option::Option<Icon>,
34425 ///ID of the page.
34426 pub id: ::std::string::String,
34427 ///Name of the page.
34428 pub name: ::std::string::String,
34429 }
34430
34431 impl ::std::convert::From<&PageAnalyticsDetails> for PageAnalyticsDetails {
34432 fn from(value: &PageAnalyticsDetails) -> Self {
34433 value.clone()
34434 }
34435 }
34436
34437 ///Analytics data for a page within a Coda doc.
34438 ///
34439 /// <details><summary>JSON schema</summary>
34440 ///
34441 /// ```json
34442 ///{
34443 /// "description": "Analytics data for a page within a Coda doc.",
34444 /// "type": "object",
34445 /// "required": [
34446 /// "metrics",
34447 /// "page"
34448 /// ],
34449 /// "properties": {
34450 /// "metrics": {
34451 /// "type": "array",
34452 /// "items": {
34453 /// "$ref": "#/components/schemas/PageAnalyticsMetrics"
34454 /// }
34455 /// },
34456 /// "page": {
34457 /// "$ref": "#/components/schemas/PageAnalyticsDetails"
34458 /// }
34459 /// },
34460 /// "additionalProperties": false,
34461 /// "x-schema-name": "PageAnalyticsItem"
34462 ///}
34463 /// ```
34464 /// </details>
34465 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34466 #[serde(deny_unknown_fields)]
34467 pub struct PageAnalyticsItem {
34468 pub metrics: ::std::vec::Vec<PageAnalyticsMetrics>,
34469 pub page: PageAnalyticsDetails,
34470 }
34471
34472 impl ::std::convert::From<&PageAnalyticsItem> for PageAnalyticsItem {
34473 fn from(value: &PageAnalyticsItem) -> Self {
34474 value.clone()
34475 }
34476 }
34477
34478 ///Analytics metrics for a page within a Coda doc.
34479 ///
34480 /// <details><summary>JSON schema</summary>
34481 ///
34482 /// ```json
34483 ///{
34484 /// "description": "Analytics metrics for a page within a Coda doc.",
34485 /// "type": "object",
34486 /// "required": [
34487 /// "averageSecondsViewed",
34488 /// "date",
34489 /// "medianSecondsViewed",
34490 /// "sessions",
34491 /// "tabs",
34492 /// "users",
34493 /// "views"
34494 /// ],
34495 /// "properties": {
34496 /// "averageSecondsViewed": {
34497 /// "description": "Average number of seconds that the page was viewed
34498 /// on the given day.",
34499 /// "examples": [
34500 /// 42
34501 /// ],
34502 /// "type": "integer"
34503 /// },
34504 /// "date": {
34505 /// "description": "Date of the analytics data.",
34506 /// "examples": [
34507 /// "2022-06-03"
34508 /// ],
34509 /// "type": "string",
34510 /// "format": "date"
34511 /// },
34512 /// "medianSecondsViewed": {
34513 /// "description": "Median number of seconds that the page was viewed
34514 /// on the given day.",
34515 /// "examples": [
34516 /// 42
34517 /// ],
34518 /// "type": "integer"
34519 /// },
34520 /// "sessions": {
34521 /// "description": "Number of unique browsers that viewed the page on
34522 /// the given day.",
34523 /// "examples": [
34524 /// 24
34525 /// ],
34526 /// "type": "integer"
34527 /// },
34528 /// "tabs": {
34529 /// "description": "Number of unique tabs that opened the doc on the
34530 /// given day.",
34531 /// "examples": [
34532 /// 10
34533 /// ],
34534 /// "type": "integer"
34535 /// },
34536 /// "users": {
34537 /// "description": "Number of unique Coda users that viewed the page on
34538 /// the given day.",
34539 /// "examples": [
34540 /// 42
34541 /// ],
34542 /// "type": "integer"
34543 /// },
34544 /// "views": {
34545 /// "description": "Number of times the page was viewed within the
34546 /// given day.",
34547 /// "examples": [
34548 /// 980
34549 /// ],
34550 /// "type": "integer"
34551 /// }
34552 /// },
34553 /// "additionalProperties": false,
34554 /// "x-schema-name": "PageAnalyticsMetrics"
34555 ///}
34556 /// ```
34557 /// </details>
34558 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34559 #[serde(deny_unknown_fields)]
34560 pub struct PageAnalyticsMetrics {
34561 ///Average number of seconds that the page was viewed on the given day.
34562 #[serde(rename = "averageSecondsViewed")]
34563 pub average_seconds_viewed: i64,
34564 ///Date of the analytics data.
34565 pub date: ::chrono::naive::NaiveDate,
34566 ///Median number of seconds that the page was viewed on the given day.
34567 #[serde(rename = "medianSecondsViewed")]
34568 pub median_seconds_viewed: i64,
34569 ///Number of unique browsers that viewed the page on the given day.
34570 pub sessions: i64,
34571 ///Number of unique tabs that opened the doc on the given day.
34572 pub tabs: i64,
34573 ///Number of unique Coda users that viewed the page on the given day.
34574 pub users: i64,
34575 ///Number of times the page was viewed within the given day.
34576 pub views: i64,
34577 }
34578
34579 impl ::std::convert::From<&PageAnalyticsMetrics> for PageAnalyticsMetrics {
34580 fn from(value: &PageAnalyticsMetrics) -> Self {
34581 value.clone()
34582 }
34583 }
34584
34585 ///Content to be added or replaced with in a page (canvas).
34586 ///
34587 /// <details><summary>JSON schema</summary>
34588 ///
34589 /// ```json
34590 ///{
34591 /// "description": "Content to be added or replaced with in a page
34592 /// (canvas).\n",
34593 /// "type": "object",
34594 /// "required": [
34595 /// "content",
34596 /// "format"
34597 /// ],
34598 /// "properties": {
34599 /// "content": {
34600 /// "description": "The actual page content.",
34601 /// "examples": [
34602 /// "<p><b>This</b> is rich text</p>"
34603 /// ],
34604 /// "type": "string"
34605 /// },
34606 /// "format": {
34607 /// "$ref": "#/components/schemas/PageContentFormat"
34608 /// }
34609 /// },
34610 /// "additionalProperties": false,
34611 /// "x-schema-name": "PageContent"
34612 ///}
34613 /// ```
34614 /// </details>
34615 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34616 #[serde(deny_unknown_fields)]
34617 pub struct PageContent {
34618 ///The actual page content.
34619 pub content: ::std::string::String,
34620 pub format: PageContentFormat,
34621 }
34622
34623 impl ::std::convert::From<&PageContent> for PageContent {
34624 fn from(value: &PageContent) -> Self {
34625 value.clone()
34626 }
34627 }
34628
34629 ///Payload for deleting content from a page.
34630 ///
34631 /// <details><summary>JSON schema</summary>
34632 ///
34633 /// ```json
34634 ///{
34635 /// "description": "Payload for deleting content from a page.",
34636 /// "type": "object",
34637 /// "properties": {
34638 /// "elementIds": {
34639 /// "description": "IDs of the elements to delete from the page. If
34640 /// omitted or empty, all content will be deleted.\n",
34641 /// "examples": [
34642 /// [
34643 /// "cl-lzqh0Q0poT",
34644 /// "cl-abc123def"
34645 /// ]
34646 /// ],
34647 /// "type": "array",
34648 /// "items": {
34649 /// "type": "string"
34650 /// }
34651 /// }
34652 /// },
34653 /// "additionalProperties": false,
34654 /// "x-schema-name": "PageContentDelete"
34655 ///}
34656 /// ```
34657 /// </details>
34658 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34659 #[serde(deny_unknown_fields)]
34660 pub struct PageContentDelete {
34661 ///IDs of the elements to delete from the page. If omitted or empty,
34662 /// all content will be deleted.
34663 #[serde(rename = "elementIds", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
34664 pub element_ids: ::std::vec::Vec<::std::string::String>,
34665 }
34666
34667 impl ::std::convert::From<&PageContentDelete> for PageContentDelete {
34668 fn from(value: &PageContentDelete) -> Self {
34669 value.clone()
34670 }
34671 }
34672
34673 impl ::std::default::Default for PageContentDelete {
34674 fn default() -> Self {
34675 Self {
34676 element_ids: Default::default(),
34677 }
34678 }
34679 }
34680
34681 ///`PageContentDeleteResult`
34682 ///
34683 /// <details><summary>JSON schema</summary>
34684 ///
34685 /// ```json
34686 ///{
34687 /// "description": "The result of a page content deletion.",
34688 /// "allOf": [
34689 /// {
34690 /// "$ref": "#/components/schemas/DocumentMutateResponse"
34691 /// },
34692 /// {
34693 /// "type": "object",
34694 /// "required": [
34695 /// "id"
34696 /// ],
34697 /// "properties": {
34698 /// "id": {
34699 /// "description": "ID of the page whose content was deleted.",
34700 /// "examples": [
34701 /// "canvas-tuVwxYz"
34702 /// ],
34703 /// "type": "string"
34704 /// }
34705 /// },
34706 /// "additionalProperties": false
34707 /// }
34708 /// ],
34709 /// "x-schema-name": "PageContentDeleteResult"
34710 ///}
34711 /// ```
34712 /// </details>
34713 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34714 #[serde(deny_unknown_fields)]
34715 pub enum PageContentDeleteResult {}
34716 impl ::std::convert::From<&Self> for PageContentDeleteResult {
34717 fn from(value: &PageContentDeleteResult) -> Self {
34718 value.clone()
34719 }
34720 }
34721
34722 ///Status of a page content export.
34723 ///
34724 /// <details><summary>JSON schema</summary>
34725 ///
34726 /// ```json
34727 ///{
34728 /// "description": "Status of a page content export.",
34729 /// "type": "string",
34730 /// "enum": [
34731 /// "inProgress",
34732 /// "failed",
34733 /// "complete"
34734 /// ],
34735 /// "x-schema-name": "PageContentExportStatus",
34736 /// "x-tsEnumNames": [
34737 /// "InProgress",
34738 /// "Failed",
34739 /// "Complete"
34740 /// ]
34741 ///}
34742 /// ```
34743 /// </details>
34744 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34745 pub enum PageContentExportStatus {
34746 #[serde(rename = "inProgress")]
34747 InProgress,
34748 #[serde(rename = "failed")]
34749 Failed,
34750 #[serde(rename = "complete")]
34751 Complete,
34752 }
34753
34754 impl ::std::convert::From<&Self> for PageContentExportStatus {
34755 fn from(value: &PageContentExportStatus) -> Self {
34756 value.clone()
34757 }
34758 }
34759
34760 impl ::std::fmt::Display for PageContentExportStatus {
34761 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34762 match *self {
34763 Self::InProgress => f.write_str("inProgress"),
34764 Self::Failed => f.write_str("failed"),
34765 Self::Complete => f.write_str("complete"),
34766 }
34767 }
34768 }
34769
34770 impl ::std::str::FromStr for PageContentExportStatus {
34771 type Err = self::error::ConversionError;
34772 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34773 match value {
34774 "inProgress" => Ok(Self::InProgress),
34775 "failed" => Ok(Self::Failed),
34776 "complete" => Ok(Self::Complete),
34777 _ => Err("invalid value".into()),
34778 }
34779 }
34780 }
34781
34782 impl ::std::convert::TryFrom<&str> for PageContentExportStatus {
34783 type Error = self::error::ConversionError;
34784 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34785 value.parse()
34786 }
34787 }
34788
34789 impl ::std::convert::TryFrom<&::std::string::String> for PageContentExportStatus {
34790 type Error = self::error::ConversionError;
34791 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34792 value.parse()
34793 }
34794 }
34795
34796 impl ::std::convert::TryFrom<::std::string::String> for PageContentExportStatus {
34797 type Error = self::error::ConversionError;
34798 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34799 value.parse()
34800 }
34801 }
34802
34803 ///Response when requesting the status of a page content export.
34804 ///
34805 /// <details><summary>JSON schema</summary>
34806 ///
34807 /// ```json
34808 ///{
34809 /// "description": "Response when requesting the status of a page content
34810 /// export.",
34811 /// "type": "object",
34812 /// "required": [
34813 /// "href",
34814 /// "id",
34815 /// "status"
34816 /// ],
34817 /// "properties": {
34818 /// "downloadLink": {
34819 /// "description": "Once the export completes, the location where the
34820 /// resulting export file can be downloaded; this link typically expires
34821 /// after a short time. Call this method again to get a fresh link.",
34822 /// "examples": [
34823 /// "https://coda.io/blobs/DOC_EXPORT_RENDERING/some-request-id"
34824 /// ],
34825 /// "type": "string"
34826 /// },
34827 /// "error": {
34828 /// "description": "Message describing an error, if this export
34829 /// failed.",
34830 /// "type": "string"
34831 /// },
34832 /// "href": {
34833 /// "description": "The URL that reports the status of this export.",
34834 /// "examples": [
34835 /// "https://coda.io/apis/v1/docs/somedoc/pages/somepage/export/some-request-id"
34836 /// ],
34837 /// "type": "string"
34838 /// },
34839 /// "id": {
34840 /// "description": "The identifier of this export request.",
34841 /// "examples": [
34842 /// "AbCDeFGH"
34843 /// ],
34844 /// "type": "string"
34845 /// },
34846 /// "status": {
34847 /// "description": "The status of this export.",
34848 /// "examples": [
34849 /// "complete"
34850 /// ],
34851 /// "type": "string"
34852 /// }
34853 /// },
34854 /// "additionalProperties": false,
34855 /// "x-schema-name": "PageContentExportStatusResponse"
34856 ///}
34857 /// ```
34858 /// </details>
34859 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34860 #[serde(deny_unknown_fields)]
34861 pub struct PageContentExportStatusResponse {
34862 ///Once the export completes, the location where the resulting export
34863 /// file can be downloaded; this link typically expires after a short
34864 /// time. Call this method again to get a fresh link.
34865 #[serde(rename = "downloadLink", default, skip_serializing_if = "::std::option::Option::is_none")]
34866 pub download_link: ::std::option::Option<::std::string::String>,
34867 ///Message describing an error, if this export failed.
34868 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
34869 pub error: ::std::option::Option<::std::string::String>,
34870 ///The URL that reports the status of this export.
34871 pub href: ::std::string::String,
34872 ///The identifier of this export request.
34873 pub id: ::std::string::String,
34874 ///The status of this export.
34875 pub status: ::std::string::String,
34876 }
34877
34878 impl ::std::convert::From<&PageContentExportStatusResponse> for PageContentExportStatusResponse {
34879 fn from(value: &PageContentExportStatusResponse) -> Self {
34880 value.clone()
34881 }
34882 }
34883
34884 ///Supported content types for page (canvas) content.
34885 ///
34886 /// <details><summary>JSON schema</summary>
34887 ///
34888 /// ```json
34889 ///{
34890 /// "description": "Supported content types for page (canvas) content.",
34891 /// "type": "string",
34892 /// "enum": [
34893 /// "html",
34894 /// "markdown"
34895 /// ],
34896 /// "x-schema-name": "PageContentFormat",
34897 /// "x-tsEnumNames": [
34898 /// "Html",
34899 /// "Markdown"
34900 /// ]
34901 ///}
34902 /// ```
34903 /// </details>
34904 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34905 pub enum PageContentFormat {
34906 #[serde(rename = "html")]
34907 Html,
34908 #[serde(rename = "markdown")]
34909 Markdown,
34910 }
34911
34912 impl ::std::convert::From<&Self> for PageContentFormat {
34913 fn from(value: &PageContentFormat) -> Self {
34914 value.clone()
34915 }
34916 }
34917
34918 impl ::std::fmt::Display for PageContentFormat {
34919 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34920 match *self {
34921 Self::Html => f.write_str("html"),
34922 Self::Markdown => f.write_str("markdown"),
34923 }
34924 }
34925 }
34926
34927 impl ::std::str::FromStr for PageContentFormat {
34928 type Err = self::error::ConversionError;
34929 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34930 match value {
34931 "html" => Ok(Self::Html),
34932 "markdown" => Ok(Self::Markdown),
34933 _ => Err("invalid value".into()),
34934 }
34935 }
34936 }
34937
34938 impl ::std::convert::TryFrom<&str> for PageContentFormat {
34939 type Error = self::error::ConversionError;
34940 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34941 value.parse()
34942 }
34943 }
34944
34945 impl ::std::convert::TryFrom<&::std::string::String> for PageContentFormat {
34946 type Error = self::error::ConversionError;
34947 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34948 value.parse()
34949 }
34950 }
34951
34952 impl ::std::convert::TryFrom<::std::string::String> for PageContentFormat {
34953 type Error = self::error::ConversionError;
34954 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
34955 value.parse()
34956 }
34957 }
34958
34959 ///Mode for updating the content on an existing page.
34960 ///
34961 /// <details><summary>JSON schema</summary>
34962 ///
34963 /// ```json
34964 ///{
34965 /// "description": "Mode for updating the content on an existing page.",
34966 /// "type": "string",
34967 /// "enum": [
34968 /// "append",
34969 /// "prepend",
34970 /// "replace"
34971 /// ],
34972 /// "x-schema-name": "PageContentInsertionMode",
34973 /// "x-tsEnumNames": [
34974 /// "Append",
34975 /// "Prepend",
34976 /// "Replace"
34977 /// ]
34978 ///}
34979 /// ```
34980 /// </details>
34981 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34982 pub enum PageContentInsertionMode {
34983 #[serde(rename = "append")]
34984 Append,
34985 #[serde(rename = "prepend")]
34986 Prepend,
34987 #[serde(rename = "replace")]
34988 Replace,
34989 }
34990
34991 impl ::std::convert::From<&Self> for PageContentInsertionMode {
34992 fn from(value: &PageContentInsertionMode) -> Self {
34993 value.clone()
34994 }
34995 }
34996
34997 impl ::std::fmt::Display for PageContentInsertionMode {
34998 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34999 match *self {
35000 Self::Append => f.write_str("append"),
35001 Self::Prepend => f.write_str("prepend"),
35002 Self::Replace => f.write_str("replace"),
35003 }
35004 }
35005 }
35006
35007 impl ::std::str::FromStr for PageContentInsertionMode {
35008 type Err = self::error::ConversionError;
35009 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35010 match value {
35011 "append" => Ok(Self::Append),
35012 "prepend" => Ok(Self::Prepend),
35013 "replace" => Ok(Self::Replace),
35014 _ => Err("invalid value".into()),
35015 }
35016 }
35017 }
35018
35019 impl ::std::convert::TryFrom<&str> for PageContentInsertionMode {
35020 type Error = self::error::ConversionError;
35021 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35022 value.parse()
35023 }
35024 }
35025
35026 impl ::std::convert::TryFrom<&::std::string::String> for PageContentInsertionMode {
35027 type Error = self::error::ConversionError;
35028 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35029 value.parse()
35030 }
35031 }
35032
35033 impl ::std::convert::TryFrom<::std::string::String> for PageContentInsertionMode {
35034 type Error = self::error::ConversionError;
35035 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35036 value.parse()
35037 }
35038 }
35039
35040 ///Content item in a page (canvas).
35041 ///
35042 /// <details><summary>JSON schema</summary>
35043 ///
35044 /// ```json
35045 ///{
35046 /// "description": "Content item in a page (canvas).",
35047 /// "type": "object",
35048 /// "required": [
35049 /// "id",
35050 /// "type"
35051 /// ],
35052 /// "properties": {
35053 /// "id": {
35054 /// "description": "ID of the content item.",
35055 /// "examples": [
35056 /// "cl-2ZUJuRhNuN"
35057 /// ],
35058 /// "type": "string"
35059 /// },
35060 /// "itemContent": {
35061 /// "$ref": "#/components/schemas/PageContentItemContent"
35062 /// },
35063 /// "type": {
35064 /// "$ref": "#/components/schemas/PageContentItemType"
35065 /// }
35066 /// },
35067 /// "additionalProperties": false,
35068 /// "x-schema-name": "PageContentItem"
35069 ///}
35070 /// ```
35071 /// </details>
35072 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35073 #[serde(deny_unknown_fields)]
35074 pub struct PageContentItem {
35075 ///ID of the content item.
35076 pub id: ::std::string::String,
35077 #[serde(rename = "itemContent", default, skip_serializing_if = "::std::option::Option::is_none")]
35078 pub item_content: ::std::option::Option<PageContentItemContent>,
35079 #[serde(rename = "type")]
35080 pub type_: PageContentItemType,
35081 }
35082
35083 impl ::std::convert::From<&PageContentItem> for PageContentItem {
35084 fn from(value: &PageContentItem) -> Self {
35085 value.clone()
35086 }
35087 }
35088
35089 ///Content details of the item.
35090 ///
35091 /// <details><summary>JSON schema</summary>
35092 ///
35093 /// ```json
35094 ///{
35095 /// "description": "Content details of the item.",
35096 /// "type": "object",
35097 /// "required": [
35098 /// "content",
35099 /// "format",
35100 /// "style"
35101 /// ],
35102 /// "properties": {
35103 /// "content": {
35104 /// "description": "Content of the item in the specified format.",
35105 /// "examples": [
35106 /// "This is a paragraph of text."
35107 /// ],
35108 /// "type": "string"
35109 /// },
35110 /// "format": {
35111 /// "$ref": "#/components/schemas/PageContentItemContentFormat"
35112 /// },
35113 /// "lineLevel": {
35114 /// "description": "Indentation level of the element. Present for
35115 /// indentable elements (paragraphs, blockquotes, and list items).\n",
35116 /// "examples": [
35117 /// 0
35118 /// ],
35119 /// "type": "integer"
35120 /// },
35121 /// "style": {
35122 /// "$ref": "#/components/schemas/PageLineStyle"
35123 /// }
35124 /// },
35125 /// "additionalProperties": false,
35126 /// "x-schema-name": "PageContentItemContent"
35127 ///}
35128 /// ```
35129 /// </details>
35130 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35131 #[serde(deny_unknown_fields)]
35132 pub struct PageContentItemContent {
35133 ///Content of the item in the specified format.
35134 pub content: ::std::string::String,
35135 pub format: PageContentItemContentFormat,
35136 ///Indentation level of the element. Present for indentable elements
35137 /// (paragraphs, blockquotes, and list items).
35138 #[serde(rename = "lineLevel", default, skip_serializing_if = "::std::option::Option::is_none")]
35139 pub line_level: ::std::option::Option<i64>,
35140 pub style: PageLineStyle,
35141 }
35142
35143 impl ::std::convert::From<&PageContentItemContent> for PageContentItemContent {
35144 fn from(value: &PageContentItemContent) -> Self {
35145 value.clone()
35146 }
35147 }
35148
35149 ///Content format for the item.
35150 ///
35151 /// <details><summary>JSON schema</summary>
35152 ///
35153 /// ```json
35154 ///{
35155 /// "description": "Content format for the item.",
35156 /// "type": "string",
35157 /// "enum": [
35158 /// "plainText"
35159 /// ],
35160 /// "x-schema-name": "PageContentItemContentFormat",
35161 /// "x-tsEnumNames": [
35162 /// "PlainText"
35163 /// ]
35164 ///}
35165 /// ```
35166 /// </details>
35167 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35168 pub enum PageContentItemContentFormat {
35169 #[serde(rename = "plainText")]
35170 PlainText,
35171 }
35172
35173 impl ::std::convert::From<&Self> for PageContentItemContentFormat {
35174 fn from(value: &PageContentItemContentFormat) -> Self {
35175 value.clone()
35176 }
35177 }
35178
35179 impl ::std::fmt::Display for PageContentItemContentFormat {
35180 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35181 match *self {
35182 Self::PlainText => f.write_str("plainText"),
35183 }
35184 }
35185 }
35186
35187 impl ::std::str::FromStr for PageContentItemContentFormat {
35188 type Err = self::error::ConversionError;
35189 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35190 match value {
35191 "plainText" => Ok(Self::PlainText),
35192 _ => Err("invalid value".into()),
35193 }
35194 }
35195 }
35196
35197 impl ::std::convert::TryFrom<&str> for PageContentItemContentFormat {
35198 type Error = self::error::ConversionError;
35199 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35200 value.parse()
35201 }
35202 }
35203
35204 impl ::std::convert::TryFrom<&::std::string::String> for PageContentItemContentFormat {
35205 type Error = self::error::ConversionError;
35206 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35207 value.parse()
35208 }
35209 }
35210
35211 impl ::std::convert::TryFrom<::std::string::String> for PageContentItemContentFormat {
35212 type Error = self::error::ConversionError;
35213 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35214 value.parse()
35215 }
35216 }
35217
35218 ///The type of content item in a page.
35219 ///
35220 /// <details><summary>JSON schema</summary>
35221 ///
35222 /// ```json
35223 ///{
35224 /// "description": "The type of content item in a page.",
35225 /// "type": "string",
35226 /// "enum": [
35227 /// "line"
35228 /// ],
35229 /// "x-schema-name": "PageContentItemType",
35230 /// "x-tsEnumNames": [
35231 /// "Line"
35232 /// ]
35233 ///}
35234 /// ```
35235 /// </details>
35236 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35237 pub enum PageContentItemType {
35238 #[serde(rename = "line")]
35239 Line,
35240 }
35241
35242 impl ::std::convert::From<&Self> for PageContentItemType {
35243 fn from(value: &PageContentItemType) -> Self {
35244 value.clone()
35245 }
35246 }
35247
35248 impl ::std::fmt::Display for PageContentItemType {
35249 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35250 match *self {
35251 Self::Line => f.write_str("line"),
35252 }
35253 }
35254 }
35255
35256 impl ::std::str::FromStr for PageContentItemType {
35257 type Err = self::error::ConversionError;
35258 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35259 match value {
35260 "line" => Ok(Self::Line),
35261 _ => Err("invalid value".into()),
35262 }
35263 }
35264 }
35265
35266 impl ::std::convert::TryFrom<&str> for PageContentItemType {
35267 type Error = self::error::ConversionError;
35268 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35269 value.parse()
35270 }
35271 }
35272
35273 impl ::std::convert::TryFrom<&::std::string::String> for PageContentItemType {
35274 type Error = self::error::ConversionError;
35275 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35276 value.parse()
35277 }
35278 }
35279
35280 impl ::std::convert::TryFrom<::std::string::String> for PageContentItemType {
35281 type Error = self::error::ConversionError;
35282 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35283 value.parse()
35284 }
35285 }
35286
35287 ///List of page content elements.
35288 ///
35289 /// <details><summary>JSON schema</summary>
35290 ///
35291 /// ```json
35292 ///{
35293 /// "description": "List of page content elements.",
35294 /// "type": "object",
35295 /// "required": [
35296 /// "href",
35297 /// "items"
35298 /// ],
35299 /// "properties": {
35300 /// "href": {
35301 /// "description": "API link to these results",
35302 /// "examples": [
35303 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO/content?limit=20"
35304 /// ],
35305 /// "type": "string",
35306 /// "format": "url"
35307 /// },
35308 /// "items": {
35309 /// "type": "array",
35310 /// "items": {
35311 /// "$ref": "#/components/schemas/PageContentItem"
35312 /// }
35313 /// },
35314 /// "nextPageLink": {
35315 /// "allOf": [
35316 /// {
35317 /// "$ref": "#/components/schemas/nextPageLink"
35318 /// },
35319 /// {
35320 /// "examples": [
35321 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO/content?pageToken=eyJsaW1pd"
35322 /// ],
35323 /// "type": "string"
35324 /// }
35325 /// ]
35326 /// },
35327 /// "nextPageToken": {
35328 /// "$ref": "#/components/schemas/nextPageToken"
35329 /// }
35330 /// },
35331 /// "additionalProperties": false,
35332 /// "x-schema-name": "PageContentList"
35333 ///}
35334 /// ```
35335 /// </details>
35336 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35337 #[serde(deny_unknown_fields)]
35338 pub struct PageContentList {
35339 ///API link to these results
35340 pub href: ::std::string::String,
35341 pub items: ::std::vec::Vec<PageContentItem>,
35342 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
35343 pub next_page_link: ::std::option::Option<NextPageLink>,
35344 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
35345 pub next_page_token: ::std::option::Option<NextPageToken>,
35346 }
35347
35348 impl ::std::convert::From<&PageContentList> for PageContentList {
35349 fn from(value: &PageContentList) -> Self {
35350 value.clone()
35351 }
35352 }
35353
35354 ///Supported output content formats that can be requested for getting
35355 /// content for an existing page.
35356 ///
35357 /// <details><summary>JSON schema</summary>
35358 ///
35359 /// ```json
35360 ///{
35361 /// "description": "Supported output content formats that can be requested
35362 /// for getting content for an existing page.",
35363 /// "type": "string",
35364 /// "enum": [
35365 /// "html",
35366 /// "markdown"
35367 /// ],
35368 /// "x-schema-name": "PageContentOutputFormat",
35369 /// "x-tsEnumNames": [
35370 /// "Html",
35371 /// "Markdown"
35372 /// ]
35373 ///}
35374 /// ```
35375 /// </details>
35376 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35377 pub enum PageContentOutputFormat {
35378 #[serde(rename = "html")]
35379 Html,
35380 #[serde(rename = "markdown")]
35381 Markdown,
35382 }
35383
35384 impl ::std::convert::From<&Self> for PageContentOutputFormat {
35385 fn from(value: &PageContentOutputFormat) -> Self {
35386 value.clone()
35387 }
35388 }
35389
35390 impl ::std::fmt::Display for PageContentOutputFormat {
35391 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35392 match *self {
35393 Self::Html => f.write_str("html"),
35394 Self::Markdown => f.write_str("markdown"),
35395 }
35396 }
35397 }
35398
35399 impl ::std::str::FromStr for PageContentOutputFormat {
35400 type Err = self::error::ConversionError;
35401 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35402 match value {
35403 "html" => Ok(Self::Html),
35404 "markdown" => Ok(Self::Markdown),
35405 _ => Err("invalid value".into()),
35406 }
35407 }
35408 }
35409
35410 impl ::std::convert::TryFrom<&str> for PageContentOutputFormat {
35411 type Error = self::error::ConversionError;
35412 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35413 value.parse()
35414 }
35415 }
35416
35417 impl ::std::convert::TryFrom<&::std::string::String> for PageContentOutputFormat {
35418 type Error = self::error::ConversionError;
35419 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35420 value.parse()
35421 }
35422 }
35423
35424 impl ::std::convert::TryFrom<::std::string::String> for PageContentOutputFormat {
35425 type Error = self::error::ConversionError;
35426 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35427 value.parse()
35428 }
35429 }
35430
35431 ///Payload for updating the content of an existing page.
35432 ///
35433 /// <details><summary>JSON schema</summary>
35434 ///
35435 /// ```json
35436 ///{
35437 /// "description": "Payload for updating the content of an existing page.",
35438 /// "type": "object",
35439 /// "required": [
35440 /// "canvasContent",
35441 /// "insertionMode"
35442 /// ],
35443 /// "properties": {
35444 /// "canvasContent": {
35445 /// "$ref": "#/components/schemas/PageContent"
35446 /// },
35447 /// "elementId": {
35448 /// "description": "ID of the element on the page to use as a reference
35449 /// point for editing content. If provided, the operation will be relative
35450 /// to this element (e.g., append after it, prepend before it, replace it).
35451 /// If omitted, the operation will be performed on the entire page (e.g.,
35452 /// append to end, prepend to beginning, replace all).\n",
35453 /// "examples": [
35454 /// "cl-lzqh0Q0poT"
35455 /// ],
35456 /// "type": "string"
35457 /// },
35458 /// "insertionMode": {
35459 /// "$ref": "#/components/schemas/PageContentInsertionMode"
35460 /// }
35461 /// },
35462 /// "additionalProperties": false,
35463 /// "x-schema-name": "PageContentUpdate"
35464 ///}
35465 /// ```
35466 /// </details>
35467 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35468 #[serde(deny_unknown_fields)]
35469 pub struct PageContentUpdate {
35470 #[serde(rename = "canvasContent")]
35471 pub canvas_content: PageContent,
35472 ///ID of the element on the page to use as a reference point for
35473 /// editing content. If provided, the operation will be relative to this
35474 /// element (e.g., append after it, prepend before it, replace it). If
35475 /// omitted, the operation will be performed on the entire page (e.g.,
35476 /// append to end, prepend to beginning, replace all).
35477 #[serde(rename = "elementId", default, skip_serializing_if = "::std::option::Option::is_none")]
35478 pub element_id: ::std::option::Option<::std::string::String>,
35479 #[serde(rename = "insertionMode")]
35480 pub insertion_mode: PageContentInsertionMode,
35481 }
35482
35483 impl ::std::convert::From<&PageContentUpdate> for PageContentUpdate {
35484 fn from(value: &PageContentUpdate) -> Self {
35485 value.clone()
35486 }
35487 }
35488
35489 ///Payload for creating a new page in a doc.
35490 ///
35491 /// <details><summary>JSON schema</summary>
35492 ///
35493 /// ```json
35494 ///{
35495 /// "description": "Payload for creating a new page in a doc.",
35496 /// "type": "object",
35497 /// "properties": {
35498 /// "iconName": {
35499 /// "description": "Name of the icon.",
35500 /// "examples": [
35501 /// "rocket"
35502 /// ],
35503 /// "type": "string"
35504 /// },
35505 /// "imageUrl": {
35506 /// "description": "Url of the cover image to use.",
35507 /// "examples": [
35508 /// "https://example.com/image.jpg"
35509 /// ],
35510 /// "type": "string"
35511 /// },
35512 /// "name": {
35513 /// "description": "Name of the page.",
35514 /// "examples": [
35515 /// "Launch Status"
35516 /// ],
35517 /// "type": "string"
35518 /// },
35519 /// "pageContent": {
35520 /// "$ref": "#/components/schemas/PageCreateContent"
35521 /// },
35522 /// "parentPageId": {
35523 /// "description": "The ID of this new page's parent, if creating a
35524 /// subpage.",
35525 /// "examples": [
35526 /// "canvas-tuVwxYz"
35527 /// ],
35528 /// "type": "string"
35529 /// },
35530 /// "subtitle": {
35531 /// "description": "Subtitle of the page.",
35532 /// "examples": [
35533 /// "See the status of launch-related tasks."
35534 /// ],
35535 /// "type": "string"
35536 /// }
35537 /// },
35538 /// "additionalProperties": false,
35539 /// "x-schema-name": "PageCreate"
35540 ///}
35541 /// ```
35542 /// </details>
35543 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35544 #[serde(deny_unknown_fields)]
35545 pub struct PageCreate {
35546 ///Name of the icon.
35547 #[serde(rename = "iconName", default, skip_serializing_if = "::std::option::Option::is_none")]
35548 pub icon_name: ::std::option::Option<::std::string::String>,
35549 ///Url of the cover image to use.
35550 #[serde(rename = "imageUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
35551 pub image_url: ::std::option::Option<::std::string::String>,
35552 ///Name of the page.
35553 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35554 pub name: ::std::option::Option<::std::string::String>,
35555 #[serde(rename = "pageContent", default, skip_serializing_if = "::std::option::Option::is_none")]
35556 pub page_content: ::std::option::Option<PageCreateContent>,
35557 ///The ID of this new page's parent, if creating a subpage.
35558 #[serde(rename = "parentPageId", default, skip_serializing_if = "::std::option::Option::is_none")]
35559 pub parent_page_id: ::std::option::Option<::std::string::String>,
35560 ///Subtitle of the page.
35561 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35562 pub subtitle: ::std::option::Option<::std::string::String>,
35563 }
35564
35565 impl ::std::convert::From<&PageCreate> for PageCreate {
35566 fn from(value: &PageCreate) -> Self {
35567 value.clone()
35568 }
35569 }
35570
35571 impl ::std::default::Default for PageCreate {
35572 fn default() -> Self {
35573 Self {
35574 icon_name: Default::default(),
35575 image_url: Default::default(),
35576 name: Default::default(),
35577 page_content: Default::default(),
35578 parent_page_id: Default::default(),
35579 subtitle: Default::default(),
35580 }
35581 }
35582 }
35583
35584 ///Content that can be added to a page at creation time, either text (or
35585 /// rich text) or a URL to create a full-page embed.
35586 ///
35587 /// <details><summary>JSON schema</summary>
35588 ///
35589 /// ```json
35590 ///{
35591 /// "description": "Content that can be added to a page at creation time,
35592 /// either text (or rich text) or a URL to create a full-page embed.",
35593 /// "oneOf": [
35594 /// {
35595 /// "type": "object",
35596 /// "required": [
35597 /// "canvasContent",
35598 /// "type"
35599 /// ],
35600 /// "properties": {
35601 /// "canvasContent": {
35602 /// "$ref": "#/components/schemas/PageContent"
35603 /// },
35604 /// "type": {
35605 /// "description": "Indicates a page containing canvas content.",
35606 /// "type": "string",
35607 /// "enum": [
35608 /// "canvas"
35609 /// ],
35610 /// "x-tsType": "PageTypeEnum.Canvas"
35611 /// }
35612 /// },
35613 /// "additionalProperties": false
35614 /// },
35615 /// {
35616 /// "type": "object",
35617 /// "required": [
35618 /// "type",
35619 /// "url"
35620 /// ],
35621 /// "properties": {
35622 /// "renderMethod": {
35623 /// "$ref": "#/components/schemas/PageEmbedRenderMethod"
35624 /// },
35625 /// "type": {
35626 /// "description": "Indicates a page that embeds other content.",
35627 /// "type": "string",
35628 /// "enum": [
35629 /// "embed"
35630 /// ],
35631 /// "x-tsType": "PageTypeEnum.Embed"
35632 /// },
35633 /// "url": {
35634 /// "description": "The URL of the content to embed.",
35635 /// "examples": [
35636 /// "https://example.com"
35637 /// ],
35638 /// "type": "string"
35639 /// }
35640 /// },
35641 /// "additionalProperties": false
35642 /// },
35643 /// {
35644 /// "oneOf": [
35645 /// {
35646 /// "type": "object",
35647 /// "required": [
35648 /// "includeSubpages",
35649 /// "mode",
35650 /// "sourceDocId",
35651 /// "sourcePageId",
35652 /// "type"
35653 /// ],
35654 /// "properties": {
35655 /// "includeSubpages": {
35656 /// "description": "Include subpages in the sync page.",
35657 /// "type": "boolean"
35658 /// },
35659 /// "mode": {
35660 /// "description": "Indicates a single-page sync page.",
35661 /// "type": "string",
35662 /// "enum": [
35663 /// "page"
35664 /// ],
35665 /// "x-tsType": "SyncPageTypeEnum.Page"
35666 /// },
35667 /// "sourceDocId": {
35668 /// "description": "The id of the document to insert as a sync
35669 /// page.",
35670 /// "examples": [
35671 /// "sHbI4uIwiK"
35672 /// ],
35673 /// "type": "string"
35674 /// },
35675 /// "sourcePageId": {
35676 /// "description": "The page id to insert as a sync page.",
35677 /// "examples": [
35678 /// "canvas-IjkLmnO"
35679 /// ],
35680 /// "type": "string"
35681 /// },
35682 /// "type": {
35683 /// "description": "Indicates a page that embeds other Coda
35684 /// content.",
35685 /// "type": "string",
35686 /// "enum": [
35687 /// "syncPage"
35688 /// ],
35689 /// "x-tsType": "PageTypeEnum.SyncPage"
35690 /// }
35691 /// },
35692 /// "additionalProperties": false
35693 /// },
35694 /// {
35695 /// "type": "object",
35696 /// "required": [
35697 /// "mode",
35698 /// "sourceDocId",
35699 /// "type"
35700 /// ],
35701 /// "properties": {
35702 /// "mode": {
35703 /// "description": "Indicates a full doc sync page.",
35704 /// "type": "string",
35705 /// "enum": [
35706 /// "document"
35707 /// ],
35708 /// "x-tsType": "SyncPageTypeEnum.Document"
35709 /// },
35710 /// "sourceDocId": {
35711 /// "description": "The id of the document to insert as a sync
35712 /// page.",
35713 /// "examples": [
35714 /// "sHbI4uIwiK"
35715 /// ],
35716 /// "type": "string"
35717 /// },
35718 /// "type": {
35719 /// "description": "Indicates a page that embeds other
35720 /// content.",
35721 /// "type": "string",
35722 /// "enum": [
35723 /// "syncPage"
35724 /// ],
35725 /// "x-tsType": "PageTypeEnum.SyncPage"
35726 /// }
35727 /// },
35728 /// "additionalProperties": false
35729 /// }
35730 /// ]
35731 /// }
35732 /// ],
35733 /// "x-schema-name": "PageCreateContent"
35734 ///}
35735 /// ```
35736 /// </details>
35737 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35738 #[serde(untagged, deny_unknown_fields)]
35739 pub enum PageCreateContent {
35740 Variant0 {
35741 #[serde(rename = "canvasContent")]
35742 canvas_content: PageContent,
35743 ///Indicates a page containing canvas content.
35744 #[serde(rename = "type")]
35745 type_: PageCreateContentVariant0Type,
35746 },
35747 Variant1 {
35748 #[serde(rename = "renderMethod", default, skip_serializing_if = "::std::option::Option::is_none")]
35749 render_method: ::std::option::Option<PageEmbedRenderMethod>,
35750 ///Indicates a page that embeds other content.
35751 #[serde(rename = "type")]
35752 type_: PageCreateContentVariant1Type,
35753 ///The URL of the content to embed.
35754 url: ::std::string::String,
35755 },
35756 Variant2(PageCreateContentVariant2),
35757 }
35758
35759 impl ::std::convert::From<&Self> for PageCreateContent {
35760 fn from(value: &PageCreateContent) -> Self {
35761 value.clone()
35762 }
35763 }
35764
35765 impl ::std::convert::From<PageCreateContentVariant2> for PageCreateContent {
35766 fn from(value: PageCreateContentVariant2) -> Self {
35767 Self::Variant2(value)
35768 }
35769 }
35770
35771 ///Indicates a page containing canvas content.
35772 ///
35773 /// <details><summary>JSON schema</summary>
35774 ///
35775 /// ```json
35776 ///{
35777 /// "description": "Indicates a page containing canvas content.",
35778 /// "type": "string",
35779 /// "enum": [
35780 /// "canvas"
35781 /// ],
35782 /// "x-tsType": "PageTypeEnum.Canvas"
35783 ///}
35784 /// ```
35785 /// </details>
35786 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35787 pub enum PageCreateContentVariant0Type {
35788 #[serde(rename = "canvas")]
35789 Canvas,
35790 }
35791
35792 impl ::std::convert::From<&Self> for PageCreateContentVariant0Type {
35793 fn from(value: &PageCreateContentVariant0Type) -> Self {
35794 value.clone()
35795 }
35796 }
35797
35798 impl ::std::fmt::Display for PageCreateContentVariant0Type {
35799 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35800 match *self {
35801 Self::Canvas => f.write_str("canvas"),
35802 }
35803 }
35804 }
35805
35806 impl ::std::str::FromStr for PageCreateContentVariant0Type {
35807 type Err = self::error::ConversionError;
35808 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35809 match value {
35810 "canvas" => Ok(Self::Canvas),
35811 _ => Err("invalid value".into()),
35812 }
35813 }
35814 }
35815
35816 impl ::std::convert::TryFrom<&str> for PageCreateContentVariant0Type {
35817 type Error = self::error::ConversionError;
35818 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35819 value.parse()
35820 }
35821 }
35822
35823 impl ::std::convert::TryFrom<&::std::string::String> for PageCreateContentVariant0Type {
35824 type Error = self::error::ConversionError;
35825 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35826 value.parse()
35827 }
35828 }
35829
35830 impl ::std::convert::TryFrom<::std::string::String> for PageCreateContentVariant0Type {
35831 type Error = self::error::ConversionError;
35832 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35833 value.parse()
35834 }
35835 }
35836
35837 ///Indicates a page that embeds other content.
35838 ///
35839 /// <details><summary>JSON schema</summary>
35840 ///
35841 /// ```json
35842 ///{
35843 /// "description": "Indicates a page that embeds other content.",
35844 /// "type": "string",
35845 /// "enum": [
35846 /// "embed"
35847 /// ],
35848 /// "x-tsType": "PageTypeEnum.Embed"
35849 ///}
35850 /// ```
35851 /// </details>
35852 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35853 pub enum PageCreateContentVariant1Type {
35854 #[serde(rename = "embed")]
35855 Embed,
35856 }
35857
35858 impl ::std::convert::From<&Self> for PageCreateContentVariant1Type {
35859 fn from(value: &PageCreateContentVariant1Type) -> Self {
35860 value.clone()
35861 }
35862 }
35863
35864 impl ::std::fmt::Display for PageCreateContentVariant1Type {
35865 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35866 match *self {
35867 Self::Embed => f.write_str("embed"),
35868 }
35869 }
35870 }
35871
35872 impl ::std::str::FromStr for PageCreateContentVariant1Type {
35873 type Err = self::error::ConversionError;
35874 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35875 match value {
35876 "embed" => Ok(Self::Embed),
35877 _ => Err("invalid value".into()),
35878 }
35879 }
35880 }
35881
35882 impl ::std::convert::TryFrom<&str> for PageCreateContentVariant1Type {
35883 type Error = self::error::ConversionError;
35884 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35885 value.parse()
35886 }
35887 }
35888
35889 impl ::std::convert::TryFrom<&::std::string::String> for PageCreateContentVariant1Type {
35890 type Error = self::error::ConversionError;
35891 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35892 value.parse()
35893 }
35894 }
35895
35896 impl ::std::convert::TryFrom<::std::string::String> for PageCreateContentVariant1Type {
35897 type Error = self::error::ConversionError;
35898 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
35899 value.parse()
35900 }
35901 }
35902
35903 ///`PageCreateContentVariant2`
35904 ///
35905 /// <details><summary>JSON schema</summary>
35906 ///
35907 /// ```json
35908 ///{
35909 /// "oneOf": [
35910 /// {
35911 /// "type": "object",
35912 /// "required": [
35913 /// "includeSubpages",
35914 /// "mode",
35915 /// "sourceDocId",
35916 /// "sourcePageId",
35917 /// "type"
35918 /// ],
35919 /// "properties": {
35920 /// "includeSubpages": {
35921 /// "description": "Include subpages in the sync page.",
35922 /// "type": "boolean"
35923 /// },
35924 /// "mode": {
35925 /// "description": "Indicates a single-page sync page.",
35926 /// "type": "string",
35927 /// "enum": [
35928 /// "page"
35929 /// ],
35930 /// "x-tsType": "SyncPageTypeEnum.Page"
35931 /// },
35932 /// "sourceDocId": {
35933 /// "description": "The id of the document to insert as a sync
35934 /// page.",
35935 /// "examples": [
35936 /// "sHbI4uIwiK"
35937 /// ],
35938 /// "type": "string"
35939 /// },
35940 /// "sourcePageId": {
35941 /// "description": "The page id to insert as a sync page.",
35942 /// "examples": [
35943 /// "canvas-IjkLmnO"
35944 /// ],
35945 /// "type": "string"
35946 /// },
35947 /// "type": {
35948 /// "description": "Indicates a page that embeds other Coda
35949 /// content.",
35950 /// "type": "string",
35951 /// "enum": [
35952 /// "syncPage"
35953 /// ],
35954 /// "x-tsType": "PageTypeEnum.SyncPage"
35955 /// }
35956 /// },
35957 /// "additionalProperties": false
35958 /// },
35959 /// {
35960 /// "type": "object",
35961 /// "required": [
35962 /// "mode",
35963 /// "sourceDocId",
35964 /// "type"
35965 /// ],
35966 /// "properties": {
35967 /// "mode": {
35968 /// "description": "Indicates a full doc sync page.",
35969 /// "type": "string",
35970 /// "enum": [
35971 /// "document"
35972 /// ],
35973 /// "x-tsType": "SyncPageTypeEnum.Document"
35974 /// },
35975 /// "sourceDocId": {
35976 /// "description": "The id of the document to insert as a sync
35977 /// page.",
35978 /// "examples": [
35979 /// "sHbI4uIwiK"
35980 /// ],
35981 /// "type": "string"
35982 /// },
35983 /// "type": {
35984 /// "description": "Indicates a page that embeds other content.",
35985 /// "type": "string",
35986 /// "enum": [
35987 /// "syncPage"
35988 /// ],
35989 /// "x-tsType": "PageTypeEnum.SyncPage"
35990 /// }
35991 /// },
35992 /// "additionalProperties": false
35993 /// }
35994 /// ]
35995 ///}
35996 /// ```
35997 /// </details>
35998 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35999 #[serde(tag = "mode", deny_unknown_fields)]
36000 pub enum PageCreateContentVariant2 {
36001 #[serde(rename = "page")]
36002 Page {
36003 ///Include subpages in the sync page.
36004 #[serde(rename = "includeSubpages")]
36005 include_subpages: bool,
36006 ///The id of the document to insert as a sync page.
36007 #[serde(rename = "sourceDocId")]
36008 source_doc_id: ::std::string::String,
36009 ///The page id to insert as a sync page.
36010 #[serde(rename = "sourcePageId")]
36011 source_page_id: ::std::string::String,
36012 ///Indicates a page that embeds other Coda content.
36013 #[serde(rename = "type")]
36014 type_: PageCreateContentVariant2Type,
36015 },
36016 #[serde(rename = "document")]
36017 Document {
36018 ///The id of the document to insert as a sync page.
36019 #[serde(rename = "sourceDocId")]
36020 source_doc_id: ::std::string::String,
36021 ///Indicates a page that embeds other content.
36022 #[serde(rename = "type")]
36023 type_: PageCreateContentVariant2Type,
36024 },
36025 }
36026
36027 impl ::std::convert::From<&Self> for PageCreateContentVariant2 {
36028 fn from(value: &PageCreateContentVariant2) -> Self {
36029 value.clone()
36030 }
36031 }
36032
36033 ///Indicates a page that embeds other Coda content.
36034 ///
36035 /// <details><summary>JSON schema</summary>
36036 ///
36037 /// ```json
36038 ///{
36039 /// "description": "Indicates a page that embeds other Coda content.",
36040 /// "type": "string",
36041 /// "enum": [
36042 /// "syncPage"
36043 /// ],
36044 /// "x-tsType": "PageTypeEnum.SyncPage"
36045 ///}
36046 /// ```
36047 /// </details>
36048 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36049 pub enum PageCreateContentVariant2Type {
36050 #[serde(rename = "syncPage")]
36051 SyncPage,
36052 }
36053
36054 impl ::std::convert::From<&Self> for PageCreateContentVariant2Type {
36055 fn from(value: &PageCreateContentVariant2Type) -> Self {
36056 value.clone()
36057 }
36058 }
36059
36060 impl ::std::fmt::Display for PageCreateContentVariant2Type {
36061 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36062 match *self {
36063 Self::SyncPage => f.write_str("syncPage"),
36064 }
36065 }
36066 }
36067
36068 impl ::std::str::FromStr for PageCreateContentVariant2Type {
36069 type Err = self::error::ConversionError;
36070 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36071 match value {
36072 "syncPage" => Ok(Self::SyncPage),
36073 _ => Err("invalid value".into()),
36074 }
36075 }
36076 }
36077
36078 impl ::std::convert::TryFrom<&str> for PageCreateContentVariant2Type {
36079 type Error = self::error::ConversionError;
36080 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36081 value.parse()
36082 }
36083 }
36084
36085 impl ::std::convert::TryFrom<&::std::string::String> for PageCreateContentVariant2Type {
36086 type Error = self::error::ConversionError;
36087 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36088 value.parse()
36089 }
36090 }
36091
36092 impl ::std::convert::TryFrom<::std::string::String> for PageCreateContentVariant2Type {
36093 type Error = self::error::ConversionError;
36094 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36095 value.parse()
36096 }
36097 }
36098
36099 ///`PageCreateResult`
36100 ///
36101 /// <details><summary>JSON schema</summary>
36102 ///
36103 /// ```json
36104 ///{
36105 /// "description": "The result of a page creation.",
36106 /// "allOf": [
36107 /// {
36108 /// "$ref": "#/components/schemas/DocumentMutateResponse"
36109 /// },
36110 /// {
36111 /// "type": "object",
36112 /// "required": [
36113 /// "id"
36114 /// ],
36115 /// "properties": {
36116 /// "id": {
36117 /// "description": "ID of the created page.",
36118 /// "examples": [
36119 /// "canvas-tuVwxYz"
36120 /// ],
36121 /// "type": "string"
36122 /// }
36123 /// },
36124 /// "additionalProperties": false
36125 /// }
36126 /// ],
36127 /// "x-schema-name": "PageCreateResult"
36128 ///}
36129 /// ```
36130 /// </details>
36131 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36132 #[serde(deny_unknown_fields)]
36133 pub enum PageCreateResult {}
36134 impl ::std::convert::From<&Self> for PageCreateResult {
36135 fn from(value: &PageCreateResult) -> Self {
36136 value.clone()
36137 }
36138 }
36139
36140 ///`PageDeleteResult`
36141 ///
36142 /// <details><summary>JSON schema</summary>
36143 ///
36144 /// ```json
36145 ///{
36146 /// "description": "The result of a page deletion.",
36147 /// "allOf": [
36148 /// {
36149 /// "$ref": "#/components/schemas/DocumentMutateResponse"
36150 /// },
36151 /// {
36152 /// "type": "object",
36153 /// "required": [
36154 /// "id"
36155 /// ],
36156 /// "properties": {
36157 /// "id": {
36158 /// "description": "ID of the page to be deleted.",
36159 /// "examples": [
36160 /// "canvas-tuVwxYz"
36161 /// ],
36162 /// "type": "string"
36163 /// }
36164 /// },
36165 /// "additionalProperties": false
36166 /// }
36167 /// ],
36168 /// "x-schema-name": "PageDeleteResult"
36169 ///}
36170 /// ```
36171 /// </details>
36172 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36173 #[serde(deny_unknown_fields)]
36174 pub enum PageDeleteResult {}
36175 impl ::std::convert::From<&Self> for PageDeleteResult {
36176 fn from(value: &PageDeleteResult) -> Self {
36177 value.clone()
36178 }
36179 }
36180
36181 ///Render mode for a page using the Embed page type.
36182 ///
36183 /// <details><summary>JSON schema</summary>
36184 ///
36185 /// ```json
36186 ///{
36187 /// "description": "Render mode for a page using the Embed page type.",
36188 /// "type": "string",
36189 /// "enum": [
36190 /// "compatibility",
36191 /// "standard"
36192 /// ],
36193 /// "x-schema-name": "PageEmbedRenderMethod",
36194 /// "x-tsEnumNames": [
36195 /// "Compatibility",
36196 /// "Standard"
36197 /// ]
36198 ///}
36199 /// ```
36200 /// </details>
36201 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36202 pub enum PageEmbedRenderMethod {
36203 #[serde(rename = "compatibility")]
36204 Compatibility,
36205 #[serde(rename = "standard")]
36206 Standard,
36207 }
36208
36209 impl ::std::convert::From<&Self> for PageEmbedRenderMethod {
36210 fn from(value: &PageEmbedRenderMethod) -> Self {
36211 value.clone()
36212 }
36213 }
36214
36215 impl ::std::fmt::Display for PageEmbedRenderMethod {
36216 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36217 match *self {
36218 Self::Compatibility => f.write_str("compatibility"),
36219 Self::Standard => f.write_str("standard"),
36220 }
36221 }
36222 }
36223
36224 impl ::std::str::FromStr for PageEmbedRenderMethod {
36225 type Err = self::error::ConversionError;
36226 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36227 match value {
36228 "compatibility" => Ok(Self::Compatibility),
36229 "standard" => Ok(Self::Standard),
36230 _ => Err("invalid value".into()),
36231 }
36232 }
36233 }
36234
36235 impl ::std::convert::TryFrom<&str> for PageEmbedRenderMethod {
36236 type Error = self::error::ConversionError;
36237 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36238 value.parse()
36239 }
36240 }
36241
36242 impl ::std::convert::TryFrom<&::std::string::String> for PageEmbedRenderMethod {
36243 type Error = self::error::ConversionError;
36244 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36245 value.parse()
36246 }
36247 }
36248
36249 impl ::std::convert::TryFrom<::std::string::String> for PageEmbedRenderMethod {
36250 type Error = self::error::ConversionError;
36251 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36252 value.parse()
36253 }
36254 }
36255
36256 ///The style of a line element in a canvas page.
36257 ///
36258 /// <details><summary>JSON schema</summary>
36259 ///
36260 /// ```json
36261 ///{
36262 /// "description": "The style of a line element in a canvas page.",
36263 /// "type": "string",
36264 /// "enum": [
36265 /// "blockQuote",
36266 /// "bulletedList",
36267 /// "checkboxList",
36268 /// "code",
36269 /// "collapsibleList",
36270 /// "h1",
36271 /// "h2",
36272 /// "h3",
36273 /// "numberedList",
36274 /// "paragraph",
36275 /// "pullQuote"
36276 /// ],
36277 /// "x-schema-name": "PageLineStyle",
36278 /// "x-tsEnumNames": [
36279 /// "BlockQuote",
36280 /// "BulletedList",
36281 /// "CheckboxList",
36282 /// "Code",
36283 /// "CollapsibleList",
36284 /// "H1",
36285 /// "H2",
36286 /// "H3",
36287 /// "NumberedList",
36288 /// "Paragraph",
36289 /// "PullQuote"
36290 /// ]
36291 ///}
36292 /// ```
36293 /// </details>
36294 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36295 pub enum PageLineStyle {
36296 #[serde(rename = "blockQuote")]
36297 BlockQuote,
36298 #[serde(rename = "bulletedList")]
36299 BulletedList,
36300 #[serde(rename = "checkboxList")]
36301 CheckboxList,
36302 #[serde(rename = "code")]
36303 Code,
36304 #[serde(rename = "collapsibleList")]
36305 CollapsibleList,
36306 #[serde(rename = "h1")]
36307 H1,
36308 #[serde(rename = "h2")]
36309 H2,
36310 #[serde(rename = "h3")]
36311 H3,
36312 #[serde(rename = "numberedList")]
36313 NumberedList,
36314 #[serde(rename = "paragraph")]
36315 Paragraph,
36316 #[serde(rename = "pullQuote")]
36317 PullQuote,
36318 }
36319
36320 impl ::std::convert::From<&Self> for PageLineStyle {
36321 fn from(value: &PageLineStyle) -> Self {
36322 value.clone()
36323 }
36324 }
36325
36326 impl ::std::fmt::Display for PageLineStyle {
36327 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36328 match *self {
36329 Self::BlockQuote => f.write_str("blockQuote"),
36330 Self::BulletedList => f.write_str("bulletedList"),
36331 Self::CheckboxList => f.write_str("checkboxList"),
36332 Self::Code => f.write_str("code"),
36333 Self::CollapsibleList => f.write_str("collapsibleList"),
36334 Self::H1 => f.write_str("h1"),
36335 Self::H2 => f.write_str("h2"),
36336 Self::H3 => f.write_str("h3"),
36337 Self::NumberedList => f.write_str("numberedList"),
36338 Self::Paragraph => f.write_str("paragraph"),
36339 Self::PullQuote => f.write_str("pullQuote"),
36340 }
36341 }
36342 }
36343
36344 impl ::std::str::FromStr for PageLineStyle {
36345 type Err = self::error::ConversionError;
36346 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36347 match value {
36348 "blockQuote" => Ok(Self::BlockQuote),
36349 "bulletedList" => Ok(Self::BulletedList),
36350 "checkboxList" => Ok(Self::CheckboxList),
36351 "code" => Ok(Self::Code),
36352 "collapsibleList" => Ok(Self::CollapsibleList),
36353 "h1" => Ok(Self::H1),
36354 "h2" => Ok(Self::H2),
36355 "h3" => Ok(Self::H3),
36356 "numberedList" => Ok(Self::NumberedList),
36357 "paragraph" => Ok(Self::Paragraph),
36358 "pullQuote" => Ok(Self::PullQuote),
36359 _ => Err("invalid value".into()),
36360 }
36361 }
36362 }
36363
36364 impl ::std::convert::TryFrom<&str> for PageLineStyle {
36365 type Error = self::error::ConversionError;
36366 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36367 value.parse()
36368 }
36369 }
36370
36371 impl ::std::convert::TryFrom<&::std::string::String> for PageLineStyle {
36372 type Error = self::error::ConversionError;
36373 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36374 value.parse()
36375 }
36376 }
36377
36378 impl ::std::convert::TryFrom<::std::string::String> for PageLineStyle {
36379 type Error = self::error::ConversionError;
36380 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36381 value.parse()
36382 }
36383 }
36384
36385 ///List of pages.
36386 ///
36387 /// <details><summary>JSON schema</summary>
36388 ///
36389 /// ```json
36390 ///{
36391 /// "description": "List of pages.",
36392 /// "type": "object",
36393 /// "required": [
36394 /// "items"
36395 /// ],
36396 /// "properties": {
36397 /// "href": {
36398 /// "description": "API link to these results",
36399 /// "examples": [
36400 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages?limit=20"
36401 /// ],
36402 /// "type": "string",
36403 /// "format": "url"
36404 /// },
36405 /// "items": {
36406 /// "type": "array",
36407 /// "items": {
36408 /// "$ref": "#/components/schemas/Page"
36409 /// }
36410 /// },
36411 /// "nextPageLink": {
36412 /// "allOf": [
36413 /// {
36414 /// "$ref": "#/components/schemas/nextPageLink"
36415 /// },
36416 /// {
36417 /// "examples": [
36418 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages?pageToken=eyJsaW1pd"
36419 /// ],
36420 /// "type": "string"
36421 /// }
36422 /// ]
36423 /// },
36424 /// "nextPageToken": {
36425 /// "$ref": "#/components/schemas/nextPageToken"
36426 /// }
36427 /// },
36428 /// "additionalProperties": false,
36429 /// "x-schema-name": "PageList"
36430 ///}
36431 /// ```
36432 /// </details>
36433 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36434 #[serde(deny_unknown_fields)]
36435 pub struct PageList {
36436 ///API link to these results
36437 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36438 pub href: ::std::option::Option<::std::string::String>,
36439 pub items: ::std::vec::Vec<Page>,
36440 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
36441 pub next_page_link: ::std::option::Option<NextPageLink>,
36442 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
36443 pub next_page_token: ::std::option::Option<NextPageToken>,
36444 }
36445
36446 impl ::std::convert::From<&PageList> for PageList {
36447 fn from(value: &PageList) -> Self {
36448 value.clone()
36449 }
36450 }
36451
36452 ///Reference to a page.
36453 ///
36454 /// <details><summary>JSON schema</summary>
36455 ///
36456 /// ```json
36457 ///{
36458 /// "description": "Reference to a page.",
36459 /// "type": "object",
36460 /// "required": [
36461 /// "browserLink",
36462 /// "href",
36463 /// "id",
36464 /// "name",
36465 /// "type"
36466 /// ],
36467 /// "properties": {
36468 /// "browserLink": {
36469 /// "description": "Browser-friendly link to the page.",
36470 /// "examples": [
36471 /// "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO"
36472 /// ],
36473 /// "type": "string",
36474 /// "format": "url"
36475 /// },
36476 /// "href": {
36477 /// "description": "API link to the page.",
36478 /// "examples": [
36479 /// "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO"
36480 /// ],
36481 /// "type": "string",
36482 /// "format": "url"
36483 /// },
36484 /// "id": {
36485 /// "description": "ID of the page.",
36486 /// "examples": [
36487 /// "canvas-IjkLmnO"
36488 /// ],
36489 /// "type": "string"
36490 /// },
36491 /// "name": {
36492 /// "description": "Name of the page.",
36493 /// "examples": [
36494 /// "Launch Status"
36495 /// ],
36496 /// "type": "string"
36497 /// },
36498 /// "type": {
36499 /// "description": "The type of this resource.",
36500 /// "type": "string",
36501 /// "enum": [
36502 /// "page"
36503 /// ],
36504 /// "x-tsType": "Type.Page"
36505 /// }
36506 /// },
36507 /// "additionalProperties": false,
36508 /// "x-schema-name": "PageReference"
36509 ///}
36510 /// ```
36511 /// </details>
36512 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36513 #[serde(deny_unknown_fields)]
36514 pub struct PageReference {
36515 ///Browser-friendly link to the page.
36516 #[serde(rename = "browserLink")]
36517 pub browser_link: ::std::string::String,
36518 ///API link to the page.
36519 pub href: ::std::string::String,
36520 ///ID of the page.
36521 pub id: ::std::string::String,
36522 ///Name of the page.
36523 pub name: ::std::string::String,
36524 ///The type of this resource.
36525 #[serde(rename = "type")]
36526 pub type_: PageReferenceType,
36527 }
36528
36529 impl ::std::convert::From<&PageReference> for PageReference {
36530 fn from(value: &PageReference) -> Self {
36531 value.clone()
36532 }
36533 }
36534
36535 ///The type of this resource.
36536 ///
36537 /// <details><summary>JSON schema</summary>
36538 ///
36539 /// ```json
36540 ///{
36541 /// "description": "The type of this resource.",
36542 /// "type": "string",
36543 /// "enum": [
36544 /// "page"
36545 /// ],
36546 /// "x-tsType": "Type.Page"
36547 ///}
36548 /// ```
36549 /// </details>
36550 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36551 pub enum PageReferenceType {
36552 #[serde(rename = "page")]
36553 Page,
36554 }
36555
36556 impl ::std::convert::From<&Self> for PageReferenceType {
36557 fn from(value: &PageReferenceType) -> Self {
36558 value.clone()
36559 }
36560 }
36561
36562 impl ::std::fmt::Display for PageReferenceType {
36563 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36564 match *self {
36565 Self::Page => f.write_str("page"),
36566 }
36567 }
36568 }
36569
36570 impl ::std::str::FromStr for PageReferenceType {
36571 type Err = self::error::ConversionError;
36572 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36573 match value {
36574 "page" => Ok(Self::Page),
36575 _ => Err("invalid value".into()),
36576 }
36577 }
36578 }
36579
36580 impl ::std::convert::TryFrom<&str> for PageReferenceType {
36581 type Error = self::error::ConversionError;
36582 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36583 value.parse()
36584 }
36585 }
36586
36587 impl ::std::convert::TryFrom<&::std::string::String> for PageReferenceType {
36588 type Error = self::error::ConversionError;
36589 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36590 value.parse()
36591 }
36592 }
36593
36594 impl ::std::convert::TryFrom<::std::string::String> for PageReferenceType {
36595 type Error = self::error::ConversionError;
36596 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36597 value.parse()
36598 }
36599 }
36600
36601 ///The type of this resource.
36602 ///
36603 /// <details><summary>JSON schema</summary>
36604 ///
36605 /// ```json
36606 ///{
36607 /// "description": "The type of this resource.",
36608 /// "type": "string",
36609 /// "enum": [
36610 /// "page"
36611 /// ],
36612 /// "x-tsType": "Type.Page"
36613 ///}
36614 /// ```
36615 /// </details>
36616 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36617 pub enum PageType {
36618 #[serde(rename = "page")]
36619 Page,
36620 }
36621
36622 impl ::std::convert::From<&Self> for PageType {
36623 fn from(value: &PageType) -> Self {
36624 value.clone()
36625 }
36626 }
36627
36628 impl ::std::fmt::Display for PageType {
36629 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36630 match *self {
36631 Self::Page => f.write_str("page"),
36632 }
36633 }
36634 }
36635
36636 impl ::std::str::FromStr for PageType {
36637 type Err = self::error::ConversionError;
36638 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36639 match value {
36640 "page" => Ok(Self::Page),
36641 _ => Err("invalid value".into()),
36642 }
36643 }
36644 }
36645
36646 impl ::std::convert::TryFrom<&str> for PageType {
36647 type Error = self::error::ConversionError;
36648 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36649 value.parse()
36650 }
36651 }
36652
36653 impl ::std::convert::TryFrom<&::std::string::String> for PageType {
36654 type Error = self::error::ConversionError;
36655 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36656 value.parse()
36657 }
36658 }
36659
36660 impl ::std::convert::TryFrom<::std::string::String> for PageType {
36661 type Error = self::error::ConversionError;
36662 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36663 value.parse()
36664 }
36665 }
36666
36667 ///The type of a page in a doc.
36668 ///
36669 /// <details><summary>JSON schema</summary>
36670 ///
36671 /// ```json
36672 ///{
36673 /// "description": "The type of a page in a doc.",
36674 /// "type": "string",
36675 /// "enum": [
36676 /// "canvas",
36677 /// "embed",
36678 /// "syncPage"
36679 /// ],
36680 /// "x-schema-name": "PageTypeEnum",
36681 /// "x-tsEnumNames": [
36682 /// "Canvas",
36683 /// "Embed",
36684 /// "SyncPage"
36685 /// ]
36686 ///}
36687 /// ```
36688 /// </details>
36689 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36690 pub enum PageTypeEnum {
36691 #[serde(rename = "canvas")]
36692 Canvas,
36693 #[serde(rename = "embed")]
36694 Embed,
36695 #[serde(rename = "syncPage")]
36696 SyncPage,
36697 }
36698
36699 impl ::std::convert::From<&Self> for PageTypeEnum {
36700 fn from(value: &PageTypeEnum) -> Self {
36701 value.clone()
36702 }
36703 }
36704
36705 impl ::std::fmt::Display for PageTypeEnum {
36706 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36707 match *self {
36708 Self::Canvas => f.write_str("canvas"),
36709 Self::Embed => f.write_str("embed"),
36710 Self::SyncPage => f.write_str("syncPage"),
36711 }
36712 }
36713 }
36714
36715 impl ::std::str::FromStr for PageTypeEnum {
36716 type Err = self::error::ConversionError;
36717 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36718 match value {
36719 "canvas" => Ok(Self::Canvas),
36720 "embed" => Ok(Self::Embed),
36721 "syncPage" => Ok(Self::SyncPage),
36722 _ => Err("invalid value".into()),
36723 }
36724 }
36725 }
36726
36727 impl ::std::convert::TryFrom<&str> for PageTypeEnum {
36728 type Error = self::error::ConversionError;
36729 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36730 value.parse()
36731 }
36732 }
36733
36734 impl ::std::convert::TryFrom<&::std::string::String> for PageTypeEnum {
36735 type Error = self::error::ConversionError;
36736 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36737 value.parse()
36738 }
36739 }
36740
36741 impl ::std::convert::TryFrom<::std::string::String> for PageTypeEnum {
36742 type Error = self::error::ConversionError;
36743 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36744 value.parse()
36745 }
36746 }
36747
36748 ///Payload for updating a page.
36749 ///
36750 /// <details><summary>JSON schema</summary>
36751 ///
36752 /// ```json
36753 ///{
36754 /// "description": "Payload for updating a page.",
36755 /// "type": "object",
36756 /// "properties": {
36757 /// "contentUpdate": {
36758 /// "allOf": [
36759 /// {
36760 /// "description": "Content with which to update an existing
36761 /// page.",
36762 /// "type": "object",
36763 /// "additionalProperties": false
36764 /// },
36765 /// {
36766 /// "$ref": "#/components/schemas/PageContentUpdate"
36767 /// }
36768 /// ]
36769 /// },
36770 /// "iconName": {
36771 /// "description": "Name of the icon.",
36772 /// "examples": [
36773 /// "rocket"
36774 /// ],
36775 /// "type": "string"
36776 /// },
36777 /// "imageUrl": {
36778 /// "description": "Url of the cover image to use.",
36779 /// "examples": [
36780 /// "https://example.com/image.jpg"
36781 /// ],
36782 /// "type": "string"
36783 /// },
36784 /// "isHidden": {
36785 /// "description": "Whether the page is hidden or not. Note that for
36786 /// pages that cannot be hidden, like the sole top-level page in a doc, this
36787 /// will be ignored.",
36788 /// "examples": [
36789 /// true
36790 /// ],
36791 /// "type": "boolean"
36792 /// },
36793 /// "name": {
36794 /// "description": "Name of the page.",
36795 /// "examples": [
36796 /// "Launch Status"
36797 /// ],
36798 /// "type": "string"
36799 /// },
36800 /// "subtitle": {
36801 /// "description": "Subtitle of the page.",
36802 /// "examples": [
36803 /// "See the status of launch-related tasks."
36804 /// ],
36805 /// "type": "string"
36806 /// }
36807 /// },
36808 /// "additionalProperties": false,
36809 /// "x-schema-name": "PageUpdate"
36810 ///}
36811 /// ```
36812 /// </details>
36813 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36814 #[serde(deny_unknown_fields)]
36815 pub struct PageUpdate {
36816 #[serde(rename = "contentUpdate", default, skip_serializing_if = "::std::option::Option::is_none")]
36817 pub content_update: ::std::option::Option<PageUpdateContentUpdate>,
36818 ///Name of the icon.
36819 #[serde(rename = "iconName", default, skip_serializing_if = "::std::option::Option::is_none")]
36820 pub icon_name: ::std::option::Option<::std::string::String>,
36821 ///Url of the cover image to use.
36822 #[serde(rename = "imageUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
36823 pub image_url: ::std::option::Option<::std::string::String>,
36824 ///Whether the page is hidden or not. Note that for pages that cannot
36825 /// be hidden, like the sole top-level page in a doc, this will be
36826 /// ignored.
36827 #[serde(rename = "isHidden", default, skip_serializing_if = "::std::option::Option::is_none")]
36828 pub is_hidden: ::std::option::Option<bool>,
36829 ///Name of the page.
36830 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36831 pub name: ::std::option::Option<::std::string::String>,
36832 ///Subtitle of the page.
36833 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36834 pub subtitle: ::std::option::Option<::std::string::String>,
36835 }
36836
36837 impl ::std::convert::From<&PageUpdate> for PageUpdate {
36838 fn from(value: &PageUpdate) -> Self {
36839 value.clone()
36840 }
36841 }
36842
36843 impl ::std::default::Default for PageUpdate {
36844 fn default() -> Self {
36845 Self {
36846 content_update: Default::default(),
36847 icon_name: Default::default(),
36848 image_url: Default::default(),
36849 is_hidden: Default::default(),
36850 name: Default::default(),
36851 subtitle: Default::default(),
36852 }
36853 }
36854 }
36855
36856 ///`PageUpdateContentUpdate`
36857 ///
36858 /// <details><summary>JSON schema</summary>
36859 ///
36860 /// ```json
36861 ///{
36862 /// "allOf": [
36863 /// {
36864 /// "description": "Content with which to update an existing page.",
36865 /// "type": "object",
36866 /// "additionalProperties": false
36867 /// },
36868 /// {
36869 /// "$ref": "#/components/schemas/PageContentUpdate"
36870 /// }
36871 /// ]
36872 ///}
36873 /// ```
36874 /// </details>
36875 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36876 #[serde(deny_unknown_fields)]
36877 pub enum PageUpdateContentUpdate {}
36878 impl ::std::convert::From<&Self> for PageUpdateContentUpdate {
36879 fn from(value: &PageUpdateContentUpdate) -> Self {
36880 value.clone()
36881 }
36882 }
36883
36884 ///`PageUpdateResult`
36885 ///
36886 /// <details><summary>JSON schema</summary>
36887 ///
36888 /// ```json
36889 ///{
36890 /// "description": "The result of a page update.",
36891 /// "allOf": [
36892 /// {
36893 /// "$ref": "#/components/schemas/DocumentMutateResponse"
36894 /// },
36895 /// {
36896 /// "type": "object",
36897 /// "required": [
36898 /// "id"
36899 /// ],
36900 /// "properties": {
36901 /// "id": {
36902 /// "description": "ID of the updated page.",
36903 /// "examples": [
36904 /// "canvas-tuVwxYz"
36905 /// ],
36906 /// "type": "string"
36907 /// }
36908 /// },
36909 /// "additionalProperties": false
36910 /// }
36911 /// ],
36912 /// "x-schema-name": "PageUpdateResult"
36913 ///}
36914 /// ```
36915 /// </details>
36916 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36917 #[serde(deny_unknown_fields)]
36918 pub enum PageUpdateResult {}
36919 impl ::std::convert::From<&Self> for PageUpdateResult {
36920 fn from(value: &PageUpdateResult) -> Self {
36921 value.clone()
36922 }
36923 }
36924
36925 ///Workspace feature set excluding free.
36926 ///
36927 /// <details><summary>JSON schema</summary>
36928 ///
36929 /// ```json
36930 ///{
36931 /// "description": "Workspace feature set excluding free.",
36932 /// "type": "string",
36933 /// "enum": [
36934 /// "Pro",
36935 /// "Team",
36936 /// "Enterprise"
36937 /// ],
36938 /// "x-schema-name": "PaidFeatureSet",
36939 /// "x-tsEnumNames": [
36940 /// "Pro",
36941 /// "Team",
36942 /// "Enterprise"
36943 /// ]
36944 ///}
36945 /// ```
36946 /// </details>
36947 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36948 pub enum PaidFeatureSet {
36949 Pro,
36950 Team,
36951 Enterprise,
36952 }
36953
36954 impl ::std::convert::From<&Self> for PaidFeatureSet {
36955 fn from(value: &PaidFeatureSet) -> Self {
36956 value.clone()
36957 }
36958 }
36959
36960 impl ::std::fmt::Display for PaidFeatureSet {
36961 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36962 match *self {
36963 Self::Pro => f.write_str("Pro"),
36964 Self::Team => f.write_str("Team"),
36965 Self::Enterprise => f.write_str("Enterprise"),
36966 }
36967 }
36968 }
36969
36970 impl ::std::str::FromStr for PaidFeatureSet {
36971 type Err = self::error::ConversionError;
36972 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36973 match value {
36974 "Pro" => Ok(Self::Pro),
36975 "Team" => Ok(Self::Team),
36976 "Enterprise" => Ok(Self::Enterprise),
36977 _ => Err("invalid value".into()),
36978 }
36979 }
36980 }
36981
36982 impl ::std::convert::TryFrom<&str> for PaidFeatureSet {
36983 type Error = self::error::ConversionError;
36984 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36985 value.parse()
36986 }
36987 }
36988
36989 impl ::std::convert::TryFrom<&::std::string::String> for PaidFeatureSet {
36990 type Error = self::error::ConversionError;
36991 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36992 value.parse()
36993 }
36994 }
36995
36996 impl ::std::convert::TryFrom<::std::string::String> for PaidFeatureSet {
36997 type Error = self::error::ConversionError;
36998 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
36999 value.parse()
37000 }
37001 }
37002
37003 ///Setting for a specific parameter
37004 ///
37005 /// <details><summary>JSON schema</summary>
37006 ///
37007 /// ```json
37008 ///{
37009 /// "description": "Setting for a specific parameter",
37010 /// "type": "object",
37011 /// "required": [
37012 /// "allowed",
37013 /// "default"
37014 /// ],
37015 /// "properties": {
37016 /// "allowed": {
37017 /// "type": "array",
37018 /// "items": {
37019 /// "type": "string"
37020 /// }
37021 /// },
37022 /// "default": {
37023 /// "description": "Default value for the parameter",
37024 /// "type": "string"
37025 /// }
37026 /// },
37027 /// "additionalProperties": false,
37028 /// "x-schema-name": "ParameterSetting"
37029 ///}
37030 /// ```
37031 /// </details>
37032 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37033 #[serde(deny_unknown_fields)]
37034 pub struct ParameterSetting {
37035 pub allowed: ::std::vec::Vec<::std::string::String>,
37036 ///Default value for the parameter
37037 pub default: ::std::string::String,
37038 }
37039
37040 impl ::std::convert::From<&ParameterSetting> for ParameterSetting {
37041 fn from(value: &ParameterSetting) -> Self {
37042 value.clone()
37043 }
37044 }
37045
37046 ///The request to patch pack system connection credentials.
37047 ///
37048 /// <details><summary>JSON schema</summary>
37049 ///
37050 /// ```json
37051 ///{
37052 /// "description": "The request to patch pack system connection
37053 /// credentials.",
37054 /// "oneOf": [
37055 /// {
37056 /// "$ref": "#/components/schemas/PackConnectionHeaderPatch"
37057 /// },
37058 /// {
37059 /// "$ref": "#/components/schemas/PackConnectionMultiHeaderPatch"
37060 /// },
37061 /// {
37062 /// "$ref": "#/components/schemas/PackConnectionUrlParamPatch"
37063 /// },
37064 /// {
37065 /// "$ref": "#/components/schemas/PackConnectionHttpBasicPatch"
37066 /// },
37067 /// {
37068 /// "$ref": "#/components/schemas/PackConnectionCustomPatch"
37069 /// },
37070 /// {
37071 /// "$ref":
37072 /// "#/components/schemas/PackConnectionOauth2ClientCredentialsPatch"
37073 /// },
37074 /// {
37075 /// "$ref":
37076 /// "#/components/schemas/PackConnectionGoogleServiceAccountPatch"
37077 /// },
37078 /// {
37079 /// "$ref": "#/components/schemas/PackConnectionAwsAssumeRolePatch"
37080 /// },
37081 /// {
37082 /// "$ref": "#/components/schemas/PackConnectionAwsAccessKeyPatch"
37083 /// }
37084 /// ],
37085 /// "x-schema-name": "PatchPackSystemConnectionRequest"
37086 ///}
37087 /// ```
37088 /// </details>
37089 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37090 #[serde(untagged)]
37091 pub enum PatchPackSystemConnectionRequest {
37092 HeaderPatch(PackConnectionHeaderPatch),
37093 MultiHeaderPatch(PackConnectionMultiHeaderPatch),
37094 UrlParamPatch(PackConnectionUrlParamPatch),
37095 HttpBasicPatch(PackConnectionHttpBasicPatch),
37096 CustomPatch(PackConnectionCustomPatch),
37097 Oauth2ClientCredentialsPatch(PackConnectionOauth2ClientCredentialsPatch),
37098 GoogleServiceAccountPatch(PackConnectionGoogleServiceAccountPatch),
37099 AwsAssumeRolePatch(PackConnectionAwsAssumeRolePatch),
37100 AwsAccessKeyPatch(PackConnectionAwsAccessKeyPatch),
37101 }
37102
37103 impl ::std::convert::From<&Self> for PatchPackSystemConnectionRequest {
37104 fn from(value: &PatchPackSystemConnectionRequest) -> Self {
37105 value.clone()
37106 }
37107 }
37108
37109 impl ::std::convert::From<PackConnectionHeaderPatch> for PatchPackSystemConnectionRequest {
37110 fn from(value: PackConnectionHeaderPatch) -> Self {
37111 Self::HeaderPatch(value)
37112 }
37113 }
37114
37115 impl ::std::convert::From<PackConnectionMultiHeaderPatch> for PatchPackSystemConnectionRequest {
37116 fn from(value: PackConnectionMultiHeaderPatch) -> Self {
37117 Self::MultiHeaderPatch(value)
37118 }
37119 }
37120
37121 impl ::std::convert::From<PackConnectionUrlParamPatch> for PatchPackSystemConnectionRequest {
37122 fn from(value: PackConnectionUrlParamPatch) -> Self {
37123 Self::UrlParamPatch(value)
37124 }
37125 }
37126
37127 impl ::std::convert::From<PackConnectionHttpBasicPatch> for PatchPackSystemConnectionRequest {
37128 fn from(value: PackConnectionHttpBasicPatch) -> Self {
37129 Self::HttpBasicPatch(value)
37130 }
37131 }
37132
37133 impl ::std::convert::From<PackConnectionCustomPatch> for PatchPackSystemConnectionRequest {
37134 fn from(value: PackConnectionCustomPatch) -> Self {
37135 Self::CustomPatch(value)
37136 }
37137 }
37138
37139 impl ::std::convert::From<PackConnectionOauth2ClientCredentialsPatch> for PatchPackSystemConnectionRequest {
37140 fn from(value: PackConnectionOauth2ClientCredentialsPatch) -> Self {
37141 Self::Oauth2ClientCredentialsPatch(value)
37142 }
37143 }
37144
37145 impl ::std::convert::From<PackConnectionGoogleServiceAccountPatch> for PatchPackSystemConnectionRequest {
37146 fn from(value: PackConnectionGoogleServiceAccountPatch) -> Self {
37147 Self::GoogleServiceAccountPatch(value)
37148 }
37149 }
37150
37151 impl ::std::convert::From<PackConnectionAwsAssumeRolePatch> for PatchPackSystemConnectionRequest {
37152 fn from(value: PackConnectionAwsAssumeRolePatch) -> Self {
37153 Self::AwsAssumeRolePatch(value)
37154 }
37155 }
37156
37157 impl ::std::convert::From<PackConnectionAwsAccessKeyPatch> for PatchPackSystemConnectionRequest {
37158 fn from(value: PackConnectionAwsAccessKeyPatch) -> Self {
37159 Self::AwsAccessKeyPatch(value)
37160 }
37161 }
37162
37163 ///An HTTP error resulting from an unsuccessful request.
37164 ///
37165 /// <details><summary>JSON schema</summary>
37166 ///
37167 /// ```json
37168 ///{
37169 /// "description": "An HTTP error resulting from an unsuccessful request.",
37170 /// "required": [
37171 /// "message",
37172 /// "statusCode",
37173 /// "statusMessage"
37174 /// ],
37175 /// "properties": {
37176 /// "codaDetail": {
37177 /// "description": "Detail about why this request was rejected.",
37178 /// "type": "object",
37179 /// "properties": {
37180 /// "validationErrors": {
37181 /// "type": "array",
37182 /// "items": {
37183 /// "$ref": "#/components/schemas/ValidationError"
37184 /// }
37185 /// }
37186 /// },
37187 /// "additionalProperties": false
37188 /// },
37189 /// "message": {
37190 /// "description": "Any additional context on the error, or the same as
37191 /// `statusMessage` otherwise.",
37192 /// "examples": [
37193 /// "Bad Request"
37194 /// ],
37195 /// "type": "string"
37196 /// },
37197 /// "statusCode": {
37198 /// "description": "HTTP status code of the error.",
37199 /// "examples": [
37200 /// 400
37201 /// ],
37202 /// "type": "number"
37203 /// },
37204 /// "statusMessage": {
37205 /// "description": "HTTP status message of the error.",
37206 /// "examples": [
37207 /// "Bad Request"
37208 /// ],
37209 /// "type": "string"
37210 /// }
37211 /// },
37212 /// "additionalProperties": false
37213 ///}
37214 /// ```
37215 /// </details>
37216 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37217 #[serde(deny_unknown_fields)]
37218 pub struct PatchPackSystemConnectionResponse {
37219 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
37220 pub coda_detail: ::std::option::Option<PatchPackSystemConnectionResponseCodaDetail>,
37221 ///Any additional context on the error, or the same as `statusMessage`
37222 /// otherwise.
37223 pub message: ::std::string::String,
37224 #[serde(rename = "statusCode")]
37225 pub status_code: f64,
37226 ///HTTP status message of the error.
37227 #[serde(rename = "statusMessage")]
37228 pub status_message: ::std::string::String,
37229 }
37230
37231 impl ::std::convert::From<&PatchPackSystemConnectionResponse> for PatchPackSystemConnectionResponse {
37232 fn from(value: &PatchPackSystemConnectionResponse) -> Self {
37233 value.clone()
37234 }
37235 }
37236
37237 ///Detail about why this request was rejected.
37238 ///
37239 /// <details><summary>JSON schema</summary>
37240 ///
37241 /// ```json
37242 ///{
37243 /// "description": "Detail about why this request was rejected.",
37244 /// "type": "object",
37245 /// "properties": {
37246 /// "validationErrors": {
37247 /// "type": "array",
37248 /// "items": {
37249 /// "$ref": "#/components/schemas/ValidationError"
37250 /// }
37251 /// }
37252 /// },
37253 /// "additionalProperties": false
37254 ///}
37255 /// ```
37256 /// </details>
37257 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37258 #[serde(deny_unknown_fields)]
37259 pub struct PatchPackSystemConnectionResponseCodaDetail {
37260 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
37261 pub validation_errors: ::std::vec::Vec<ValidationError>,
37262 }
37263
37264 impl ::std::convert::From<&PatchPackSystemConnectionResponseCodaDetail> for PatchPackSystemConnectionResponseCodaDetail {
37265 fn from(value: &PatchPackSystemConnectionResponseCodaDetail) -> Self {
37266 value.clone()
37267 }
37268 }
37269
37270 impl ::std::default::Default for PatchPackSystemConnectionResponseCodaDetail {
37271 fn default() -> Self {
37272 Self {
37273 validation_errors: Default::default(),
37274 }
37275 }
37276 }
37277
37278 ///A specific permission granted to a principal.
37279 ///
37280 /// <details><summary>JSON schema</summary>
37281 ///
37282 /// ```json
37283 ///{
37284 /// "description": "A specific permission granted to a principal.",
37285 /// "type": "object",
37286 /// "required": [
37287 /// "access",
37288 /// "id",
37289 /// "principal"
37290 /// ],
37291 /// "properties": {
37292 /// "access": {
37293 /// "$ref": "#/components/schemas/AccessType"
37294 /// },
37295 /// "id": {
37296 /// "description": "Id for the Permission",
37297 /// "type": "string"
37298 /// },
37299 /// "principal": {
37300 /// "$ref": "#/components/schemas/Principal"
37301 /// }
37302 /// },
37303 /// "additionalProperties": false,
37304 /// "x-schema-name": "Permission"
37305 ///}
37306 /// ```
37307 /// </details>
37308 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37309 #[serde(deny_unknown_fields)]
37310 pub struct Permission {
37311 pub access: AccessType,
37312 ///Id for the Permission
37313 pub id: ::std::string::String,
37314 pub principal: Principal,
37315 }
37316
37317 impl ::std::convert::From<&Permission> for Permission {
37318 fn from(value: &Permission) -> Self {
37319 value.clone()
37320 }
37321 }
37322
37323 ///`PersonValue`
37324 ///
37325 /// <details><summary>JSON schema</summary>
37326 ///
37327 /// ```json
37328 ///{
37329 /// "description": "A named reference to a person, where the person is
37330 /// identified by email address.",
37331 /// "allOf": [
37332 /// {
37333 /// "$ref": "#/components/schemas/LinkedDataObject"
37334 /// },
37335 /// {
37336 /// "type": "object",
37337 /// "required": [
37338 /// "@type",
37339 /// "name"
37340 /// ],
37341 /// "properties": {
37342 /// "@type": {
37343 /// "type": "string",
37344 /// "enum": [
37345 /// "Person"
37346 /// ],
37347 /// "x-tsType": "LinkedDataType.Person"
37348 /// },
37349 /// "email": {
37350 /// "description": "The email address of the person.",
37351 /// "examples": [
37352 /// "alice@atkins.com"
37353 /// ],
37354 /// "type": "string"
37355 /// },
37356 /// "name": {
37357 /// "description": "The full name of the person.",
37358 /// "examples": [
37359 /// "Alice Atkins"
37360 /// ],
37361 /// "type": "string"
37362 /// }
37363 /// },
37364 /// "additionalProperties": false
37365 /// }
37366 /// ],
37367 /// "x-schema-name": "PersonValue"
37368 ///}
37369 /// ```
37370 /// </details>
37371 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37372 #[serde(deny_unknown_fields)]
37373 pub enum PersonValue {}
37374 impl ::std::convert::From<&Self> for PersonValue {
37375 fn from(value: &PersonValue) -> Self {
37376 value.clone()
37377 }
37378 }
37379
37380 ///Metadata about a principal.
37381 ///
37382 /// <details><summary>JSON schema</summary>
37383 ///
37384 /// ```json
37385 ///{
37386 /// "description": "Metadata about a principal.",
37387 /// "oneOf": [
37388 /// {
37389 /// "$ref": "#/components/schemas/EmailPrincipal"
37390 /// },
37391 /// {
37392 /// "$ref": "#/components/schemas/GroupPrincipal"
37393 /// },
37394 /// {
37395 /// "$ref": "#/components/schemas/DomainPrincipal"
37396 /// },
37397 /// {
37398 /// "$ref": "#/components/schemas/WorkspacePrincipal"
37399 /// },
37400 /// {
37401 /// "$ref": "#/components/schemas/AnyonePrincipal"
37402 /// },
37403 /// {
37404 /// "$ref": "#/components/schemas/InternalAccessPrincipal"
37405 /// }
37406 /// ],
37407 /// "x-schema-name": "Principal"
37408 ///}
37409 /// ```
37410 /// </details>
37411 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37412 #[serde(untagged)]
37413 pub enum Principal {
37414 EmailPrincipal(EmailPrincipal),
37415 GroupPrincipal(GroupPrincipal),
37416 DomainPrincipal(DomainPrincipal),
37417 WorkspacePrincipal(WorkspacePrincipal),
37418 AnyonePrincipal(AnyonePrincipal),
37419 InternalAccessPrincipal(InternalAccessPrincipal),
37420 }
37421
37422 impl ::std::convert::From<&Self> for Principal {
37423 fn from(value: &Principal) -> Self {
37424 value.clone()
37425 }
37426 }
37427
37428 impl ::std::convert::From<EmailPrincipal> for Principal {
37429 fn from(value: EmailPrincipal) -> Self {
37430 Self::EmailPrincipal(value)
37431 }
37432 }
37433
37434 impl ::std::convert::From<GroupPrincipal> for Principal {
37435 fn from(value: GroupPrincipal) -> Self {
37436 Self::GroupPrincipal(value)
37437 }
37438 }
37439
37440 impl ::std::convert::From<DomainPrincipal> for Principal {
37441 fn from(value: DomainPrincipal) -> Self {
37442 Self::DomainPrincipal(value)
37443 }
37444 }
37445
37446 impl ::std::convert::From<WorkspacePrincipal> for Principal {
37447 fn from(value: WorkspacePrincipal) -> Self {
37448 Self::WorkspacePrincipal(value)
37449 }
37450 }
37451
37452 impl ::std::convert::From<AnyonePrincipal> for Principal {
37453 fn from(value: AnyonePrincipal) -> Self {
37454 Self::AnyonePrincipal(value)
37455 }
37456 }
37457
37458 impl ::std::convert::From<InternalAccessPrincipal> for Principal {
37459 fn from(value: InternalAccessPrincipal) -> Self {
37460 Self::InternalAccessPrincipal(value)
37461 }
37462 }
37463
37464 ///Type of principal.
37465 ///
37466 /// <details><summary>JSON schema</summary>
37467 ///
37468 /// ```json
37469 ///{
37470 /// "description": "Type of principal.",
37471 /// "type": "string",
37472 /// "enum": [
37473 /// "email",
37474 /// "group",
37475 /// "domain",
37476 /// "workspace",
37477 /// "anyone",
37478 /// "internalAccess"
37479 /// ],
37480 /// "x-schema-name": "PrincipalType",
37481 /// "x-tsEnumNames": [
37482 /// "Email",
37483 /// "Group",
37484 /// "Domain",
37485 /// "Workspace",
37486 /// "Anyone",
37487 /// "InternalAccess"
37488 /// ]
37489 ///}
37490 /// ```
37491 /// </details>
37492 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37493 pub enum PrincipalType {
37494 #[serde(rename = "email")]
37495 Email,
37496 #[serde(rename = "group")]
37497 Group,
37498 #[serde(rename = "domain")]
37499 Domain,
37500 #[serde(rename = "workspace")]
37501 Workspace,
37502 #[serde(rename = "anyone")]
37503 Anyone,
37504 #[serde(rename = "internalAccess")]
37505 InternalAccess,
37506 }
37507
37508 impl ::std::convert::From<&Self> for PrincipalType {
37509 fn from(value: &PrincipalType) -> Self {
37510 value.clone()
37511 }
37512 }
37513
37514 impl ::std::fmt::Display for PrincipalType {
37515 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37516 match *self {
37517 Self::Email => f.write_str("email"),
37518 Self::Group => f.write_str("group"),
37519 Self::Domain => f.write_str("domain"),
37520 Self::Workspace => f.write_str("workspace"),
37521 Self::Anyone => f.write_str("anyone"),
37522 Self::InternalAccess => f.write_str("internalAccess"),
37523 }
37524 }
37525 }
37526
37527 impl ::std::str::FromStr for PrincipalType {
37528 type Err = self::error::ConversionError;
37529 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37530 match value {
37531 "email" => Ok(Self::Email),
37532 "group" => Ok(Self::Group),
37533 "domain" => Ok(Self::Domain),
37534 "workspace" => Ok(Self::Workspace),
37535 "anyone" => Ok(Self::Anyone),
37536 "internalAccess" => Ok(Self::InternalAccess),
37537 _ => Err("invalid value".into()),
37538 }
37539 }
37540 }
37541
37542 impl ::std::convert::TryFrom<&str> for PrincipalType {
37543 type Error = self::error::ConversionError;
37544 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37545 value.parse()
37546 }
37547 }
37548
37549 impl ::std::convert::TryFrom<&::std::string::String> for PrincipalType {
37550 type Error = self::error::ConversionError;
37551 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
37552 value.parse()
37553 }
37554 }
37555
37556 impl ::std::convert::TryFrom<::std::string::String> for PrincipalType {
37557 type Error = self::error::ConversionError;
37558 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
37559 value.parse()
37560 }
37561 }
37562
37563 ///An HTTP error resulting from an unsuccessful request.
37564 ///
37565 /// <details><summary>JSON schema</summary>
37566 ///
37567 /// ```json
37568 ///{
37569 /// "description": "An HTTP error resulting from an unsuccessful request.",
37570 /// "required": [
37571 /// "message",
37572 /// "statusCode",
37573 /// "statusMessage"
37574 /// ],
37575 /// "properties": {
37576 /// "message": {
37577 /// "description": "Any additional context on the error, or the same as
37578 /// `statusMessage` otherwise.",
37579 /// "examples": [
37580 /// "Bad Request"
37581 /// ],
37582 /// "type": "string"
37583 /// },
37584 /// "statusCode": {
37585 /// "description": "HTTP status code of the error.",
37586 /// "examples": [
37587 /// 400
37588 /// ],
37589 /// "type": "number"
37590 /// },
37591 /// "statusMessage": {
37592 /// "description": "HTTP status message of the error.",
37593 /// "examples": [
37594 /// "Bad Request"
37595 /// ],
37596 /// "type": "string"
37597 /// }
37598 /// },
37599 /// "additionalProperties": false
37600 ///}
37601 /// ```
37602 /// </details>
37603 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37604 #[serde(deny_unknown_fields)]
37605 pub struct PublishDocResponse {
37606 ///Any additional context on the error, or the same as `statusMessage`
37607 /// otherwise.
37608 pub message: ::std::string::String,
37609 #[serde(rename = "statusCode")]
37610 pub status_code: f64,
37611 ///HTTP status message of the error.
37612 #[serde(rename = "statusMessage")]
37613 pub status_message: ::std::string::String,
37614 }
37615
37616 impl ::std::convert::From<&PublishDocResponse> for PublishDocResponse {
37617 fn from(value: &PublishDocResponse) -> Self {
37618 value.clone()
37619 }
37620 }
37621
37622 ///`PublishResult`
37623 ///
37624 /// <details><summary>JSON schema</summary>
37625 ///
37626 /// ```json
37627 ///{
37628 /// "description": "The result of publishing a doc.",
37629 /// "allOf": [
37630 /// {
37631 /// "$ref": "#/components/schemas/DocumentMutateResponse"
37632 /// },
37633 /// {
37634 /// "type": "object",
37635 /// "additionalProperties": false
37636 /// }
37637 /// ],
37638 /// "x-schema-name": "PublishResult"
37639 ///}
37640 /// ```
37641 /// </details>
37642 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37643 #[serde(deny_unknown_fields)]
37644 pub enum PublishResult {}
37645 impl ::std::convert::From<&Self> for PublishResult {
37646 fn from(value: &PublishResult) -> Self {
37647 value.clone()
37648 }
37649 }
37650
37651 ///Info about a publishing category
37652 ///
37653 /// <details><summary>JSON schema</summary>
37654 ///
37655 /// ```json
37656 ///{
37657 /// "description": "Info about a publishing category",
37658 /// "type": "object",
37659 /// "required": [
37660 /// "categoryId",
37661 /// "categoryName"
37662 /// ],
37663 /// "properties": {
37664 /// "categoryId": {
37665 /// "description": "The ID for this category.",
37666 /// "examples": [
37667 /// "aBCdEFg"
37668 /// ],
37669 /// "type": "string"
37670 /// },
37671 /// "categoryName": {
37672 /// "description": "The name of the category.",
37673 /// "examples": [
37674 /// "Project management"
37675 /// ],
37676 /// "type": "string"
37677 /// },
37678 /// "categorySlug": {
37679 /// "description": "The URL identifier of the category.",
37680 /// "examples": [
37681 /// "project-management"
37682 /// ],
37683 /// "type": "string"
37684 /// }
37685 /// },
37686 /// "additionalProperties": false,
37687 /// "x-schema-name": "PublishingCategory"
37688 ///}
37689 /// ```
37690 /// </details>
37691 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37692 #[serde(deny_unknown_fields)]
37693 pub struct PublishingCategory {
37694 ///The ID for this category.
37695 #[serde(rename = "categoryId")]
37696 pub category_id: ::std::string::String,
37697 ///The name of the category.
37698 #[serde(rename = "categoryName")]
37699 pub category_name: ::std::string::String,
37700 ///The URL identifier of the category.
37701 #[serde(rename = "categorySlug", default, skip_serializing_if = "::std::option::Option::is_none")]
37702 pub category_slug: ::std::option::Option<::std::string::String>,
37703 }
37704
37705 impl ::std::convert::From<&PublishingCategory> for PublishingCategory {
37706 fn from(value: &PublishingCategory) -> Self {
37707 value.clone()
37708 }
37709 }
37710
37711 ///An HTTP error resulting from an unsuccessful request.
37712 ///
37713 /// <details><summary>JSON schema</summary>
37714 ///
37715 /// ```json
37716 ///{
37717 /// "description": "An HTTP error resulting from an unsuccessful request.",
37718 /// "required": [
37719 /// "message",
37720 /// "statusCode",
37721 /// "statusMessage"
37722 /// ],
37723 /// "properties": {
37724 /// "message": {
37725 /// "description": "Any additional context on the error, or the same as
37726 /// `statusMessage` otherwise.",
37727 /// "examples": [
37728 /// "Bad Request"
37729 /// ],
37730 /// "type": "string"
37731 /// },
37732 /// "statusCode": {
37733 /// "description": "HTTP status code of the error.",
37734 /// "examples": [
37735 /// 400
37736 /// ],
37737 /// "type": "number"
37738 /// },
37739 /// "statusMessage": {
37740 /// "description": "HTTP status message of the error.",
37741 /// "examples": [
37742 /// "Bad Request"
37743 /// ],
37744 /// "type": "string"
37745 /// }
37746 /// },
37747 /// "additionalProperties": false
37748 ///}
37749 /// ```
37750 /// </details>
37751 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37752 #[serde(deny_unknown_fields)]
37753 pub struct PushButtonResponse {
37754 ///Any additional context on the error, or the same as `statusMessage`
37755 /// otherwise.
37756 pub message: ::std::string::String,
37757 #[serde(rename = "statusCode")]
37758 pub status_code: f64,
37759 ///HTTP status message of the error.
37760 #[serde(rename = "statusMessage")]
37761 pub status_message: ::std::string::String,
37762 }
37763
37764 impl ::std::convert::From<&PushButtonResponse> for PushButtonResponse {
37765 fn from(value: &PushButtonResponse) -> Self {
37766 value.clone()
37767 }
37768 }
37769
37770 ///`PushButtonResult`
37771 ///
37772 /// <details><summary>JSON schema</summary>
37773 ///
37774 /// ```json
37775 ///{
37776 /// "description": "The result of a push button.",
37777 /// "allOf": [
37778 /// {
37779 /// "$ref": "#/components/schemas/DocumentMutateResponse"
37780 /// },
37781 /// {
37782 /// "type": "object",
37783 /// "required": [
37784 /// "columnId",
37785 /// "rowId"
37786 /// ],
37787 /// "properties": {
37788 /// "columnId": {
37789 /// "description": "ID of the column where the button exists.",
37790 /// "examples": [
37791 /// "i-tuVwxYz"
37792 /// ],
37793 /// "type": "string"
37794 /// },
37795 /// "rowId": {
37796 /// "description": "ID of the row where the button exists.",
37797 /// "examples": [
37798 /// "i-tuVwxYz"
37799 /// ],
37800 /// "type": "string"
37801 /// }
37802 /// },
37803 /// "additionalProperties": false
37804 /// }
37805 /// ],
37806 /// "x-schema-name": "PushButtonResult"
37807 ///}
37808 /// ```
37809 /// </details>
37810 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37811 #[serde(deny_unknown_fields)]
37812 pub struct PushButtonResult {
37813 #[serde(rename = "rowId")]
37814 row_id: String,
37815 #[serde(rename = "columnId")]
37816 column_id: String,
37817 #[serde(rename = "requestId")]
37818 request_id: String,
37819 }
37820 impl ::std::convert::From<&Self> for PushButtonResult {
37821 fn from(value: &PushButtonResult) -> Self {
37822 value.clone()
37823 }
37824 }
37825
37826 ///`ReferenceColumnFormat`
37827 ///
37828 /// <details><summary>JSON schema</summary>
37829 ///
37830 /// ```json
37831 ///{
37832 /// "description": "Format of a column that refers to another table.",
37833 /// "allOf": [
37834 /// {
37835 /// "$ref": "#/components/schemas/SimpleColumnFormat"
37836 /// },
37837 /// {
37838 /// "type": "object",
37839 /// "required": [
37840 /// "table"
37841 /// ],
37842 /// "properties": {
37843 /// "table": {
37844 /// "allOf": [
37845 /// {
37846 /// "description": "Reference to the table this column refers
37847 /// to, if applicable.",
37848 /// "additionalProperties": false
37849 /// },
37850 /// {
37851 /// "$ref": "#/components/schemas/TableReference"
37852 /// }
37853 /// ]
37854 /// }
37855 /// },
37856 /// "additionalProperties": false
37857 /// }
37858 /// ],
37859 /// "x-schema-name": "ReferenceColumnFormat"
37860 ///}
37861 /// ```
37862 /// </details>
37863 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37864 #[serde(deny_unknown_fields)]
37865 pub enum ReferenceColumnFormat {}
37866 impl ::std::convert::From<&Self> for ReferenceColumnFormat {
37867 fn from(value: &ReferenceColumnFormat) -> Self {
37868 value.clone()
37869 }
37870 }
37871
37872 ///Payload for registering a Pack version.
37873 ///
37874 /// <details><summary>JSON schema</summary>
37875 ///
37876 /// ```json
37877 ///{
37878 /// "description": "Payload for registering a Pack version.",
37879 /// "type": "object",
37880 /// "required": [
37881 /// "bundleHash"
37882 /// ],
37883 /// "properties": {
37884 /// "bundleHash": {
37885 /// "description": "The SHA-256 hash of the file to be uploaded.",
37886 /// "examples": [
37887 /// "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"
37888 /// ],
37889 /// "type": "string"
37890 /// }
37891 /// },
37892 /// "additionalProperties": false,
37893 /// "x-schema-name": "RegisterPackVersionRequest"
37894 ///}
37895 /// ```
37896 /// </details>
37897 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37898 #[serde(deny_unknown_fields)]
37899 pub struct RegisterPackVersionRequest {
37900 ///The SHA-256 hash of the file to be uploaded.
37901 #[serde(rename = "bundleHash")]
37902 pub bundle_hash: ::std::string::String,
37903 }
37904
37905 impl ::std::convert::From<&RegisterPackVersionRequest> for RegisterPackVersionRequest {
37906 fn from(value: &RegisterPackVersionRequest) -> Self {
37907 value.clone()
37908 }
37909 }
37910
37911 ///An HTTP error resulting from an unsuccessful request.
37912 ///
37913 /// <details><summary>JSON schema</summary>
37914 ///
37915 /// ```json
37916 ///{
37917 /// "description": "An HTTP error resulting from an unsuccessful request.",
37918 /// "required": [
37919 /// "message",
37920 /// "statusCode",
37921 /// "statusMessage"
37922 /// ],
37923 /// "properties": {
37924 /// "message": {
37925 /// "description": "Any additional context on the error, or the same as
37926 /// `statusMessage` otherwise.",
37927 /// "examples": [
37928 /// "Bad Request"
37929 /// ],
37930 /// "type": "string"
37931 /// },
37932 /// "statusCode": {
37933 /// "description": "HTTP status code of the error.",
37934 /// "examples": [
37935 /// 400
37936 /// ],
37937 /// "type": "number"
37938 /// },
37939 /// "statusMessage": {
37940 /// "description": "HTTP status message of the error.",
37941 /// "examples": [
37942 /// "Bad Request"
37943 /// ],
37944 /// "type": "string"
37945 /// }
37946 /// },
37947 /// "additionalProperties": false
37948 ///}
37949 /// ```
37950 /// </details>
37951 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37952 #[serde(deny_unknown_fields)]
37953 pub struct RegisterPackVersionResponse {
37954 ///Any additional context on the error, or the same as `statusMessage`
37955 /// otherwise.
37956 pub message: ::std::string::String,
37957 #[serde(rename = "statusCode")]
37958 pub status_code: f64,
37959 ///HTTP status message of the error.
37960 #[serde(rename = "statusMessage")]
37961 pub status_message: ::std::string::String,
37962 }
37963
37964 impl ::std::convert::From<&RegisterPackVersionResponse> for RegisterPackVersionResponse {
37965 fn from(value: &RegisterPackVersionResponse) -> Self {
37966 value.clone()
37967 }
37968 }
37969
37970 ///An HTTP error resulting from an unsuccessful request.
37971 ///
37972 /// <details><summary>JSON schema</summary>
37973 ///
37974 /// ```json
37975 ///{
37976 /// "description": "An HTTP error resulting from an unsuccessful request.",
37977 /// "required": [
37978 /// "message",
37979 /// "statusCode",
37980 /// "statusMessage"
37981 /// ],
37982 /// "properties": {
37983 /// "codaDetail": {
37984 /// "description": "Detail about why this request was rejected.",
37985 /// "type": "object",
37986 /// "properties": {
37987 /// "validationErrors": {
37988 /// "type": "array",
37989 /// "items": {
37990 /// "$ref": "#/components/schemas/ValidationError"
37991 /// }
37992 /// }
37993 /// },
37994 /// "additionalProperties": false
37995 /// },
37996 /// "message": {
37997 /// "description": "Any additional context on the error, or the same as
37998 /// `statusMessage` otherwise.",
37999 /// "examples": [
38000 /// "Bad Request"
38001 /// ],
38002 /// "type": "string"
38003 /// },
38004 /// "statusCode": {
38005 /// "description": "HTTP status code of the error.",
38006 /// "examples": [
38007 /// 400
38008 /// ],
38009 /// "type": "number"
38010 /// },
38011 /// "statusMessage": {
38012 /// "description": "HTTP status message of the error.",
38013 /// "examples": [
38014 /// "Bad Request"
38015 /// ],
38016 /// "type": "string"
38017 /// }
38018 /// },
38019 /// "additionalProperties": false
38020 ///}
38021 /// ```
38022 /// </details>
38023 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38024 #[serde(deny_unknown_fields)]
38025 pub struct ReplyToPackInvitationResponse {
38026 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
38027 pub coda_detail: ::std::option::Option<ReplyToPackInvitationResponseCodaDetail>,
38028 ///Any additional context on the error, or the same as `statusMessage`
38029 /// otherwise.
38030 pub message: ::std::string::String,
38031 #[serde(rename = "statusCode")]
38032 pub status_code: f64,
38033 ///HTTP status message of the error.
38034 #[serde(rename = "statusMessage")]
38035 pub status_message: ::std::string::String,
38036 }
38037
38038 impl ::std::convert::From<&ReplyToPackInvitationResponse> for ReplyToPackInvitationResponse {
38039 fn from(value: &ReplyToPackInvitationResponse) -> Self {
38040 value.clone()
38041 }
38042 }
38043
38044 ///Detail about why this request was rejected.
38045 ///
38046 /// <details><summary>JSON schema</summary>
38047 ///
38048 /// ```json
38049 ///{
38050 /// "description": "Detail about why this request was rejected.",
38051 /// "type": "object",
38052 /// "properties": {
38053 /// "validationErrors": {
38054 /// "type": "array",
38055 /// "items": {
38056 /// "$ref": "#/components/schemas/ValidationError"
38057 /// }
38058 /// }
38059 /// },
38060 /// "additionalProperties": false
38061 ///}
38062 /// ```
38063 /// </details>
38064 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38065 #[serde(deny_unknown_fields)]
38066 pub struct ReplyToPackInvitationResponseCodaDetail {
38067 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
38068 pub validation_errors: ::std::vec::Vec<ValidationError>,
38069 }
38070
38071 impl ::std::convert::From<&ReplyToPackInvitationResponseCodaDetail> for ReplyToPackInvitationResponseCodaDetail {
38072 fn from(value: &ReplyToPackInvitationResponseCodaDetail) -> Self {
38073 value.clone()
38074 }
38075 }
38076
38077 impl ::std::default::Default for ReplyToPackInvitationResponseCodaDetail {
38078 fn default() -> Self {
38079 Self {
38080 validation_errors: Default::default(),
38081 }
38082 }
38083 }
38084
38085 ///An HTTP error resulting from an unsuccessful request.
38086 ///
38087 /// <details><summary>JSON schema</summary>
38088 ///
38089 /// ```json
38090 ///{
38091 /// "description": "An HTTP error resulting from an unsuccessful request.",
38092 /// "required": [
38093 /// "message",
38094 /// "statusCode",
38095 /// "statusMessage"
38096 /// ],
38097 /// "properties": {
38098 /// "message": {
38099 /// "description": "Any additional context on the error, or the same as
38100 /// `statusMessage` otherwise.",
38101 /// "examples": [
38102 /// "Bad Request"
38103 /// ],
38104 /// "type": "string"
38105 /// },
38106 /// "statusCode": {
38107 /// "description": "HTTP status code of the error.",
38108 /// "examples": [
38109 /// 400
38110 /// ],
38111 /// "type": "number"
38112 /// },
38113 /// "statusMessage": {
38114 /// "description": "HTTP status message of the error.",
38115 /// "examples": [
38116 /// "Bad Request"
38117 /// ],
38118 /// "type": "string"
38119 /// }
38120 /// },
38121 /// "additionalProperties": false
38122 ///}
38123 /// ```
38124 /// </details>
38125 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38126 #[serde(deny_unknown_fields)]
38127 pub struct ResolveBrowserLinkResponse {
38128 ///Any additional context on the error, or the same as `statusMessage`
38129 /// otherwise.
38130 pub message: ::std::string::String,
38131 #[serde(rename = "statusCode")]
38132 pub status_code: f64,
38133 ///HTTP status message of the error.
38134 #[serde(rename = "statusMessage")]
38135 pub status_message: ::std::string::String,
38136 }
38137
38138 impl ::std::convert::From<&ResolveBrowserLinkResponse> for ResolveBrowserLinkResponse {
38139 fn from(value: &ResolveBrowserLinkResponse) -> Self {
38140 value.clone()
38141 }
38142 }
38143
38144 ///A value that contains rich structured data. Cell values are composed of
38145 /// these values or arrays of these values.
38146 ///
38147 /// <details><summary>JSON schema</summary>
38148 ///
38149 /// ```json
38150 ///{
38151 /// "description": "A value that contains rich structured data. Cell values
38152 /// are composed of these values or arrays of these values.\n",
38153 /// "oneOf": [
38154 /// {
38155 /// "$ref": "#/components/schemas/ScalarValue"
38156 /// },
38157 /// {
38158 /// "$ref": "#/components/schemas/CurrencyValue"
38159 /// },
38160 /// {
38161 /// "$ref": "#/components/schemas/ImageUrlValue"
38162 /// },
38163 /// {
38164 /// "$ref": "#/components/schemas/PersonValue"
38165 /// },
38166 /// {
38167 /// "$ref": "#/components/schemas/UrlValue"
38168 /// },
38169 /// {
38170 /// "$ref": "#/components/schemas/RowValue"
38171 /// }
38172 /// ],
38173 /// "x-schema-name": "RichSingleValue"
38174 ///}
38175 /// ```
38176 /// </details>
38177 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38178 #[serde(untagged)]
38179 pub enum RichSingleValue {
38180 ScalarValue(ScalarValue),
38181 CurrencyValue(CurrencyValue),
38182 ImageUrlValue(ImageUrlValue),
38183 PersonValue(PersonValue),
38184 UrlValue(UrlValue),
38185 RowValue(RowValue),
38186 }
38187
38188 impl ::std::convert::From<&Self> for RichSingleValue {
38189 fn from(value: &RichSingleValue) -> Self {
38190 value.clone()
38191 }
38192 }
38193
38194 impl ::std::convert::From<ScalarValue> for RichSingleValue {
38195 fn from(value: ScalarValue) -> Self {
38196 Self::ScalarValue(value)
38197 }
38198 }
38199
38200 impl ::std::convert::From<CurrencyValue> for RichSingleValue {
38201 fn from(value: CurrencyValue) -> Self {
38202 Self::CurrencyValue(value)
38203 }
38204 }
38205
38206 impl ::std::convert::From<ImageUrlValue> for RichSingleValue {
38207 fn from(value: ImageUrlValue) -> Self {
38208 Self::ImageUrlValue(value)
38209 }
38210 }
38211
38212 impl ::std::convert::From<PersonValue> for RichSingleValue {
38213 fn from(value: PersonValue) -> Self {
38214 Self::PersonValue(value)
38215 }
38216 }
38217
38218 impl ::std::convert::From<UrlValue> for RichSingleValue {
38219 fn from(value: UrlValue) -> Self {
38220 Self::UrlValue(value)
38221 }
38222 }
38223
38224 impl ::std::convert::From<RowValue> for RichSingleValue {
38225 fn from(value: RowValue) -> Self {
38226 Self::RowValue(value)
38227 }
38228 }
38229
38230 ///A cell value that contains rich structured data.
38231 ///
38232 /// <details><summary>JSON schema</summary>
38233 ///
38234 /// ```json
38235 ///{
38236 /// "description": "A cell value that contains rich structured data.",
38237 /// "oneOf": [
38238 /// {
38239 /// "$ref": "#/components/schemas/RichSingleValue"
38240 /// },
38241 /// {
38242 /// "type": "array",
38243 /// "items": {
38244 /// "oneOf": [
38245 /// {
38246 /// "$ref": "#/components/schemas/RichSingleValue"
38247 /// },
38248 /// {
38249 /// "type": "array",
38250 /// "items": {
38251 /// "$ref": "#/components/schemas/RichSingleValue"
38252 /// }
38253 /// }
38254 /// ]
38255 /// }
38256 /// }
38257 /// ],
38258 /// "x-schema-name": "RichValue"
38259 ///}
38260 /// ```
38261 /// </details>
38262 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38263 #[serde(untagged)]
38264 pub enum RichValue {
38265 Variant0(RichSingleValue),
38266 Variant1(::std::vec::Vec<RichValueVariant1Item>),
38267 }
38268
38269 impl ::std::convert::From<&Self> for RichValue {
38270 fn from(value: &RichValue) -> Self {
38271 value.clone()
38272 }
38273 }
38274
38275 impl ::std::convert::From<RichSingleValue> for RichValue {
38276 fn from(value: RichSingleValue) -> Self {
38277 Self::Variant0(value)
38278 }
38279 }
38280
38281 impl ::std::convert::From<::std::vec::Vec<RichValueVariant1Item>> for RichValue {
38282 fn from(value: ::std::vec::Vec<RichValueVariant1Item>) -> Self {
38283 Self::Variant1(value)
38284 }
38285 }
38286
38287 ///`RichValueVariant1Item`
38288 ///
38289 /// <details><summary>JSON schema</summary>
38290 ///
38291 /// ```json
38292 ///{
38293 /// "oneOf": [
38294 /// {
38295 /// "$ref": "#/components/schemas/RichSingleValue"
38296 /// },
38297 /// {
38298 /// "type": "array",
38299 /// "items": {
38300 /// "$ref": "#/components/schemas/RichSingleValue"
38301 /// }
38302 /// }
38303 /// ]
38304 ///}
38305 /// ```
38306 /// </details>
38307 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38308 #[serde(untagged)]
38309 pub enum RichValueVariant1Item {
38310 Variant0(RichSingleValue),
38311 Variant1(::std::vec::Vec<RichSingleValue>),
38312 }
38313
38314 impl ::std::convert::From<&Self> for RichValueVariant1Item {
38315 fn from(value: &RichValueVariant1Item) -> Self {
38316 value.clone()
38317 }
38318 }
38319
38320 impl ::std::convert::From<RichSingleValue> for RichValueVariant1Item {
38321 fn from(value: RichSingleValue) -> Self {
38322 Self::Variant0(value)
38323 }
38324 }
38325
38326 impl ::std::convert::From<::std::vec::Vec<RichSingleValue>> for RichValueVariant1Item {
38327 fn from(value: ::std::vec::Vec<RichSingleValue>) -> Self {
38328 Self::Variant1(value)
38329 }
38330 }
38331
38332 ///Info about a row.
38333 ///
38334 /// <details><summary>JSON schema</summary>
38335 ///
38336 /// ```json
38337 ///{
38338 /// "description": "Info about a row.",
38339 /// "type": "object",
38340 /// "required": [
38341 /// "browserLink",
38342 /// "createdAt",
38343 /// "href",
38344 /// "id",
38345 /// "index",
38346 /// "name",
38347 /// "type",
38348 /// "updatedAt",
38349 /// "values"
38350 /// ],
38351 /// "properties": {
38352 /// "browserLink": {
38353 /// "description": "Browser-friendly link to the row.",
38354 /// "examples": [
38355 /// "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz"
38356 /// ],
38357 /// "type": "string",
38358 /// "format": "url"
38359 /// },
38360 /// "createdAt": {
38361 /// "description": "Timestamp for when the row was created.",
38362 /// "examples": [
38363 /// "2018-04-11T00:18:57.946Z"
38364 /// ],
38365 /// "type": "string",
38366 /// "format": "date-time"
38367 /// },
38368 /// "href": {
38369 /// "description": "API link to the row.",
38370 /// "examples": [
38371 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W"
38372 /// ],
38373 /// "type": "string",
38374 /// "format": "url"
38375 /// },
38376 /// "id": {
38377 /// "description": "ID of the row.",
38378 /// "examples": [
38379 /// "i-tuVwxYz"
38380 /// ],
38381 /// "type": "string"
38382 /// },
38383 /// "index": {
38384 /// "description": "Index of the row within the table.",
38385 /// "examples": [
38386 /// 7
38387 /// ],
38388 /// "type": "integer"
38389 /// },
38390 /// "name": {
38391 /// "description": "The display name of the row, based on its
38392 /// identifying column.",
38393 /// "examples": [
38394 /// "Apple"
38395 /// ],
38396 /// "type": "string"
38397 /// },
38398 /// "type": {
38399 /// "description": "The type of this resource.",
38400 /// "type": "string",
38401 /// "enum": [
38402 /// "row"
38403 /// ],
38404 /// "x-tsType": "Type.Row"
38405 /// },
38406 /// "updatedAt": {
38407 /// "description": "Timestamp for when the row was last modified.",
38408 /// "examples": [
38409 /// "2018-04-11T00:18:57.946Z"
38410 /// ],
38411 /// "type": "string",
38412 /// "format": "date-time"
38413 /// },
38414 /// "values": {
38415 /// "description": "Values for a specific row, represented as a hash of
38416 /// column IDs (or names with `useColumnNames`) to values.\n",
38417 /// "examples": [
38418 /// {
38419 /// "c-bCdeFgh": [
38420 /// "$12.34",
38421 /// "$56.78"
38422 /// ],
38423 /// "c-tuVwxYz": "Apple"
38424 /// }
38425 /// ],
38426 /// "type": "object",
38427 /// "additionalProperties": {
38428 /// "$ref": "#/components/schemas/CellValue"
38429 /// }
38430 /// }
38431 /// },
38432 /// "additionalProperties": false,
38433 /// "x-schema-name": "Row"
38434 ///}
38435 /// ```
38436 /// </details>
38437 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38438 #[serde(deny_unknown_fields)]
38439 pub struct Row {
38440 ///Browser-friendly link to the row.
38441 #[serde(rename = "browserLink")]
38442 pub browser_link: ::std::string::String,
38443 ///Timestamp for when the row was created.
38444 #[serde(rename = "createdAt")]
38445 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
38446 ///API link to the row.
38447 pub href: ::std::string::String,
38448 ///ID of the row.
38449 pub id: ::std::string::String,
38450 ///Index of the row within the table.
38451 pub index: i64,
38452 ///The display name of the row, based on its identifying column.
38453 pub name: ::std::string::String,
38454 ///The type of this resource.
38455 #[serde(rename = "type")]
38456 pub type_: RowType,
38457 ///Timestamp for when the row was last modified.
38458 #[serde(rename = "updatedAt")]
38459 pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
38460 ///Values for a specific row, represented as a hash of column IDs (or
38461 /// names with `useColumnNames`) to values.
38462 pub values: ::std::collections::HashMap<::std::string::String, CellValue>,
38463 }
38464
38465 impl ::std::convert::From<&Row> for Row {
38466 fn from(value: &Row) -> Self {
38467 value.clone()
38468 }
38469 }
38470
38471 ///`RowDeleteResult`
38472 ///
38473 /// <details><summary>JSON schema</summary>
38474 ///
38475 /// ```json
38476 ///{
38477 /// "description": "The result of a row deletion.",
38478 /// "allOf": [
38479 /// {
38480 /// "$ref": "#/components/schemas/DocumentMutateResponse"
38481 /// },
38482 /// {
38483 /// "type": "object",
38484 /// "required": [
38485 /// "id"
38486 /// ],
38487 /// "properties": {
38488 /// "id": {
38489 /// "description": "ID of the row to be deleted.",
38490 /// "examples": [
38491 /// "i-tuVwxYz"
38492 /// ],
38493 /// "type": "string"
38494 /// }
38495 /// },
38496 /// "additionalProperties": false
38497 /// }
38498 /// ],
38499 /// "x-schema-name": "RowDeleteResult"
38500 ///}
38501 /// ```
38502 /// </details>
38503 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38504 #[serde(deny_unknown_fields)]
38505 pub enum RowDeleteResult {}
38506 impl ::std::convert::From<&Self> for RowDeleteResult {
38507 fn from(value: &RowDeleteResult) -> Self {
38508 value.clone()
38509 }
38510 }
38511
38512 ///Details about a row.
38513 ///
38514 /// <details><summary>JSON schema</summary>
38515 ///
38516 /// ```json
38517 ///{
38518 /// "description": "Details about a row.",
38519 /// "type": "object",
38520 /// "required": [
38521 /// "browserLink",
38522 /// "createdAt",
38523 /// "href",
38524 /// "id",
38525 /// "index",
38526 /// "name",
38527 /// "parent",
38528 /// "type",
38529 /// "updatedAt",
38530 /// "values"
38531 /// ],
38532 /// "properties": {
38533 /// "browserLink": {
38534 /// "description": "Browser-friendly link to the row.",
38535 /// "examples": [
38536 /// "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz"
38537 /// ],
38538 /// "type": "string",
38539 /// "format": "url"
38540 /// },
38541 /// "createdAt": {
38542 /// "description": "Timestamp for when the row was created.",
38543 /// "examples": [
38544 /// "2018-04-11T00:18:57.946Z"
38545 /// ],
38546 /// "type": "string",
38547 /// "format": "date-time"
38548 /// },
38549 /// "href": {
38550 /// "description": "API link to the row.",
38551 /// "examples": [
38552 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W"
38553 /// ],
38554 /// "type": "string",
38555 /// "format": "url"
38556 /// },
38557 /// "id": {
38558 /// "description": "ID of the row.",
38559 /// "examples": [
38560 /// "i-tuVwxYz"
38561 /// ],
38562 /// "type": "string"
38563 /// },
38564 /// "index": {
38565 /// "description": "Index of the row within the table.",
38566 /// "examples": [
38567 /// 7
38568 /// ],
38569 /// "type": "integer"
38570 /// },
38571 /// "name": {
38572 /// "description": "The display name of the row, based on its
38573 /// identifying column.",
38574 /// "examples": [
38575 /// "Apple"
38576 /// ],
38577 /// "type": "string"
38578 /// },
38579 /// "parent": {
38580 /// "$ref": "#/components/schemas/TableReference"
38581 /// },
38582 /// "type": {
38583 /// "description": "The type of this resource.",
38584 /// "type": "string",
38585 /// "enum": [
38586 /// "row"
38587 /// ],
38588 /// "x-tsType": "Type.Row"
38589 /// },
38590 /// "updatedAt": {
38591 /// "description": "Timestamp for when the row was last modified.",
38592 /// "examples": [
38593 /// "2018-04-11T00:18:57.946Z"
38594 /// ],
38595 /// "type": "string",
38596 /// "format": "date-time"
38597 /// },
38598 /// "values": {
38599 /// "description": "Values for a specific row, represented as a hash of
38600 /// column IDs (or names with `useColumnNames`) to values.\n",
38601 /// "examples": [
38602 /// {
38603 /// "c-bCdeFgh": [
38604 /// "$12.34",
38605 /// "$56.78"
38606 /// ],
38607 /// "c-tuVwxYz": "Apple"
38608 /// }
38609 /// ],
38610 /// "type": "object",
38611 /// "additionalProperties": {
38612 /// "$ref": "#/components/schemas/CellValue"
38613 /// }
38614 /// }
38615 /// },
38616 /// "additionalProperties": false,
38617 /// "x-schema-name": "RowDetail"
38618 ///}
38619 /// ```
38620 /// </details>
38621 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38622 #[serde(deny_unknown_fields)]
38623 pub struct RowDetail {
38624 ///Browser-friendly link to the row.
38625 #[serde(rename = "browserLink")]
38626 pub browser_link: ::std::string::String,
38627 ///Timestamp for when the row was created.
38628 #[serde(rename = "createdAt")]
38629 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
38630 ///API link to the row.
38631 pub href: ::std::string::String,
38632 ///ID of the row.
38633 pub id: ::std::string::String,
38634 ///Index of the row within the table.
38635 pub index: i64,
38636 ///The display name of the row, based on its identifying column.
38637 pub name: ::std::string::String,
38638 pub parent: TableReference,
38639 ///The type of this resource.
38640 #[serde(rename = "type")]
38641 pub type_: RowDetailType,
38642 ///Timestamp for when the row was last modified.
38643 #[serde(rename = "updatedAt")]
38644 pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
38645 ///Values for a specific row, represented as a hash of column IDs (or
38646 /// names with `useColumnNames`) to values.
38647 pub values: ::std::collections::HashMap<::std::string::String, CellValue>,
38648 }
38649
38650 impl ::std::convert::From<&RowDetail> for RowDetail {
38651 fn from(value: &RowDetail) -> Self {
38652 value.clone()
38653 }
38654 }
38655
38656 ///The type of this resource.
38657 ///
38658 /// <details><summary>JSON schema</summary>
38659 ///
38660 /// ```json
38661 ///{
38662 /// "description": "The type of this resource.",
38663 /// "type": "string",
38664 /// "enum": [
38665 /// "row"
38666 /// ],
38667 /// "x-tsType": "Type.Row"
38668 ///}
38669 /// ```
38670 /// </details>
38671 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38672 pub enum RowDetailType {
38673 #[serde(rename = "row")]
38674 Row,
38675 }
38676
38677 impl ::std::convert::From<&Self> for RowDetailType {
38678 fn from(value: &RowDetailType) -> Self {
38679 value.clone()
38680 }
38681 }
38682
38683 impl ::std::fmt::Display for RowDetailType {
38684 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
38685 match *self {
38686 Self::Row => f.write_str("row"),
38687 }
38688 }
38689 }
38690
38691 impl ::std::str::FromStr for RowDetailType {
38692 type Err = self::error::ConversionError;
38693 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
38694 match value {
38695 "row" => Ok(Self::Row),
38696 _ => Err("invalid value".into()),
38697 }
38698 }
38699 }
38700
38701 impl ::std::convert::TryFrom<&str> for RowDetailType {
38702 type Error = self::error::ConversionError;
38703 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
38704 value.parse()
38705 }
38706 }
38707
38708 impl ::std::convert::TryFrom<&::std::string::String> for RowDetailType {
38709 type Error = self::error::ConversionError;
38710 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
38711 value.parse()
38712 }
38713 }
38714
38715 impl ::std::convert::TryFrom<::std::string::String> for RowDetailType {
38716 type Error = self::error::ConversionError;
38717 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
38718 value.parse()
38719 }
38720 }
38721
38722 ///An edit made to a particular row.
38723 ///
38724 /// <details><summary>JSON schema</summary>
38725 ///
38726 /// ```json
38727 ///{
38728 /// "description": "An edit made to a particular row.",
38729 /// "type": "object",
38730 /// "required": [
38731 /// "cells"
38732 /// ],
38733 /// "properties": {
38734 /// "cells": {
38735 /// "type": "array",
38736 /// "items": {
38737 /// "$ref": "#/components/schemas/CellEdit"
38738 /// }
38739 /// }
38740 /// },
38741 /// "additionalProperties": false,
38742 /// "x-schema-name": "RowEdit"
38743 ///}
38744 /// ```
38745 /// </details>
38746 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38747 #[serde(deny_unknown_fields)]
38748 pub struct RowEdit {
38749 pub cells: ::std::vec::Vec<CellEdit>,
38750 }
38751
38752 impl ::std::convert::From<&RowEdit> for RowEdit {
38753 fn from(value: &RowEdit) -> Self {
38754 value.clone()
38755 }
38756 }
38757
38758 ///List of rows.
38759 ///
38760 /// <details><summary>JSON schema</summary>
38761 ///
38762 /// ```json
38763 ///{
38764 /// "description": "List of rows.",
38765 /// "type": "object",
38766 /// "required": [
38767 /// "items"
38768 /// ],
38769 /// "properties": {
38770 /// "href": {
38771 /// "description": "API link to these results",
38772 /// "examples": [
38773 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?limit=20"
38774 /// ],
38775 /// "type": "string",
38776 /// "format": "url"
38777 /// },
38778 /// "items": {
38779 /// "type": "array",
38780 /// "items": {
38781 /// "$ref": "#/components/schemas/Row"
38782 /// }
38783 /// },
38784 /// "nextPageLink": {
38785 /// "allOf": [
38786 /// {
38787 /// "$ref": "#/components/schemas/nextPageLink"
38788 /// },
38789 /// {
38790 /// "examples": [
38791 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?pageToken=eyJsaW1pd"
38792 /// ],
38793 /// "type": "string"
38794 /// }
38795 /// ]
38796 /// },
38797 /// "nextPageToken": {
38798 /// "$ref": "#/components/schemas/nextPageToken"
38799 /// },
38800 /// "nextSyncToken": {
38801 /// "$ref": "#/components/schemas/nextSyncToken"
38802 /// }
38803 /// },
38804 /// "additionalProperties": false,
38805 /// "x-schema-name": "RowList"
38806 ///}
38807 /// ```
38808 /// </details>
38809 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38810 #[serde(deny_unknown_fields)]
38811 pub struct RowList {
38812 ///API link to these results
38813 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
38814 pub href: ::std::option::Option<::std::string::String>,
38815 pub items: ::std::vec::Vec<Row>,
38816 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
38817 pub next_page_link: ::std::option::Option<NextPageLink>,
38818 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
38819 pub next_page_token: ::std::option::Option<NextPageToken>,
38820 #[serde(rename = "nextSyncToken", default, skip_serializing_if = "::std::option::Option::is_none")]
38821 pub next_sync_token: ::std::option::Option<NextSyncToken>,
38822 }
38823
38824 impl ::std::convert::From<&RowList> for RowList {
38825 fn from(value: &RowList) -> Self {
38826 value.clone()
38827 }
38828 }
38829
38830 ///The type of this resource.
38831 ///
38832 /// <details><summary>JSON schema</summary>
38833 ///
38834 /// ```json
38835 ///{
38836 /// "description": "The type of this resource.",
38837 /// "type": "string",
38838 /// "enum": [
38839 /// "row"
38840 /// ],
38841 /// "x-tsType": "Type.Row"
38842 ///}
38843 /// ```
38844 /// </details>
38845 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38846 pub enum RowType {
38847 #[serde(rename = "row")]
38848 Row,
38849 }
38850
38851 impl ::std::convert::From<&Self> for RowType {
38852 fn from(value: &RowType) -> Self {
38853 value.clone()
38854 }
38855 }
38856
38857 impl ::std::fmt::Display for RowType {
38858 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
38859 match *self {
38860 Self::Row => f.write_str("row"),
38861 }
38862 }
38863 }
38864
38865 impl ::std::str::FromStr for RowType {
38866 type Err = self::error::ConversionError;
38867 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
38868 match value {
38869 "row" => Ok(Self::Row),
38870 _ => Err("invalid value".into()),
38871 }
38872 }
38873 }
38874
38875 impl ::std::convert::TryFrom<&str> for RowType {
38876 type Error = self::error::ConversionError;
38877 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
38878 value.parse()
38879 }
38880 }
38881
38882 impl ::std::convert::TryFrom<&::std::string::String> for RowType {
38883 type Error = self::error::ConversionError;
38884 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
38885 value.parse()
38886 }
38887 }
38888
38889 impl ::std::convert::TryFrom<::std::string::String> for RowType {
38890 type Error = self::error::ConversionError;
38891 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
38892 value.parse()
38893 }
38894 }
38895
38896 ///Payload for updating a row in a table.
38897 ///
38898 /// <details><summary>JSON schema</summary>
38899 ///
38900 /// ```json
38901 ///{
38902 /// "description": "Payload for updating a row in a table.",
38903 /// "type": "object",
38904 /// "required": [
38905 /// "row"
38906 /// ],
38907 /// "properties": {
38908 /// "row": {
38909 /// "$ref": "#/components/schemas/RowEdit"
38910 /// }
38911 /// },
38912 /// "additionalProperties": false,
38913 /// "x-schema-name": "RowUpdate"
38914 ///}
38915 /// ```
38916 /// </details>
38917 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38918 #[serde(deny_unknown_fields)]
38919 pub struct RowUpdate {
38920 pub row: RowEdit,
38921 }
38922
38923 impl ::std::convert::From<&RowUpdate> for RowUpdate {
38924 fn from(value: &RowUpdate) -> Self {
38925 value.clone()
38926 }
38927 }
38928
38929 ///`RowUpdateResult`
38930 ///
38931 /// <details><summary>JSON schema</summary>
38932 ///
38933 /// ```json
38934 ///{
38935 /// "description": "The result of a row update.",
38936 /// "allOf": [
38937 /// {
38938 /// "$ref": "#/components/schemas/DocumentMutateResponse"
38939 /// },
38940 /// {
38941 /// "type": "object",
38942 /// "required": [
38943 /// "id"
38944 /// ],
38945 /// "properties": {
38946 /// "id": {
38947 /// "description": "ID of the updated row.",
38948 /// "examples": [
38949 /// "i-tuVwxYz"
38950 /// ],
38951 /// "type": "string"
38952 /// }
38953 /// },
38954 /// "additionalProperties": false
38955 /// }
38956 /// ],
38957 /// "x-schema-name": "RowUpdateResult"
38958 ///}
38959 /// ```
38960 /// </details>
38961 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38962 #[serde(deny_unknown_fields)]
38963 pub enum RowUpdateResult {}
38964 impl ::std::convert::From<&Self> for RowUpdateResult {
38965 fn from(value: &RowUpdateResult) -> Self {
38966 value.clone()
38967 }
38968 }
38969
38970 ///`RowValue`
38971 ///
38972 /// <details><summary>JSON schema</summary>
38973 ///
38974 /// ```json
38975 ///{
38976 /// "description": "A value representing a Coda row.",
38977 /// "allOf": [
38978 /// {
38979 /// "$ref": "#/components/schemas/LinkedDataObject"
38980 /// },
38981 /// {
38982 /// "type": "object",
38983 /// "required": [
38984 /// "@type",
38985 /// "additionalType",
38986 /// "name",
38987 /// "rowId",
38988 /// "tableId",
38989 /// "tableUrl",
38990 /// "url"
38991 /// ],
38992 /// "properties": {
38993 /// "@type": {
38994 /// "type": "string",
38995 /// "enum": [
38996 /// "StructuredValue"
38997 /// ],
38998 /// "x-tsType": "LinkedDataType.StructuredValue"
38999 /// },
39000 /// "additionalType": {
39001 /// "description": "The type of this resource.",
39002 /// "type": "string",
39003 /// "enum": [
39004 /// "row"
39005 /// ],
39006 /// "x-tsType": "Type.Row"
39007 /// },
39008 /// "name": {
39009 /// "description": "The display name of the row, based on its
39010 /// identifying column.",
39011 /// "examples": [
39012 /// "Apple"
39013 /// ],
39014 /// "type": "string"
39015 /// },
39016 /// "rowId": {
39017 /// "description": "The ID of the table",
39018 /// "examples": [
39019 /// "i-tuVwxYz"
39020 /// ],
39021 /// "type": "string"
39022 /// },
39023 /// "tableId": {
39024 /// "description": "The ID of the table",
39025 /// "examples": [
39026 /// "grid-pqRst-U"
39027 /// ],
39028 /// "type": "string"
39029 /// },
39030 /// "tableUrl": {
39031 /// "description": "The url of the table.",
39032 /// "examples": [
39033 /// "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U"
39034 /// ],
39035 /// "type": "string"
39036 /// },
39037 /// "url": {
39038 /// "description": "The url of the row.",
39039 /// "examples": [
39040 /// "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz"
39041 /// ],
39042 /// "type": "string"
39043 /// }
39044 /// },
39045 /// "additionalProperties": false
39046 /// }
39047 /// ],
39048 /// "x-schema-name": "RowValue"
39049 ///}
39050 /// ```
39051 /// </details>
39052 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39053 #[serde(deny_unknown_fields)]
39054 pub enum RowValue {}
39055 impl ::std::convert::From<&Self> for RowValue {
39056 fn from(value: &RowValue) -> Self {
39057 value.clone()
39058 }
39059 }
39060
39061 ///Payload for deleting rows from a table.
39062 ///
39063 /// <details><summary>JSON schema</summary>
39064 ///
39065 /// ```json
39066 ///{
39067 /// "description": "Payload for deleting rows from a table.",
39068 /// "type": "object",
39069 /// "required": [
39070 /// "rowIds"
39071 /// ],
39072 /// "properties": {
39073 /// "rowIds": {
39074 /// "description": "Row IDs to delete.\n",
39075 /// "examples": [
39076 /// [
39077 /// "i-bCdeFgh",
39078 /// "i-CdEfgHi"
39079 /// ]
39080 /// ],
39081 /// "type": "array",
39082 /// "items": {
39083 /// "type": "string"
39084 /// }
39085 /// }
39086 /// },
39087 /// "additionalProperties": false,
39088 /// "x-schema-name": "RowsDelete"
39089 ///}
39090 /// ```
39091 /// </details>
39092 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39093 #[serde(deny_unknown_fields)]
39094 pub struct RowsDelete {
39095 ///Row IDs to delete.
39096 #[serde(rename = "rowIds")]
39097 pub row_ids: ::std::vec::Vec<::std::string::String>,
39098 }
39099
39100 impl ::std::convert::From<&RowsDelete> for RowsDelete {
39101 fn from(value: &RowsDelete) -> Self {
39102 value.clone()
39103 }
39104 }
39105
39106 ///`RowsDeleteResult`
39107 ///
39108 /// <details><summary>JSON schema</summary>
39109 ///
39110 /// ```json
39111 ///{
39112 /// "description": "The result of a rows delete operation.",
39113 /// "allOf": [
39114 /// {
39115 /// "$ref": "#/components/schemas/DocumentMutateResponse"
39116 /// },
39117 /// {
39118 /// "type": "object",
39119 /// "required": [
39120 /// "rowIds"
39121 /// ],
39122 /// "properties": {
39123 /// "rowIds": {
39124 /// "description": "Row IDs to delete.",
39125 /// "examples": [
39126 /// [
39127 /// "i-bCdeFgh",
39128 /// "i-CdEfgHi"
39129 /// ]
39130 /// ],
39131 /// "type": "array",
39132 /// "items": {
39133 /// "type": "string"
39134 /// }
39135 /// }
39136 /// },
39137 /// "additionalProperties": false
39138 /// }
39139 /// ],
39140 /// "x-schema-name": "RowsDeleteResult"
39141 ///}
39142 /// ```
39143 /// </details>
39144 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39145 #[serde(deny_unknown_fields)]
39146 pub enum RowsDeleteResult {}
39147 impl ::std::convert::From<&Self> for RowsDeleteResult {
39148 fn from(value: &RowsDeleteResult) -> Self {
39149 value.clone()
39150 }
39151 }
39152
39153 ///Determines how the rows returned are sorted
39154 ///
39155 /// <details><summary>JSON schema</summary>
39156 ///
39157 /// ```json
39158 ///{
39159 /// "description": "Determines how the rows returned are sorted",
39160 /// "type": "string",
39161 /// "enum": [
39162 /// "createdAt",
39163 /// "natural",
39164 /// "updatedAt"
39165 /// ],
39166 /// "x-schema-name": "RowsSortBy",
39167 /// "x-tsEnumNames": [
39168 /// "CreatedAt",
39169 /// "Natural",
39170 /// "UpdatedAt"
39171 /// ]
39172 ///}
39173 /// ```
39174 /// </details>
39175 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39176 pub enum RowsSortBy {
39177 #[serde(rename = "createdAt")]
39178 CreatedAt,
39179 #[serde(rename = "natural")]
39180 Natural,
39181 #[serde(rename = "updatedAt")]
39182 UpdatedAt,
39183 }
39184
39185 impl ::std::convert::From<&Self> for RowsSortBy {
39186 fn from(value: &RowsSortBy) -> Self {
39187 value.clone()
39188 }
39189 }
39190
39191 impl ::std::fmt::Display for RowsSortBy {
39192 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39193 match *self {
39194 Self::CreatedAt => f.write_str("createdAt"),
39195 Self::Natural => f.write_str("natural"),
39196 Self::UpdatedAt => f.write_str("updatedAt"),
39197 }
39198 }
39199 }
39200
39201 impl ::std::str::FromStr for RowsSortBy {
39202 type Err = self::error::ConversionError;
39203 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39204 match value {
39205 "createdAt" => Ok(Self::CreatedAt),
39206 "natural" => Ok(Self::Natural),
39207 "updatedAt" => Ok(Self::UpdatedAt),
39208 _ => Err("invalid value".into()),
39209 }
39210 }
39211 }
39212
39213 impl ::std::convert::TryFrom<&str> for RowsSortBy {
39214 type Error = self::error::ConversionError;
39215 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39216 value.parse()
39217 }
39218 }
39219
39220 impl ::std::convert::TryFrom<&::std::string::String> for RowsSortBy {
39221 type Error = self::error::ConversionError;
39222 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
39223 value.parse()
39224 }
39225 }
39226
39227 impl ::std::convert::TryFrom<::std::string::String> for RowsSortBy {
39228 type Error = self::error::ConversionError;
39229 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
39230 value.parse()
39231 }
39232 }
39233
39234 ///Payload for upserting rows in a table.
39235 ///
39236 /// <details><summary>JSON schema</summary>
39237 ///
39238 /// ```json
39239 ///{
39240 /// "description": "Payload for upserting rows in a table.",
39241 /// "type": "object",
39242 /// "required": [
39243 /// "rows"
39244 /// ],
39245 /// "properties": {
39246 /// "keyColumns": {
39247 /// "description": "Optional column IDs, URLs, or names (fragile and
39248 /// discouraged), specifying columns to be used as upsert keys.",
39249 /// "examples": [
39250 /// [
39251 /// "c-bCdeFgh"
39252 /// ]
39253 /// ],
39254 /// "type": "array",
39255 /// "items": {
39256 /// "type": "string"
39257 /// }
39258 /// },
39259 /// "rows": {
39260 /// "type": "array",
39261 /// "items": {
39262 /// "$ref": "#/components/schemas/RowEdit"
39263 /// }
39264 /// }
39265 /// },
39266 /// "additionalProperties": false,
39267 /// "x-schema-name": "RowsUpsert"
39268 ///}
39269 /// ```
39270 /// </details>
39271 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39272 #[serde(deny_unknown_fields)]
39273 pub struct RowsUpsert {
39274 ///Optional column IDs, URLs, or names (fragile and discouraged),
39275 /// specifying columns to be used as upsert keys.
39276 #[serde(rename = "keyColumns", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
39277 pub key_columns: ::std::vec::Vec<::std::string::String>,
39278 pub rows: ::std::vec::Vec<RowEdit>,
39279 }
39280
39281 impl ::std::convert::From<&RowsUpsert> for RowsUpsert {
39282 fn from(value: &RowsUpsert) -> Self {
39283 value.clone()
39284 }
39285 }
39286
39287 ///`RowsUpsertResult`
39288 ///
39289 /// <details><summary>JSON schema</summary>
39290 ///
39291 /// ```json
39292 ///{
39293 /// "description": "The result of a rows insert/upsert operation.",
39294 /// "allOf": [
39295 /// {
39296 /// "$ref": "#/components/schemas/DocumentMutateResponse"
39297 /// },
39298 /// {
39299 /// "type": "object",
39300 /// "properties": {
39301 /// "addedRowIds": {
39302 /// "description": "Row IDs for rows that will be added. Only
39303 /// applicable when keyColumns is not set or empty.",
39304 /// "examples": [
39305 /// [
39306 /// "i-bCdeFgh",
39307 /// "i-CdEfgHi"
39308 /// ]
39309 /// ],
39310 /// "type": "array",
39311 /// "items": {
39312 /// "type": "string"
39313 /// }
39314 /// }
39315 /// },
39316 /// "additionalProperties": false
39317 /// }
39318 /// ],
39319 /// "x-schema-name": "RowsUpsertResult"
39320 ///}
39321 /// ```
39322 /// </details>
39323 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39324 #[serde(deny_unknown_fields)]
39325 pub enum RowsUpsertResult {}
39326 impl ::std::convert::From<&Self> for RowsUpsertResult {
39327 fn from(value: &RowsUpsertResult) -> Self {
39328 value.clone()
39329 }
39330 }
39331
39332 ///A Coda result or entity expressed as a primitive type.
39333 ///
39334 /// <details><summary>JSON schema</summary>
39335 ///
39336 /// ```json
39337 ///{
39338 /// "description": "A Coda result or entity expressed as a primitive
39339 /// type.",
39340 /// "oneOf": [
39341 /// {
39342 /// "examples": [
39343 /// "$12.34"
39344 /// ],
39345 /// "type": "string"
39346 /// },
39347 /// {
39348 /// "examples": [
39349 /// 12.34
39350 /// ],
39351 /// "type": "number"
39352 /// },
39353 /// {
39354 /// "examples": [
39355 /// true
39356 /// ],
39357 /// "type": "boolean"
39358 /// }
39359 /// ],
39360 /// "x-schema-name": "ScalarValue"
39361 ///}
39362 /// ```
39363 /// </details>
39364 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39365 #[serde(untagged)]
39366 pub enum ScalarValue {
39367 Variant0(::std::string::String),
39368 Variant1(f64),
39369 Variant2(bool),
39370 }
39371
39372 impl ::std::convert::From<&Self> for ScalarValue {
39373 fn from(value: &ScalarValue) -> Self {
39374 value.clone()
39375 }
39376 }
39377
39378 impl ::std::fmt::Display for ScalarValue {
39379 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39380 match self {
39381 Self::Variant0(x) => x.fmt(f),
39382 Self::Variant1(x) => x.fmt(f),
39383 Self::Variant2(x) => x.fmt(f),
39384 }
39385 }
39386 }
39387
39388 impl ::std::convert::From<f64> for ScalarValue {
39389 fn from(value: f64) -> Self {
39390 Self::Variant1(value)
39391 }
39392 }
39393
39394 impl ::std::convert::From<bool> for ScalarValue {
39395 fn from(value: bool) -> Self {
39396 Self::Variant2(value)
39397 }
39398 }
39399
39400 ///`ScaleColumnFormat`
39401 ///
39402 /// <details><summary>JSON schema</summary>
39403 ///
39404 /// ```json
39405 ///{
39406 /// "description": "Format of a numeric column that renders as a scale,
39407 /// like star ratings.",
39408 /// "allOf": [
39409 /// {
39410 /// "$ref": "#/components/schemas/SimpleColumnFormat"
39411 /// },
39412 /// {
39413 /// "type": "object",
39414 /// "required": [
39415 /// "icon",
39416 /// "maximum"
39417 /// ],
39418 /// "properties": {
39419 /// "icon": {
39420 /// "allOf": [
39421 /// {
39422 /// "description": "The icon set to use when rendering the
39423 /// scale, e.g. render a 5 star scale.",
39424 /// "additionalProperties": false
39425 /// },
39426 /// {
39427 /// "$ref": "#/components/schemas/IconSet"
39428 /// }
39429 /// ]
39430 /// },
39431 /// "maximum": {
39432 /// "description": "The maximum number allowed for this scale.",
39433 /// "examples": [
39434 /// 5
39435 /// ],
39436 /// "type": "number"
39437 /// }
39438 /// },
39439 /// "additionalProperties": false
39440 /// }
39441 /// ],
39442 /// "x-schema-name": "ScaleColumnFormat"
39443 ///}
39444 /// ```
39445 /// </details>
39446 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39447 #[serde(deny_unknown_fields)]
39448 pub enum ScaleColumnFormat {}
39449 impl ::std::convert::From<&Self> for ScaleColumnFormat {
39450 fn from(value: &ScaleColumnFormat) -> Self {
39451 value.clone()
39452 }
39453 }
39454
39455 ///Metadata about the principals that match the given query.
39456 ///
39457 /// <details><summary>JSON schema</summary>
39458 ///
39459 /// ```json
39460 ///{
39461 /// "description": "Metadata about the principals that match the given
39462 /// query.",
39463 /// "type": "object",
39464 /// "required": [
39465 /// "groups",
39466 /// "users"
39467 /// ],
39468 /// "properties": {
39469 /// "groups": {
39470 /// "type": "array",
39471 /// "items": {
39472 /// "$ref": "#/components/schemas/GroupPrincipal"
39473 /// }
39474 /// },
39475 /// "users": {
39476 /// "type": "array",
39477 /// "items": {
39478 /// "$ref": "#/components/schemas/UserSummary"
39479 /// }
39480 /// }
39481 /// },
39482 /// "additionalProperties": false,
39483 /// "x-schema-name": "SearchPrincipalsResponse"
39484 ///}
39485 /// ```
39486 /// </details>
39487 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39488 #[serde(deny_unknown_fields)]
39489 pub struct SearchPrincipalsResponse {
39490 pub groups: ::std::vec::Vec<GroupPrincipal>,
39491 pub users: ::std::vec::Vec<UserSummary>,
39492 }
39493
39494 impl ::std::convert::From<&SearchPrincipalsResponse> for SearchPrincipalsResponse {
39495 fn from(value: &SearchPrincipalsResponse) -> Self {
39496 value.clone()
39497 }
39498 }
39499
39500 ///`SelectColumnFormat`
39501 ///
39502 /// <details><summary>JSON schema</summary>
39503 ///
39504 /// ```json
39505 ///{
39506 /// "description": "Format of a select column.",
39507 /// "allOf": [
39508 /// {
39509 /// "$ref": "#/components/schemas/SimpleColumnFormat"
39510 /// },
39511 /// {
39512 /// "type": "object",
39513 /// "properties": {
39514 /// "options": {
39515 /// "description": "For select format columns, the list of
39516 /// available options. Only returned for select lists that used a fixed set
39517 /// of options. Returns the first 5000 options.",
39518 /// "type": "array",
39519 /// "items": {
39520 /// "$ref": "#/components/schemas/SelectOption"
39521 /// }
39522 /// }
39523 /// },
39524 /// "additionalProperties": false
39525 /// }
39526 /// ],
39527 /// "x-schema-name": "SelectColumnFormat"
39528 ///}
39529 /// ```
39530 /// </details>
39531 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39532 #[serde(deny_unknown_fields)]
39533 pub enum SelectColumnFormat {}
39534 impl ::std::convert::From<&Self> for SelectColumnFormat {
39535 fn from(value: &SelectColumnFormat) -> Self {
39536 value.clone()
39537 }
39538 }
39539
39540 ///An option for a select column.
39541 ///
39542 /// <details><summary>JSON schema</summary>
39543 ///
39544 /// ```json
39545 ///{
39546 /// "description": "An option for a select column.",
39547 /// "type": "object",
39548 /// "required": [
39549 /// "name"
39550 /// ],
39551 /// "properties": {
39552 /// "backgroundColor": {
39553 /// "description": "The background color of the option.",
39554 /// "examples": [
39555 /// "#ff0000"
39556 /// ],
39557 /// "type": "string"
39558 /// },
39559 /// "foregroundColor": {
39560 /// "description": "The foreground color of the option.",
39561 /// "examples": [
39562 /// "#ffffff"
39563 /// ],
39564 /// "type": "string"
39565 /// },
39566 /// "name": {
39567 /// "description": "The name of the option.",
39568 /// "examples": [
39569 /// "Option 1"
39570 /// ],
39571 /// "type": "string"
39572 /// }
39573 /// },
39574 /// "additionalProperties": false,
39575 /// "x-schema-name": "SelectOption"
39576 ///}
39577 /// ```
39578 /// </details>
39579 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39580 #[serde(deny_unknown_fields)]
39581 pub struct SelectOption {
39582 ///The background color of the option.
39583 #[serde(rename = "backgroundColor", default, skip_serializing_if = "::std::option::Option::is_none")]
39584 pub background_color: ::std::option::Option<::std::string::String>,
39585 ///The foreground color of the option.
39586 #[serde(rename = "foregroundColor", default, skip_serializing_if = "::std::option::Option::is_none")]
39587 pub foreground_color: ::std::option::Option<::std::string::String>,
39588 ///The name of the option.
39589 pub name: ::std::string::String,
39590 }
39591
39592 impl ::std::convert::From<&SelectOption> for SelectOption {
39593 fn from(value: &SelectOption) -> Self {
39594 value.clone()
39595 }
39596 }
39597
39598 ///Request to set the Pack OAuth configuration.
39599 ///
39600 /// <details><summary>JSON schema</summary>
39601 ///
39602 /// ```json
39603 ///{
39604 /// "description": "Request to set the Pack OAuth configuration.",
39605 /// "type": "object",
39606 /// "properties": {
39607 /// "clientId": {
39608 /// "type": "string"
39609 /// },
39610 /// "clientSecret": {
39611 /// "type": "string"
39612 /// },
39613 /// "redirectUri": {
39614 /// "type": "string"
39615 /// }
39616 /// },
39617 /// "additionalProperties": false,
39618 /// "x-schema-name": "SetPackOauthConfigRequest"
39619 ///}
39620 /// ```
39621 /// </details>
39622 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39623 #[serde(deny_unknown_fields)]
39624 pub struct SetPackOauthConfigRequest {
39625 #[serde(rename = "clientId", default, skip_serializing_if = "::std::option::Option::is_none")]
39626 pub client_id: ::std::option::Option<::std::string::String>,
39627 #[serde(rename = "clientSecret", default, skip_serializing_if = "::std::option::Option::is_none")]
39628 pub client_secret: ::std::option::Option<::std::string::String>,
39629 #[serde(rename = "redirectUri", default, skip_serializing_if = "::std::option::Option::is_none")]
39630 pub redirect_uri: ::std::option::Option<::std::string::String>,
39631 }
39632
39633 impl ::std::convert::From<&SetPackOauthConfigRequest> for SetPackOauthConfigRequest {
39634 fn from(value: &SetPackOauthConfigRequest) -> Self {
39635 value.clone()
39636 }
39637 }
39638
39639 impl ::std::default::Default for SetPackOauthConfigRequest {
39640 fn default() -> Self {
39641 Self {
39642 client_id: Default::default(),
39643 client_secret: Default::default(),
39644 redirect_uri: Default::default(),
39645 }
39646 }
39647 }
39648
39649 ///An HTTP error resulting from an unsuccessful request.
39650 ///
39651 /// <details><summary>JSON schema</summary>
39652 ///
39653 /// ```json
39654 ///{
39655 /// "description": "An HTTP error resulting from an unsuccessful request.",
39656 /// "required": [
39657 /// "message",
39658 /// "statusCode",
39659 /// "statusMessage"
39660 /// ],
39661 /// "properties": {
39662 /// "codaDetail": {
39663 /// "description": "Detail about why this request was rejected.",
39664 /// "type": "object",
39665 /// "properties": {
39666 /// "validationErrors": {
39667 /// "type": "array",
39668 /// "items": {
39669 /// "$ref": "#/components/schemas/ValidationError"
39670 /// }
39671 /// }
39672 /// },
39673 /// "additionalProperties": false
39674 /// },
39675 /// "message": {
39676 /// "description": "Any additional context on the error, or the same as
39677 /// `statusMessage` otherwise.",
39678 /// "examples": [
39679 /// "Bad Request"
39680 /// ],
39681 /// "type": "string"
39682 /// },
39683 /// "statusCode": {
39684 /// "description": "HTTP status code of the error.",
39685 /// "examples": [
39686 /// 400
39687 /// ],
39688 /// "type": "number"
39689 /// },
39690 /// "statusMessage": {
39691 /// "description": "HTTP status message of the error.",
39692 /// "examples": [
39693 /// "Bad Request"
39694 /// ],
39695 /// "type": "string"
39696 /// }
39697 /// },
39698 /// "additionalProperties": false
39699 ///}
39700 /// ```
39701 /// </details>
39702 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39703 #[serde(deny_unknown_fields)]
39704 pub struct SetPackOauthConfigResponse {
39705 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
39706 pub coda_detail: ::std::option::Option<SetPackOauthConfigResponseCodaDetail>,
39707 ///Any additional context on the error, or the same as `statusMessage`
39708 /// otherwise.
39709 pub message: ::std::string::String,
39710 #[serde(rename = "statusCode")]
39711 pub status_code: f64,
39712 ///HTTP status message of the error.
39713 #[serde(rename = "statusMessage")]
39714 pub status_message: ::std::string::String,
39715 }
39716
39717 impl ::std::convert::From<&SetPackOauthConfigResponse> for SetPackOauthConfigResponse {
39718 fn from(value: &SetPackOauthConfigResponse) -> Self {
39719 value.clone()
39720 }
39721 }
39722
39723 ///Detail about why this request was rejected.
39724 ///
39725 /// <details><summary>JSON schema</summary>
39726 ///
39727 /// ```json
39728 ///{
39729 /// "description": "Detail about why this request was rejected.",
39730 /// "type": "object",
39731 /// "properties": {
39732 /// "validationErrors": {
39733 /// "type": "array",
39734 /// "items": {
39735 /// "$ref": "#/components/schemas/ValidationError"
39736 /// }
39737 /// }
39738 /// },
39739 /// "additionalProperties": false
39740 ///}
39741 /// ```
39742 /// </details>
39743 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39744 #[serde(deny_unknown_fields)]
39745 pub struct SetPackOauthConfigResponseCodaDetail {
39746 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
39747 pub validation_errors: ::std::vec::Vec<ValidationError>,
39748 }
39749
39750 impl ::std::convert::From<&SetPackOauthConfigResponseCodaDetail> for SetPackOauthConfigResponseCodaDetail {
39751 fn from(value: &SetPackOauthConfigResponseCodaDetail) -> Self {
39752 value.clone()
39753 }
39754 }
39755
39756 impl ::std::default::Default for SetPackOauthConfigResponseCodaDetail {
39757 fn default() -> Self {
39758 Self {
39759 validation_errors: Default::default(),
39760 }
39761 }
39762 }
39763
39764 ///The request to set pack system connection credentials.
39765 ///
39766 /// <details><summary>JSON schema</summary>
39767 ///
39768 /// ```json
39769 ///{
39770 /// "description": "The request to set pack system connection
39771 /// credentials.",
39772 /// "type": "object",
39773 /// "required": [
39774 /// "credentials"
39775 /// ],
39776 /// "properties": {
39777 /// "credentials": {
39778 /// "$ref": "#/components/schemas/PackSystemConnectionCredentials"
39779 /// }
39780 /// },
39781 /// "additionalProperties": false,
39782 /// "x-schema-name": "SetPackSystemConnectionRequest"
39783 ///}
39784 /// ```
39785 /// </details>
39786 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39787 #[serde(deny_unknown_fields)]
39788 pub struct SetPackSystemConnectionRequest {
39789 pub credentials: PackSystemConnectionCredentials,
39790 }
39791
39792 impl ::std::convert::From<&SetPackSystemConnectionRequest> for SetPackSystemConnectionRequest {
39793 fn from(value: &SetPackSystemConnectionRequest) -> Self {
39794 value.clone()
39795 }
39796 }
39797
39798 ///An HTTP error resulting from an unsuccessful request.
39799 ///
39800 /// <details><summary>JSON schema</summary>
39801 ///
39802 /// ```json
39803 ///{
39804 /// "description": "An HTTP error resulting from an unsuccessful request.",
39805 /// "required": [
39806 /// "message",
39807 /// "statusCode",
39808 /// "statusMessage"
39809 /// ],
39810 /// "properties": {
39811 /// "codaDetail": {
39812 /// "description": "Detail about why this request was rejected.",
39813 /// "type": "object",
39814 /// "properties": {
39815 /// "validationErrors": {
39816 /// "type": "array",
39817 /// "items": {
39818 /// "$ref": "#/components/schemas/ValidationError"
39819 /// }
39820 /// }
39821 /// },
39822 /// "additionalProperties": false
39823 /// },
39824 /// "message": {
39825 /// "description": "Any additional context on the error, or the same as
39826 /// `statusMessage` otherwise.",
39827 /// "examples": [
39828 /// "Bad Request"
39829 /// ],
39830 /// "type": "string"
39831 /// },
39832 /// "statusCode": {
39833 /// "description": "HTTP status code of the error.",
39834 /// "examples": [
39835 /// 400
39836 /// ],
39837 /// "type": "number"
39838 /// },
39839 /// "statusMessage": {
39840 /// "description": "HTTP status message of the error.",
39841 /// "examples": [
39842 /// "Bad Request"
39843 /// ],
39844 /// "type": "string"
39845 /// }
39846 /// },
39847 /// "additionalProperties": false
39848 ///}
39849 /// ```
39850 /// </details>
39851 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39852 #[serde(deny_unknown_fields)]
39853 pub struct SetPackSystemConnectionResponse {
39854 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
39855 pub coda_detail: ::std::option::Option<SetPackSystemConnectionResponseCodaDetail>,
39856 ///Any additional context on the error, or the same as `statusMessage`
39857 /// otherwise.
39858 pub message: ::std::string::String,
39859 #[serde(rename = "statusCode")]
39860 pub status_code: f64,
39861 ///HTTP status message of the error.
39862 #[serde(rename = "statusMessage")]
39863 pub status_message: ::std::string::String,
39864 }
39865
39866 impl ::std::convert::From<&SetPackSystemConnectionResponse> for SetPackSystemConnectionResponse {
39867 fn from(value: &SetPackSystemConnectionResponse) -> Self {
39868 value.clone()
39869 }
39870 }
39871
39872 ///Detail about why this request was rejected.
39873 ///
39874 /// <details><summary>JSON schema</summary>
39875 ///
39876 /// ```json
39877 ///{
39878 /// "description": "Detail about why this request was rejected.",
39879 /// "type": "object",
39880 /// "properties": {
39881 /// "validationErrors": {
39882 /// "type": "array",
39883 /// "items": {
39884 /// "$ref": "#/components/schemas/ValidationError"
39885 /// }
39886 /// }
39887 /// },
39888 /// "additionalProperties": false
39889 ///}
39890 /// ```
39891 /// </details>
39892 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39893 #[serde(deny_unknown_fields)]
39894 pub struct SetPackSystemConnectionResponseCodaDetail {
39895 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
39896 pub validation_errors: ::std::vec::Vec<ValidationError>,
39897 }
39898
39899 impl ::std::convert::From<&SetPackSystemConnectionResponseCodaDetail> for SetPackSystemConnectionResponseCodaDetail {
39900 fn from(value: &SetPackSystemConnectionResponseCodaDetail) -> Self {
39901 value.clone()
39902 }
39903 }
39904
39905 impl ::std::default::Default for SetPackSystemConnectionResponseCodaDetail {
39906 fn default() -> Self {
39907 Self {
39908 validation_errors: Default::default(),
39909 }
39910 }
39911 }
39912
39913 ///Format of a simple column.
39914 ///
39915 /// <details><summary>JSON schema</summary>
39916 ///
39917 /// ```json
39918 ///{
39919 /// "description": "Format of a simple column.",
39920 /// "type": "object",
39921 /// "required": [
39922 /// "isArray",
39923 /// "type"
39924 /// ],
39925 /// "properties": {
39926 /// "isArray": {
39927 /// "description": "Whether or not this column is an array.",
39928 /// "examples": [
39929 /// true
39930 /// ],
39931 /// "type": "boolean"
39932 /// },
39933 /// "type": {
39934 /// "$ref": "#/components/schemas/ColumnFormatType"
39935 /// }
39936 /// },
39937 /// "additionalProperties": false,
39938 /// "x-schema-name": "SimpleColumnFormat"
39939 ///}
39940 /// ```
39941 /// </details>
39942 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39943 #[serde(deny_unknown_fields)]
39944 pub struct SimpleColumnFormat {
39945 ///Whether or not this column is an array.
39946 #[serde(rename = "isArray")]
39947 pub is_array: bool,
39948 #[serde(rename = "type")]
39949 pub type_: ColumnFormatType,
39950 }
39951
39952 impl ::std::convert::From<&SimpleColumnFormat> for SimpleColumnFormat {
39953 fn from(value: &SimpleColumnFormat) -> Self {
39954 value.clone()
39955 }
39956 }
39957
39958 ///`SliderColumnFormat`
39959 ///
39960 /// <details><summary>JSON schema</summary>
39961 ///
39962 /// ```json
39963 ///{
39964 /// "description": "Format of a numeric column that renders as a slider.",
39965 /// "allOf": [
39966 /// {
39967 /// "$ref": "#/components/schemas/SimpleColumnFormat"
39968 /// },
39969 /// {
39970 /// "type": "object",
39971 /// "properties": {
39972 /// "displayType": {
39973 /// "$ref": "#/components/schemas/SliderDisplayType"
39974 /// },
39975 /// "maximum": {
39976 /// "allOf": [
39977 /// {
39978 /// "description": "The maximum allowed value for this
39979 /// slider.",
39980 /// "additionalProperties": false
39981 /// },
39982 /// {
39983 /// "$ref": "#/components/schemas/NumberOrNumberFormula"
39984 /// }
39985 /// ]
39986 /// },
39987 /// "minimum": {
39988 /// "allOf": [
39989 /// {
39990 /// "description": "The minimum allowed value for this
39991 /// slider.",
39992 /// "additionalProperties": false
39993 /// },
39994 /// {
39995 /// "$ref": "#/components/schemas/NumberOrNumberFormula"
39996 /// }
39997 /// ]
39998 /// },
39999 /// "showValue": {
40000 /// "description": "Whether the underyling numeric value is also
40001 /// displayed.",
40002 /// "examples": [
40003 /// true
40004 /// ],
40005 /// "type": "boolean"
40006 /// },
40007 /// "step": {
40008 /// "allOf": [
40009 /// {
40010 /// "description": "The step size (numeric increment) for this
40011 /// slider.",
40012 /// "additionalProperties": false
40013 /// },
40014 /// {
40015 /// "$ref": "#/components/schemas/NumberOrNumberFormula"
40016 /// }
40017 /// ]
40018 /// }
40019 /// },
40020 /// "additionalProperties": false
40021 /// }
40022 /// ],
40023 /// "x-schema-name": "SliderColumnFormat"
40024 ///}
40025 /// ```
40026 /// </details>
40027 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40028 #[serde(deny_unknown_fields)]
40029 pub enum SliderColumnFormat {}
40030 impl ::std::convert::From<&Self> for SliderColumnFormat {
40031 fn from(value: &SliderColumnFormat) -> Self {
40032 value.clone()
40033 }
40034 }
40035
40036 ///How the slider should be rendered.
40037 ///
40038 /// <details><summary>JSON schema</summary>
40039 ///
40040 /// ```json
40041 ///{
40042 /// "description": "How the slider should be rendered.",
40043 /// "type": "string",
40044 /// "enum": [
40045 /// "slider",
40046 /// "progress"
40047 /// ],
40048 /// "x-schema-name": "SliderDisplayType",
40049 /// "x-tsEnumNames": [
40050 /// "Slider",
40051 /// "Progress"
40052 /// ]
40053 ///}
40054 /// ```
40055 /// </details>
40056 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40057 pub enum SliderDisplayType {
40058 #[serde(rename = "slider")]
40059 Slider,
40060 #[serde(rename = "progress")]
40061 Progress,
40062 }
40063
40064 impl ::std::convert::From<&Self> for SliderDisplayType {
40065 fn from(value: &SliderDisplayType) -> Self {
40066 value.clone()
40067 }
40068 }
40069
40070 impl ::std::fmt::Display for SliderDisplayType {
40071 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40072 match *self {
40073 Self::Slider => f.write_str("slider"),
40074 Self::Progress => f.write_str("progress"),
40075 }
40076 }
40077 }
40078
40079 impl ::std::str::FromStr for SliderDisplayType {
40080 type Err = self::error::ConversionError;
40081 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40082 match value {
40083 "slider" => Ok(Self::Slider),
40084 "progress" => Ok(Self::Progress),
40085 _ => Err("invalid value".into()),
40086 }
40087 }
40088 }
40089
40090 impl ::std::convert::TryFrom<&str> for SliderDisplayType {
40091 type Error = self::error::ConversionError;
40092 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40093 value.parse()
40094 }
40095 }
40096
40097 impl ::std::convert::TryFrom<&::std::string::String> for SliderDisplayType {
40098 type Error = self::error::ConversionError;
40099 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40100 value.parse()
40101 }
40102 }
40103
40104 impl ::std::convert::TryFrom<::std::string::String> for SliderDisplayType {
40105 type Error = self::error::ConversionError;
40106 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40107 value.parse()
40108 }
40109 }
40110
40111 ///A sort applied to a table or view.
40112 ///
40113 /// <details><summary>JSON schema</summary>
40114 ///
40115 /// ```json
40116 ///{
40117 /// "description": "A sort applied to a table or view.",
40118 /// "type": "object",
40119 /// "required": [
40120 /// "column",
40121 /// "direction"
40122 /// ],
40123 /// "properties": {
40124 /// "column": {
40125 /// "$ref": "#/components/schemas/ColumnReference"
40126 /// },
40127 /// "direction": {
40128 /// "$ref": "#/components/schemas/SortDirection"
40129 /// }
40130 /// },
40131 /// "additionalProperties": false,
40132 /// "x-schema-name": "Sort"
40133 ///}
40134 /// ```
40135 /// </details>
40136 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40137 #[serde(deny_unknown_fields)]
40138 pub struct Sort {
40139 pub column: ColumnReference,
40140 pub direction: SortDirection,
40141 }
40142
40143 impl ::std::convert::From<&Sort> for Sort {
40144 fn from(value: &Sort) -> Self {
40145 value.clone()
40146 }
40147 }
40148
40149 ///Determines how the objects returned are sorted
40150 ///
40151 /// <details><summary>JSON schema</summary>
40152 ///
40153 /// ```json
40154 ///{
40155 /// "description": "Determines how the objects returned are sorted",
40156 /// "type": "string",
40157 /// "enum": [
40158 /// "name"
40159 /// ],
40160 /// "x-schema-name": "SortBy",
40161 /// "x-tsEnumNames": [
40162 /// "Name"
40163 /// ]
40164 ///}
40165 /// ```
40166 /// </details>
40167 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40168 pub enum SortBy {
40169 #[serde(rename = "name")]
40170 Name,
40171 }
40172
40173 impl ::std::convert::From<&Self> for SortBy {
40174 fn from(value: &SortBy) -> Self {
40175 value.clone()
40176 }
40177 }
40178
40179 impl ::std::fmt::Display for SortBy {
40180 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40181 match *self {
40182 Self::Name => f.write_str("name"),
40183 }
40184 }
40185 }
40186
40187 impl ::std::str::FromStr for SortBy {
40188 type Err = self::error::ConversionError;
40189 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40190 match value {
40191 "name" => Ok(Self::Name),
40192 _ => Err("invalid value".into()),
40193 }
40194 }
40195 }
40196
40197 impl ::std::convert::TryFrom<&str> for SortBy {
40198 type Error = self::error::ConversionError;
40199 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40200 value.parse()
40201 }
40202 }
40203
40204 impl ::std::convert::TryFrom<&::std::string::String> for SortBy {
40205 type Error = self::error::ConversionError;
40206 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40207 value.parse()
40208 }
40209 }
40210
40211 impl ::std::convert::TryFrom<::std::string::String> for SortBy {
40212 type Error = self::error::ConversionError;
40213 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40214 value.parse()
40215 }
40216 }
40217
40218 ///Direction of a sort for a table or view.
40219 ///
40220 /// <details><summary>JSON schema</summary>
40221 ///
40222 /// ```json
40223 ///{
40224 /// "description": "Direction of a sort for a table or view.",
40225 /// "type": "string",
40226 /// "enum": [
40227 /// "ascending",
40228 /// "descending"
40229 /// ],
40230 /// "x-schema-name": "SortDirection",
40231 /// "x-tsEnumNames": [
40232 /// "Ascending",
40233 /// "Descending"
40234 /// ]
40235 ///}
40236 /// ```
40237 /// </details>
40238 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40239 pub enum SortDirection {
40240 #[serde(rename = "ascending")]
40241 Ascending,
40242 #[serde(rename = "descending")]
40243 Descending,
40244 }
40245
40246 impl ::std::convert::From<&Self> for SortDirection {
40247 fn from(value: &SortDirection) -> Self {
40248 value.clone()
40249 }
40250 }
40251
40252 impl ::std::fmt::Display for SortDirection {
40253 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40254 match *self {
40255 Self::Ascending => f.write_str("ascending"),
40256 Self::Descending => f.write_str("descending"),
40257 }
40258 }
40259 }
40260
40261 impl ::std::str::FromStr for SortDirection {
40262 type Err = self::error::ConversionError;
40263 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40264 match value {
40265 "ascending" => Ok(Self::Ascending),
40266 "descending" => Ok(Self::Descending),
40267 _ => Err("invalid value".into()),
40268 }
40269 }
40270 }
40271
40272 impl ::std::convert::TryFrom<&str> for SortDirection {
40273 type Error = self::error::ConversionError;
40274 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40275 value.parse()
40276 }
40277 }
40278
40279 impl ::std::convert::TryFrom<&::std::string::String> for SortDirection {
40280 type Error = self::error::ConversionError;
40281 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40282 value.parse()
40283 }
40284 }
40285
40286 impl ::std::convert::TryFrom<::std::string::String> for SortDirection {
40287 type Error = self::error::ConversionError;
40288 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40289 value.parse()
40290 }
40291 }
40292
40293 ///The Pack plan to show the Pack can be subscribed to at a monthly cost
40294 /// per Doc Maker or for free.
40295 ///
40296 /// <details><summary>JSON schema</summary>
40297 ///
40298 /// ```json
40299 ///{
40300 /// "description": "The Pack plan to show the Pack can be subscribed to at
40301 /// a monthly cost per Doc Maker or for free.",
40302 /// "type": "object",
40303 /// "required": [
40304 /// "createdAt",
40305 /// "packId",
40306 /// "packPlanId",
40307 /// "pricing"
40308 /// ],
40309 /// "properties": {
40310 /// "createdAt": {
40311 /// "description": "Timestamp for when the Pack plan was created.",
40312 /// "examples": [
40313 /// "2018-04-11T00:18:57.946Z"
40314 /// ],
40315 /// "type": "string",
40316 /// "format": "date-time"
40317 /// },
40318 /// "packId": {
40319 /// "type": "number"
40320 /// },
40321 /// "packPlanId": {
40322 /// "type": "string"
40323 /// },
40324 /// "pricing": {
40325 /// "description": "Pricing to show how workspaces can subscribe to the
40326 /// Pack.",
40327 /// "oneOf": [
40328 /// {
40329 /// "$ref": "#/components/schemas/FreePackPlanPricing"
40330 /// },
40331 /// {
40332 /// "$ref": "#/components/schemas/MonthlyDocMakerPackPlanPricing"
40333 /// }
40334 /// ]
40335 /// }
40336 /// },
40337 /// "additionalProperties": false,
40338 /// "x-schema-name": "StandardPackPlan"
40339 ///}
40340 /// ```
40341 /// </details>
40342 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40343 #[serde(deny_unknown_fields)]
40344 pub struct StandardPackPlan {
40345 ///Timestamp for when the Pack plan was created.
40346 #[serde(rename = "createdAt")]
40347 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
40348 #[serde(rename = "packId")]
40349 pub pack_id: f64,
40350 #[serde(rename = "packPlanId")]
40351 pub pack_plan_id: ::std::string::String,
40352 ///Pricing to show how workspaces can subscribe to the Pack.
40353 pub pricing: StandardPackPlanPricing,
40354 }
40355
40356 impl ::std::convert::From<&StandardPackPlan> for StandardPackPlan {
40357 fn from(value: &StandardPackPlan) -> Self {
40358 value.clone()
40359 }
40360 }
40361
40362 ///Pricing to show how workspaces can subscribe to the Pack.
40363 ///
40364 /// <details><summary>JSON schema</summary>
40365 ///
40366 /// ```json
40367 ///{
40368 /// "description": "Pricing to show how workspaces can subscribe to the
40369 /// Pack.",
40370 /// "oneOf": [
40371 /// {
40372 /// "$ref": "#/components/schemas/FreePackPlanPricing"
40373 /// },
40374 /// {
40375 /// "$ref": "#/components/schemas/MonthlyDocMakerPackPlanPricing"
40376 /// }
40377 /// ]
40378 ///}
40379 /// ```
40380 /// </details>
40381 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40382 #[serde(untagged)]
40383 pub enum StandardPackPlanPricing {
40384 FreePackPlanPricing(FreePackPlanPricing),
40385 MonthlyDocMakerPackPlanPricing(MonthlyDocMakerPackPlanPricing),
40386 }
40387
40388 impl ::std::convert::From<&Self> for StandardPackPlanPricing {
40389 fn from(value: &StandardPackPlanPricing) -> Self {
40390 value.clone()
40391 }
40392 }
40393
40394 impl ::std::convert::From<FreePackPlanPricing> for StandardPackPlanPricing {
40395 fn from(value: FreePackPlanPricing) -> Self {
40396 Self::FreePackPlanPricing(value)
40397 }
40398 }
40399
40400 impl ::std::convert::From<MonthlyDocMakerPackPlanPricing> for StandardPackPlanPricing {
40401 fn from(value: MonthlyDocMakerPackPlanPricing) -> Self {
40402 Self::MonthlyDocMakerPackPlanPricing(value)
40403 }
40404 }
40405
40406 ///The type of sync page in a doc
40407 ///
40408 /// <details><summary>JSON schema</summary>
40409 ///
40410 /// ```json
40411 ///{
40412 /// "description": "The type of sync page in a doc",
40413 /// "type": "string",
40414 /// "enum": [
40415 /// "page",
40416 /// "document"
40417 /// ],
40418 /// "x-schema-name": "SyncPageTypeEnum",
40419 /// "x-tsEnumNames": [
40420 /// "Page",
40421 /// "Document"
40422 /// ]
40423 ///}
40424 /// ```
40425 /// </details>
40426 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40427 pub enum SyncPageTypeEnum {
40428 #[serde(rename = "page")]
40429 Page,
40430 #[serde(rename = "document")]
40431 Document,
40432 }
40433
40434 impl ::std::convert::From<&Self> for SyncPageTypeEnum {
40435 fn from(value: &SyncPageTypeEnum) -> Self {
40436 value.clone()
40437 }
40438 }
40439
40440 impl ::std::fmt::Display for SyncPageTypeEnum {
40441 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40442 match *self {
40443 Self::Page => f.write_str("page"),
40444 Self::Document => f.write_str("document"),
40445 }
40446 }
40447 }
40448
40449 impl ::std::str::FromStr for SyncPageTypeEnum {
40450 type Err = self::error::ConversionError;
40451 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40452 match value {
40453 "page" => Ok(Self::Page),
40454 "document" => Ok(Self::Document),
40455 _ => Err("invalid value".into()),
40456 }
40457 }
40458 }
40459
40460 impl ::std::convert::TryFrom<&str> for SyncPageTypeEnum {
40461 type Error = self::error::ConversionError;
40462 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40463 value.parse()
40464 }
40465 }
40466
40467 impl ::std::convert::TryFrom<&::std::string::String> for SyncPageTypeEnum {
40468 type Error = self::error::ConversionError;
40469 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40470 value.parse()
40471 }
40472 }
40473
40474 impl ::std::convert::TryFrom<::std::string::String> for SyncPageTypeEnum {
40475 type Error = self::error::ConversionError;
40476 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40477 value.parse()
40478 }
40479 }
40480
40481 ///Metadata about a table.
40482 ///
40483 /// <details><summary>JSON schema</summary>
40484 ///
40485 /// ```json
40486 ///{
40487 /// "description": "Metadata about a table.",
40488 /// "type": "object",
40489 /// "required": [
40490 /// "browserLink",
40491 /// "createdAt",
40492 /// "displayColumn",
40493 /// "href",
40494 /// "id",
40495 /// "layout",
40496 /// "name",
40497 /// "parent",
40498 /// "rowCount",
40499 /// "sorts",
40500 /// "tableType",
40501 /// "type",
40502 /// "updatedAt",
40503 /// "viewId"
40504 /// ],
40505 /// "properties": {
40506 /// "browserLink": {
40507 /// "description": "Browser-friendly link to the table.",
40508 /// "examples": [
40509 /// "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U"
40510 /// ],
40511 /// "type": "string",
40512 /// "format": "url"
40513 /// },
40514 /// "createdAt": {
40515 /// "description": "Timestamp for when the table was created.",
40516 /// "examples": [
40517 /// "2018-04-11T00:18:57.946Z"
40518 /// ],
40519 /// "type": "string",
40520 /// "format": "date-time"
40521 /// },
40522 /// "displayColumn": {
40523 /// "$ref": "#/components/schemas/ColumnReference"
40524 /// },
40525 /// "filter": {
40526 /// "allOf": [
40527 /// {
40528 /// "description": "Detailed information about the filter formula
40529 /// for the table, if applicable.",
40530 /// "additionalProperties": false
40531 /// },
40532 /// {
40533 /// "$ref": "#/components/schemas/FormulaDetail"
40534 /// }
40535 /// ]
40536 /// },
40537 /// "href": {
40538 /// "description": "API link to the table.",
40539 /// "examples": [
40540 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U"
40541 /// ],
40542 /// "type": "string",
40543 /// "format": "url"
40544 /// },
40545 /// "id": {
40546 /// "description": "ID of the table.",
40547 /// "examples": [
40548 /// "grid-pqRst-U"
40549 /// ],
40550 /// "type": "string"
40551 /// },
40552 /// "layout": {
40553 /// "$ref": "#/components/schemas/Layout"
40554 /// },
40555 /// "name": {
40556 /// "description": "Name of the table.",
40557 /// "examples": [
40558 /// "Tasks"
40559 /// ],
40560 /// "type": "string"
40561 /// },
40562 /// "parent": {
40563 /// "$ref": "#/components/schemas/PageReference"
40564 /// },
40565 /// "parentTable": {
40566 /// "$ref": "#/components/schemas/TableReference"
40567 /// },
40568 /// "rowCount": {
40569 /// "description": "Total number of rows in the table.",
40570 /// "examples": [
40571 /// 130
40572 /// ],
40573 /// "type": "integer"
40574 /// },
40575 /// "sorts": {
40576 /// "description": "Any sorts applied to the table.",
40577 /// "type": "array",
40578 /// "items": {
40579 /// "$ref": "#/components/schemas/Sort"
40580 /// }
40581 /// },
40582 /// "tableType": {
40583 /// "$ref": "#/components/schemas/TableTypeEnum"
40584 /// },
40585 /// "type": {
40586 /// "description": "The type of this resource.",
40587 /// "type": "string",
40588 /// "enum": [
40589 /// "table"
40590 /// ],
40591 /// "x-tsType": "Type.Table"
40592 /// },
40593 /// "updatedAt": {
40594 /// "description": "Timestamp for when the table was last modified.",
40595 /// "examples": [
40596 /// "2018-04-11T00:18:57.946Z"
40597 /// ],
40598 /// "type": "string",
40599 /// "format": "date-time"
40600 /// }
40601 /// },
40602 /// "additionalProperties": false,
40603 /// "x-schema-name": "Table"
40604 ///}
40605 /// ```
40606 /// </details>
40607 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40608 #[serde(deny_unknown_fields)]
40609 pub struct Table {
40610 ///Browser-friendly link to the table.
40611 #[serde(rename = "browserLink")]
40612 pub browser_link: ::std::string::String,
40613 ///Timestamp for when the table was created.
40614 #[serde(rename = "createdAt")]
40615 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
40616 #[serde(rename = "displayColumn")]
40617 pub display_column: ColumnReference,
40618 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
40619 pub filter: ::std::option::Option<TableFilter>,
40620 ///API link to the table.
40621 pub href: ::std::string::String,
40622 ///ID of the table.
40623 pub id: ::std::string::String,
40624 pub layout: Layout,
40625 ///Name of the table.
40626 pub name: ::std::string::String,
40627 pub parent: PageReference,
40628 #[serde(rename = "parentTable", default, skip_serializing_if = "::std::option::Option::is_none")]
40629 pub parent_table: ::std::option::Option<TableReference>,
40630 ///Total number of rows in the table.
40631 #[serde(rename = "rowCount")]
40632 pub row_count: i64,
40633 ///Any sorts applied to the table.
40634 pub sorts: ::std::vec::Vec<Sort>,
40635 #[serde(rename = "tableType")]
40636 pub table_type: TableTypeEnum,
40637 ///The type of this resource.
40638 #[serde(rename = "type")]
40639 pub type_: TableType,
40640 ///Timestamp for when the table was last modified.
40641 #[serde(rename = "updatedAt")]
40642 pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
40643 #[serde(rename = "viewId")]
40644 pub view_id: ::serde_json::Value,
40645 }
40646
40647 impl ::std::convert::From<&Table> for Table {
40648 fn from(value: &Table) -> Self {
40649 value.clone()
40650 }
40651 }
40652
40653 ///`TableFilter`
40654 ///
40655 /// <details><summary>JSON schema</summary>
40656 ///
40657 /// ```json
40658 ///{
40659 /// "allOf": [
40660 /// {
40661 /// "description": "Detailed information about the filter formula for
40662 /// the table, if applicable.",
40663 /// "additionalProperties": false
40664 /// },
40665 /// {
40666 /// "$ref": "#/components/schemas/FormulaDetail"
40667 /// }
40668 /// ]
40669 ///}
40670 /// ```
40671 /// </details>
40672 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40673 #[serde(deny_unknown_fields)]
40674 pub enum TableFilter {}
40675 impl ::std::convert::From<&Self> for TableFilter {
40676 fn from(value: &TableFilter) -> Self {
40677 value.clone()
40678 }
40679 }
40680
40681 ///List of tables.
40682 ///
40683 /// <details><summary>JSON schema</summary>
40684 ///
40685 /// ```json
40686 ///{
40687 /// "description": "List of tables.",
40688 /// "type": "object",
40689 /// "required": [
40690 /// "items"
40691 /// ],
40692 /// "properties": {
40693 /// "href": {
40694 /// "description": "API link to these results",
40695 /// "examples": [
40696 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables?limit=20"
40697 /// ],
40698 /// "type": "string",
40699 /// "format": "url"
40700 /// },
40701 /// "items": {
40702 /// "type": "array",
40703 /// "items": {
40704 /// "$ref": "#/components/schemas/TableReference"
40705 /// }
40706 /// },
40707 /// "nextPageLink": {
40708 /// "allOf": [
40709 /// {
40710 /// "$ref": "#/components/schemas/nextPageLink"
40711 /// },
40712 /// {
40713 /// "examples": [
40714 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables?pageToken=eyJsaW1pd"
40715 /// ],
40716 /// "type": "string"
40717 /// }
40718 /// ]
40719 /// },
40720 /// "nextPageToken": {
40721 /// "$ref": "#/components/schemas/nextPageToken"
40722 /// }
40723 /// },
40724 /// "additionalProperties": false,
40725 /// "x-schema-name": "TableList"
40726 ///}
40727 /// ```
40728 /// </details>
40729 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40730 #[serde(deny_unknown_fields)]
40731 pub struct TableList {
40732 ///API link to these results
40733 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
40734 pub href: ::std::option::Option<::std::string::String>,
40735 pub items: ::std::vec::Vec<TableReference>,
40736 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
40737 pub next_page_link: ::std::option::Option<NextPageLink>,
40738 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
40739 pub next_page_token: ::std::option::Option<NextPageToken>,
40740 }
40741
40742 impl ::std::convert::From<&TableList> for TableList {
40743 fn from(value: &TableList) -> Self {
40744 value.clone()
40745 }
40746 }
40747
40748 ///Reference to a table or view.
40749 ///
40750 /// <details><summary>JSON schema</summary>
40751 ///
40752 /// ```json
40753 ///{
40754 /// "description": "Reference to a table or view.",
40755 /// "type": "object",
40756 /// "required": [
40757 /// "browserLink",
40758 /// "href",
40759 /// "id",
40760 /// "name",
40761 /// "tableType",
40762 /// "type"
40763 /// ],
40764 /// "properties": {
40765 /// "browserLink": {
40766 /// "description": "Browser-friendly link to the table.",
40767 /// "examples": [
40768 /// "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U"
40769 /// ],
40770 /// "type": "string",
40771 /// "format": "url"
40772 /// },
40773 /// "href": {
40774 /// "description": "API link to the table.",
40775 /// "examples": [
40776 /// "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U"
40777 /// ],
40778 /// "type": "string",
40779 /// "format": "url"
40780 /// },
40781 /// "id": {
40782 /// "description": "ID of the table.",
40783 /// "examples": [
40784 /// "grid-pqRst-U"
40785 /// ],
40786 /// "type": "string"
40787 /// },
40788 /// "name": {
40789 /// "description": "Name of the table.",
40790 /// "examples": [
40791 /// "Tasks"
40792 /// ],
40793 /// "type": "string"
40794 /// },
40795 /// "parent": {
40796 /// "$ref": "#/components/schemas/PageReference"
40797 /// },
40798 /// "tableType": {
40799 /// "$ref": "#/components/schemas/TableTypeEnum"
40800 /// },
40801 /// "type": {
40802 /// "description": "The type of this resource.",
40803 /// "type": "string",
40804 /// "enum": [
40805 /// "table"
40806 /// ],
40807 /// "x-tsType": "Type.Table"
40808 /// }
40809 /// },
40810 /// "additionalProperties": false,
40811 /// "x-schema-name": "TableReference"
40812 ///}
40813 /// ```
40814 /// </details>
40815 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40816 #[serde(deny_unknown_fields)]
40817 pub struct TableReference {
40818 ///Browser-friendly link to the table.
40819 #[serde(rename = "browserLink")]
40820 pub browser_link: ::std::string::String,
40821 ///API link to the table.
40822 pub href: ::std::string::String,
40823 ///ID of the table.
40824 pub id: ::std::string::String,
40825 ///Name of the table.
40826 pub name: ::std::string::String,
40827 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
40828 pub parent: ::std::option::Option<PageReference>,
40829 #[serde(rename = "tableType")]
40830 pub table_type: TableTypeEnum,
40831 ///The type of this resource.
40832 #[serde(rename = "type")]
40833 pub type_: TableReferenceType,
40834 }
40835
40836 impl ::std::convert::From<&TableReference> for TableReference {
40837 fn from(value: &TableReference) -> Self {
40838 value.clone()
40839 }
40840 }
40841
40842 ///The type of this resource.
40843 ///
40844 /// <details><summary>JSON schema</summary>
40845 ///
40846 /// ```json
40847 ///{
40848 /// "description": "The type of this resource.",
40849 /// "type": "string",
40850 /// "enum": [
40851 /// "table"
40852 /// ],
40853 /// "x-tsType": "Type.Table"
40854 ///}
40855 /// ```
40856 /// </details>
40857 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40858 pub enum TableReferenceType {
40859 #[serde(rename = "table")]
40860 Table,
40861 }
40862
40863 impl ::std::convert::From<&Self> for TableReferenceType {
40864 fn from(value: &TableReferenceType) -> Self {
40865 value.clone()
40866 }
40867 }
40868
40869 impl ::std::fmt::Display for TableReferenceType {
40870 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40871 match *self {
40872 Self::Table => f.write_str("table"),
40873 }
40874 }
40875 }
40876
40877 impl ::std::str::FromStr for TableReferenceType {
40878 type Err = self::error::ConversionError;
40879 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40880 match value {
40881 "table" => Ok(Self::Table),
40882 _ => Err("invalid value".into()),
40883 }
40884 }
40885 }
40886
40887 impl ::std::convert::TryFrom<&str> for TableReferenceType {
40888 type Error = self::error::ConversionError;
40889 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40890 value.parse()
40891 }
40892 }
40893
40894 impl ::std::convert::TryFrom<&::std::string::String> for TableReferenceType {
40895 type Error = self::error::ConversionError;
40896 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40897 value.parse()
40898 }
40899 }
40900
40901 impl ::std::convert::TryFrom<::std::string::String> for TableReferenceType {
40902 type Error = self::error::ConversionError;
40903 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40904 value.parse()
40905 }
40906 }
40907
40908 ///The type of this resource.
40909 ///
40910 /// <details><summary>JSON schema</summary>
40911 ///
40912 /// ```json
40913 ///{
40914 /// "description": "The type of this resource.",
40915 /// "type": "string",
40916 /// "enum": [
40917 /// "table"
40918 /// ],
40919 /// "x-tsType": "Type.Table"
40920 ///}
40921 /// ```
40922 /// </details>
40923 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40924 pub enum TableType {
40925 #[serde(rename = "table")]
40926 Table,
40927 }
40928
40929 impl ::std::convert::From<&Self> for TableType {
40930 fn from(value: &TableType) -> Self {
40931 value.clone()
40932 }
40933 }
40934
40935 impl ::std::fmt::Display for TableType {
40936 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40937 match *self {
40938 Self::Table => f.write_str("table"),
40939 }
40940 }
40941 }
40942
40943 impl ::std::str::FromStr for TableType {
40944 type Err = self::error::ConversionError;
40945 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40946 match value {
40947 "table" => Ok(Self::Table),
40948 _ => Err("invalid value".into()),
40949 }
40950 }
40951 }
40952
40953 impl ::std::convert::TryFrom<&str> for TableType {
40954 type Error = self::error::ConversionError;
40955 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40956 value.parse()
40957 }
40958 }
40959
40960 impl ::std::convert::TryFrom<&::std::string::String> for TableType {
40961 type Error = self::error::ConversionError;
40962 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40963 value.parse()
40964 }
40965 }
40966
40967 impl ::std::convert::TryFrom<::std::string::String> for TableType {
40968 type Error = self::error::ConversionError;
40969 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
40970 value.parse()
40971 }
40972 }
40973
40974 ///`TableTypeEnum`
40975 ///
40976 /// <details><summary>JSON schema</summary>
40977 ///
40978 /// ```json
40979 ///{
40980 /// "type": "string",
40981 /// "enum": [
40982 /// "table",
40983 /// "view"
40984 /// ],
40985 /// "x-schema-name": "TableTypeEnum",
40986 /// "x-tsEnumNames": [
40987 /// "Table",
40988 /// "View"
40989 /// ]
40990 ///}
40991 /// ```
40992 /// </details>
40993 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40994 pub enum TableTypeEnum {
40995 #[serde(rename = "table")]
40996 Table,
40997 #[serde(rename = "view")]
40998 View,
40999 }
41000
41001 impl ::std::convert::From<&Self> for TableTypeEnum {
41002 fn from(value: &TableTypeEnum) -> Self {
41003 value.clone()
41004 }
41005 }
41006
41007 impl ::std::fmt::Display for TableTypeEnum {
41008 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41009 match *self {
41010 Self::Table => f.write_str("table"),
41011 Self::View => f.write_str("view"),
41012 }
41013 }
41014 }
41015
41016 impl ::std::str::FromStr for TableTypeEnum {
41017 type Err = self::error::ConversionError;
41018 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41019 match value {
41020 "table" => Ok(Self::Table),
41021 "view" => Ok(Self::View),
41022 _ => Err("invalid value".into()),
41023 }
41024 }
41025 }
41026
41027 impl ::std::convert::TryFrom<&str> for TableTypeEnum {
41028 type Error = self::error::ConversionError;
41029 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41030 value.parse()
41031 }
41032 }
41033
41034 impl ::std::convert::TryFrom<&::std::string::String> for TableTypeEnum {
41035 type Error = self::error::ConversionError;
41036 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
41037 value.parse()
41038 }
41039 }
41040
41041 impl ::std::convert::TryFrom<::std::string::String> for TableTypeEnum {
41042 type Error = self::error::ConversionError;
41043 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
41044 value.parse()
41045 }
41046 }
41047
41048 ///`TimeColumnFormat`
41049 ///
41050 /// <details><summary>JSON schema</summary>
41051 ///
41052 /// ```json
41053 ///{
41054 /// "description": "Format of a time column.",
41055 /// "allOf": [
41056 /// {
41057 /// "$ref": "#/components/schemas/SimpleColumnFormat"
41058 /// },
41059 /// {
41060 /// "type": "object",
41061 /// "properties": {
41062 /// "format": {
41063 /// "description": "A format string using Moment syntax: https://momentjs.com/docs/#/displaying/",
41064 /// "examples": [
41065 /// "h:mm:ss A"
41066 /// ],
41067 /// "type": "string"
41068 /// }
41069 /// },
41070 /// "additionalProperties": false
41071 /// }
41072 /// ],
41073 /// "x-schema-name": "TimeColumnFormat"
41074 ///}
41075 /// ```
41076 /// </details>
41077 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41078 #[serde(deny_unknown_fields)]
41079 pub enum TimeColumnFormat {}
41080 impl ::std::convert::From<&Self> for TimeColumnFormat {
41081 fn from(value: &TimeColumnFormat) -> Self {
41082 value.clone()
41083 }
41084 }
41085
41086 ///An HTTP error resulting from an unsuccessful request.
41087 ///
41088 /// <details><summary>JSON schema</summary>
41089 ///
41090 /// ```json
41091 ///{
41092 /// "description": "An HTTP error resulting from an unsuccessful request.",
41093 /// "required": [
41094 /// "message",
41095 /// "statusCode",
41096 /// "statusMessage"
41097 /// ],
41098 /// "properties": {
41099 /// "message": {
41100 /// "description": "Any additional context on the error, or the same as
41101 /// `statusMessage` otherwise.",
41102 /// "examples": [
41103 /// "Bad Request"
41104 /// ],
41105 /// "type": "string"
41106 /// },
41107 /// "statusCode": {
41108 /// "description": "HTTP status code of the error.",
41109 /// "examples": [
41110 /// 400
41111 /// ],
41112 /// "type": "number"
41113 /// },
41114 /// "statusMessage": {
41115 /// "description": "HTTP status message of the error.",
41116 /// "examples": [
41117 /// "Bad Request"
41118 /// ],
41119 /// "type": "string"
41120 /// }
41121 /// },
41122 /// "additionalProperties": false
41123 ///}
41124 /// ```
41125 /// </details>
41126 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41127 #[serde(deny_unknown_fields)]
41128 pub struct TriggerWebhookAutomationResponse {
41129 ///Any additional context on the error, or the same as `statusMessage`
41130 /// otherwise.
41131 pub message: ::std::string::String,
41132 #[serde(rename = "statusCode")]
41133 pub status_code: f64,
41134 ///HTTP status message of the error.
41135 #[serde(rename = "statusMessage")]
41136 pub status_message: ::std::string::String,
41137 }
41138
41139 impl ::std::convert::From<&TriggerWebhookAutomationResponse> for TriggerWebhookAutomationResponse {
41140 fn from(value: &TriggerWebhookAutomationResponse) -> Self {
41141 value.clone()
41142 }
41143 }
41144
41145 ///A constant identifying the type of the resource.
41146 ///
41147 /// <details><summary>JSON schema</summary>
41148 ///
41149 /// ```json
41150 ///{
41151 /// "description": "A constant identifying the type of the resource.",
41152 /// "type": "string",
41153 /// "enum": [
41154 /// "aclMetadata",
41155 /// "aclPermissions",
41156 /// "aclSettings",
41157 /// "agentPackLog",
41158 /// "analyticsLastUpdated",
41159 /// "apiLink",
41160 /// "automation",
41161 /// "column",
41162 /// "control",
41163 /// "doc",
41164 /// "customDocDomain",
41165 /// "customDocDomainProvider",
41166 /// "docAnalytics",
41167 /// "docAnalyticsSummary",
41168 /// "docAnalyticsV2",
41169 /// "folder",
41170 /// "formula",
41171 /// "goLink",
41172 /// "ingestionBatchExecution",
41173 /// "ingestionExecution",
41174 /// "ingestionExecutionAttempt",
41175 /// "ingestionPackLog",
41176 /// "ingestionParentItem",
41177 /// "mutationStatus",
41178 /// "pack",
41179 /// "packAclPermissions",
41180 /// "packAnalytics",
41181 /// "packAnalyticsSummary",
41182 /// "packAsset",
41183 /// "packCategory",
41184 /// "packConfigurationSchema",
41185 /// "packFeaturedDocs",
41186 /// "packFormulaAnalytics",
41187 /// "packInvitation",
41188 /// "packLog",
41189 /// "packMaker",
41190 /// "packOauthConfig",
41191 /// "packRelease",
41192 /// "packSourceCode",
41193 /// "packSystemConnection",
41194 /// "packVersion",
41195 /// "page",
41196 /// "pageContentExport",
41197 /// "pageContentExportStatus",
41198 /// "principal",
41199 /// "row",
41200 /// "table",
41201 /// "user",
41202 /// "workspace"
41203 /// ],
41204 /// "x-schema-name": "Type",
41205 /// "x-tsEnumNames": [
41206 /// "AclMetadata",
41207 /// "AclPermissions",
41208 /// "AclSettings",
41209 /// "AgentPackLog",
41210 /// "AnalyticsLastUpdated",
41211 /// "ApiLink",
41212 /// "Automation",
41213 /// "Column",
41214 /// "Control",
41215 /// "Doc",
41216 /// "CustomDocDomain",
41217 /// "CustomDocDomainProvider",
41218 /// "DocAnalytics",
41219 /// "DocAnalyticsSummary",
41220 /// "DocAnalyticsV2",
41221 /// "Folder",
41222 /// "Formula",
41223 /// "GoLink",
41224 /// "IngestionBatchExecution",
41225 /// "IngestionExecution",
41226 /// "IngestionExecutionAttempt",
41227 /// "IngestionPackLog",
41228 /// "IngestionParentItem",
41229 /// "MutationStatus",
41230 /// "Pack",
41231 /// "PackAclPermissions",
41232 /// "PackAnalytics",
41233 /// "PackAnalyticsSummary",
41234 /// "PackAsset",
41235 /// "PackCategory",
41236 /// "PackConfigurationSchema",
41237 /// "PackFeaturedDocs",
41238 /// "PackFormulaAnalytics",
41239 /// "PackInvitation",
41240 /// "PackLog",
41241 /// "PackMaker",
41242 /// "PackOauthConfig",
41243 /// "PackRelease",
41244 /// "PackSourceCode",
41245 /// "PackSystemConnection",
41246 /// "PackVersion",
41247 /// "Page",
41248 /// "PageContentExport",
41249 /// "PageContentExportStatus",
41250 /// "Principal",
41251 /// "Row",
41252 /// "Table",
41253 /// "User",
41254 /// "Workspace"
41255 /// ]
41256 ///}
41257 /// ```
41258 /// </details>
41259 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41260 pub enum Type {
41261 #[serde(rename = "aclMetadata")]
41262 AclMetadata,
41263 #[serde(rename = "aclPermissions")]
41264 AclPermissions,
41265 #[serde(rename = "aclSettings")]
41266 AclSettings,
41267 #[serde(rename = "agentPackLog")]
41268 AgentPackLog,
41269 #[serde(rename = "analyticsLastUpdated")]
41270 AnalyticsLastUpdated,
41271 #[serde(rename = "apiLink")]
41272 ApiLink,
41273 #[serde(rename = "automation")]
41274 Automation,
41275 #[serde(rename = "column")]
41276 Column,
41277 #[serde(rename = "control")]
41278 Control,
41279 #[serde(rename = "doc")]
41280 Doc,
41281 #[serde(rename = "customDocDomain")]
41282 CustomDocDomain,
41283 #[serde(rename = "customDocDomainProvider")]
41284 CustomDocDomainProvider,
41285 #[serde(rename = "docAnalytics")]
41286 DocAnalytics,
41287 #[serde(rename = "docAnalyticsSummary")]
41288 DocAnalyticsSummary,
41289 #[serde(rename = "docAnalyticsV2")]
41290 DocAnalyticsV2,
41291 #[serde(rename = "folder")]
41292 Folder,
41293 #[serde(rename = "formula")]
41294 Formula,
41295 #[serde(rename = "goLink")]
41296 GoLink,
41297 #[serde(rename = "ingestionBatchExecution")]
41298 IngestionBatchExecution,
41299 #[serde(rename = "ingestionExecution")]
41300 IngestionExecution,
41301 #[serde(rename = "ingestionExecutionAttempt")]
41302 IngestionExecutionAttempt,
41303 #[serde(rename = "ingestionPackLog")]
41304 IngestionPackLog,
41305 #[serde(rename = "ingestionParentItem")]
41306 IngestionParentItem,
41307 #[serde(rename = "mutationStatus")]
41308 MutationStatus,
41309 #[serde(rename = "pack")]
41310 Pack,
41311 #[serde(rename = "packAclPermissions")]
41312 PackAclPermissions,
41313 #[serde(rename = "packAnalytics")]
41314 PackAnalytics,
41315 #[serde(rename = "packAnalyticsSummary")]
41316 PackAnalyticsSummary,
41317 #[serde(rename = "packAsset")]
41318 PackAsset,
41319 #[serde(rename = "packCategory")]
41320 PackCategory,
41321 #[serde(rename = "packConfigurationSchema")]
41322 PackConfigurationSchema,
41323 #[serde(rename = "packFeaturedDocs")]
41324 PackFeaturedDocs,
41325 #[serde(rename = "packFormulaAnalytics")]
41326 PackFormulaAnalytics,
41327 #[serde(rename = "packInvitation")]
41328 PackInvitation,
41329 #[serde(rename = "packLog")]
41330 PackLog,
41331 #[serde(rename = "packMaker")]
41332 PackMaker,
41333 #[serde(rename = "packOauthConfig")]
41334 PackOauthConfig,
41335 #[serde(rename = "packRelease")]
41336 PackRelease,
41337 #[serde(rename = "packSourceCode")]
41338 PackSourceCode,
41339 #[serde(rename = "packSystemConnection")]
41340 PackSystemConnection,
41341 #[serde(rename = "packVersion")]
41342 PackVersion,
41343 #[serde(rename = "page")]
41344 Page,
41345 #[serde(rename = "pageContentExport")]
41346 PageContentExport,
41347 #[serde(rename = "pageContentExportStatus")]
41348 PageContentExportStatus,
41349 #[serde(rename = "principal")]
41350 Principal,
41351 #[serde(rename = "row")]
41352 Row,
41353 #[serde(rename = "table")]
41354 Table,
41355 #[serde(rename = "user")]
41356 User,
41357 #[serde(rename = "workspace")]
41358 Workspace,
41359 }
41360
41361 impl ::std::convert::From<&Self> for Type {
41362 fn from(value: &Type) -> Self {
41363 value.clone()
41364 }
41365 }
41366
41367 impl ::std::fmt::Display for Type {
41368 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41369 match *self {
41370 Self::AclMetadata => f.write_str("aclMetadata"),
41371 Self::AclPermissions => f.write_str("aclPermissions"),
41372 Self::AclSettings => f.write_str("aclSettings"),
41373 Self::AgentPackLog => f.write_str("agentPackLog"),
41374 Self::AnalyticsLastUpdated => f.write_str("analyticsLastUpdated"),
41375 Self::ApiLink => f.write_str("apiLink"),
41376 Self::Automation => f.write_str("automation"),
41377 Self::Column => f.write_str("column"),
41378 Self::Control => f.write_str("control"),
41379 Self::Doc => f.write_str("doc"),
41380 Self::CustomDocDomain => f.write_str("customDocDomain"),
41381 Self::CustomDocDomainProvider => f.write_str("customDocDomainProvider"),
41382 Self::DocAnalytics => f.write_str("docAnalytics"),
41383 Self::DocAnalyticsSummary => f.write_str("docAnalyticsSummary"),
41384 Self::DocAnalyticsV2 => f.write_str("docAnalyticsV2"),
41385 Self::Folder => f.write_str("folder"),
41386 Self::Formula => f.write_str("formula"),
41387 Self::GoLink => f.write_str("goLink"),
41388 Self::IngestionBatchExecution => f.write_str("ingestionBatchExecution"),
41389 Self::IngestionExecution => f.write_str("ingestionExecution"),
41390 Self::IngestionExecutionAttempt => f.write_str("ingestionExecutionAttempt"),
41391 Self::IngestionPackLog => f.write_str("ingestionPackLog"),
41392 Self::IngestionParentItem => f.write_str("ingestionParentItem"),
41393 Self::MutationStatus => f.write_str("mutationStatus"),
41394 Self::Pack => f.write_str("pack"),
41395 Self::PackAclPermissions => f.write_str("packAclPermissions"),
41396 Self::PackAnalytics => f.write_str("packAnalytics"),
41397 Self::PackAnalyticsSummary => f.write_str("packAnalyticsSummary"),
41398 Self::PackAsset => f.write_str("packAsset"),
41399 Self::PackCategory => f.write_str("packCategory"),
41400 Self::PackConfigurationSchema => f.write_str("packConfigurationSchema"),
41401 Self::PackFeaturedDocs => f.write_str("packFeaturedDocs"),
41402 Self::PackFormulaAnalytics => f.write_str("packFormulaAnalytics"),
41403 Self::PackInvitation => f.write_str("packInvitation"),
41404 Self::PackLog => f.write_str("packLog"),
41405 Self::PackMaker => f.write_str("packMaker"),
41406 Self::PackOauthConfig => f.write_str("packOauthConfig"),
41407 Self::PackRelease => f.write_str("packRelease"),
41408 Self::PackSourceCode => f.write_str("packSourceCode"),
41409 Self::PackSystemConnection => f.write_str("packSystemConnection"),
41410 Self::PackVersion => f.write_str("packVersion"),
41411 Self::Page => f.write_str("page"),
41412 Self::PageContentExport => f.write_str("pageContentExport"),
41413 Self::PageContentExportStatus => f.write_str("pageContentExportStatus"),
41414 Self::Principal => f.write_str("principal"),
41415 Self::Row => f.write_str("row"),
41416 Self::Table => f.write_str("table"),
41417 Self::User => f.write_str("user"),
41418 Self::Workspace => f.write_str("workspace"),
41419 }
41420 }
41421 }
41422
41423 impl ::std::str::FromStr for Type {
41424 type Err = self::error::ConversionError;
41425 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41426 match value {
41427 "aclMetadata" => Ok(Self::AclMetadata),
41428 "aclPermissions" => Ok(Self::AclPermissions),
41429 "aclSettings" => Ok(Self::AclSettings),
41430 "agentPackLog" => Ok(Self::AgentPackLog),
41431 "analyticsLastUpdated" => Ok(Self::AnalyticsLastUpdated),
41432 "apiLink" => Ok(Self::ApiLink),
41433 "automation" => Ok(Self::Automation),
41434 "column" => Ok(Self::Column),
41435 "control" => Ok(Self::Control),
41436 "doc" => Ok(Self::Doc),
41437 "customDocDomain" => Ok(Self::CustomDocDomain),
41438 "customDocDomainProvider" => Ok(Self::CustomDocDomainProvider),
41439 "docAnalytics" => Ok(Self::DocAnalytics),
41440 "docAnalyticsSummary" => Ok(Self::DocAnalyticsSummary),
41441 "docAnalyticsV2" => Ok(Self::DocAnalyticsV2),
41442 "folder" => Ok(Self::Folder),
41443 "formula" => Ok(Self::Formula),
41444 "goLink" => Ok(Self::GoLink),
41445 "ingestionBatchExecution" => Ok(Self::IngestionBatchExecution),
41446 "ingestionExecution" => Ok(Self::IngestionExecution),
41447 "ingestionExecutionAttempt" => Ok(Self::IngestionExecutionAttempt),
41448 "ingestionPackLog" => Ok(Self::IngestionPackLog),
41449 "ingestionParentItem" => Ok(Self::IngestionParentItem),
41450 "mutationStatus" => Ok(Self::MutationStatus),
41451 "pack" => Ok(Self::Pack),
41452 "packAclPermissions" => Ok(Self::PackAclPermissions),
41453 "packAnalytics" => Ok(Self::PackAnalytics),
41454 "packAnalyticsSummary" => Ok(Self::PackAnalyticsSummary),
41455 "packAsset" => Ok(Self::PackAsset),
41456 "packCategory" => Ok(Self::PackCategory),
41457 "packConfigurationSchema" => Ok(Self::PackConfigurationSchema),
41458 "packFeaturedDocs" => Ok(Self::PackFeaturedDocs),
41459 "packFormulaAnalytics" => Ok(Self::PackFormulaAnalytics),
41460 "packInvitation" => Ok(Self::PackInvitation),
41461 "packLog" => Ok(Self::PackLog),
41462 "packMaker" => Ok(Self::PackMaker),
41463 "packOauthConfig" => Ok(Self::PackOauthConfig),
41464 "packRelease" => Ok(Self::PackRelease),
41465 "packSourceCode" => Ok(Self::PackSourceCode),
41466 "packSystemConnection" => Ok(Self::PackSystemConnection),
41467 "packVersion" => Ok(Self::PackVersion),
41468 "page" => Ok(Self::Page),
41469 "pageContentExport" => Ok(Self::PageContentExport),
41470 "pageContentExportStatus" => Ok(Self::PageContentExportStatus),
41471 "principal" => Ok(Self::Principal),
41472 "row" => Ok(Self::Row),
41473 "table" => Ok(Self::Table),
41474 "user" => Ok(Self::User),
41475 "workspace" => Ok(Self::Workspace),
41476 _ => Err("invalid value".into()),
41477 }
41478 }
41479 }
41480
41481 impl ::std::convert::TryFrom<&str> for Type {
41482 type Error = self::error::ConversionError;
41483 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41484 value.parse()
41485 }
41486 }
41487
41488 impl ::std::convert::TryFrom<&::std::string::String> for Type {
41489 type Error = self::error::ConversionError;
41490 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
41491 value.parse()
41492 }
41493 }
41494
41495 impl ::std::convert::TryFrom<::std::string::String> for Type {
41496 type Error = self::error::ConversionError;
41497 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
41498 value.parse()
41499 }
41500 }
41501
41502 ///An HTTP error resulting from an unsuccessful request.
41503 ///
41504 /// <details><summary>JSON schema</summary>
41505 ///
41506 /// ```json
41507 ///{
41508 /// "description": "An HTTP error resulting from an unsuccessful request.",
41509 /// "required": [
41510 /// "message",
41511 /// "statusCode",
41512 /// "statusMessage"
41513 /// ],
41514 /// "properties": {
41515 /// "message": {
41516 /// "description": "Any additional context on the error, or the same as
41517 /// `statusMessage` otherwise.",
41518 /// "examples": [
41519 /// "Unauthorized"
41520 /// ],
41521 /// "type": "string"
41522 /// },
41523 /// "statusCode": {
41524 /// "description": "HTTP status code of the error.",
41525 /// "examples": [
41526 /// 401
41527 /// ],
41528 /// "type": "number"
41529 /// },
41530 /// "statusMessage": {
41531 /// "description": "HTTP status message of the error.",
41532 /// "examples": [
41533 /// "Unauthorized"
41534 /// ],
41535 /// "type": "string"
41536 /// }
41537 /// },
41538 /// "additionalProperties": false
41539 ///}
41540 /// ```
41541 /// </details>
41542 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41543 #[serde(deny_unknown_fields)]
41544 pub struct UnpublishDocResponse {
41545 ///Any additional context on the error, or the same as `statusMessage`
41546 /// otherwise.
41547 pub message: ::std::string::String,
41548 #[serde(rename = "statusCode")]
41549 pub status_code: f64,
41550 ///HTTP status message of the error.
41551 #[serde(rename = "statusMessage")]
41552 pub status_message: ::std::string::String,
41553 }
41554
41555 impl ::std::convert::From<&UnpublishDocResponse> for UnpublishDocResponse {
41556 fn from(value: &UnpublishDocResponse) -> Self {
41557 value.clone()
41558 }
41559 }
41560
41561 ///The result of unpublishing a doc.
41562 ///
41563 /// <details><summary>JSON schema</summary>
41564 ///
41565 /// ```json
41566 ///{
41567 /// "description": "The result of unpublishing a doc.",
41568 /// "type": "object",
41569 /// "additionalProperties": false,
41570 /// "x-schema-name": "UnpublishResult"
41571 ///}
41572 /// ```
41573 /// </details>
41574 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41575 #[serde(deny_unknown_fields)]
41576 pub struct UnpublishResult {}
41577 impl ::std::convert::From<&UnpublishResult> for UnpublishResult {
41578 fn from(value: &UnpublishResult) -> Self {
41579 value.clone()
41580 }
41581 }
41582
41583 impl ::std::default::Default for UnpublishResult {
41584 fn default() -> Self {
41585 Self {}
41586 }
41587 }
41588
41589 ///Request to update ACL settings for a doc.
41590 ///
41591 /// <details><summary>JSON schema</summary>
41592 ///
41593 /// ```json
41594 ///{
41595 /// "description": "Request to update ACL settings for a doc.",
41596 /// "type": "object",
41597 /// "properties": {
41598 /// "allowCopying": {
41599 /// "description": "When true, allows doc viewers to copy the doc.",
41600 /// "type": "boolean"
41601 /// },
41602 /// "allowEditorsToChangePermissions": {
41603 /// "description": "When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions.\n",
41604 /// "type": "boolean"
41605 /// },
41606 /// "allowViewersToRequestEditing": {
41607 /// "description": "When true, allows doc viewers to request editing
41608 /// permissions.",
41609 /// "type": "boolean"
41610 /// }
41611 /// },
41612 /// "additionalProperties": false,
41613 /// "x-schema-name": "UpdateAclSettingsRequest"
41614 ///}
41615 /// ```
41616 /// </details>
41617 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41618 #[serde(deny_unknown_fields)]
41619 pub struct UpdateAclSettingsRequest {
41620 ///When true, allows doc viewers to copy the doc.
41621 #[serde(rename = "allowCopying", default, skip_serializing_if = "::std::option::Option::is_none")]
41622 pub allow_copying: ::std::option::Option<bool>,
41623 ///When true, allows editors to change doc permissions. When false,
41624 /// only doc owner can change doc permissions.
41625 #[serde(rename = "allowEditorsToChangePermissions", default, skip_serializing_if = "::std::option::Option::is_none")]
41626 pub allow_editors_to_change_permissions: ::std::option::Option<bool>,
41627 ///When true, allows doc viewers to request editing permissions.
41628 #[serde(rename = "allowViewersToRequestEditing", default, skip_serializing_if = "::std::option::Option::is_none")]
41629 pub allow_viewers_to_request_editing: ::std::option::Option<bool>,
41630 }
41631
41632 impl ::std::convert::From<&UpdateAclSettingsRequest> for UpdateAclSettingsRequest {
41633 fn from(value: &UpdateAclSettingsRequest) -> Self {
41634 value.clone()
41635 }
41636 }
41637
41638 impl ::std::default::Default for UpdateAclSettingsRequest {
41639 fn default() -> Self {
41640 Self {
41641 allow_copying: Default::default(),
41642 allow_editors_to_change_permissions: Default::default(),
41643 allow_viewers_to_request_editing: Default::default(),
41644 }
41645 }
41646 }
41647
41648 ///An HTTP error resulting from an unsuccessful request.
41649 ///
41650 /// <details><summary>JSON schema</summary>
41651 ///
41652 /// ```json
41653 ///{
41654 /// "description": "An HTTP error resulting from an unsuccessful request.",
41655 /// "required": [
41656 /// "message",
41657 /// "statusCode",
41658 /// "statusMessage"
41659 /// ],
41660 /// "properties": {
41661 /// "message": {
41662 /// "description": "Any additional context on the error, or the same as
41663 /// `statusMessage` otherwise.",
41664 /// "examples": [
41665 /// "Unauthorized"
41666 /// ],
41667 /// "type": "string"
41668 /// },
41669 /// "statusCode": {
41670 /// "description": "HTTP status code of the error.",
41671 /// "examples": [
41672 /// 401
41673 /// ],
41674 /// "type": "number"
41675 /// },
41676 /// "statusMessage": {
41677 /// "description": "HTTP status message of the error.",
41678 /// "examples": [
41679 /// "Unauthorized"
41680 /// ],
41681 /// "type": "string"
41682 /// }
41683 /// },
41684 /// "additionalProperties": false
41685 ///}
41686 /// ```
41687 /// </details>
41688 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41689 #[serde(deny_unknown_fields)]
41690 pub struct UpdateAclSettingsResponse {
41691 ///Any additional context on the error, or the same as `statusMessage`
41692 /// otherwise.
41693 pub message: ::std::string::String,
41694 #[serde(rename = "statusCode")]
41695 pub status_code: f64,
41696 ///HTTP status message of the error.
41697 #[serde(rename = "statusMessage")]
41698 pub status_message: ::std::string::String,
41699 }
41700
41701 impl ::std::convert::From<&UpdateAclSettingsResponse> for UpdateAclSettingsResponse {
41702 fn from(value: &UpdateAclSettingsResponse) -> Self {
41703 value.clone()
41704 }
41705 }
41706
41707 ///Payload for updating the properties of a custom published doc domain.
41708 ///
41709 /// <details><summary>JSON schema</summary>
41710 ///
41711 /// ```json
41712 ///{
41713 /// "description": "Payload for updating the properties of a custom
41714 /// published doc domain.",
41715 /// "type": "object",
41716 /// "additionalProperties": false,
41717 /// "x-schema-name": "UpdateCustomDocDomainRequest"
41718 ///}
41719 /// ```
41720 /// </details>
41721 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41722 #[serde(deny_unknown_fields)]
41723 pub struct UpdateCustomDocDomainRequest {}
41724 impl ::std::convert::From<&UpdateCustomDocDomainRequest> for UpdateCustomDocDomainRequest {
41725 fn from(value: &UpdateCustomDocDomainRequest) -> Self {
41726 value.clone()
41727 }
41728 }
41729
41730 impl ::std::default::Default for UpdateCustomDocDomainRequest {
41731 fn default() -> Self {
41732 Self {}
41733 }
41734 }
41735
41736 ///The result of updating a custom domain for a published doc.
41737 ///
41738 /// <details><summary>JSON schema</summary>
41739 ///
41740 /// ```json
41741 ///{
41742 /// "description": "The result of updating a custom domain for a published
41743 /// doc.",
41744 /// "type": "object",
41745 /// "additionalProperties": false,
41746 /// "x-schema-name": "UpdateCustomDocDomainResponse"
41747 ///}
41748 /// ```
41749 /// </details>
41750 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41751 #[serde(deny_unknown_fields)]
41752 pub struct UpdateCustomDocDomainResponse {}
41753 impl ::std::convert::From<&UpdateCustomDocDomainResponse> for UpdateCustomDocDomainResponse {
41754 fn from(value: &UpdateCustomDocDomainResponse) -> Self {
41755 value.clone()
41756 }
41757 }
41758
41759 impl ::std::default::Default for UpdateCustomDocDomainResponse {
41760 fn default() -> Self {
41761 Self {}
41762 }
41763 }
41764
41765 ///An HTTP error resulting from an unsuccessful request.
41766 ///
41767 /// <details><summary>JSON schema</summary>
41768 ///
41769 /// ```json
41770 ///{
41771 /// "description": "An HTTP error resulting from an unsuccessful request.",
41772 /// "required": [
41773 /// "message",
41774 /// "statusCode",
41775 /// "statusMessage"
41776 /// ],
41777 /// "properties": {
41778 /// "message": {
41779 /// "description": "Any additional context on the error, or the same as
41780 /// `statusMessage` otherwise.",
41781 /// "examples": [
41782 /// "Bad Request"
41783 /// ],
41784 /// "type": "string"
41785 /// },
41786 /// "statusCode": {
41787 /// "description": "HTTP status code of the error.",
41788 /// "examples": [
41789 /// 400
41790 /// ],
41791 /// "type": "number"
41792 /// },
41793 /// "statusMessage": {
41794 /// "description": "HTTP status message of the error.",
41795 /// "examples": [
41796 /// "Bad Request"
41797 /// ],
41798 /// "type": "string"
41799 /// }
41800 /// },
41801 /// "additionalProperties": false
41802 ///}
41803 /// ```
41804 /// </details>
41805 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41806 #[serde(deny_unknown_fields)]
41807 pub struct UpdateDocResponse {
41808 ///Any additional context on the error, or the same as `statusMessage`
41809 /// otherwise.
41810 pub message: ::std::string::String,
41811 #[serde(rename = "statusCode")]
41812 pub status_code: f64,
41813 ///HTTP status message of the error.
41814 #[serde(rename = "statusMessage")]
41815 pub status_message: ::std::string::String,
41816 }
41817
41818 impl ::std::convert::From<&UpdateDocResponse> for UpdateDocResponse {
41819 fn from(value: &UpdateDocResponse) -> Self {
41820 value.clone()
41821 }
41822 }
41823
41824 ///Payload for updating featured docs for a Pack.
41825 ///
41826 /// <details><summary>JSON schema</summary>
41827 ///
41828 /// ```json
41829 ///{
41830 /// "description": "Payload for updating featured docs for a Pack.",
41831 /// "type": "object",
41832 /// "required": [
41833 /// "items"
41834 /// ],
41835 /// "properties": {
41836 /// "items": {
41837 /// "description": "A list of docs to set as the featured docs for a
41838 /// Pack.",
41839 /// "type": "array",
41840 /// "items": {
41841 /// "$ref": "#/components/schemas/PackFeaturedDocRequestItem"
41842 /// },
41843 /// "maxItems": 5,
41844 /// "uniqueItems": true
41845 /// }
41846 /// },
41847 /// "additionalProperties": false,
41848 /// "x-schema-name": "UpdatePackFeaturedDocsRequest"
41849 ///}
41850 /// ```
41851 /// </details>
41852 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41853 #[serde(deny_unknown_fields)]
41854 pub struct UpdatePackFeaturedDocsRequest {
41855 ///A list of docs to set as the featured docs for a Pack.
41856 pub items: Vec<PackFeaturedDocRequestItem>,
41857 }
41858
41859 impl ::std::convert::From<&UpdatePackFeaturedDocsRequest> for UpdatePackFeaturedDocsRequest {
41860 fn from(value: &UpdatePackFeaturedDocsRequest) -> Self {
41861 value.clone()
41862 }
41863 }
41864
41865 ///Confirmation of successful Pack featured docs update.
41866 ///
41867 /// <details><summary>JSON schema</summary>
41868 ///
41869 /// ```json
41870 ///{
41871 /// "description": "Confirmation of successful Pack featured docs update.",
41872 /// "type": "object",
41873 /// "additionalProperties": false,
41874 /// "x-schema-name": "UpdatePackFeaturedDocsResponse"
41875 ///}
41876 /// ```
41877 /// </details>
41878 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41879 #[serde(deny_unknown_fields)]
41880 pub struct UpdatePackFeaturedDocsResponse {}
41881 impl ::std::convert::From<&UpdatePackFeaturedDocsResponse> for UpdatePackFeaturedDocsResponse {
41882 fn from(value: &UpdatePackFeaturedDocsResponse) -> Self {
41883 value.clone()
41884 }
41885 }
41886
41887 impl ::std::default::Default for UpdatePackFeaturedDocsResponse {
41888 fn default() -> Self {
41889 Self {}
41890 }
41891 }
41892
41893 ///Payload for updating a Pack invitation.
41894 ///
41895 /// <details><summary>JSON schema</summary>
41896 ///
41897 /// ```json
41898 ///{
41899 /// "description": "Payload for updating a Pack invitation.",
41900 /// "type": "object",
41901 /// "required": [
41902 /// "access"
41903 /// ],
41904 /// "properties": {
41905 /// "access": {
41906 /// "$ref": "#/components/schemas/PackAccessType"
41907 /// }
41908 /// },
41909 /// "additionalProperties": false,
41910 /// "x-schema-name": "UpdatePackInvitationRequest"
41911 ///}
41912 /// ```
41913 /// </details>
41914 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41915 #[serde(deny_unknown_fields)]
41916 pub struct UpdatePackInvitationRequest {
41917 pub access: PackAccessType,
41918 }
41919
41920 impl ::std::convert::From<&UpdatePackInvitationRequest> for UpdatePackInvitationRequest {
41921 fn from(value: &UpdatePackInvitationRequest) -> Self {
41922 value.clone()
41923 }
41924 }
41925
41926 ///Confirmation of successfully updating a Pack invitation.
41927 ///
41928 /// <details><summary>JSON schema</summary>
41929 ///
41930 /// ```json
41931 ///{
41932 /// "description": "Confirmation of successfully updating a Pack
41933 /// invitation.",
41934 /// "type": "object",
41935 /// "additionalProperties": false,
41936 /// "x-schema-name": "UpdatePackInvitationResponse"
41937 ///}
41938 /// ```
41939 /// </details>
41940 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41941 #[serde(deny_unknown_fields)]
41942 pub struct UpdatePackInvitationResponse {}
41943 impl ::std::convert::From<&UpdatePackInvitationResponse> for UpdatePackInvitationResponse {
41944 fn from(value: &UpdatePackInvitationResponse) -> Self {
41945 value.clone()
41946 }
41947 }
41948
41949 impl ::std::default::Default for UpdatePackInvitationResponse {
41950 fn default() -> Self {
41951 Self {}
41952 }
41953 }
41954
41955 ///Detail about why this request was rejected.
41956 ///
41957 /// <details><summary>JSON schema</summary>
41958 ///
41959 /// ```json
41960 ///{
41961 /// "description": "Detail about why this request was rejected.",
41962 /// "type": "object",
41963 /// "properties": {
41964 /// "validationErrors": {
41965 /// "type": "array",
41966 /// "items": {
41967 /// "$ref": "#/components/schemas/ValidationError"
41968 /// }
41969 /// }
41970 /// },
41971 /// "additionalProperties": false
41972 ///}
41973 /// ```
41974 /// </details>
41975 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41976 #[serde(deny_unknown_fields)]
41977 pub struct UpdatePackInvitationResponseCodaDetail {
41978 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
41979 pub validation_errors: ::std::vec::Vec<ValidationError>,
41980 }
41981
41982 impl ::std::convert::From<&UpdatePackInvitationResponseCodaDetail> for UpdatePackInvitationResponseCodaDetail {
41983 fn from(value: &UpdatePackInvitationResponseCodaDetail) -> Self {
41984 value.clone()
41985 }
41986 }
41987
41988 impl ::std::default::Default for UpdatePackInvitationResponseCodaDetail {
41989 fn default() -> Self {
41990 Self {
41991 validation_errors: Default::default(),
41992 }
41993 }
41994 }
41995
41996 ///Payload for updating a new Pack release.
41997 ///
41998 /// <details><summary>JSON schema</summary>
41999 ///
42000 /// ```json
42001 ///{
42002 /// "description": "Payload for updating a new Pack release.",
42003 /// "type": "object",
42004 /// "properties": {
42005 /// "releaseNotes": {
42006 /// "description": "Notes about key features or changes in this release
42007 /// that the Pack maker wants to communicate to users.",
42008 /// "examples": [
42009 /// "The first release."
42010 /// ],
42011 /// "type": "string"
42012 /// }
42013 /// },
42014 /// "additionalProperties": false,
42015 /// "x-schema-name": "UpdatePackReleaseRequest"
42016 ///}
42017 /// ```
42018 /// </details>
42019 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42020 #[serde(deny_unknown_fields)]
42021 pub struct UpdatePackReleaseRequest {
42022 ///Notes about key features or changes in this release that the Pack
42023 /// maker wants to communicate to users.
42024 #[serde(rename = "releaseNotes", default, skip_serializing_if = "::std::option::Option::is_none")]
42025 pub release_notes: ::std::option::Option<::std::string::String>,
42026 }
42027
42028 impl ::std::convert::From<&UpdatePackReleaseRequest> for UpdatePackReleaseRequest {
42029 fn from(value: &UpdatePackReleaseRequest) -> Self {
42030 value.clone()
42031 }
42032 }
42033
42034 impl ::std::default::Default for UpdatePackReleaseRequest {
42035 fn default() -> Self {
42036 Self {
42037 release_notes: Default::default(),
42038 }
42039 }
42040 }
42041
42042 ///An HTTP error resulting from an unsuccessful request.
42043 ///
42044 /// <details><summary>JSON schema</summary>
42045 ///
42046 /// ```json
42047 ///{
42048 /// "description": "An HTTP error resulting from an unsuccessful request.",
42049 /// "required": [
42050 /// "message",
42051 /// "statusCode",
42052 /// "statusMessage"
42053 /// ],
42054 /// "properties": {
42055 /// "codaDetail": {
42056 /// "description": "Detail about why this request was rejected.",
42057 /// "type": "object",
42058 /// "properties": {
42059 /// "validationErrors": {
42060 /// "type": "array",
42061 /// "items": {
42062 /// "$ref": "#/components/schemas/ValidationError"
42063 /// }
42064 /// }
42065 /// },
42066 /// "additionalProperties": false
42067 /// },
42068 /// "message": {
42069 /// "description": "Any additional context on the error, or the same as
42070 /// `statusMessage` otherwise.",
42071 /// "examples": [
42072 /// "Bad Request"
42073 /// ],
42074 /// "type": "string"
42075 /// },
42076 /// "statusCode": {
42077 /// "description": "HTTP status code of the error.",
42078 /// "examples": [
42079 /// 400
42080 /// ],
42081 /// "type": "number"
42082 /// },
42083 /// "statusMessage": {
42084 /// "description": "HTTP status message of the error.",
42085 /// "examples": [
42086 /// "Bad Request"
42087 /// ],
42088 /// "type": "string"
42089 /// }
42090 /// },
42091 /// "additionalProperties": false
42092 ///}
42093 /// ```
42094 /// </details>
42095 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42096 #[serde(deny_unknown_fields)]
42097 pub struct UpdatePackReleaseResponse {
42098 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
42099 pub coda_detail: ::std::option::Option<UpdatePackReleaseResponseCodaDetail>,
42100 ///Any additional context on the error, or the same as `statusMessage`
42101 /// otherwise.
42102 pub message: ::std::string::String,
42103 #[serde(rename = "statusCode")]
42104 pub status_code: f64,
42105 ///HTTP status message of the error.
42106 #[serde(rename = "statusMessage")]
42107 pub status_message: ::std::string::String,
42108 }
42109
42110 impl ::std::convert::From<&UpdatePackReleaseResponse> for UpdatePackReleaseResponse {
42111 fn from(value: &UpdatePackReleaseResponse) -> Self {
42112 value.clone()
42113 }
42114 }
42115
42116 ///Detail about why this request was rejected.
42117 ///
42118 /// <details><summary>JSON schema</summary>
42119 ///
42120 /// ```json
42121 ///{
42122 /// "description": "Detail about why this request was rejected.",
42123 /// "type": "object",
42124 /// "properties": {
42125 /// "validationErrors": {
42126 /// "type": "array",
42127 /// "items": {
42128 /// "$ref": "#/components/schemas/ValidationError"
42129 /// }
42130 /// }
42131 /// },
42132 /// "additionalProperties": false
42133 ///}
42134 /// ```
42135 /// </details>
42136 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42137 #[serde(deny_unknown_fields)]
42138 pub struct UpdatePackReleaseResponseCodaDetail {
42139 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
42140 pub validation_errors: ::std::vec::Vec<ValidationError>,
42141 }
42142
42143 impl ::std::convert::From<&UpdatePackReleaseResponseCodaDetail> for UpdatePackReleaseResponseCodaDetail {
42144 fn from(value: &UpdatePackReleaseResponseCodaDetail) -> Self {
42145 value.clone()
42146 }
42147 }
42148
42149 impl ::std::default::Default for UpdatePackReleaseResponseCodaDetail {
42150 fn default() -> Self {
42151 Self {
42152 validation_errors: Default::default(),
42153 }
42154 }
42155 }
42156
42157 ///Payload for updating a Pack.
42158 ///
42159 /// <details><summary>JSON schema</summary>
42160 ///
42161 /// ```json
42162 ///{
42163 /// "description": "Payload for updating a Pack.",
42164 /// "type": "object",
42165 /// "properties": {
42166 /// "agentDescription": {
42167 /// "description": "A full description for the pack as an agent.",
42168 /// "examples": [
42169 /// "Chat with a comprehensive tool that can calculate cool geometric
42170 /// formulas like surface area, volume, and other mathematical operations.
42171 /// This agent can help with complex calculations and provide detailed
42172 /// explanations."
42173 /// ],
42174 /// "type": "string",
42175 /// "maxLength": 8192,
42176 /// "x-allow-empty": true
42177 /// },
42178 /// "agentImages": {
42179 /// "description": "The agent images for the Pack.",
42180 /// "type": [
42181 /// "array",
42182 /// "null"
42183 /// ],
42184 /// "items": {
42185 /// "$ref": "#/components/schemas/ImageFileForUpdatePackRequest"
42186 /// }
42187 /// },
42188 /// "agentShortDescription": {
42189 /// "description": "A short description for the pack as an agent.",
42190 /// "examples": [
42191 /// "Chat with a tool that can calculate cool geometric formulas like
42192 /// surface area."
42193 /// ],
42194 /// "type": "string",
42195 /// "maxLength": 256
42196 /// },
42197 /// "cover": {
42198 /// "description": "Information about an image file for an update Pack
42199 /// request.",
42200 /// "type": [
42201 /// "object",
42202 /// "null"
42203 /// ],
42204 /// "required": [
42205 /// "assetId",
42206 /// "filename"
42207 /// ],
42208 /// "properties": {
42209 /// "assetId": {
42210 /// "description": "The asset id of the Pack's image, returned by
42211 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42212 /// endpoint.",
42213 /// "type": "string"
42214 /// },
42215 /// "filename": {
42216 /// "description": "The filename for the image.",
42217 /// "type": "string"
42218 /// },
42219 /// "mimeType": {
42220 /// "description": "The media type of the image being sent.",
42221 /// "examples": [
42222 /// "image/jpeg"
42223 /// ],
42224 /// "type": "string"
42225 /// }
42226 /// },
42227 /// "additionalProperties": false,
42228 /// "x-schema-name": "ImageFileForUpdatePackRequest"
42229 /// },
42230 /// "description": {
42231 /// "description": "The full description of the Pack.",
42232 /// "examples": [
42233 /// "This Pack allows users to calculate the surface area and volume
42234 /// of a few common 3D shapes, like cubes and pyramids."
42235 /// ],
42236 /// "type": "string",
42237 /// "maxLength": 8192
42238 /// },
42239 /// "exampleImages": {
42240 /// "description": "The example images for the Pack.",
42241 /// "type": [
42242 /// "array",
42243 /// "null"
42244 /// ],
42245 /// "items": {
42246 /// "$ref": "#/components/schemas/ImageFileForUpdatePackRequest"
42247 /// }
42248 /// },
42249 /// "logo": {
42250 /// "description": "Information about an image file for an update Pack
42251 /// request.",
42252 /// "type": [
42253 /// "object",
42254 /// "null"
42255 /// ],
42256 /// "required": [
42257 /// "assetId",
42258 /// "filename"
42259 /// ],
42260 /// "properties": {
42261 /// "assetId": {
42262 /// "description": "The asset id of the Pack's image, returned by
42263 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42264 /// endpoint.",
42265 /// "type": "string"
42266 /// },
42267 /// "filename": {
42268 /// "description": "The filename for the image.",
42269 /// "type": "string"
42270 /// },
42271 /// "mimeType": {
42272 /// "description": "The media type of the image being sent.",
42273 /// "examples": [
42274 /// "image/jpeg"
42275 /// ],
42276 /// "type": "string"
42277 /// }
42278 /// },
42279 /// "additionalProperties": false,
42280 /// "x-schema-name": "ImageFileForUpdatePackRequest"
42281 /// },
42282 /// "name": {
42283 /// "description": "The name of the Pack.",
42284 /// "examples": [
42285 /// "Cool Geometry Formulas"
42286 /// ],
42287 /// "type": "string",
42288 /// "maxLength": 128
42289 /// },
42290 /// "overallRateLimit": {
42291 /// "description": "Rate limit in Pack settings.",
42292 /// "type": [
42293 /// "object",
42294 /// "null"
42295 /// ],
42296 /// "required": [
42297 /// "intervalSeconds",
42298 /// "operationsPerInterval"
42299 /// ],
42300 /// "properties": {
42301 /// "intervalSeconds": {
42302 /// "description": "The rate limit interval in seconds.",
42303 /// "examples": [
42304 /// 3600
42305 /// ],
42306 /// "type": "integer",
42307 /// "maximum": 86400.0,
42308 /// "minimum": 1.0
42309 /// },
42310 /// "operationsPerInterval": {
42311 /// "description": "The maximum number of Pack operations that can
42312 /// be performed in a given interval.",
42313 /// "examples": [
42314 /// 20
42315 /// ],
42316 /// "type": "integer",
42317 /// "minimum": 0.0
42318 /// }
42319 /// },
42320 /// "additionalProperties": false,
42321 /// "x-schema-name": "PackRateLimit"
42322 /// },
42323 /// "packEntrypoints": {
42324 /// "description": "Pack entrypoints where this pack is available",
42325 /// "type": [
42326 /// "array",
42327 /// "null"
42328 /// ],
42329 /// "items": {
42330 /// "$ref": "#/components/schemas/PackEntrypoint"
42331 /// },
42332 /// "minItems": 1
42333 /// },
42334 /// "perConnectionRateLimit": {
42335 /// "description": "Rate limit in Pack settings.",
42336 /// "type": [
42337 /// "object",
42338 /// "null"
42339 /// ],
42340 /// "required": [
42341 /// "intervalSeconds",
42342 /// "operationsPerInterval"
42343 /// ],
42344 /// "properties": {
42345 /// "intervalSeconds": {
42346 /// "description": "The rate limit interval in seconds.",
42347 /// "examples": [
42348 /// 3600
42349 /// ],
42350 /// "type": "integer",
42351 /// "maximum": 86400.0,
42352 /// "minimum": 1.0
42353 /// },
42354 /// "operationsPerInterval": {
42355 /// "description": "The maximum number of Pack operations that can
42356 /// be performed in a given interval.",
42357 /// "examples": [
42358 /// 20
42359 /// ],
42360 /// "type": "integer",
42361 /// "minimum": 0.0
42362 /// }
42363 /// },
42364 /// "additionalProperties": false,
42365 /// "x-schema-name": "PackRateLimit"
42366 /// },
42367 /// "privacyPolicyUrl": {
42368 /// "description": "A Privacy Policy URL for the Pack.",
42369 /// "type": "string",
42370 /// "format": "url",
42371 /// "maxLength": 512
42372 /// },
42373 /// "shortDescription": {
42374 /// "description": "A short version of the description of the Pack.",
42375 /// "examples": [
42376 /// "Calculate cool geometric formulas like surface area."
42377 /// ],
42378 /// "type": "string",
42379 /// "maxLength": 256
42380 /// },
42381 /// "sourceCodeVisibility": {
42382 /// "$ref": "#/components/schemas/PackSourceCodeVisibility"
42383 /// },
42384 /// "supportEmail": {
42385 /// "description": "A contact email for the Pack.",
42386 /// "examples": [
42387 /// "user@email.com"
42388 /// ],
42389 /// "type": "string",
42390 /// "maxLength": 512
42391 /// },
42392 /// "termsOfServiceUrl": {
42393 /// "description": "A Terms of Service URL for the Pack.",
42394 /// "type": "string",
42395 /// "format": "url",
42396 /// "maxLength": 512
42397 /// }
42398 /// },
42399 /// "additionalProperties": false,
42400 /// "x-schema-name": "UpdatePackRequest"
42401 ///}
42402 /// ```
42403 /// </details>
42404 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42405 #[serde(deny_unknown_fields)]
42406 pub struct UpdatePackRequest {
42407 ///A full description for the pack as an agent.
42408 #[serde(rename = "agentDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
42409 pub agent_description: ::std::option::Option<UpdatePackRequestAgentDescription>,
42410 ///The agent images for the Pack.
42411 #[serde(rename = "agentImages", default, skip_serializing_if = "::std::option::Option::is_none")]
42412 pub agent_images: ::std::option::Option<::std::vec::Vec<ImageFileForUpdatePackRequest>>,
42413 ///A short description for the pack as an agent.
42414 #[serde(rename = "agentShortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
42415 pub agent_short_description: ::std::option::Option<UpdatePackRequestAgentShortDescription>,
42416 ///Information about an image file for an update Pack request.
42417 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
42418 pub cover: ::std::option::Option<UpdatePackRequestCover>,
42419 ///The full description of the Pack.
42420 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
42421 pub description: ::std::option::Option<UpdatePackRequestDescription>,
42422 ///The example images for the Pack.
42423 #[serde(rename = "exampleImages", default, skip_serializing_if = "::std::option::Option::is_none")]
42424 pub example_images: ::std::option::Option<::std::vec::Vec<ImageFileForUpdatePackRequest>>,
42425 ///Information about an image file for an update Pack request.
42426 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
42427 pub logo: ::std::option::Option<UpdatePackRequestLogo>,
42428 ///The name of the Pack.
42429 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
42430 pub name: ::std::option::Option<UpdatePackRequestName>,
42431 ///Rate limit in Pack settings.
42432 #[serde(rename = "overallRateLimit", default, skip_serializing_if = "::std::option::Option::is_none")]
42433 pub overall_rate_limit: ::std::option::Option<UpdatePackRequestOverallRateLimit>,
42434 ///Pack entrypoints where this pack is available
42435 #[serde(rename = "packEntrypoints", default, skip_serializing_if = "::std::option::Option::is_none")]
42436 pub pack_entrypoints: ::std::option::Option<::std::vec::Vec<PackEntrypoint>>,
42437 ///Rate limit in Pack settings.
42438 #[serde(rename = "perConnectionRateLimit", default, skip_serializing_if = "::std::option::Option::is_none")]
42439 pub per_connection_rate_limit: ::std::option::Option<UpdatePackRequestPerConnectionRateLimit>,
42440 ///A Privacy Policy URL for the Pack.
42441 #[serde(rename = "privacyPolicyUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
42442 pub privacy_policy_url: ::std::option::Option<::std::string::String>,
42443 ///A short version of the description of the Pack.
42444 #[serde(rename = "shortDescription", default, skip_serializing_if = "::std::option::Option::is_none")]
42445 pub short_description: ::std::option::Option<UpdatePackRequestShortDescription>,
42446 #[serde(rename = "sourceCodeVisibility", default, skip_serializing_if = "::std::option::Option::is_none")]
42447 pub source_code_visibility: ::std::option::Option<PackSourceCodeVisibility>,
42448 ///A contact email for the Pack.
42449 #[serde(rename = "supportEmail", default, skip_serializing_if = "::std::option::Option::is_none")]
42450 pub support_email: ::std::option::Option<UpdatePackRequestSupportEmail>,
42451 ///A Terms of Service URL for the Pack.
42452 #[serde(rename = "termsOfServiceUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
42453 pub terms_of_service_url: ::std::option::Option<::std::string::String>,
42454 }
42455
42456 impl ::std::convert::From<&UpdatePackRequest> for UpdatePackRequest {
42457 fn from(value: &UpdatePackRequest) -> Self {
42458 value.clone()
42459 }
42460 }
42461
42462 impl ::std::default::Default for UpdatePackRequest {
42463 fn default() -> Self {
42464 Self {
42465 agent_description: Default::default(),
42466 agent_images: Default::default(),
42467 agent_short_description: Default::default(),
42468 cover: Default::default(),
42469 description: Default::default(),
42470 example_images: Default::default(),
42471 logo: Default::default(),
42472 name: Default::default(),
42473 overall_rate_limit: Default::default(),
42474 pack_entrypoints: Default::default(),
42475 per_connection_rate_limit: Default::default(),
42476 privacy_policy_url: Default::default(),
42477 short_description: Default::default(),
42478 source_code_visibility: Default::default(),
42479 support_email: Default::default(),
42480 terms_of_service_url: Default::default(),
42481 }
42482 }
42483 }
42484
42485 ///A full description for the pack as an agent.
42486 ///
42487 /// <details><summary>JSON schema</summary>
42488 ///
42489 /// ```json
42490 ///{
42491 /// "description": "A full description for the pack as an agent.",
42492 /// "examples": [
42493 /// "Chat with a comprehensive tool that can calculate cool geometric
42494 /// formulas like surface area, volume, and other mathematical operations.
42495 /// This agent can help with complex calculations and provide detailed
42496 /// explanations."
42497 /// ],
42498 /// "type": "string",
42499 /// "maxLength": 8192,
42500 /// "x-allow-empty": true
42501 ///}
42502 /// ```
42503 /// </details>
42504 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42505 #[serde(transparent)]
42506 pub struct UpdatePackRequestAgentDescription(::std::string::String);
42507 impl ::std::ops::Deref for UpdatePackRequestAgentDescription {
42508 type Target = ::std::string::String;
42509 fn deref(&self) -> &::std::string::String {
42510 &self.0
42511 }
42512 }
42513
42514 impl ::std::convert::From<UpdatePackRequestAgentDescription> for ::std::string::String {
42515 fn from(value: UpdatePackRequestAgentDescription) -> Self {
42516 value.0
42517 }
42518 }
42519
42520 impl ::std::convert::From<&UpdatePackRequestAgentDescription> for UpdatePackRequestAgentDescription {
42521 fn from(value: &UpdatePackRequestAgentDescription) -> Self {
42522 value.clone()
42523 }
42524 }
42525
42526 impl ::std::str::FromStr for UpdatePackRequestAgentDescription {
42527 type Err = self::error::ConversionError;
42528 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42529 if value.chars().count() > 8192usize {
42530 return Err("longer than 8192 characters".into());
42531 }
42532 Ok(Self(value.to_string()))
42533 }
42534 }
42535
42536 impl ::std::convert::TryFrom<&str> for UpdatePackRequestAgentDescription {
42537 type Error = self::error::ConversionError;
42538 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42539 value.parse()
42540 }
42541 }
42542
42543 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestAgentDescription {
42544 type Error = self::error::ConversionError;
42545 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42546 value.parse()
42547 }
42548 }
42549
42550 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestAgentDescription {
42551 type Error = self::error::ConversionError;
42552 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42553 value.parse()
42554 }
42555 }
42556
42557 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestAgentDescription {
42558 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
42559 where
42560 D: ::serde::Deserializer<'de>,
42561 {
42562 ::std::string::String::deserialize(deserializer)?
42563 .parse()
42564 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
42565 }
42566 }
42567
42568 ///A short description for the pack as an agent.
42569 ///
42570 /// <details><summary>JSON schema</summary>
42571 ///
42572 /// ```json
42573 ///{
42574 /// "description": "A short description for the pack as an agent.",
42575 /// "examples": [
42576 /// "Chat with a tool that can calculate cool geometric formulas like
42577 /// surface area."
42578 /// ],
42579 /// "type": "string",
42580 /// "maxLength": 256
42581 ///}
42582 /// ```
42583 /// </details>
42584 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42585 #[serde(transparent)]
42586 pub struct UpdatePackRequestAgentShortDescription(::std::string::String);
42587 impl ::std::ops::Deref for UpdatePackRequestAgentShortDescription {
42588 type Target = ::std::string::String;
42589 fn deref(&self) -> &::std::string::String {
42590 &self.0
42591 }
42592 }
42593
42594 impl ::std::convert::From<UpdatePackRequestAgentShortDescription> for ::std::string::String {
42595 fn from(value: UpdatePackRequestAgentShortDescription) -> Self {
42596 value.0
42597 }
42598 }
42599
42600 impl ::std::convert::From<&UpdatePackRequestAgentShortDescription> for UpdatePackRequestAgentShortDescription {
42601 fn from(value: &UpdatePackRequestAgentShortDescription) -> Self {
42602 value.clone()
42603 }
42604 }
42605
42606 impl ::std::str::FromStr for UpdatePackRequestAgentShortDescription {
42607 type Err = self::error::ConversionError;
42608 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42609 if value.chars().count() > 256usize {
42610 return Err("longer than 256 characters".into());
42611 }
42612 Ok(Self(value.to_string()))
42613 }
42614 }
42615
42616 impl ::std::convert::TryFrom<&str> for UpdatePackRequestAgentShortDescription {
42617 type Error = self::error::ConversionError;
42618 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42619 value.parse()
42620 }
42621 }
42622
42623 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestAgentShortDescription {
42624 type Error = self::error::ConversionError;
42625 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42626 value.parse()
42627 }
42628 }
42629
42630 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestAgentShortDescription {
42631 type Error = self::error::ConversionError;
42632 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42633 value.parse()
42634 }
42635 }
42636
42637 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestAgentShortDescription {
42638 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
42639 where
42640 D: ::serde::Deserializer<'de>,
42641 {
42642 ::std::string::String::deserialize(deserializer)?
42643 .parse()
42644 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
42645 }
42646 }
42647
42648 ///Information about an image file for an update Pack request.
42649 ///
42650 /// <details><summary>JSON schema</summary>
42651 ///
42652 /// ```json
42653 ///{
42654 /// "description": "Information about an image file for an update Pack
42655 /// request.",
42656 /// "type": "object",
42657 /// "required": [
42658 /// "assetId",
42659 /// "filename"
42660 /// ],
42661 /// "properties": {
42662 /// "assetId": {
42663 /// "description": "The asset id of the Pack's image, returned by
42664 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42665 /// endpoint.",
42666 /// "type": "string"
42667 /// },
42668 /// "filename": {
42669 /// "description": "The filename for the image.",
42670 /// "type": "string"
42671 /// },
42672 /// "mimeType": {
42673 /// "description": "The media type of the image being sent.",
42674 /// "examples": [
42675 /// "image/jpeg"
42676 /// ],
42677 /// "type": "string"
42678 /// }
42679 /// },
42680 /// "additionalProperties": false,
42681 /// "x-schema-name": "ImageFileForUpdatePackRequest"
42682 ///}
42683 /// ```
42684 /// </details>
42685 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42686 #[serde(deny_unknown_fields)]
42687 pub struct UpdatePackRequestCover {
42688 ///The asset id of the Pack's image, returned by
42689 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42690 /// endpoint.
42691 #[serde(rename = "assetId")]
42692 pub asset_id: ::std::string::String,
42693 ///The filename for the image.
42694 pub filename: ::std::string::String,
42695 ///The media type of the image being sent.
42696 #[serde(rename = "mimeType", default, skip_serializing_if = "::std::option::Option::is_none")]
42697 pub mime_type: ::std::option::Option<::std::string::String>,
42698 }
42699
42700 impl ::std::convert::From<&UpdatePackRequestCover> for UpdatePackRequestCover {
42701 fn from(value: &UpdatePackRequestCover) -> Self {
42702 value.clone()
42703 }
42704 }
42705
42706 ///The full description of the Pack.
42707 ///
42708 /// <details><summary>JSON schema</summary>
42709 ///
42710 /// ```json
42711 ///{
42712 /// "description": "The full description of the Pack.",
42713 /// "examples": [
42714 /// "This Pack allows users to calculate the surface area and volume of a
42715 /// few common 3D shapes, like cubes and pyramids."
42716 /// ],
42717 /// "type": "string",
42718 /// "maxLength": 8192
42719 ///}
42720 /// ```
42721 /// </details>
42722 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42723 #[serde(transparent)]
42724 pub struct UpdatePackRequestDescription(::std::string::String);
42725 impl ::std::ops::Deref for UpdatePackRequestDescription {
42726 type Target = ::std::string::String;
42727 fn deref(&self) -> &::std::string::String {
42728 &self.0
42729 }
42730 }
42731
42732 impl ::std::convert::From<UpdatePackRequestDescription> for ::std::string::String {
42733 fn from(value: UpdatePackRequestDescription) -> Self {
42734 value.0
42735 }
42736 }
42737
42738 impl ::std::convert::From<&UpdatePackRequestDescription> for UpdatePackRequestDescription {
42739 fn from(value: &UpdatePackRequestDescription) -> Self {
42740 value.clone()
42741 }
42742 }
42743
42744 impl ::std::str::FromStr for UpdatePackRequestDescription {
42745 type Err = self::error::ConversionError;
42746 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42747 if value.chars().count() > 8192usize {
42748 return Err("longer than 8192 characters".into());
42749 }
42750 Ok(Self(value.to_string()))
42751 }
42752 }
42753
42754 impl ::std::convert::TryFrom<&str> for UpdatePackRequestDescription {
42755 type Error = self::error::ConversionError;
42756 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42757 value.parse()
42758 }
42759 }
42760
42761 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestDescription {
42762 type Error = self::error::ConversionError;
42763 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42764 value.parse()
42765 }
42766 }
42767
42768 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestDescription {
42769 type Error = self::error::ConversionError;
42770 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42771 value.parse()
42772 }
42773 }
42774
42775 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestDescription {
42776 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
42777 where
42778 D: ::serde::Deserializer<'de>,
42779 {
42780 ::std::string::String::deserialize(deserializer)?
42781 .parse()
42782 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
42783 }
42784 }
42785
42786 ///Information about an image file for an update Pack request.
42787 ///
42788 /// <details><summary>JSON schema</summary>
42789 ///
42790 /// ```json
42791 ///{
42792 /// "description": "Information about an image file for an update Pack
42793 /// request.",
42794 /// "type": "object",
42795 /// "required": [
42796 /// "assetId",
42797 /// "filename"
42798 /// ],
42799 /// "properties": {
42800 /// "assetId": {
42801 /// "description": "The asset id of the Pack's image, returned by
42802 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42803 /// endpoint.",
42804 /// "type": "string"
42805 /// },
42806 /// "filename": {
42807 /// "description": "The filename for the image.",
42808 /// "type": "string"
42809 /// },
42810 /// "mimeType": {
42811 /// "description": "The media type of the image being sent.",
42812 /// "examples": [
42813 /// "image/jpeg"
42814 /// ],
42815 /// "type": "string"
42816 /// }
42817 /// },
42818 /// "additionalProperties": false,
42819 /// "x-schema-name": "ImageFileForUpdatePackRequest"
42820 ///}
42821 /// ```
42822 /// </details>
42823 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42824 #[serde(deny_unknown_fields)]
42825 pub struct UpdatePackRequestLogo {
42826 ///The asset id of the Pack's image, returned by
42827 /// [`#PackAssetUploadComplete`](#operation/packAssetUploadComplete)
42828 /// endpoint.
42829 #[serde(rename = "assetId")]
42830 pub asset_id: ::std::string::String,
42831 ///The filename for the image.
42832 pub filename: ::std::string::String,
42833 ///The media type of the image being sent.
42834 #[serde(rename = "mimeType", default, skip_serializing_if = "::std::option::Option::is_none")]
42835 pub mime_type: ::std::option::Option<::std::string::String>,
42836 }
42837
42838 impl ::std::convert::From<&UpdatePackRequestLogo> for UpdatePackRequestLogo {
42839 fn from(value: &UpdatePackRequestLogo) -> Self {
42840 value.clone()
42841 }
42842 }
42843
42844 ///The name of the Pack.
42845 ///
42846 /// <details><summary>JSON schema</summary>
42847 ///
42848 /// ```json
42849 ///{
42850 /// "description": "The name of the Pack.",
42851 /// "examples": [
42852 /// "Cool Geometry Formulas"
42853 /// ],
42854 /// "type": "string",
42855 /// "maxLength": 128
42856 ///}
42857 /// ```
42858 /// </details>
42859 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42860 #[serde(transparent)]
42861 pub struct UpdatePackRequestName(::std::string::String);
42862 impl ::std::ops::Deref for UpdatePackRequestName {
42863 type Target = ::std::string::String;
42864 fn deref(&self) -> &::std::string::String {
42865 &self.0
42866 }
42867 }
42868
42869 impl ::std::convert::From<UpdatePackRequestName> for ::std::string::String {
42870 fn from(value: UpdatePackRequestName) -> Self {
42871 value.0
42872 }
42873 }
42874
42875 impl ::std::convert::From<&UpdatePackRequestName> for UpdatePackRequestName {
42876 fn from(value: &UpdatePackRequestName) -> Self {
42877 value.clone()
42878 }
42879 }
42880
42881 impl ::std::str::FromStr for UpdatePackRequestName {
42882 type Err = self::error::ConversionError;
42883 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42884 if value.chars().count() > 128usize {
42885 return Err("longer than 128 characters".into());
42886 }
42887 Ok(Self(value.to_string()))
42888 }
42889 }
42890
42891 impl ::std::convert::TryFrom<&str> for UpdatePackRequestName {
42892 type Error = self::error::ConversionError;
42893 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42894 value.parse()
42895 }
42896 }
42897
42898 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestName {
42899 type Error = self::error::ConversionError;
42900 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42901 value.parse()
42902 }
42903 }
42904
42905 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestName {
42906 type Error = self::error::ConversionError;
42907 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
42908 value.parse()
42909 }
42910 }
42911
42912 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestName {
42913 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
42914 where
42915 D: ::serde::Deserializer<'de>,
42916 {
42917 ::std::string::String::deserialize(deserializer)?
42918 .parse()
42919 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
42920 }
42921 }
42922
42923 ///Rate limit in Pack settings.
42924 ///
42925 /// <details><summary>JSON schema</summary>
42926 ///
42927 /// ```json
42928 ///{
42929 /// "description": "Rate limit in Pack settings.",
42930 /// "type": "object",
42931 /// "required": [
42932 /// "intervalSeconds",
42933 /// "operationsPerInterval"
42934 /// ],
42935 /// "properties": {
42936 /// "intervalSeconds": {
42937 /// "description": "The rate limit interval in seconds.",
42938 /// "examples": [
42939 /// 3600
42940 /// ],
42941 /// "type": "integer",
42942 /// "maximum": 86400.0,
42943 /// "minimum": 1.0
42944 /// },
42945 /// "operationsPerInterval": {
42946 /// "description": "The maximum number of Pack operations that can be
42947 /// performed in a given interval.",
42948 /// "examples": [
42949 /// 20
42950 /// ],
42951 /// "type": "integer",
42952 /// "minimum": 0.0
42953 /// }
42954 /// },
42955 /// "additionalProperties": false,
42956 /// "x-schema-name": "PackRateLimit"
42957 ///}
42958 /// ```
42959 /// </details>
42960 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
42961 #[serde(deny_unknown_fields)]
42962 pub struct UpdatePackRequestOverallRateLimit {
42963 ///The rate limit interval in seconds.
42964 #[serde(rename = "intervalSeconds")]
42965 pub interval_seconds: ::std::num::NonZeroU64,
42966 ///The maximum number of Pack operations that can be performed in a
42967 /// given interval.
42968 #[serde(rename = "operationsPerInterval")]
42969 pub operations_per_interval: u64,
42970 }
42971
42972 impl ::std::convert::From<&UpdatePackRequestOverallRateLimit> for UpdatePackRequestOverallRateLimit {
42973 fn from(value: &UpdatePackRequestOverallRateLimit) -> Self {
42974 value.clone()
42975 }
42976 }
42977
42978 ///Rate limit in Pack settings.
42979 ///
42980 /// <details><summary>JSON schema</summary>
42981 ///
42982 /// ```json
42983 ///{
42984 /// "description": "Rate limit in Pack settings.",
42985 /// "type": "object",
42986 /// "required": [
42987 /// "intervalSeconds",
42988 /// "operationsPerInterval"
42989 /// ],
42990 /// "properties": {
42991 /// "intervalSeconds": {
42992 /// "description": "The rate limit interval in seconds.",
42993 /// "examples": [
42994 /// 3600
42995 /// ],
42996 /// "type": "integer",
42997 /// "maximum": 86400.0,
42998 /// "minimum": 1.0
42999 /// },
43000 /// "operationsPerInterval": {
43001 /// "description": "The maximum number of Pack operations that can be
43002 /// performed in a given interval.",
43003 /// "examples": [
43004 /// 20
43005 /// ],
43006 /// "type": "integer",
43007 /// "minimum": 0.0
43008 /// }
43009 /// },
43010 /// "additionalProperties": false,
43011 /// "x-schema-name": "PackRateLimit"
43012 ///}
43013 /// ```
43014 /// </details>
43015 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43016 #[serde(deny_unknown_fields)]
43017 pub struct UpdatePackRequestPerConnectionRateLimit {
43018 ///The rate limit interval in seconds.
43019 #[serde(rename = "intervalSeconds")]
43020 pub interval_seconds: ::std::num::NonZeroU64,
43021 ///The maximum number of Pack operations that can be performed in a
43022 /// given interval.
43023 #[serde(rename = "operationsPerInterval")]
43024 pub operations_per_interval: u64,
43025 }
43026
43027 impl ::std::convert::From<&UpdatePackRequestPerConnectionRateLimit> for UpdatePackRequestPerConnectionRateLimit {
43028 fn from(value: &UpdatePackRequestPerConnectionRateLimit) -> Self {
43029 value.clone()
43030 }
43031 }
43032
43033 ///A short version of the description of the Pack.
43034 ///
43035 /// <details><summary>JSON schema</summary>
43036 ///
43037 /// ```json
43038 ///{
43039 /// "description": "A short version of the description of the Pack.",
43040 /// "examples": [
43041 /// "Calculate cool geometric formulas like surface area."
43042 /// ],
43043 /// "type": "string",
43044 /// "maxLength": 256
43045 ///}
43046 /// ```
43047 /// </details>
43048 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43049 #[serde(transparent)]
43050 pub struct UpdatePackRequestShortDescription(::std::string::String);
43051 impl ::std::ops::Deref for UpdatePackRequestShortDescription {
43052 type Target = ::std::string::String;
43053 fn deref(&self) -> &::std::string::String {
43054 &self.0
43055 }
43056 }
43057
43058 impl ::std::convert::From<UpdatePackRequestShortDescription> for ::std::string::String {
43059 fn from(value: UpdatePackRequestShortDescription) -> Self {
43060 value.0
43061 }
43062 }
43063
43064 impl ::std::convert::From<&UpdatePackRequestShortDescription> for UpdatePackRequestShortDescription {
43065 fn from(value: &UpdatePackRequestShortDescription) -> Self {
43066 value.clone()
43067 }
43068 }
43069
43070 impl ::std::str::FromStr for UpdatePackRequestShortDescription {
43071 type Err = self::error::ConversionError;
43072 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
43073 if value.chars().count() > 256usize {
43074 return Err("longer than 256 characters".into());
43075 }
43076 Ok(Self(value.to_string()))
43077 }
43078 }
43079
43080 impl ::std::convert::TryFrom<&str> for UpdatePackRequestShortDescription {
43081 type Error = self::error::ConversionError;
43082 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
43083 value.parse()
43084 }
43085 }
43086
43087 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestShortDescription {
43088 type Error = self::error::ConversionError;
43089 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
43090 value.parse()
43091 }
43092 }
43093
43094 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestShortDescription {
43095 type Error = self::error::ConversionError;
43096 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
43097 value.parse()
43098 }
43099 }
43100
43101 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestShortDescription {
43102 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
43103 where
43104 D: ::serde::Deserializer<'de>,
43105 {
43106 ::std::string::String::deserialize(deserializer)?
43107 .parse()
43108 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
43109 }
43110 }
43111
43112 ///A contact email for the Pack.
43113 ///
43114 /// <details><summary>JSON schema</summary>
43115 ///
43116 /// ```json
43117 ///{
43118 /// "description": "A contact email for the Pack.",
43119 /// "examples": [
43120 /// "user@email.com"
43121 /// ],
43122 /// "type": "string",
43123 /// "maxLength": 512
43124 ///}
43125 /// ```
43126 /// </details>
43127 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43128 #[serde(transparent)]
43129 pub struct UpdatePackRequestSupportEmail(::std::string::String);
43130 impl ::std::ops::Deref for UpdatePackRequestSupportEmail {
43131 type Target = ::std::string::String;
43132 fn deref(&self) -> &::std::string::String {
43133 &self.0
43134 }
43135 }
43136
43137 impl ::std::convert::From<UpdatePackRequestSupportEmail> for ::std::string::String {
43138 fn from(value: UpdatePackRequestSupportEmail) -> Self {
43139 value.0
43140 }
43141 }
43142
43143 impl ::std::convert::From<&UpdatePackRequestSupportEmail> for UpdatePackRequestSupportEmail {
43144 fn from(value: &UpdatePackRequestSupportEmail) -> Self {
43145 value.clone()
43146 }
43147 }
43148
43149 impl ::std::str::FromStr for UpdatePackRequestSupportEmail {
43150 type Err = self::error::ConversionError;
43151 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
43152 if value.chars().count() > 512usize {
43153 return Err("longer than 512 characters".into());
43154 }
43155 Ok(Self(value.to_string()))
43156 }
43157 }
43158
43159 impl ::std::convert::TryFrom<&str> for UpdatePackRequestSupportEmail {
43160 type Error = self::error::ConversionError;
43161 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
43162 value.parse()
43163 }
43164 }
43165
43166 impl ::std::convert::TryFrom<&::std::string::String> for UpdatePackRequestSupportEmail {
43167 type Error = self::error::ConversionError;
43168 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
43169 value.parse()
43170 }
43171 }
43172
43173 impl ::std::convert::TryFrom<::std::string::String> for UpdatePackRequestSupportEmail {
43174 type Error = self::error::ConversionError;
43175 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
43176 value.parse()
43177 }
43178 }
43179
43180 impl<'de> ::serde::Deserialize<'de> for UpdatePackRequestSupportEmail {
43181 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
43182 where
43183 D: ::serde::Deserializer<'de>,
43184 {
43185 ::std::string::String::deserialize(deserializer)?
43186 .parse()
43187 .map_err(|e: self::error::ConversionError| <D::Error as ::serde::de::Error>::custom(e.to_string()))
43188 }
43189 }
43190
43191 ///An HTTP error resulting from an unsuccessful request.
43192 ///
43193 /// <details><summary>JSON schema</summary>
43194 ///
43195 /// ```json
43196 ///{
43197 /// "description": "An HTTP error resulting from an unsuccessful request.",
43198 /// "required": [
43199 /// "message",
43200 /// "statusCode",
43201 /// "statusMessage"
43202 /// ],
43203 /// "properties": {
43204 /// "message": {
43205 /// "description": "Any additional context on the error, or the same as
43206 /// `statusMessage` otherwise.",
43207 /// "examples": [
43208 /// "Bad Request"
43209 /// ],
43210 /// "type": "string"
43211 /// },
43212 /// "statusCode": {
43213 /// "description": "HTTP status code of the error.",
43214 /// "examples": [
43215 /// 400
43216 /// ],
43217 /// "type": "number"
43218 /// },
43219 /// "statusMessage": {
43220 /// "description": "HTTP status message of the error.",
43221 /// "examples": [
43222 /// "Bad Request"
43223 /// ],
43224 /// "type": "string"
43225 /// }
43226 /// },
43227 /// "additionalProperties": false
43228 ///}
43229 /// ```
43230 /// </details>
43231 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43232 #[serde(deny_unknown_fields)]
43233 pub struct UpdatePackResponse {
43234 ///Any additional context on the error, or the same as `statusMessage`
43235 /// otherwise.
43236 pub message: ::std::string::String,
43237 #[serde(rename = "statusCode")]
43238 pub status_code: f64,
43239 ///HTTP status message of the error.
43240 #[serde(rename = "statusMessage")]
43241 pub status_message: ::std::string::String,
43242 }
43243
43244 impl ::std::convert::From<&UpdatePackResponse> for UpdatePackResponse {
43245 fn from(value: &UpdatePackResponse) -> Self {
43246 value.clone()
43247 }
43248 }
43249
43250 ///An HTTP error resulting from an unsuccessful request.
43251 ///
43252 /// <details><summary>JSON schema</summary>
43253 ///
43254 /// ```json
43255 ///{
43256 /// "description": "An HTTP error resulting from an unsuccessful request.",
43257 /// "required": [
43258 /// "message",
43259 /// "statusCode",
43260 /// "statusMessage"
43261 /// ],
43262 /// "properties": {
43263 /// "message": {
43264 /// "description": "Any additional context on the error, or the same as
43265 /// `statusMessage` otherwise.",
43266 /// "examples": [
43267 /// "Bad Request"
43268 /// ],
43269 /// "type": "string"
43270 /// },
43271 /// "statusCode": {
43272 /// "description": "HTTP status code of the error.",
43273 /// "examples": [
43274 /// 400
43275 /// ],
43276 /// "type": "number"
43277 /// },
43278 /// "statusMessage": {
43279 /// "description": "HTTP status message of the error.",
43280 /// "examples": [
43281 /// "Bad Request"
43282 /// ],
43283 /// "type": "string"
43284 /// }
43285 /// },
43286 /// "additionalProperties": false
43287 ///}
43288 /// ```
43289 /// </details>
43290 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43291 #[serde(deny_unknown_fields)]
43292 pub struct UpdatePageResponse {
43293 ///Any additional context on the error, or the same as `statusMessage`
43294 /// otherwise.
43295 pub message: ::std::string::String,
43296 #[serde(rename = "statusCode")]
43297 pub status_code: f64,
43298 ///HTTP status message of the error.
43299 #[serde(rename = "statusMessage")]
43300 pub status_message: ::std::string::String,
43301 }
43302
43303 impl ::std::convert::From<&UpdatePageResponse> for UpdatePageResponse {
43304 fn from(value: &UpdatePageResponse) -> Self {
43305 value.clone()
43306 }
43307 }
43308
43309 ///An HTTP error resulting from an unsuccessful request.
43310 ///
43311 /// <details><summary>JSON schema</summary>
43312 ///
43313 /// ```json
43314 ///{
43315 /// "description": "An HTTP error resulting from an unsuccessful request.",
43316 /// "required": [
43317 /// "message",
43318 /// "statusCode",
43319 /// "statusMessage"
43320 /// ],
43321 /// "properties": {
43322 /// "message": {
43323 /// "description": "Any additional context on the error, or the same as
43324 /// `statusMessage` otherwise.",
43325 /// "examples": [
43326 /// "Bad Request"
43327 /// ],
43328 /// "type": "string"
43329 /// },
43330 /// "statusCode": {
43331 /// "description": "HTTP status code of the error.",
43332 /// "examples": [
43333 /// 400
43334 /// ],
43335 /// "type": "number"
43336 /// },
43337 /// "statusMessage": {
43338 /// "description": "HTTP status message of the error.",
43339 /// "examples": [
43340 /// "Bad Request"
43341 /// ],
43342 /// "type": "string"
43343 /// }
43344 /// },
43345 /// "additionalProperties": false
43346 ///}
43347 /// ```
43348 /// </details>
43349 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43350 #[serde(deny_unknown_fields)]
43351 pub struct UpdateRowResponse {
43352 ///Any additional context on the error, or the same as `statusMessage`
43353 /// otherwise.
43354 pub message: ::std::string::String,
43355 #[serde(rename = "statusCode")]
43356 pub status_code: f64,
43357 ///HTTP status message of the error.
43358 #[serde(rename = "statusMessage")]
43359 pub status_message: ::std::string::String,
43360 }
43361
43362 impl ::std::convert::From<&UpdateRowResponse> for UpdateRowResponse {
43363 fn from(value: &UpdateRowResponse) -> Self {
43364 value.clone()
43365 }
43366 }
43367
43368 ///Payload for a Pack asset upload.
43369 ///
43370 /// <details><summary>JSON schema</summary>
43371 ///
43372 /// ```json
43373 ///{
43374 /// "description": "Payload for a Pack asset upload.",
43375 /// "type": "object",
43376 /// "required": [
43377 /// "filename",
43378 /// "imageHash",
43379 /// "mimeType",
43380 /// "packAssetType"
43381 /// ],
43382 /// "properties": {
43383 /// "filename": {
43384 /// "examples": [
43385 /// "image.jpg"
43386 /// ],
43387 /// "type": "string"
43388 /// },
43389 /// "imageHash": {
43390 /// "description": "The SHA-256 hash of the image to be uploaded.",
43391 /// "examples": [
43392 /// "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"
43393 /// ],
43394 /// "type": "string"
43395 /// },
43396 /// "mimeType": {
43397 /// "description": "The media type of the image being sent.",
43398 /// "examples": [
43399 /// "image/jpeg"
43400 /// ],
43401 /// "type": "string"
43402 /// },
43403 /// "packAssetType": {
43404 /// "$ref": "#/components/schemas/PackAssetType"
43405 /// }
43406 /// },
43407 /// "additionalProperties": false,
43408 /// "x-schema-name": "UploadPackAssetRequest"
43409 ///}
43410 /// ```
43411 /// </details>
43412 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43413 #[serde(deny_unknown_fields)]
43414 pub struct UploadPackAssetRequest {
43415 pub filename: ::std::string::String,
43416 ///The SHA-256 hash of the image to be uploaded.
43417 #[serde(rename = "imageHash")]
43418 pub image_hash: ::std::string::String,
43419 ///The media type of the image being sent.
43420 #[serde(rename = "mimeType")]
43421 pub mime_type: ::std::string::String,
43422 #[serde(rename = "packAssetType")]
43423 pub pack_asset_type: PackAssetType,
43424 }
43425
43426 impl ::std::convert::From<&UploadPackAssetRequest> for UploadPackAssetRequest {
43427 fn from(value: &UploadPackAssetRequest) -> Self {
43428 value.clone()
43429 }
43430 }
43431
43432 ///An HTTP error resulting from an unsuccessful request.
43433 ///
43434 /// <details><summary>JSON schema</summary>
43435 ///
43436 /// ```json
43437 ///{
43438 /// "description": "An HTTP error resulting from an unsuccessful request.",
43439 /// "required": [
43440 /// "message",
43441 /// "statusCode",
43442 /// "statusMessage"
43443 /// ],
43444 /// "properties": {
43445 /// "codaDetail": {
43446 /// "description": "Detail about why this request was rejected.",
43447 /// "type": "object",
43448 /// "properties": {
43449 /// "validationErrors": {
43450 /// "type": "array",
43451 /// "items": {
43452 /// "$ref": "#/components/schemas/ValidationError"
43453 /// }
43454 /// }
43455 /// },
43456 /// "additionalProperties": false
43457 /// },
43458 /// "message": {
43459 /// "description": "Any additional context on the error, or the same as
43460 /// `statusMessage` otherwise.",
43461 /// "examples": [
43462 /// "Bad Request"
43463 /// ],
43464 /// "type": "string"
43465 /// },
43466 /// "statusCode": {
43467 /// "description": "HTTP status code of the error.",
43468 /// "examples": [
43469 /// 400
43470 /// ],
43471 /// "type": "number"
43472 /// },
43473 /// "statusMessage": {
43474 /// "description": "HTTP status message of the error.",
43475 /// "examples": [
43476 /// "Bad Request"
43477 /// ],
43478 /// "type": "string"
43479 /// }
43480 /// },
43481 /// "additionalProperties": false
43482 ///}
43483 /// ```
43484 /// </details>
43485 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43486 #[serde(deny_unknown_fields)]
43487 pub struct UploadPackAssetResponse {
43488 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
43489 pub coda_detail: ::std::option::Option<UploadPackAssetResponseCodaDetail>,
43490 ///Any additional context on the error, or the same as `statusMessage`
43491 /// otherwise.
43492 pub message: ::std::string::String,
43493 #[serde(rename = "statusCode")]
43494 pub status_code: f64,
43495 ///HTTP status message of the error.
43496 #[serde(rename = "statusMessage")]
43497 pub status_message: ::std::string::String,
43498 }
43499
43500 impl ::std::convert::From<&UploadPackAssetResponse> for UploadPackAssetResponse {
43501 fn from(value: &UploadPackAssetResponse) -> Self {
43502 value.clone()
43503 }
43504 }
43505
43506 ///Detail about why this request was rejected.
43507 ///
43508 /// <details><summary>JSON schema</summary>
43509 ///
43510 /// ```json
43511 ///{
43512 /// "description": "Detail about why this request was rejected.",
43513 /// "type": "object",
43514 /// "properties": {
43515 /// "validationErrors": {
43516 /// "type": "array",
43517 /// "items": {
43518 /// "$ref": "#/components/schemas/ValidationError"
43519 /// }
43520 /// }
43521 /// },
43522 /// "additionalProperties": false
43523 ///}
43524 /// ```
43525 /// </details>
43526 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43527 #[serde(deny_unknown_fields)]
43528 pub struct UploadPackAssetResponseCodaDetail {
43529 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
43530 pub validation_errors: ::std::vec::Vec<ValidationError>,
43531 }
43532
43533 impl ::std::convert::From<&UploadPackAssetResponseCodaDetail> for UploadPackAssetResponseCodaDetail {
43534 fn from(value: &UploadPackAssetResponseCodaDetail) -> Self {
43535 value.clone()
43536 }
43537 }
43538
43539 impl ::std::default::Default for UploadPackAssetResponseCodaDetail {
43540 fn default() -> Self {
43541 Self {
43542 validation_errors: Default::default(),
43543 }
43544 }
43545 }
43546
43547 ///Payload for a Pack asset upload.
43548 ///
43549 /// <details><summary>JSON schema</summary>
43550 ///
43551 /// ```json
43552 ///{
43553 /// "description": "Payload for a Pack asset upload.",
43554 /// "type": "object",
43555 /// "required": [
43556 /// "filename",
43557 /// "payloadHash"
43558 /// ],
43559 /// "properties": {
43560 /// "filename": {
43561 /// "examples": [
43562 /// "main.ts"
43563 /// ],
43564 /// "type": "string"
43565 /// },
43566 /// "packVersion": {
43567 /// "examples": [
43568 /// "1.0.0"
43569 /// ],
43570 /// "type": "string"
43571 /// },
43572 /// "payloadHash": {
43573 /// "description": "The SHA-256 hash of the image to be uploaded.",
43574 /// "examples": [
43575 /// "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"
43576 /// ],
43577 /// "type": "string"
43578 /// }
43579 /// },
43580 /// "additionalProperties": false,
43581 /// "x-schema-name": "UploadPackSourceCodeRequest"
43582 ///}
43583 /// ```
43584 /// </details>
43585 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43586 #[serde(deny_unknown_fields)]
43587 pub struct UploadPackSourceCodeRequest {
43588 pub filename: ::std::string::String,
43589 #[serde(rename = "packVersion", default, skip_serializing_if = "::std::option::Option::is_none")]
43590 pub pack_version: ::std::option::Option<::std::string::String>,
43591 ///The SHA-256 hash of the image to be uploaded.
43592 #[serde(rename = "payloadHash")]
43593 pub payload_hash: ::std::string::String,
43594 }
43595
43596 impl ::std::convert::From<&UploadPackSourceCodeRequest> for UploadPackSourceCodeRequest {
43597 fn from(value: &UploadPackSourceCodeRequest) -> Self {
43598 value.clone()
43599 }
43600 }
43601
43602 ///An HTTP error resulting from an unsuccessful request.
43603 ///
43604 /// <details><summary>JSON schema</summary>
43605 ///
43606 /// ```json
43607 ///{
43608 /// "description": "An HTTP error resulting from an unsuccessful request.",
43609 /// "required": [
43610 /// "message",
43611 /// "statusCode",
43612 /// "statusMessage"
43613 /// ],
43614 /// "properties": {
43615 /// "codaDetail": {
43616 /// "description": "Detail about why this request was rejected.",
43617 /// "type": "object",
43618 /// "properties": {
43619 /// "validationErrors": {
43620 /// "type": "array",
43621 /// "items": {
43622 /// "$ref": "#/components/schemas/ValidationError"
43623 /// }
43624 /// }
43625 /// },
43626 /// "additionalProperties": false
43627 /// },
43628 /// "message": {
43629 /// "description": "Any additional context on the error, or the same as
43630 /// `statusMessage` otherwise.",
43631 /// "examples": [
43632 /// "Bad Request"
43633 /// ],
43634 /// "type": "string"
43635 /// },
43636 /// "statusCode": {
43637 /// "description": "HTTP status code of the error.",
43638 /// "examples": [
43639 /// 400
43640 /// ],
43641 /// "type": "number"
43642 /// },
43643 /// "statusMessage": {
43644 /// "description": "HTTP status message of the error.",
43645 /// "examples": [
43646 /// "Bad Request"
43647 /// ],
43648 /// "type": "string"
43649 /// }
43650 /// },
43651 /// "additionalProperties": false
43652 ///}
43653 /// ```
43654 /// </details>
43655 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43656 #[serde(deny_unknown_fields)]
43657 pub struct UploadPackSourceCodeResponse {
43658 #[serde(rename = "codaDetail", default, skip_serializing_if = "::std::option::Option::is_none")]
43659 pub coda_detail: ::std::option::Option<UploadPackSourceCodeResponseCodaDetail>,
43660 ///Any additional context on the error, or the same as `statusMessage`
43661 /// otherwise.
43662 pub message: ::std::string::String,
43663 #[serde(rename = "statusCode")]
43664 pub status_code: f64,
43665 ///HTTP status message of the error.
43666 #[serde(rename = "statusMessage")]
43667 pub status_message: ::std::string::String,
43668 }
43669
43670 impl ::std::convert::From<&UploadPackSourceCodeResponse> for UploadPackSourceCodeResponse {
43671 fn from(value: &UploadPackSourceCodeResponse) -> Self {
43672 value.clone()
43673 }
43674 }
43675
43676 ///Detail about why this request was rejected.
43677 ///
43678 /// <details><summary>JSON schema</summary>
43679 ///
43680 /// ```json
43681 ///{
43682 /// "description": "Detail about why this request was rejected.",
43683 /// "type": "object",
43684 /// "properties": {
43685 /// "validationErrors": {
43686 /// "type": "array",
43687 /// "items": {
43688 /// "$ref": "#/components/schemas/ValidationError"
43689 /// }
43690 /// }
43691 /// },
43692 /// "additionalProperties": false
43693 ///}
43694 /// ```
43695 /// </details>
43696 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43697 #[serde(deny_unknown_fields)]
43698 pub struct UploadPackSourceCodeResponseCodaDetail {
43699 #[serde(rename = "validationErrors", default, skip_serializing_if = "::std::vec::Vec::is_empty")]
43700 pub validation_errors: ::std::vec::Vec<ValidationError>,
43701 }
43702
43703 impl ::std::convert::From<&UploadPackSourceCodeResponseCodaDetail> for UploadPackSourceCodeResponseCodaDetail {
43704 fn from(value: &UploadPackSourceCodeResponseCodaDetail) -> Self {
43705 value.clone()
43706 }
43707 }
43708
43709 impl ::std::default::Default for UploadPackSourceCodeResponseCodaDetail {
43710 fn default() -> Self {
43711 Self {
43712 validation_errors: Default::default(),
43713 }
43714 }
43715 }
43716
43717 ///An HTTP error resulting from an unsuccessful request.
43718 ///
43719 /// <details><summary>JSON schema</summary>
43720 ///
43721 /// ```json
43722 ///{
43723 /// "description": "An HTTP error resulting from an unsuccessful request.",
43724 /// "required": [
43725 /// "message",
43726 /// "statusCode",
43727 /// "statusMessage"
43728 /// ],
43729 /// "properties": {
43730 /// "message": {
43731 /// "description": "Any additional context on the error, or the same as
43732 /// `statusMessage` otherwise.",
43733 /// "examples": [
43734 /// "Bad Request"
43735 /// ],
43736 /// "type": "string"
43737 /// },
43738 /// "statusCode": {
43739 /// "description": "HTTP status code of the error.",
43740 /// "examples": [
43741 /// 400
43742 /// ],
43743 /// "type": "number"
43744 /// },
43745 /// "statusMessage": {
43746 /// "description": "HTTP status message of the error.",
43747 /// "examples": [
43748 /// "Bad Request"
43749 /// ],
43750 /// "type": "string"
43751 /// }
43752 /// },
43753 /// "additionalProperties": false
43754 ///}
43755 /// ```
43756 /// </details>
43757 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43758 #[serde(deny_unknown_fields)]
43759 pub struct UpsertRowsResponse {
43760 ///Any additional context on the error, or the same as `statusMessage`
43761 /// otherwise.
43762 pub message: ::std::string::String,
43763 #[serde(rename = "statusCode")]
43764 pub status_code: f64,
43765 ///HTTP status message of the error.
43766 #[serde(rename = "statusMessage")]
43767 pub status_message: ::std::string::String,
43768 }
43769
43770 impl ::std::convert::From<&UpsertRowsResponse> for UpsertRowsResponse {
43771 fn from(value: &UpsertRowsResponse) -> Self {
43772 value.clone()
43773 }
43774 }
43775
43776 ///`UrlValue`
43777 ///
43778 /// <details><summary>JSON schema</summary>
43779 ///
43780 /// ```json
43781 ///{
43782 /// "description": "A named hyperlink to an arbitrary url.",
43783 /// "allOf": [
43784 /// {
43785 /// "$ref": "#/components/schemas/LinkedDataObject"
43786 /// },
43787 /// {
43788 /// "type": "object",
43789 /// "required": [
43790 /// "@type",
43791 /// "url"
43792 /// ],
43793 /// "properties": {
43794 /// "@type": {
43795 /// "type": "string",
43796 /// "enum": [
43797 /// "WebPage"
43798 /// ],
43799 /// "x-tsType": "LinkedDataType.WebPage"
43800 /// },
43801 /// "name": {
43802 /// "description": "The user-visible text of the hyperlink.",
43803 /// "examples": [
43804 /// "Click me"
43805 /// ],
43806 /// "type": "string"
43807 /// },
43808 /// "url": {
43809 /// "description": "The url of the hyperlink.",
43810 /// "examples": [
43811 /// "https://coda.io"
43812 /// ],
43813 /// "type": "string"
43814 /// }
43815 /// },
43816 /// "additionalProperties": false
43817 /// }
43818 /// ],
43819 /// "x-schema-name": "UrlValue"
43820 ///}
43821 /// ```
43822 /// </details>
43823 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43824 #[serde(deny_unknown_fields)]
43825 pub enum UrlValue {}
43826 impl ::std::convert::From<&Self> for UrlValue {
43827 fn from(value: &UrlValue) -> Self {
43828 value.clone()
43829 }
43830 }
43831
43832 ///Info about the user.
43833 ///
43834 /// <details><summary>JSON schema</summary>
43835 ///
43836 /// ```json
43837 ///{
43838 /// "description": "Info about the user.",
43839 /// "type": "object",
43840 /// "required": [
43841 /// "href",
43842 /// "loginId",
43843 /// "name",
43844 /// "scoped",
43845 /// "tokenName",
43846 /// "type",
43847 /// "workspace"
43848 /// ],
43849 /// "properties": {
43850 /// "href": {
43851 /// "description": "API link to the user.",
43852 /// "examples": [
43853 /// "https://coda.io/apis/v1beta/whoami"
43854 /// ],
43855 /// "type": "string",
43856 /// "format": "url"
43857 /// },
43858 /// "loginId": {
43859 /// "description": "Email address of the user.",
43860 /// "examples": [
43861 /// "user@example.com"
43862 /// ],
43863 /// "type": "string"
43864 /// },
43865 /// "name": {
43866 /// "description": "Name of the user.",
43867 /// "examples": [
43868 /// "John Doe"
43869 /// ],
43870 /// "type": "string"
43871 /// },
43872 /// "pictureLink": {
43873 /// "description": "Browser-friendly link to the user's avatar image.",
43874 /// "examples": [
43875 /// "https://cdn.coda.io/avatars/default_avatar.png"
43876 /// ],
43877 /// "type": "string",
43878 /// "format": "url"
43879 /// },
43880 /// "scoped": {
43881 /// "description": "True if the token used to make this request has
43882 /// restricted/scoped access to the API.",
43883 /// "examples": [
43884 /// false
43885 /// ],
43886 /// "type": "boolean"
43887 /// },
43888 /// "tokenName": {
43889 /// "description": "Returns the name of the token used for this
43890 /// request.",
43891 /// "examples": [
43892 /// "My API token"
43893 /// ],
43894 /// "type": "string"
43895 /// },
43896 /// "type": {
43897 /// "description": "The type of this resource.",
43898 /// "type": "string",
43899 /// "enum": [
43900 /// "user"
43901 /// ],
43902 /// "x-tsType": "Type.User"
43903 /// },
43904 /// "workspace": {
43905 /// "$ref": "#/components/schemas/WorkspaceReference"
43906 /// }
43907 /// },
43908 /// "additionalProperties": false,
43909 /// "x-schema-name": "User"
43910 ///}
43911 /// ```
43912 /// </details>
43913 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43914 #[serde(deny_unknown_fields)]
43915 pub struct User {
43916 ///API link to the user.
43917 pub href: ::std::string::String,
43918 ///Email address of the user.
43919 #[serde(rename = "loginId")]
43920 pub login_id: ::std::string::String,
43921 ///Name of the user.
43922 pub name: ::std::string::String,
43923 ///Browser-friendly link to the user's avatar image.
43924 #[serde(rename = "pictureLink", default, skip_serializing_if = "::std::option::Option::is_none")]
43925 pub picture_link: ::std::option::Option<::std::string::String>,
43926 ///True if the token used to make this request has restricted/scoped
43927 /// access to the API.
43928 pub scoped: bool,
43929 ///Returns the name of the token used for this request.
43930 #[serde(rename = "tokenName")]
43931 pub token_name: ::std::string::String,
43932 ///The type of this resource.
43933 #[serde(rename = "type")]
43934 pub type_: UserType,
43935 pub workspace: WorkspaceReference,
43936 }
43937
43938 impl ::std::convert::From<&User> for User {
43939 fn from(value: &User) -> Self {
43940 value.clone()
43941 }
43942 }
43943
43944 ///Summary about the user.
43945 ///
43946 /// <details><summary>JSON schema</summary>
43947 ///
43948 /// ```json
43949 ///{
43950 /// "description": "Summary about the user.",
43951 /// "type": "object",
43952 /// "required": [
43953 /// "loginId",
43954 /// "name",
43955 /// "type"
43956 /// ],
43957 /// "properties": {
43958 /// "loginId": {
43959 /// "description": "Email address of the user.",
43960 /// "examples": [
43961 /// "user@example.com"
43962 /// ],
43963 /// "type": "string"
43964 /// },
43965 /// "name": {
43966 /// "description": "Name of the user.",
43967 /// "examples": [
43968 /// "John Doe"
43969 /// ],
43970 /// "type": "string"
43971 /// },
43972 /// "pictureLink": {
43973 /// "description": "Browser-friendly link to the user's avatar image.",
43974 /// "examples": [
43975 /// "https://cdn.coda.io/avatars/default_avatar.png"
43976 /// ],
43977 /// "type": "string",
43978 /// "format": "url"
43979 /// },
43980 /// "type": {
43981 /// "description": "The type of this resource.",
43982 /// "type": "string",
43983 /// "enum": [
43984 /// "user"
43985 /// ],
43986 /// "x-tsType": "Type.User"
43987 /// }
43988 /// },
43989 /// "additionalProperties": false,
43990 /// "x-schema-name": "UserSummary"
43991 ///}
43992 /// ```
43993 /// </details>
43994 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
43995 #[serde(deny_unknown_fields)]
43996 pub struct UserSummary {
43997 ///Email address of the user.
43998 #[serde(rename = "loginId")]
43999 pub login_id: ::std::string::String,
44000 ///Name of the user.
44001 pub name: ::std::string::String,
44002 ///Browser-friendly link to the user's avatar image.
44003 #[serde(rename = "pictureLink", default, skip_serializing_if = "::std::option::Option::is_none")]
44004 pub picture_link: ::std::option::Option<::std::string::String>,
44005 ///The type of this resource.
44006 #[serde(rename = "type")]
44007 pub type_: UserSummaryType,
44008 }
44009
44010 impl ::std::convert::From<&UserSummary> for UserSummary {
44011 fn from(value: &UserSummary) -> Self {
44012 value.clone()
44013 }
44014 }
44015
44016 ///The type of this resource.
44017 ///
44018 /// <details><summary>JSON schema</summary>
44019 ///
44020 /// ```json
44021 ///{
44022 /// "description": "The type of this resource.",
44023 /// "type": "string",
44024 /// "enum": [
44025 /// "user"
44026 /// ],
44027 /// "x-tsType": "Type.User"
44028 ///}
44029 /// ```
44030 /// </details>
44031 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44032 pub enum UserSummaryType {
44033 #[serde(rename = "user")]
44034 User,
44035 }
44036
44037 impl ::std::convert::From<&Self> for UserSummaryType {
44038 fn from(value: &UserSummaryType) -> Self {
44039 value.clone()
44040 }
44041 }
44042
44043 impl ::std::fmt::Display for UserSummaryType {
44044 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44045 match *self {
44046 Self::User => f.write_str("user"),
44047 }
44048 }
44049 }
44050
44051 impl ::std::str::FromStr for UserSummaryType {
44052 type Err = self::error::ConversionError;
44053 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44054 match value {
44055 "user" => Ok(Self::User),
44056 _ => Err("invalid value".into()),
44057 }
44058 }
44059 }
44060
44061 impl ::std::convert::TryFrom<&str> for UserSummaryType {
44062 type Error = self::error::ConversionError;
44063 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44064 value.parse()
44065 }
44066 }
44067
44068 impl ::std::convert::TryFrom<&::std::string::String> for UserSummaryType {
44069 type Error = self::error::ConversionError;
44070 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44071 value.parse()
44072 }
44073 }
44074
44075 impl ::std::convert::TryFrom<::std::string::String> for UserSummaryType {
44076 type Error = self::error::ConversionError;
44077 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44078 value.parse()
44079 }
44080 }
44081
44082 ///The type of this resource.
44083 ///
44084 /// <details><summary>JSON schema</summary>
44085 ///
44086 /// ```json
44087 ///{
44088 /// "description": "The type of this resource.",
44089 /// "type": "string",
44090 /// "enum": [
44091 /// "user"
44092 /// ],
44093 /// "x-tsType": "Type.User"
44094 ///}
44095 /// ```
44096 /// </details>
44097 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44098 pub enum UserType {
44099 #[serde(rename = "user")]
44100 User,
44101 }
44102
44103 impl ::std::convert::From<&Self> for UserType {
44104 fn from(value: &UserType) -> Self {
44105 value.clone()
44106 }
44107 }
44108
44109 impl ::std::fmt::Display for UserType {
44110 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44111 match *self {
44112 Self::User => f.write_str("user"),
44113 }
44114 }
44115 }
44116
44117 impl ::std::str::FromStr for UserType {
44118 type Err = self::error::ConversionError;
44119 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44120 match value {
44121 "user" => Ok(Self::User),
44122 _ => Err("invalid value".into()),
44123 }
44124 }
44125 }
44126
44127 impl ::std::convert::TryFrom<&str> for UserType {
44128 type Error = self::error::ConversionError;
44129 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44130 value.parse()
44131 }
44132 }
44133
44134 impl ::std::convert::TryFrom<&::std::string::String> for UserType {
44135 type Error = self::error::ConversionError;
44136 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44137 value.parse()
44138 }
44139 }
44140
44141 impl ::std::convert::TryFrom<::std::string::String> for UserType {
44142 type Error = self::error::ConversionError;
44143 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44144 value.parse()
44145 }
44146 }
44147
44148 ///Detail about why a particular field failed request validation.
44149 ///
44150 /// <details><summary>JSON schema</summary>
44151 ///
44152 /// ```json
44153 ///{
44154 /// "description": "Detail about why a particular field failed request
44155 /// validation.",
44156 /// "type": "object",
44157 /// "required": [
44158 /// "message",
44159 /// "path"
44160 /// ],
44161 /// "properties": {
44162 /// "message": {
44163 /// "description": "An error message.",
44164 /// "examples": [
44165 /// "Expected a string but got a number"
44166 /// ],
44167 /// "type": "string"
44168 /// },
44169 /// "path": {
44170 /// "description": "A path indicating the affected field, in OGNL
44171 /// notation.",
44172 /// "examples": [
44173 /// "parent.child[0]"
44174 /// ],
44175 /// "type": "string"
44176 /// }
44177 /// },
44178 /// "additionalProperties": false,
44179 /// "x-schema-name": "ValidationError"
44180 ///}
44181 /// ```
44182 /// </details>
44183 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44184 #[serde(deny_unknown_fields)]
44185 pub struct ValidationError {
44186 ///An error message.
44187 pub message: ::std::string::String,
44188 ///A path indicating the affected field, in OGNL notation.
44189 pub path: ::std::string::String,
44190 }
44191
44192 impl ::std::convert::From<&ValidationError> for ValidationError {
44193 fn from(value: &ValidationError) -> Self {
44194 value.clone()
44195 }
44196 }
44197
44198 ///A Coda result or entity expressed as a primitive type, or array of
44199 /// primitive types.
44200 ///
44201 /// <details><summary>JSON schema</summary>
44202 ///
44203 /// ```json
44204 ///{
44205 /// "description": "A Coda result or entity expressed as a primitive type,
44206 /// or array of primitive types.",
44207 /// "oneOf": [
44208 /// {
44209 /// "$ref": "#/components/schemas/ScalarValue"
44210 /// },
44211 /// {
44212 /// "type": "array",
44213 /// "items": {
44214 /// "oneOf": [
44215 /// {
44216 /// "$ref": "#/components/schemas/ScalarValue"
44217 /// },
44218 /// {
44219 /// "type": "array",
44220 /// "items": {
44221 /// "$ref": "#/components/schemas/ScalarValue"
44222 /// }
44223 /// }
44224 /// ]
44225 /// }
44226 /// }
44227 /// ],
44228 /// "additionalProperties": false,
44229 /// "x-schema-name": "Value"
44230 ///}
44231 /// ```
44232 /// </details>
44233 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44234 #[serde(untagged)]
44235 pub enum Value {
44236 Variant0(ValueVariant0),
44237 Variant1(::std::vec::Vec<ValueVariant1Item>),
44238 }
44239
44240 impl ::std::convert::From<&Self> for Value {
44241 fn from(value: &Value) -> Self {
44242 value.clone()
44243 }
44244 }
44245
44246 impl ::std::convert::From<ValueVariant0> for Value {
44247 fn from(value: ValueVariant0) -> Self {
44248 Self::Variant0(value)
44249 }
44250 }
44251
44252 impl ::std::convert::From<::std::vec::Vec<ValueVariant1Item>> for Value {
44253 fn from(value: ::std::vec::Vec<ValueVariant1Item>) -> Self {
44254 Self::Variant1(value)
44255 }
44256 }
44257
44258 ///The format that cell values are returned as.
44259 ///
44260 /// <details><summary>JSON schema</summary>
44261 ///
44262 /// ```json
44263 ///{
44264 /// "description": "The format that cell values are returned as.",
44265 /// "type": "string",
44266 /// "enum": [
44267 /// "simple",
44268 /// "simpleWithArrays",
44269 /// "rich"
44270 /// ],
44271 /// "x-schema-name": "ValueFormat",
44272 /// "x-tsEnumNames": [
44273 /// "Simple",
44274 /// "SimpleWithArrays",
44275 /// "Rich"
44276 /// ]
44277 ///}
44278 /// ```
44279 /// </details>
44280 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44281 pub enum ValueFormat {
44282 #[serde(rename = "simple")]
44283 Simple,
44284 #[serde(rename = "simpleWithArrays")]
44285 SimpleWithArrays,
44286 #[serde(rename = "rich")]
44287 Rich,
44288 }
44289
44290 impl ::std::convert::From<&Self> for ValueFormat {
44291 fn from(value: &ValueFormat) -> Self {
44292 value.clone()
44293 }
44294 }
44295
44296 impl ::std::fmt::Display for ValueFormat {
44297 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44298 match *self {
44299 Self::Simple => f.write_str("simple"),
44300 Self::SimpleWithArrays => f.write_str("simpleWithArrays"),
44301 Self::Rich => f.write_str("rich"),
44302 }
44303 }
44304 }
44305
44306 impl ::std::str::FromStr for ValueFormat {
44307 type Err = self::error::ConversionError;
44308 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44309 match value {
44310 "simple" => Ok(Self::Simple),
44311 "simpleWithArrays" => Ok(Self::SimpleWithArrays),
44312 "rich" => Ok(Self::Rich),
44313 _ => Err("invalid value".into()),
44314 }
44315 }
44316 }
44317
44318 impl ::std::convert::TryFrom<&str> for ValueFormat {
44319 type Error = self::error::ConversionError;
44320 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44321 value.parse()
44322 }
44323 }
44324
44325 impl ::std::convert::TryFrom<&::std::string::String> for ValueFormat {
44326 type Error = self::error::ConversionError;
44327 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44328 value.parse()
44329 }
44330 }
44331
44332 impl ::std::convert::TryFrom<::std::string::String> for ValueFormat {
44333 type Error = self::error::ConversionError;
44334 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44335 value.parse()
44336 }
44337 }
44338
44339 ///`ValueVariant0`
44340 ///
44341 /// <details><summary>JSON schema</summary>
44342 ///
44343 /// ```json
44344 ///{
44345 /// "allOf": [
44346 /// {
44347 /// "additionalProperties": false,
44348 /// "x-schema-name": "Value"
44349 /// },
44350 /// {
44351 /// "$ref": "#/components/schemas/ScalarValue"
44352 /// },
44353 /// {
44354 /// "not": {
44355 /// "type": "array",
44356 /// "items": {
44357 /// "oneOf": [
44358 /// {
44359 /// "$ref": "#/components/schemas/ScalarValue"
44360 /// },
44361 /// {
44362 /// "type": "array",
44363 /// "items": {
44364 /// "$ref": "#/components/schemas/ScalarValue"
44365 /// }
44366 /// }
44367 /// ]
44368 /// }
44369 /// }
44370 /// }
44371 /// ]
44372 ///}
44373 /// ```
44374 /// </details>
44375 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44376 #[serde(untagged)]
44377 pub enum ValueVariant0 {
44378 Variant0(::std::string::String),
44379 Variant1(f64),
44380 Variant2(bool),
44381 }
44382
44383 impl ::std::convert::From<&Self> for ValueVariant0 {
44384 fn from(value: &ValueVariant0) -> Self {
44385 value.clone()
44386 }
44387 }
44388
44389 impl ::std::fmt::Display for ValueVariant0 {
44390 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44391 match self {
44392 Self::Variant0(x) => x.fmt(f),
44393 Self::Variant1(x) => x.fmt(f),
44394 Self::Variant2(x) => x.fmt(f),
44395 }
44396 }
44397 }
44398
44399 impl ::std::convert::From<f64> for ValueVariant0 {
44400 fn from(value: f64) -> Self {
44401 Self::Variant1(value)
44402 }
44403 }
44404
44405 impl ::std::convert::From<bool> for ValueVariant0 {
44406 fn from(value: bool) -> Self {
44407 Self::Variant2(value)
44408 }
44409 }
44410
44411 ///`ValueVariant1Item`
44412 ///
44413 /// <details><summary>JSON schema</summary>
44414 ///
44415 /// ```json
44416 ///{
44417 /// "oneOf": [
44418 /// {
44419 /// "$ref": "#/components/schemas/ScalarValue"
44420 /// },
44421 /// {
44422 /// "type": "array",
44423 /// "items": {
44424 /// "$ref": "#/components/schemas/ScalarValue"
44425 /// }
44426 /// }
44427 /// ]
44428 ///}
44429 /// ```
44430 /// </details>
44431 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44432 #[serde(untagged)]
44433 pub enum ValueVariant1Item {
44434 Variant0(ScalarValue),
44435 Variant1(::std::vec::Vec<ScalarValue>),
44436 }
44437
44438 impl ::std::convert::From<&Self> for ValueVariant1Item {
44439 fn from(value: &ValueVariant1Item) -> Self {
44440 value.clone()
44441 }
44442 }
44443
44444 impl ::std::convert::From<ScalarValue> for ValueVariant1Item {
44445 fn from(value: ScalarValue) -> Self {
44446 Self::Variant0(value)
44447 }
44448 }
44449
44450 impl ::std::convert::From<::std::vec::Vec<ScalarValue>> for ValueVariant1Item {
44451 fn from(value: ::std::vec::Vec<ScalarValue>) -> Self {
44452 Self::Variant1(value)
44453 }
44454 }
44455
44456 ///Payload for webhook trigger
44457 ///
44458 /// <details><summary>JSON schema</summary>
44459 ///
44460 /// ```json
44461 ///{
44462 /// "description": "Payload for webhook trigger",
44463 /// "examples": [
44464 /// {
44465 /// "message": "The doc that brings words, data, & teams together."
44466 /// }
44467 /// ],
44468 /// "type": "object",
44469 /// "additionalProperties": true,
44470 /// "x-schema-name": "WebhookTriggerPayload"
44471 ///}
44472 /// ```
44473 /// </details>
44474 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44475 #[serde(transparent)]
44476 pub struct WebhookTriggerPayload(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
44477 impl ::std::ops::Deref for WebhookTriggerPayload {
44478 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
44479 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
44480 &self.0
44481 }
44482 }
44483
44484 impl ::std::convert::From<WebhookTriggerPayload> for ::serde_json::Map<::std::string::String, ::serde_json::Value> {
44485 fn from(value: WebhookTriggerPayload) -> Self {
44486 value.0
44487 }
44488 }
44489
44490 impl ::std::convert::From<&WebhookTriggerPayload> for WebhookTriggerPayload {
44491 fn from(value: &WebhookTriggerPayload) -> Self {
44492 value.clone()
44493 }
44494 }
44495
44496 impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>> for WebhookTriggerPayload {
44497 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
44498 Self(value)
44499 }
44500 }
44501
44502 ///`WebhookTriggerResult`
44503 ///
44504 /// <details><summary>JSON schema</summary>
44505 ///
44506 /// ```json
44507 ///{
44508 /// "description": "The result of triggering a webhook",
44509 /// "allOf": [
44510 /// {
44511 /// "$ref": "#/components/schemas/DocumentMutateResponse"
44512 /// },
44513 /// {
44514 /// "type": "object",
44515 /// "additionalProperties": false
44516 /// }
44517 /// ],
44518 /// "x-schema-name": "WebhookTriggerResult"
44519 ///}
44520 /// ```
44521 /// </details>
44522 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44523 #[serde(deny_unknown_fields)]
44524 pub enum WebhookTriggerResult {}
44525 impl ::std::convert::From<&Self> for WebhookTriggerResult {
44526 fn from(value: &WebhookTriggerResult) -> Self {
44527 value.clone()
44528 }
44529 }
44530
44531 ///An HTTP error resulting from an unsuccessful request.
44532 ///
44533 /// <details><summary>JSON schema</summary>
44534 ///
44535 /// ```json
44536 ///{
44537 /// "description": "An HTTP error resulting from an unsuccessful request.",
44538 /// "required": [
44539 /// "message",
44540 /// "statusCode",
44541 /// "statusMessage"
44542 /// ],
44543 /// "properties": {
44544 /// "message": {
44545 /// "description": "Any additional context on the error, or the same as
44546 /// `statusMessage` otherwise.",
44547 /// "examples": [
44548 /// "Unauthorized"
44549 /// ],
44550 /// "type": "string"
44551 /// },
44552 /// "statusCode": {
44553 /// "description": "HTTP status code of the error.",
44554 /// "examples": [
44555 /// 401
44556 /// ],
44557 /// "type": "number"
44558 /// },
44559 /// "statusMessage": {
44560 /// "description": "HTTP status message of the error.",
44561 /// "examples": [
44562 /// "Unauthorized"
44563 /// ],
44564 /// "type": "string"
44565 /// }
44566 /// },
44567 /// "additionalProperties": false
44568 ///}
44569 /// ```
44570 /// </details>
44571 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44572 #[serde(deny_unknown_fields)]
44573 pub struct WhoamiResponse {
44574 ///Any additional context on the error, or the same as `statusMessage`
44575 /// otherwise.
44576 pub message: ::std::string::String,
44577 #[serde(rename = "statusCode")]
44578 pub status_code: f64,
44579 ///HTTP status message of the error.
44580 #[serde(rename = "statusMessage")]
44581 pub status_message: ::std::string::String,
44582 }
44583
44584 impl ::std::convert::From<&WhoamiResponse> for WhoamiResponse {
44585 fn from(value: &WhoamiResponse) -> Self {
44586 value.clone()
44587 }
44588 }
44589
44590 ///Metadata about a Coda workspace.
44591 ///
44592 /// <details><summary>JSON schema</summary>
44593 ///
44594 /// ```json
44595 ///{
44596 /// "description": "Metadata about a Coda workspace.",
44597 /// "type": "object",
44598 /// "required": [
44599 /// "browserLink",
44600 /// "id",
44601 /// "name",
44602 /// "type"
44603 /// ],
44604 /// "properties": {
44605 /// "browserLink": {
44606 /// "description": "Browser-friendly link to the Coda workspace.",
44607 /// "examples": [
44608 /// "https://coda.io/docs?workspaceId=ws-1Ab234"
44609 /// ],
44610 /// "type": "string",
44611 /// "format": "url"
44612 /// },
44613 /// "description": {
44614 /// "description": "Description of the workspace.",
44615 /// "examples": [
44616 /// "The central place for our team's knowledge."
44617 /// ],
44618 /// "type": "string"
44619 /// },
44620 /// "id": {
44621 /// "description": "ID of the Coda workspace.",
44622 /// "examples": [
44623 /// "ws-1Ab234"
44624 /// ],
44625 /// "type": "string"
44626 /// },
44627 /// "name": {
44628 /// "description": "Name of the workspace.",
44629 /// "examples": [
44630 /// "coda.io"
44631 /// ],
44632 /// "type": "string"
44633 /// },
44634 /// "organizationId": {
44635 /// "description": "ID of the organization bound to this workspace, if
44636 /// any.",
44637 /// "examples": [
44638 /// "org-2Bc456"
44639 /// ],
44640 /// "type": "string"
44641 /// },
44642 /// "type": {
44643 /// "description": "The type of this resource.",
44644 /// "type": "string",
44645 /// "enum": [
44646 /// "workspace"
44647 /// ],
44648 /// "x-tsType": "Type.Workspace"
44649 /// }
44650 /// },
44651 /// "additionalProperties": false,
44652 /// "x-schema-name": "Workspace"
44653 ///}
44654 /// ```
44655 /// </details>
44656 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44657 #[serde(deny_unknown_fields)]
44658 pub struct Workspace {
44659 ///Browser-friendly link to the Coda workspace.
44660 #[serde(rename = "browserLink")]
44661 pub browser_link: ::std::string::String,
44662 ///Description of the workspace.
44663 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
44664 pub description: ::std::option::Option<::std::string::String>,
44665 ///ID of the Coda workspace.
44666 pub id: ::std::string::String,
44667 ///Name of the workspace.
44668 pub name: ::std::string::String,
44669 ///ID of the organization bound to this workspace, if any.
44670 #[serde(rename = "organizationId", default, skip_serializing_if = "::std::option::Option::is_none")]
44671 pub organization_id: ::std::option::Option<::std::string::String>,
44672 ///The type of this resource.
44673 #[serde(rename = "type")]
44674 pub type_: WorkspaceType,
44675 }
44676
44677 impl ::std::convert::From<&Workspace> for Workspace {
44678 fn from(value: &Workspace) -> Self {
44679 value.clone()
44680 }
44681 }
44682
44683 ///Response for listing workspace users.
44684 ///
44685 /// <details><summary>JSON schema</summary>
44686 ///
44687 /// ```json
44688 ///{
44689 /// "description": "Response for listing workspace users.",
44690 /// "type": "object",
44691 /// "required": [
44692 /// "items"
44693 /// ],
44694 /// "properties": {
44695 /// "items": {
44696 /// "type": "array",
44697 /// "items": {
44698 /// "$ref": "#/components/schemas/WorkspaceUser"
44699 /// }
44700 /// },
44701 /// "nextPageLink": {
44702 /// "allOf": [
44703 /// {
44704 /// "$ref": "#/components/schemas/nextPageLink"
44705 /// },
44706 /// {
44707 /// "examples": [
44708 /// "https://coda.io/apis/v1/workspaces/{workspaceId}/users?pageToken=xyz"
44709 /// ],
44710 /// "type": "string"
44711 /// }
44712 /// ]
44713 /// },
44714 /// "nextPageToken": {
44715 /// "$ref": "#/components/schemas/nextPageToken"
44716 /// }
44717 /// },
44718 /// "additionalProperties": false,
44719 /// "x-schema-name": "WorkspaceMembersList"
44720 ///}
44721 /// ```
44722 /// </details>
44723 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44724 #[serde(deny_unknown_fields)]
44725 pub struct WorkspaceMembersList {
44726 pub items: ::std::vec::Vec<WorkspaceUser>,
44727 #[serde(rename = "nextPageLink", default, skip_serializing_if = "::std::option::Option::is_none")]
44728 pub next_page_link: ::std::option::Option<NextPageLink>,
44729 #[serde(rename = "nextPageToken", default, skip_serializing_if = "::std::option::Option::is_none")]
44730 pub next_page_token: ::std::option::Option<NextPageToken>,
44731 }
44732
44733 impl ::std::convert::From<&WorkspaceMembersList> for WorkspaceMembersList {
44734 fn from(value: &WorkspaceMembersList) -> Self {
44735 value.clone()
44736 }
44737 }
44738
44739 ///`WorkspacePrincipal`
44740 ///
44741 /// <details><summary>JSON schema</summary>
44742 ///
44743 /// ```json
44744 ///{
44745 /// "type": "object",
44746 /// "required": [
44747 /// "type",
44748 /// "workspaceId"
44749 /// ],
44750 /// "properties": {
44751 /// "type": {
44752 /// "description": "The type of this principal.",
44753 /// "type": "string",
44754 /// "enum": [
44755 /// "workspace"
44756 /// ],
44757 /// "x-tsType": "PrincipalType.Workspace"
44758 /// },
44759 /// "workspaceId": {
44760 /// "description": "WorkspaceId for the principal.",
44761 /// "examples": [
44762 /// "ws-sdfmsdf9"
44763 /// ],
44764 /// "type": "string"
44765 /// }
44766 /// },
44767 /// "additionalProperties": false
44768 ///}
44769 /// ```
44770 /// </details>
44771 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44772 #[serde(deny_unknown_fields)]
44773 pub struct WorkspacePrincipal {
44774 ///The type of this principal.
44775 #[serde(rename = "type")]
44776 pub type_: WorkspacePrincipalType,
44777 ///WorkspaceId for the principal.
44778 #[serde(rename = "workspaceId")]
44779 pub workspace_id: ::std::string::String,
44780 }
44781
44782 impl ::std::convert::From<&WorkspacePrincipal> for WorkspacePrincipal {
44783 fn from(value: &WorkspacePrincipal) -> Self {
44784 value.clone()
44785 }
44786 }
44787
44788 ///The type of this principal.
44789 ///
44790 /// <details><summary>JSON schema</summary>
44791 ///
44792 /// ```json
44793 ///{
44794 /// "description": "The type of this principal.",
44795 /// "type": "string",
44796 /// "enum": [
44797 /// "workspace"
44798 /// ],
44799 /// "x-tsType": "PrincipalType.Workspace"
44800 ///}
44801 /// ```
44802 /// </details>
44803 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44804 pub enum WorkspacePrincipalType {
44805 #[serde(rename = "workspace")]
44806 Workspace,
44807 }
44808
44809 impl ::std::convert::From<&Self> for WorkspacePrincipalType {
44810 fn from(value: &WorkspacePrincipalType) -> Self {
44811 value.clone()
44812 }
44813 }
44814
44815 impl ::std::fmt::Display for WorkspacePrincipalType {
44816 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44817 match *self {
44818 Self::Workspace => f.write_str("workspace"),
44819 }
44820 }
44821 }
44822
44823 impl ::std::str::FromStr for WorkspacePrincipalType {
44824 type Err = self::error::ConversionError;
44825 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44826 match value {
44827 "workspace" => Ok(Self::Workspace),
44828 _ => Err("invalid value".into()),
44829 }
44830 }
44831 }
44832
44833 impl ::std::convert::TryFrom<&str> for WorkspacePrincipalType {
44834 type Error = self::error::ConversionError;
44835 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44836 value.parse()
44837 }
44838 }
44839
44840 impl ::std::convert::TryFrom<&::std::string::String> for WorkspacePrincipalType {
44841 type Error = self::error::ConversionError;
44842 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44843 value.parse()
44844 }
44845 }
44846
44847 impl ::std::convert::TryFrom<::std::string::String> for WorkspacePrincipalType {
44848 type Error = self::error::ConversionError;
44849 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44850 value.parse()
44851 }
44852 }
44853
44854 ///Reference to a Coda workspace.
44855 ///
44856 /// <details><summary>JSON schema</summary>
44857 ///
44858 /// ```json
44859 ///{
44860 /// "description": "Reference to a Coda workspace.",
44861 /// "type": "object",
44862 /// "required": [
44863 /// "browserLink",
44864 /// "id",
44865 /// "type"
44866 /// ],
44867 /// "properties": {
44868 /// "browserLink": {
44869 /// "description": "Browser-friendly link to the Coda workspace.",
44870 /// "examples": [
44871 /// "https://coda.io/docs?workspaceId=ws-1Ab234"
44872 /// ],
44873 /// "type": "string",
44874 /// "format": "url"
44875 /// },
44876 /// "id": {
44877 /// "description": "ID of the Coda workspace.",
44878 /// "examples": [
44879 /// "ws-1Ab234"
44880 /// ],
44881 /// "type": "string"
44882 /// },
44883 /// "name": {
44884 /// "description": "Name of the workspace; included if the user has
44885 /// access to the workspace.",
44886 /// "examples": [
44887 /// "My workspace"
44888 /// ],
44889 /// "type": "string"
44890 /// },
44891 /// "organizationId": {
44892 /// "description": "ID of the organization bound to this workspace, if
44893 /// any.",
44894 /// "examples": [
44895 /// "org-2Bc456"
44896 /// ],
44897 /// "type": "string"
44898 /// },
44899 /// "type": {
44900 /// "description": "The type of this resource.",
44901 /// "type": "string",
44902 /// "enum": [
44903 /// "workspace"
44904 /// ],
44905 /// "x-tsType": "Type.Workspace"
44906 /// }
44907 /// },
44908 /// "additionalProperties": false,
44909 /// "x-schema-name": "WorkspaceReference"
44910 ///}
44911 /// ```
44912 /// </details>
44913 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
44914 #[serde(deny_unknown_fields)]
44915 pub struct WorkspaceReference {
44916 ///Browser-friendly link to the Coda workspace.
44917 #[serde(rename = "browserLink")]
44918 pub browser_link: ::std::string::String,
44919 ///ID of the Coda workspace.
44920 pub id: ::std::string::String,
44921 ///Name of the workspace; included if the user has access to the
44922 /// workspace.
44923 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
44924 pub name: ::std::option::Option<::std::string::String>,
44925 ///ID of the organization bound to this workspace, if any.
44926 #[serde(rename = "organizationId", default, skip_serializing_if = "::std::option::Option::is_none")]
44927 pub organization_id: ::std::option::Option<::std::string::String>,
44928 ///The type of this resource.
44929 #[serde(rename = "type")]
44930 pub type_: WorkspaceReferenceType,
44931 }
44932
44933 impl ::std::convert::From<&WorkspaceReference> for WorkspaceReference {
44934 fn from(value: &WorkspaceReference) -> Self {
44935 value.clone()
44936 }
44937 }
44938
44939 ///The type of this resource.
44940 ///
44941 /// <details><summary>JSON schema</summary>
44942 ///
44943 /// ```json
44944 ///{
44945 /// "description": "The type of this resource.",
44946 /// "type": "string",
44947 /// "enum": [
44948 /// "workspace"
44949 /// ],
44950 /// "x-tsType": "Type.Workspace"
44951 ///}
44952 /// ```
44953 /// </details>
44954 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44955 pub enum WorkspaceReferenceType {
44956 #[serde(rename = "workspace")]
44957 Workspace,
44958 }
44959
44960 impl ::std::convert::From<&Self> for WorkspaceReferenceType {
44961 fn from(value: &WorkspaceReferenceType) -> Self {
44962 value.clone()
44963 }
44964 }
44965
44966 impl ::std::fmt::Display for WorkspaceReferenceType {
44967 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
44968 match *self {
44969 Self::Workspace => f.write_str("workspace"),
44970 }
44971 }
44972 }
44973
44974 impl ::std::str::FromStr for WorkspaceReferenceType {
44975 type Err = self::error::ConversionError;
44976 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44977 match value {
44978 "workspace" => Ok(Self::Workspace),
44979 _ => Err("invalid value".into()),
44980 }
44981 }
44982 }
44983
44984 impl ::std::convert::TryFrom<&str> for WorkspaceReferenceType {
44985 type Error = self::error::ConversionError;
44986 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
44987 value.parse()
44988 }
44989 }
44990
44991 impl ::std::convert::TryFrom<&::std::string::String> for WorkspaceReferenceType {
44992 type Error = self::error::ConversionError;
44993 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
44994 value.parse()
44995 }
44996 }
44997
44998 impl ::std::convert::TryFrom<::std::string::String> for WorkspaceReferenceType {
44999 type Error = self::error::ConversionError;
45000 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
45001 value.parse()
45002 }
45003 }
45004
45005 ///Metadata for workspace role activity.
45006 ///
45007 /// <details><summary>JSON schema</summary>
45008 ///
45009 /// ```json
45010 ///{
45011 /// "description": "Metadata for workspace role activity.",
45012 /// "type": "object",
45013 /// "required": [
45014 /// "activeAdminCount",
45015 /// "activeDocMakerCount",
45016 /// "activeEditorCount",
45017 /// "inactiveAdminCount",
45018 /// "inactiveDocMakerCount",
45019 /// "inactiveEditorCount",
45020 /// "month"
45021 /// ],
45022 /// "properties": {
45023 /// "activeAdminCount": {
45024 /// "description": "Number of active Admins.",
45025 /// "examples": [
45026 /// 2
45027 /// ],
45028 /// "type": "number"
45029 /// },
45030 /// "activeDocMakerCount": {
45031 /// "description": "Number of active Doc Makers.",
45032 /// "examples": [
45033 /// 2
45034 /// ],
45035 /// "type": "number"
45036 /// },
45037 /// "activeEditorCount": {
45038 /// "description": "Number of active Editors.",
45039 /// "examples": [
45040 /// 2
45041 /// ],
45042 /// "type": "number"
45043 /// },
45044 /// "inactiveAdminCount": {
45045 /// "description": "Number of inactive Admins.",
45046 /// "examples": [
45047 /// 2
45048 /// ],
45049 /// "type": "number"
45050 /// },
45051 /// "inactiveDocMakerCount": {
45052 /// "description": "Number of inactive Doc Makers.",
45053 /// "examples": [
45054 /// 2
45055 /// ],
45056 /// "type": "number"
45057 /// },
45058 /// "inactiveEditorCount": {
45059 /// "description": "Number of inactive Editor users.",
45060 /// "examples": [
45061 /// 2
45062 /// ],
45063 /// "type": "number"
45064 /// },
45065 /// "month": {
45066 /// "description": "Month corresponding to the data.",
45067 /// "examples": [
45068 /// "2020-09-15"
45069 /// ],
45070 /// "type": "string"
45071 /// }
45072 /// },
45073 /// "additionalProperties": false,
45074 /// "x-schema-name": "WorkspaceRoleActivity"
45075 ///}
45076 /// ```
45077 /// </details>
45078 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
45079 #[serde(deny_unknown_fields)]
45080 pub struct WorkspaceRoleActivity {
45081 #[serde(rename = "activeAdminCount")]
45082 pub active_admin_count: f64,
45083 #[serde(rename = "activeDocMakerCount")]
45084 pub active_doc_maker_count: f64,
45085 #[serde(rename = "activeEditorCount")]
45086 pub active_editor_count: f64,
45087 #[serde(rename = "inactiveAdminCount")]
45088 pub inactive_admin_count: f64,
45089 #[serde(rename = "inactiveDocMakerCount")]
45090 pub inactive_doc_maker_count: f64,
45091 #[serde(rename = "inactiveEditorCount")]
45092 pub inactive_editor_count: f64,
45093 ///Month corresponding to the data.
45094 pub month: ::std::string::String,
45095 }
45096
45097 impl ::std::convert::From<&WorkspaceRoleActivity> for WorkspaceRoleActivity {
45098 fn from(value: &WorkspaceRoleActivity) -> Self {
45099 value.clone()
45100 }
45101 }
45102
45103 ///The type of this resource.
45104 ///
45105 /// <details><summary>JSON schema</summary>
45106 ///
45107 /// ```json
45108 ///{
45109 /// "description": "The type of this resource.",
45110 /// "type": "string",
45111 /// "enum": [
45112 /// "workspace"
45113 /// ],
45114 /// "x-tsType": "Type.Workspace"
45115 ///}
45116 /// ```
45117 /// </details>
45118 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
45119 pub enum WorkspaceType {
45120 #[serde(rename = "workspace")]
45121 Workspace,
45122 }
45123
45124 impl ::std::convert::From<&Self> for WorkspaceType {
45125 fn from(value: &WorkspaceType) -> Self {
45126 value.clone()
45127 }
45128 }
45129
45130 impl ::std::fmt::Display for WorkspaceType {
45131 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
45132 match *self {
45133 Self::Workspace => f.write_str("workspace"),
45134 }
45135 }
45136 }
45137
45138 impl ::std::str::FromStr for WorkspaceType {
45139 type Err = self::error::ConversionError;
45140 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
45141 match value {
45142 "workspace" => Ok(Self::Workspace),
45143 _ => Err("invalid value".into()),
45144 }
45145 }
45146 }
45147
45148 impl ::std::convert::TryFrom<&str> for WorkspaceType {
45149 type Error = self::error::ConversionError;
45150 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
45151 value.parse()
45152 }
45153 }
45154
45155 impl ::std::convert::TryFrom<&::std::string::String> for WorkspaceType {
45156 type Error = self::error::ConversionError;
45157 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
45158 value.parse()
45159 }
45160 }
45161
45162 impl ::std::convert::TryFrom<::std::string::String> for WorkspaceType {
45163 type Error = self::error::ConversionError;
45164 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
45165 value.parse()
45166 }
45167 }
45168
45169 ///Metadata of a workspace user.
45170 ///
45171 /// <details><summary>JSON schema</summary>
45172 ///
45173 /// ```json
45174 ///{
45175 /// "description": "Metadata of a workspace user.",
45176 /// "type": "object",
45177 /// "required": [
45178 /// "email",
45179 /// "name",
45180 /// "registeredAt",
45181 /// "role"
45182 /// ],
45183 /// "properties": {
45184 /// "docCollaboratorCount": {
45185 /// "description": "Number of collaborators that have interacted with
45186 /// docs owned by the user in the last 90 days.",
45187 /// "examples": [
45188 /// 2
45189 /// ],
45190 /// "type": "number"
45191 /// },
45192 /// "docsLastActiveAt": {
45193 /// "description": "Date when anyone last accessed a doc that the user
45194 /// owns in this workspace.",
45195 /// "examples": [
45196 /// "2018-04-11"
45197 /// ],
45198 /// "type": "string",
45199 /// "format": "date"
45200 /// },
45201 /// "email": {
45202 /// "description": "Email of the user.",
45203 /// "examples": [
45204 /// "hello@coda.io"
45205 /// ],
45206 /// "type": "string"
45207 /// },
45208 /// "lastActiveAt": {
45209 /// "description": "Date when the user last took an action in any
45210 /// workspace.",
45211 /// "examples": [
45212 /// "2018-04-11"
45213 /// ],
45214 /// "type": "string",
45215 /// "format": "date"
45216 /// },
45217 /// "name": {
45218 /// "description": "Name of the user.",
45219 /// "examples": [
45220 /// "Sally Jane"
45221 /// ],
45222 /// "type": "string"
45223 /// },
45224 /// "ownedDocs": {
45225 /// "description": "Number of docs the user owns in this workspace.",
45226 /// "examples": [
45227 /// 2
45228 /// ],
45229 /// "type": "number"
45230 /// },
45231 /// "pictureUrl": {
45232 /// "description": "Picture url of the user.",
45233 /// "examples": [
45234 /// "codahosted.io/123"
45235 /// ],
45236 /// "type": "string",
45237 /// "format": "url"
45238 /// },
45239 /// "registeredAt": {
45240 /// "description": "Timestamp for when the user registered in this
45241 /// workspace",
45242 /// "examples": [
45243 /// "2018-04-11T00:18:57.946Z"
45244 /// ],
45245 /// "type": "string",
45246 /// "format": "date-time"
45247 /// },
45248 /// "role": {
45249 /// "$ref": "#/components/schemas/WorkspaceUserRole"
45250 /// },
45251 /// "roleChangedAt": {
45252 /// "description": "Timestamp for when the user's role last changed in
45253 /// this workspace.",
45254 /// "examples": [
45255 /// "2018-04-11T00:18:57.946Z"
45256 /// ],
45257 /// "type": "string",
45258 /// "format": "date-time"
45259 /// },
45260 /// "totalDocCollaboratorsLast90Days": {
45261 /// "description": "Number of unique users that have viewed any doc the
45262 /// user owns, manages, or has added pages to in the last 90 days.",
45263 /// "examples": [
45264 /// 2
45265 /// ],
45266 /// "type": "number"
45267 /// },
45268 /// "totalDocs": {
45269 /// "description": "Number of docs the user owns, manages, or to which
45270 /// they have added pages in the last 90 days.",
45271 /// "examples": [
45272 /// 2
45273 /// ],
45274 /// "type": "number"
45275 /// },
45276 /// "totalDocsLastActiveAt": {
45277 /// "description": "Date when anyone last accessed a doc the member
45278 /// owns or contributed to.",
45279 /// "examples": [
45280 /// "2018-04-11"
45281 /// ],
45282 /// "type": "string",
45283 /// "format": "date"
45284 /// }
45285 /// },
45286 /// "additionalProperties": false,
45287 /// "x-schema-name": "WorkspaceUser"
45288 ///}
45289 /// ```
45290 /// </details>
45291 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
45292 #[serde(deny_unknown_fields)]
45293 pub struct WorkspaceUser {
45294 #[serde(rename = "docCollaboratorCount", default, skip_serializing_if = "::std::option::Option::is_none")]
45295 pub doc_collaborator_count: ::std::option::Option<f64>,
45296 ///Date when anyone last accessed a doc that the user owns in this
45297 /// workspace.
45298 #[serde(rename = "docsLastActiveAt", default, skip_serializing_if = "::std::option::Option::is_none")]
45299 pub docs_last_active_at: ::std::option::Option<::chrono::naive::NaiveDate>,
45300 ///Email of the user.
45301 pub email: ::std::string::String,
45302 ///Date when the user last took an action in any workspace.
45303 #[serde(rename = "lastActiveAt", default, skip_serializing_if = "::std::option::Option::is_none")]
45304 pub last_active_at: ::std::option::Option<::chrono::naive::NaiveDate>,
45305 ///Name of the user.
45306 pub name: ::std::string::String,
45307 #[serde(rename = "ownedDocs", default, skip_serializing_if = "::std::option::Option::is_none")]
45308 pub owned_docs: ::std::option::Option<f64>,
45309 ///Picture url of the user.
45310 #[serde(rename = "pictureUrl", default, skip_serializing_if = "::std::option::Option::is_none")]
45311 pub picture_url: ::std::option::Option<::std::string::String>,
45312 ///Timestamp for when the user registered in this workspace
45313 #[serde(rename = "registeredAt")]
45314 pub registered_at: ::chrono::DateTime<::chrono::offset::Utc>,
45315 pub role: WorkspaceUserRole,
45316 ///Timestamp for when the user's role last changed in this workspace.
45317 #[serde(rename = "roleChangedAt", default, skip_serializing_if = "::std::option::Option::is_none")]
45318 pub role_changed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
45319 #[serde(rename = "totalDocCollaboratorsLast90Days", default, skip_serializing_if = "::std::option::Option::is_none")]
45320 pub total_doc_collaborators_last90_days: ::std::option::Option<f64>,
45321 #[serde(rename = "totalDocs", default, skip_serializing_if = "::std::option::Option::is_none")]
45322 pub total_docs: ::std::option::Option<f64>,
45323 ///Date when anyone last accessed a doc the member owns or contributed
45324 /// to.
45325 #[serde(rename = "totalDocsLastActiveAt", default, skip_serializing_if = "::std::option::Option::is_none")]
45326 pub total_docs_last_active_at: ::std::option::Option<::chrono::naive::NaiveDate>,
45327 }
45328
45329 impl ::std::convert::From<&WorkspaceUser> for WorkspaceUser {
45330 fn from(value: &WorkspaceUser) -> Self {
45331 value.clone()
45332 }
45333 }
45334
45335 ///`WorkspaceUserRole`
45336 ///
45337 /// <details><summary>JSON schema</summary>
45338 ///
45339 /// ```json
45340 ///{
45341 /// "type": "string",
45342 /// "enum": [
45343 /// "Admin",
45344 /// "DocMaker",
45345 /// "Editor"
45346 /// ],
45347 /// "x-schema-name": "WorkspaceUserRole",
45348 /// "x-tsEnumNames": [
45349 /// "Admin",
45350 /// "DocMaker",
45351 /// "Editor"
45352 /// ]
45353 ///}
45354 /// ```
45355 /// </details>
45356 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
45357 pub enum WorkspaceUserRole {
45358 Admin,
45359 DocMaker,
45360 Editor,
45361 }
45362
45363 impl ::std::convert::From<&Self> for WorkspaceUserRole {
45364 fn from(value: &WorkspaceUserRole) -> Self {
45365 value.clone()
45366 }
45367 }
45368
45369 impl ::std::fmt::Display for WorkspaceUserRole {
45370 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
45371 match *self {
45372 Self::Admin => f.write_str("Admin"),
45373 Self::DocMaker => f.write_str("DocMaker"),
45374 Self::Editor => f.write_str("Editor"),
45375 }
45376 }
45377 }
45378
45379 impl ::std::str::FromStr for WorkspaceUserRole {
45380 type Err = self::error::ConversionError;
45381 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
45382 match value {
45383 "Admin" => Ok(Self::Admin),
45384 "DocMaker" => Ok(Self::DocMaker),
45385 "Editor" => Ok(Self::Editor),
45386 _ => Err("invalid value".into()),
45387 }
45388 }
45389 }
45390
45391 impl ::std::convert::TryFrom<&str> for WorkspaceUserRole {
45392 type Error = self::error::ConversionError;
45393 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
45394 value.parse()
45395 }
45396 }
45397
45398 impl ::std::convert::TryFrom<&::std::string::String> for WorkspaceUserRole {
45399 type Error = self::error::ConversionError;
45400 fn try_from(value: &::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
45401 value.parse()
45402 }
45403 }
45404
45405 impl ::std::convert::TryFrom<::std::string::String> for WorkspaceUserRole {
45406 type Error = self::error::ConversionError;
45407 fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, self::error::ConversionError> {
45408 value.parse()
45409 }
45410 }
45411}
45412
45413#[derive(Clone, Debug)]
45414///Client for Coda API
45415///
45416///# Introduction
45417///
45418///The Coda API is a RESTful API that lets you programmatically interact with
45419/// Coda docs:
45420///
45421/// * List and search Coda docs
45422/// * Create new docs and copy existing ones
45423/// * Share and publish docs
45424/// * Discover pages, tables, formulas, and controls
45425/// * Read, insert, upsert, update, and delete rows
45426///
45427///As we update and release newer versions of the API, we reserve the right to
45428/// remove older APIs and functionality with a 3-month deprecation notice. We
45429/// will post about such changes as well as announce new features in the [Developers Central](https://community.coda.io/c/developers-central) section of our Community,
45430///and update the [API updates](https://coda.io/api-updates) doc.
45431///
45432///# Getting Started
45433///
45434///Our [Getting Started Guide](https://coda.io/@oleg/getting-started-guide-coda-api) helps you learn the
45435///basic of working with the API and shows a few ways you can use it. Check it
45436/// out, and learn how to:
45437///
45438/// - Read data from Coda tables and write back to them
45439/// - Build a one-way sync from one Coda doc to another
45440/// - Automate reminders
45441/// - Sync your Google Calendar to Coda
45442///
45443///# Using the API
45444///
45445///Coda's REST API is designed to be straightforward to use. You can use the
45446/// language and platform of your choice to make requests. To get a feel for the API, you can also use a tool like [Postman](https://www.getpostman.com/) or
45447///[Insomnia](https://insomnia.rest/).
45448///
45449///## API Endpoint
45450///
45451///This API uses a base path of `https://coda.io/apis/v1`.
45452///
45453///## Resource IDs and Links
45454///
45455///Each resource instance retrieved via the API has the following fields:
45456///
45457/// - `id`: The resource's immutable ID, which can be used to refer to it
45458/// within its context
45459/// - `type`: The type of resource, useful for identifying it in a heterogenous
45460/// collection of results
45461/// - `href`: A fully qualified URI that can be used to refer to and get the
45462/// latest details on the resource
45463///
45464///Most resources can be queried by their name or ID. We recommend sticking
45465/// with IDs where possible, as names are fragile and prone to being changed by
45466/// your doc's users.
45467///
45468///### List Endpoints
45469///
45470///Endpoints supporting listing of resources have the following fields:
45471///
45472/// - `items`: An array containing the listed resources, limited by the `limit`
45473/// or `pageToken` query parameters
45474/// - `nextPageLink`: If more results are available, an API link to the next
45475/// page of results
45476/// - `nextPageToken`: If more results are available, a page token that can be
45477/// passed into the `pageToken` query parameter
45478///
45479///**The maximum page size may change at any time, and may be different for
45480/// different endpoints.** Please do not rely on it for any behavior of your
45481/// application. If you pass a `limit` parameter that is larger than our maximum
45482/// allowed limit, we will only return as many results as our maximum limit. You
45483/// should look for the presence of the `nextPageToken` on the response to see
45484/// if there are more results available, rather than relying on a result set
45485/// that matches your provided limit.
45486///
45487///To fetch a subsequent page of results, pass the `pageToken` parameter. Set
45488/// this parameter to the value given to you as the `nextPageToken`
45489/// in a page response. If no value is provided, there are no more results
45490/// available. You only need to pass the `pageToken` to get the next page of
45491/// results, you don't need to pass any of the parameters from your original
45492/// request, as they are all implied by the `pageToken`. Any other parameters
45493/// provided alongside a `pageToken` will be ignored.
45494///
45495///### Doc IDs
45496///
45497///While most object IDs will have to be discovered via the API, you may find
45498/// yourself frequently wanting to get the ID of a specific Coda doc.
45499///
45500///Here's a handy tool that will extract it for you. (See if you can find the
45501/// pattern!)
45502///
45503///<form>
45504/// <fieldset style="margin: 0px 25px 25px 25px; display: inline;">
45505/// <legend>Doc ID Extractor</legend>
45506/// <input type="text" id="de_docUrl" placeholder="Paste in a Coda doc URL"
45507/// style="width: 250px; padding: 8px; margin-right: 20px;" />
45508///
45509/// Your doc ID is:
45510/// <input id="de_docId" readonly="true"
45511/// style="width: 150px; padding: 8px; font-family: monospace; border: 1px dashed gray;" /> </fieldset>
45512///</form>
45513///
45514///<script>
45515/// (() => {
45516/// const docUrl = document.getElementById('de_docUrl');
45517/// const docId = document.getElementById('de_docId');
45518/// docUrl.addEventListener('input', () => {
45519/// docId.value = (docUrl.value.match(/_d([\w-]+)/) || [])[1] || '';
45520/// });
45521/// docId.addEventListener('mousedown', () => docId.select());
45522/// docId.addEventListener('click', () => docId.select());
45523/// })();
45524///</script>
45525///
45526///## Rate Limiting
45527///
45528///The Coda API sets a reasonable limit on the number of requests that can be
45529/// made per minute. Once this limit is reached, calls to the API will start
45530/// returning errors with an HTTP status code of 429.
45531///
45532///These are the current rate limits. They are subject to change at any time
45533/// without notice. For robustness, all API scripts should check for HTTP 429
45534/// Too Many Requests errors and back off and retry the request. Limits apply
45535/// per-user across all endpoints that share the same limit and across all docs.
45536///
45537///Reading data (with the exceptions below): {{READ_RATE_LIMIT}}
45538///<br/>
45539///Writing data (POST/PUT/PATCH): {{WRITE_RATE_LIMIT}}
45540///<br/>
45541///Writing doc content data (POST/PUT/PATCH): {{WRITE_DOC_CONTENT_RATE_LIMIT}}
45542///<br/>
45543///Listing docs: {{LIST_DOCS_RATE_LIMIT}}
45544///<br/>
45545///Reading analytics: {{ANALYTICS_RATE_LIMIT}}
45546///
45547///## Consistency
45548///
45549///While edits made in Coda are shared with other collaborators in real-time,
45550/// it can take a few seconds for them to become available via the API. You may
45551/// also notice that changes made via the API, such as updating a row, are not
45552/// immediate. These endpoints all return an HTTP 202 status code, instead of a
45553/// standard 200, indicating that the edit has been accepted and queued for
45554/// processing. This generally takes a few seconds, and the edit may fail if
45555/// invalid. Each such edit will return a `requestId` in the response, and you
45556/// can pass this `requestId` to the [`#getMutationStatus`](#operation/
45557/// getMutationStatus) endpoint to find out if it has been applied.
45558///
45559///Similarly, when you get doc data from the API (rows, pages, columns, etc),
45560/// the data you receive comes from the most recent "snapshot" of the doc, which
45561/// might be slightly stale relative to the data you observe in your browser. If
45562/// you want to ensure that the data you receive is up to date and are ok
45563/// getting an error if not, you can pass this header in your request:
45564/// `X-Coda-Doc-Version: latest`. If the API's view of the doc is
45565/// not up to date, the API will return an HTTP 400 response.
45566///
45567///## Volatile Formulas
45568///
45569///Coda exposes a number of "volatile" formulas, as as `Today()`, `Now()`, and
45570/// `User()`. When used in a live Coda doc, these formulas affect what's visible
45571/// in realtime, tailored to the current user.
45572///
45573///Such formulas behave differently with the API. Time-based values may only be
45574/// current to the last edit made to the doc. User-based values may be blank or
45575/// invalid.
45576///
45577///## Free and Paid Workspaces
45578///
45579///We make the Coda API available to all of our users free of charge, in both
45580/// free and paid workspaces. However, API usage is subject to the role of the
45581/// user associated with the API token in the workspace applicable to each API
45582/// request. What this means is:
45583///
45584/// - For the [`#createDoc`](#operation/createDoc) endpoint specifically, the
45585/// owner of the API token must be a Doc
45586/// Maker (or Admin) in the workspace. If the "Any member can create docs"
45587/// option in enabled in the workspace settings, they can be an Editor and will
45588/// get auto-promoted to Doc Maker upon using this endpoint. Lastly, if in
45589/// addition, the API key owner matches the "Auto-join email domains" setting,
45590/// they will be auto-added to the workspace and promoted to Doc Maker upon
45591/// using this endpoint
45592///
45593///This behavior applies to the API as well as any integrations that may use
45594/// it, such as Zapier.
45595///
45596///## Examples
45597///
45598///To help you get started, this documentation provides code examples in
45599/// Python, Unix shell, and Google Apps Script. These examples are based on a
45600/// simple doc that looks something like this:
45601///
45602/// 
45603///
45604///### Python examples
45605///
45606///These examples use Python 3.6+. If you don't already have the `requests`
45607/// module, use `pip` or `easy_install` to get it.
45608///
45609///### Shell examples
45610///
45611///The shell examples are intended to be run in a Unix shell. If you're on
45612/// Windows, you will need to install [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
45613///
45614///These examples use the standard cURL utility to pull from the API, and then
45615/// process it with `jq` to extract and format example output. If you don't already have it, you can either [install it](https://stedolan.github.io/jq/)
45616///or run the command without it to see the raw JSON output.
45617///
45618///### Google Apps Script examples
45619///
45620/// 
45621///
45622///[Google Apps Script](https://script.google.com/) makes it easy to write code in a JavaScript-like syntax and
45623///easily access many Google products with built-in libraries. You can set up
45624/// your scripts to run periodically, which makes it a good environment for
45625/// writing tools without maintaining your own server.
45626///
45627///Coda provides a library for Google Apps Script. To use it, go into
45628/// `Resources -> Libraries...` and enter the following library ID:
45629/// `15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl`. If you want to
45630/// see the library's source code, it's available
45631///[here](https://script.google.com/d/15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl/edit).
45632///
45633///Google provides autocomplete for API functions as well as generated docs.
45634/// You can access these docs via the Libraries dialog by clicking on the
45635/// library name. Required parameters that would be included in the URL path are
45636/// positional arguments in each of these functions, followed by the request
45637/// body, if applicable. All remaining parameters can be specified in the
45638/// options object.
45639///
45640///## OpenAPI/Swagger Spec
45641///
45642///In an effort to standardize our API and make it accessible, we offer an
45643/// OpenAPI 3.0 specification:
45644///
45645/// - [OpenAPI 3.0 spec - YAML](https://coda.io/apis/v1/openapi.yaml)
45646/// - [OpenAPI 3.0 spec - JSON](https://coda.io/apis/v1/openapi.json)
45647///
45648///#### Postman collection
45649///
45650///To get started with prototyping the API quickly in Postman, you can use one
45651/// of links above to import the Coda API into a collection. You'll then need to
45652/// set the [appropriate header](#section/Authentication) and environment
45653/// variables.
45654///
45655///## Client libraries
45656///
45657///We do not currently support client libraries apart from Google Apps Script.
45658/// To work with the Coda API, you can either use standard network libraries for
45659/// your language, or use the appropriate Swagger Generator tool to
45660/// auto-generate Coda API client libraries for your language of choice. We do
45661/// not provide any guarantees that these autogenerated libraries are compatible
45662/// with our API (e.g., some libraries may not work with Bearer authentication).
45663///
45664///### OpenAPI 3.0
45665///
45666///[Swagger Generator 3](https://generator3.swagger.io/) (that link takes you to the docs for the generator API) can
45667///generate client libraries for [these languages](https://generator3.swagger.io/v2/clients). It's relatively new
45668///and thus only has support for a limited set of languages at this time.
45669///
45670///### Third-party client libraries
45671///
45672///Some members of our amazing community have written libraries to work with
45673/// our API. These aren't officially supported by Coda, but are listed here for
45674/// convenience. (Please let us know if you've written a library and would
45675/// like to have it included here.)
45676///
45677/// - [PHP](https://github.com/danielstieber/CodaPHP) by Daniel Stieber
45678/// - [Node-RED](https://github.com/serene-water/node-red-contrib-coda-io) by
45679/// Mori Sugimoto
45680/// - [NodeJS](https://www.npmjs.com/package/coda-js) by Parker McMullin
45681/// - [Ruby](https://rubygems.org/gems/coda_docs/) by Carlos Muñoz at Getro
45682/// - [Python](https://github.com/Blasterai/codaio) by Mikhail Beliansky
45683/// - [Go](https://github.com/artsafin/coda-schema-generator) by Artur Safin
45684///
45685///
45686///<https://coda.io/trust/tos>
45687///
45688///Version: 1.5.0
45689pub struct RawClient {
45690 pub(crate) baseurl: String,
45691 pub(crate) client: reqwest::Client,
45692}
45693
45694impl RawClient {
45695 /// Create a new client.
45696 ///
45697 /// `baseurl` is the base URL provided to the internal
45698 /// `reqwest::Client`, and should include a scheme and hostname,
45699 /// as well as port and a path stem if applicable.
45700 pub fn new(baseurl: &str) -> Self {
45701 #[cfg(not(target_arch = "wasm32"))]
45702 let client = {
45703 let dur = std::time::Duration::from_secs(15);
45704 reqwest::ClientBuilder::new()
45705 .connect_timeout(dur)
45706 .timeout(dur)
45707 };
45708 #[cfg(target_arch = "wasm32")]
45709 let client = reqwest::ClientBuilder::new();
45710 Self::new_with_client(baseurl, client.build().unwrap())
45711 }
45712
45713 /// Construct a new client with an existing `reqwest::Client`,
45714 /// allowing more control over its configuration.
45715 ///
45716 /// `baseurl` is the base URL provided to the internal
45717 /// `reqwest::Client`, and should include a scheme and hostname,
45718 /// as well as port and a path stem if applicable.
45719 pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
45720 Self {
45721 baseurl: baseurl.to_string(),
45722 client,
45723 }
45724 }
45725}
45726
45727impl ClientInfo<()> for RawClient {
45728 fn api_version() -> &'static str {
45729 "1.5.0"
45730 }
45731
45732 fn baseurl(&self) -> &str {
45733 self.baseurl.as_str()
45734 }
45735
45736 fn client(&self) -> &reqwest::Client {
45737 &self.client
45738 }
45739
45740 fn inner(&self) -> &() {
45741 &()
45742 }
45743}
45744
45745impl ClientHooks<()> for &RawClient {}
45746#[allow(clippy::all)]
45747impl RawClient {
45748 ///Get doc categories
45749 ///
45750 ///Gets all available doc categories.
45751 ///
45752 ///Sends a `GET` request to `/categories`
45753 pub async fn list_categories<'a>(&'a self) -> Result<ResponseValue<types::DocCategoryList>, Error<types::ListCategoriesResponse>> {
45754 let url = format!("{}/categories", self.baseurl,);
45755 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45756 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45757 #[allow(unused_mut)]
45758 let mut request = self
45759 .client
45760 .get(url)
45761 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45762 .headers(header_map)
45763 .build()?;
45764 let info = OperationInfo {
45765 operation_id: "list_categories",
45766 };
45767 self.pre(&mut request, &info).await?;
45768 let result = self.exec(request, &info).await;
45769 self.post(&result, &info).await?;
45770 let response = result?;
45771 match response.status().as_u16() {
45772 200u16 => ResponseValue::from_response(response).await,
45773 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45774 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45775 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45776 _ => Err(Error::UnexpectedResponse(response)),
45777 }
45778 }
45779
45780 ///List available docs
45781 ///
45782 ///Returns a list of Coda docs accessible by the user, and which they have
45783 /// opened at least once. These are returned in the same order as on the
45784 /// docs page: reverse chronological by the latest event relevant to the
45785 /// user (last viewed, edited, or shared).
45786 ///
45787 ///
45788 ///Sends a `GET` request to `/docs`
45789 ///
45790 ///Arguments:
45791 /// - `folder_id`: Show only docs belonging to the given folder.
45792 /// - `in_gallery`: Show only docs visible within the gallery.
45793 /// - `is_owner`: Show only docs owned by the user.
45794 /// - `is_published`: Show only published docs.
45795 /// - `is_starred`: If true, returns docs that are starred. If false,
45796 /// returns docs that are not starred.
45797 /// - `limit`: Maximum number of results to return in this query.
45798 /// - `page_token`: An opaque token used to fetch the next page of results.
45799 /// - `query`: Search term used to filter down results.
45800 /// - `source_doc`: Show only docs copied from the specified doc ID.
45801 /// - `workspace_id`: Show only docs belonging to the given workspace.
45802 pub async fn list_docs<'a>(&'a self, folder_id: Option<&'a str>, in_gallery: Option<bool>, is_owner: Option<bool>, is_published: Option<bool>, is_starred: Option<bool>, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, query: Option<&'a str>, source_doc: Option<&'a str>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::DocList>, Error<types::ListDocsResponse>> {
45803 let url = format!("{}/docs", self.baseurl,);
45804 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45805 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45806 #[allow(unused_mut)]
45807 let mut request = self
45808 .client
45809 .get(url)
45810 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45811 .query(&progenitor_client::QueryParam::new("folderId", &folder_id))
45812 .query(&progenitor_client::QueryParam::new("inGallery", &in_gallery))
45813 .query(&progenitor_client::QueryParam::new("isOwner", &is_owner))
45814 .query(&progenitor_client::QueryParam::new("isPublished", &is_published))
45815 .query(&progenitor_client::QueryParam::new("isStarred", &is_starred))
45816 .query(&progenitor_client::QueryParam::new("limit", &limit))
45817 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
45818 .query(&progenitor_client::QueryParam::new("query", &query))
45819 .query(&progenitor_client::QueryParam::new("sourceDoc", &source_doc))
45820 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
45821 .headers(header_map)
45822 .build()?;
45823 let info = OperationInfo {
45824 operation_id: "list_docs",
45825 };
45826 self.pre(&mut request, &info).await?;
45827 let result = self.exec(request, &info).await;
45828 self.post(&result, &info).await?;
45829 let response = result?;
45830 match response.status().as_u16() {
45831 200u16 => ResponseValue::from_response(response).await,
45832 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45833 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45834 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45835 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45836 _ => Err(Error::UnexpectedResponse(response)),
45837 }
45838 }
45839
45840 ///Create doc
45841 ///
45842 ///Creates a new Coda doc, optionally copying an existing doc. Note that
45843 /// creating a doc requires you to be a Doc Maker in the applicable
45844 /// workspace (or be auto-promoted to one).
45845 ///
45846 ///
45847 ///Sends a `POST` request to `/docs`
45848 ///
45849 ///Arguments:
45850 /// - `body`: Parameters for creating the doc.
45851 pub async fn create_doc<'a>(&'a self, body: &'a types::DocCreate) -> Result<ResponseValue<types::DocumentCreationResult>, Error<types::CreateDocResponse>> {
45852 let url = format!("{}/docs", self.baseurl,);
45853 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45854 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45855 #[allow(unused_mut)]
45856 let mut request = self
45857 .client
45858 .post(url)
45859 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45860 .json(&body)
45861 .headers(header_map)
45862 .build()?;
45863 let info = OperationInfo {
45864 operation_id: "create_doc",
45865 };
45866 self.pre(&mut request, &info).await?;
45867 let result = self.exec(request, &info).await;
45868 self.post(&result, &info).await?;
45869 let response = result?;
45870 match response.status().as_u16() {
45871 201u16 => ResponseValue::from_response(response).await,
45872 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45873 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45874 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45875 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45876 _ => Err(Error::UnexpectedResponse(response)),
45877 }
45878 }
45879
45880 ///Get info about a doc
45881 ///
45882 ///Returns metadata for the specified doc.
45883 ///
45884 ///Sends a `GET` request to `/docs/{docId}`
45885 ///
45886 ///Arguments:
45887 /// - `doc_id`: ID of the doc.
45888 pub async fn get_doc<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::Doc>, Error<types::GetDocResponse>> {
45889 let url = format!("{}/docs/{}", self.baseurl, encode_path(&doc_id.to_string()),);
45890 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45891 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45892 #[allow(unused_mut)]
45893 let mut request = self
45894 .client
45895 .get(url)
45896 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45897 .headers(header_map)
45898 .build()?;
45899 let info = OperationInfo {
45900 operation_id: "get_doc",
45901 };
45902 self.pre(&mut request, &info).await?;
45903 let result = self.exec(request, &info).await;
45904 self.post(&result, &info).await?;
45905 let response = result?;
45906 match response.status().as_u16() {
45907 200u16 => ResponseValue::from_response(response).await,
45908 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45909 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45910 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45911 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45912 _ => Err(Error::UnexpectedResponse(response)),
45913 }
45914 }
45915
45916 ///Delete doc
45917 ///
45918 ///Deletes a doc.
45919 ///
45920 ///Sends a `DELETE` request to `/docs/{docId}`
45921 ///
45922 ///Arguments:
45923 /// - `doc_id`: ID of the doc.
45924 pub async fn delete_doc<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::DocDelete>, Error<types::DeleteDocResponse>> {
45925 let url = format!("{}/docs/{}", self.baseurl, encode_path(&doc_id.to_string()),);
45926 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45927 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45928 #[allow(unused_mut)]
45929 let mut request = self
45930 .client
45931 .delete(url)
45932 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45933 .headers(header_map)
45934 .build()?;
45935 let info = OperationInfo {
45936 operation_id: "delete_doc",
45937 };
45938 self.pre(&mut request, &info).await?;
45939 let result = self.exec(request, &info).await;
45940 self.post(&result, &info).await?;
45941 let response = result?;
45942 match response.status().as_u16() {
45943 202u16 => ResponseValue::from_response(response).await,
45944 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45945 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45946 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45947 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45948 _ => Err(Error::UnexpectedResponse(response)),
45949 }
45950 }
45951
45952 ///Update doc
45953 ///
45954 ///Updates metadata for a doc. Note that updating a doc title requires you
45955 /// to be a Doc Maker in the applicable workspace.
45956 ///
45957 ///Sends a `PATCH` request to `/docs/{docId}`
45958 ///
45959 ///Arguments:
45960 /// - `doc_id`: ID of the doc.
45961 /// - `body`: Parameters for updating the doc.
45962 pub async fn update_doc<'a>(&'a self, doc_id: &'a str, body: &'a types::DocUpdate) -> Result<ResponseValue<types::DocUpdateResult>, Error<types::UpdateDocResponse>> {
45963 let url = format!("{}/docs/{}", self.baseurl, encode_path(&doc_id.to_string()),);
45964 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
45965 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
45966 #[allow(unused_mut)]
45967 let mut request = self
45968 .client
45969 .patch(url)
45970 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
45971 .json(&body)
45972 .headers(header_map)
45973 .build()?;
45974 let info = OperationInfo {
45975 operation_id: "update_doc",
45976 };
45977 self.pre(&mut request, &info).await?;
45978 let result = self.exec(request, &info).await;
45979 self.post(&result, &info).await?;
45980 let response = result?;
45981 match response.status().as_u16() {
45982 200u16 => ResponseValue::from_response(response).await,
45983 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45984 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45985 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45986 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45987 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
45988 _ => Err(Error::UnexpectedResponse(response)),
45989 }
45990 }
45991
45992 ///Get sharing metadata
45993 ///
45994 ///Returns metadata associated with sharing for this Coda doc.
45995 ///
45996 ///Sends a `GET` request to `/docs/{docId}/acl/metadata`
45997 ///
45998 ///Arguments:
45999 /// - `doc_id`: ID of the doc.
46000 pub async fn get_sharing_metadata<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::AclMetadata>, Error<types::GetSharingMetadataResponse>> {
46001 let url = format!("{}/docs/{}/acl/metadata", self.baseurl, encode_path(&doc_id.to_string()),);
46002 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46003 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46004 #[allow(unused_mut)]
46005 let mut request = self
46006 .client
46007 .get(url)
46008 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46009 .headers(header_map)
46010 .build()?;
46011 let info = OperationInfo {
46012 operation_id: "get_sharing_metadata",
46013 };
46014 self.pre(&mut request, &info).await?;
46015 let result = self.exec(request, &info).await;
46016 self.post(&result, &info).await?;
46017 let response = result?;
46018 match response.status().as_u16() {
46019 200u16 => ResponseValue::from_response(response).await,
46020 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46021 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46022 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46023 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46024 _ => Err(Error::UnexpectedResponse(response)),
46025 }
46026 }
46027
46028 ///List permissions
46029 ///
46030 ///Returns a list of permissions for this Coda doc.
46031 ///
46032 ///Sends a `GET` request to `/docs/{docId}/acl/permissions`
46033 ///
46034 ///Arguments:
46035 /// - `doc_id`: ID of the doc.
46036 /// - `limit`: Maximum number of results to return in this query.
46037 /// - `page_token`: An opaque token used to fetch the next page of results.
46038 pub async fn get_permissions<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::Acl>, Error<types::GetPermissionsResponse>> {
46039 let url = format!("{}/docs/{}/acl/permissions", self.baseurl, encode_path(&doc_id.to_string()),);
46040 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46041 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46042 #[allow(unused_mut)]
46043 let mut request = self
46044 .client
46045 .get(url)
46046 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46047 .query(&progenitor_client::QueryParam::new("limit", &limit))
46048 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46049 .headers(header_map)
46050 .build()?;
46051 let info = OperationInfo {
46052 operation_id: "get_permissions",
46053 };
46054 self.pre(&mut request, &info).await?;
46055 let result = self.exec(request, &info).await;
46056 self.post(&result, &info).await?;
46057 let response = result?;
46058 match response.status().as_u16() {
46059 200u16 => ResponseValue::from_response(response).await,
46060 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46061 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46062 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46063 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46064 _ => Err(Error::UnexpectedResponse(response)),
46065 }
46066 }
46067
46068 ///Add permission
46069 ///
46070 ///Adds a new permission to the doc.
46071 ///
46072 ///
46073 ///Sends a `POST` request to `/docs/{docId}/acl/permissions`
46074 ///
46075 ///Arguments:
46076 /// - `doc_id`: ID of the doc.
46077 /// - `body`: Parameters for adding the new permission.
46078 pub async fn add_permission<'a>(&'a self, doc_id: &'a str, body: &'a types::AddPermissionRequest) -> Result<ResponseValue<types::AddPermissionResult>, Error<types::AddPermissionResponse>> {
46079 let url = format!("{}/docs/{}/acl/permissions", self.baseurl, encode_path(&doc_id.to_string()),);
46080 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46081 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46082 #[allow(unused_mut)]
46083 let mut request = self
46084 .client
46085 .post(url)
46086 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46087 .json(&body)
46088 .headers(header_map)
46089 .build()?;
46090 let info = OperationInfo {
46091 operation_id: "add_permission",
46092 };
46093 self.pre(&mut request, &info).await?;
46094 let result = self.exec(request, &info).await;
46095 self.post(&result, &info).await?;
46096 let response = result?;
46097 match response.status().as_u16() {
46098 200u16 => ResponseValue::from_response(response).await,
46099 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46100 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46101 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46102 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46103 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46104 _ => Err(Error::UnexpectedResponse(response)),
46105 }
46106 }
46107
46108 ///Delete permission
46109 ///
46110 ///Deletes an existing permission.
46111 ///
46112 ///
46113 ///Sends a `DELETE` request to
46114 /// `/docs/{docId}/acl/permissions/{permissionId}`
46115 ///
46116 ///Arguments:
46117 /// - `doc_id`: ID of the doc.
46118 /// - `permission_id`: ID of a permission on a doc.
46119 pub async fn delete_permission<'a>(&'a self, doc_id: &'a str, permission_id: &'a str) -> Result<ResponseValue<types::DeletePermissionResult>, Error<types::DeletePermissionResponse>> {
46120 let url = format!("{}/docs/{}/acl/permissions/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&permission_id.to_string()),);
46121 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46122 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46123 #[allow(unused_mut)]
46124 let mut request = self
46125 .client
46126 .delete(url)
46127 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46128 .headers(header_map)
46129 .build()?;
46130 let info = OperationInfo {
46131 operation_id: "delete_permission",
46132 };
46133 self.pre(&mut request, &info).await?;
46134 let result = self.exec(request, &info).await;
46135 self.post(&result, &info).await?;
46136 let response = result?;
46137 match response.status().as_u16() {
46138 200u16 => ResponseValue::from_response(response).await,
46139 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46140 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46141 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46142 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46143 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46144 _ => Err(Error::UnexpectedResponse(response)),
46145 }
46146 }
46147
46148 ///Search principals
46149 ///
46150 ///Searches for user and group principals matching the query that this doc
46151 /// can be shared with. At most 20 results will be returned for both
46152 /// users and groups. If no query is given then no results are returned.
46153 ///
46154 ///
46155 ///Sends a `GET` request to `/docs/{docId}/acl/principals/search`
46156 ///
46157 ///Arguments:
46158 /// - `doc_id`: ID of the doc.
46159 /// - `query`: Search term used to filter down results.
46160 pub async fn search_principals<'a>(&'a self, doc_id: &'a str, query: Option<&'a str>) -> Result<ResponseValue<types::SearchPrincipalsResponse>, Error<types::SearchPrincipalsResponse>> {
46161 let url = format!("{}/docs/{}/acl/principals/search", self.baseurl, encode_path(&doc_id.to_string()),);
46162 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46163 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46164 #[allow(unused_mut)]
46165 let mut request = self
46166 .client
46167 .get(url)
46168 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46169 .query(&progenitor_client::QueryParam::new("query", &query))
46170 .headers(header_map)
46171 .build()?;
46172 let info = OperationInfo {
46173 operation_id: "search_principals",
46174 };
46175 self.pre(&mut request, &info).await?;
46176 let result = self.exec(request, &info).await;
46177 self.post(&result, &info).await?;
46178 let response = result?;
46179 match response.status().as_u16() {
46180 200u16 => ResponseValue::from_response(response).await,
46181 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46182 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46183 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46184 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46185 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46186 _ => Err(Error::UnexpectedResponse(response)),
46187 }
46188 }
46189
46190 ///Get ACL settings
46191 ///
46192 ///Returns settings associated with ACLs for this Coda doc.
46193 ///
46194 ///Sends a `GET` request to `/docs/{docId}/acl/settings`
46195 ///
46196 ///Arguments:
46197 /// - `doc_id`: ID of the doc.
46198 pub async fn get_acl_settings<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::AclSettings>, Error<types::GetAclSettingsResponse>> {
46199 let url = format!("{}/docs/{}/acl/settings", self.baseurl, encode_path(&doc_id.to_string()),);
46200 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46201 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46202 #[allow(unused_mut)]
46203 let mut request = self
46204 .client
46205 .get(url)
46206 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46207 .headers(header_map)
46208 .build()?;
46209 let info = OperationInfo {
46210 operation_id: "get_acl_settings",
46211 };
46212 self.pre(&mut request, &info).await?;
46213 let result = self.exec(request, &info).await;
46214 self.post(&result, &info).await?;
46215 let response = result?;
46216 match response.status().as_u16() {
46217 200u16 => ResponseValue::from_response(response).await,
46218 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46219 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46220 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46221 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46222 _ => Err(Error::UnexpectedResponse(response)),
46223 }
46224 }
46225
46226 ///Update ACL settings
46227 ///
46228 ///Update settings associated with ACLs for this Coda doc.
46229 ///
46230 ///Sends a `PATCH` request to `/docs/{docId}/acl/settings`
46231 ///
46232 ///Arguments:
46233 /// - `doc_id`: ID of the doc.
46234 /// - `body`: Parameters for updating the ACL settings.
46235 pub async fn update_acl_settings<'a>(&'a self, doc_id: &'a str, body: &'a types::UpdateAclSettingsRequest) -> Result<ResponseValue<types::AclSettings>, Error<types::UpdateAclSettingsResponse>> {
46236 let url = format!("{}/docs/{}/acl/settings", self.baseurl, encode_path(&doc_id.to_string()),);
46237 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46238 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46239 #[allow(unused_mut)]
46240 let mut request = self
46241 .client
46242 .patch(url)
46243 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46244 .json(&body)
46245 .headers(header_map)
46246 .build()?;
46247 let info = OperationInfo {
46248 operation_id: "update_acl_settings",
46249 };
46250 self.pre(&mut request, &info).await?;
46251 let result = self.exec(request, &info).await;
46252 self.post(&result, &info).await?;
46253 let response = result?;
46254 match response.status().as_u16() {
46255 200u16 => ResponseValue::from_response(response).await,
46256 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46257 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46258 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46259 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46260 _ => Err(Error::UnexpectedResponse(response)),
46261 }
46262 }
46263
46264 ///Publish doc
46265 ///
46266 ///Update publish settings for a doc.
46267 ///
46268 ///Sends a `PUT` request to `/docs/{docId}/publish`
46269 ///
46270 ///Arguments:
46271 /// - `doc_id`: ID of the doc.
46272 /// - `body`: Parameters for changing publish settings.
46273 pub async fn publish_doc<'a>(&'a self, doc_id: &'a str, body: &'a types::DocPublish) -> Result<ResponseValue<types::PublishResult>, Error<types::PublishDocResponse>> {
46274 let url = format!("{}/docs/{}/publish", self.baseurl, encode_path(&doc_id.to_string()),);
46275 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46276 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46277 #[allow(unused_mut)]
46278 let mut request = self
46279 .client
46280 .put(url)
46281 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46282 .json(&body)
46283 .headers(header_map)
46284 .build()?;
46285 let info = OperationInfo {
46286 operation_id: "publish_doc",
46287 };
46288 self.pre(&mut request, &info).await?;
46289 let result = self.exec(request, &info).await;
46290 self.post(&result, &info).await?;
46291 let response = result?;
46292 match response.status().as_u16() {
46293 202u16 => ResponseValue::from_response(response).await,
46294 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46295 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46296 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46297 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46298 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46299 _ => Err(Error::UnexpectedResponse(response)),
46300 }
46301 }
46302
46303 ///Unpublish doc
46304 ///
46305 ///Unpublishes a doc.
46306 ///
46307 ///Sends a `DELETE` request to `/docs/{docId}/publish`
46308 ///
46309 ///Arguments:
46310 /// - `doc_id`: ID of the doc.
46311 pub async fn unpublish_doc<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::UnpublishResult>, Error<types::UnpublishDocResponse>> {
46312 let url = format!("{}/docs/{}/publish", self.baseurl, encode_path(&doc_id.to_string()),);
46313 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46314 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46315 #[allow(unused_mut)]
46316 let mut request = self
46317 .client
46318 .delete(url)
46319 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46320 .headers(header_map)
46321 .build()?;
46322 let info = OperationInfo {
46323 operation_id: "unpublish_doc",
46324 };
46325 self.pre(&mut request, &info).await?;
46326 let result = self.exec(request, &info).await;
46327 self.post(&result, &info).await?;
46328 let response = result?;
46329 match response.status().as_u16() {
46330 200u16 => ResponseValue::from_response(response).await,
46331 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46332 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46333 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46334 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46335 _ => Err(Error::UnexpectedResponse(response)),
46336 }
46337 }
46338
46339 ///List pages
46340 ///
46341 ///Returns a list of pages in a Coda doc.
46342 ///
46343 ///Sends a `GET` request to `/docs/{docId}/pages`
46344 ///
46345 ///Arguments:
46346 /// - `doc_id`: ID of the doc.
46347 /// - `limit`: Maximum number of results to return in this query.
46348 /// - `page_token`: An opaque token used to fetch the next page of results.
46349 pub async fn list_pages<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PageList>, Error<types::ListPagesResponse>> {
46350 let url = format!("{}/docs/{}/pages", self.baseurl, encode_path(&doc_id.to_string()),);
46351 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46352 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46353 #[allow(unused_mut)]
46354 let mut request = self
46355 .client
46356 .get(url)
46357 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46358 .query(&progenitor_client::QueryParam::new("limit", &limit))
46359 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46360 .headers(header_map)
46361 .build()?;
46362 let info = OperationInfo {
46363 operation_id: "list_pages",
46364 };
46365 self.pre(&mut request, &info).await?;
46366 let result = self.exec(request, &info).await;
46367 self.post(&result, &info).await?;
46368 let response = result?;
46369 match response.status().as_u16() {
46370 200u16 => ResponseValue::from_response(response).await,
46371 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46372 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46373 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46374 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46375 _ => Err(Error::UnexpectedResponse(response)),
46376 }
46377 }
46378
46379 ///Create a page
46380 ///
46381 ///Create a new page in a doc. Note that creating a page requires you to be
46382 /// a Doc Maker in the applicable workspace.
46383 ///
46384 ///
46385 ///Sends a `POST` request to `/docs/{docId}/pages`
46386 ///
46387 ///Arguments:
46388 /// - `doc_id`: ID of the doc.
46389 /// - `body`: Parameters for creating a page.
46390 pub async fn create_page<'a>(&'a self, doc_id: &'a str, body: &'a types::PageCreate) -> Result<ResponseValue<types::PageCreateResult>, Error<types::CreatePageResponse>> {
46391 let url = format!("{}/docs/{}/pages", self.baseurl, encode_path(&doc_id.to_string()),);
46392 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46393 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46394 #[allow(unused_mut)]
46395 let mut request = self
46396 .client
46397 .post(url)
46398 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46399 .json(&body)
46400 .headers(header_map)
46401 .build()?;
46402 let info = OperationInfo {
46403 operation_id: "create_page",
46404 };
46405 self.pre(&mut request, &info).await?;
46406 let result = self.exec(request, &info).await;
46407 self.post(&result, &info).await?;
46408 let response = result?;
46409 match response.status().as_u16() {
46410 202u16 => ResponseValue::from_response(response).await,
46411 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46412 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46413 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46414 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46415 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46416 _ => Err(Error::UnexpectedResponse(response)),
46417 }
46418 }
46419
46420 ///Get a page
46421 ///
46422 ///Returns details about a page.
46423 ///
46424 ///Sends a `GET` request to `/docs/{docId}/pages/{pageIdOrName}`
46425 ///
46426 ///Arguments:
46427 /// - `doc_id`: ID of the doc.
46428 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46429 /// because they're easily prone to being changed by users. If you're
46430 /// using a name, be sure to URI-encode it. If you provide a name and
46431 /// there are multiple pages with the same name, an arbitrary one will be
46432 /// selected.
46433 pub async fn get_page<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str) -> Result<ResponseValue<types::Page>, Error<types::GetPageResponse>> {
46434 let url = format!("{}/docs/{}/pages/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46435 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46436 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46437 #[allow(unused_mut)]
46438 let mut request = self
46439 .client
46440 .get(url)
46441 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46442 .headers(header_map)
46443 .build()?;
46444 let info = OperationInfo {
46445 operation_id: "get_page",
46446 };
46447 self.pre(&mut request, &info).await?;
46448 let result = self.exec(request, &info).await;
46449 self.post(&result, &info).await?;
46450 let response = result?;
46451 match response.status().as_u16() {
46452 200u16 => ResponseValue::from_response(response).await,
46453 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46454 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46455 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46456 410u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46457 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46458 _ => Err(Error::UnexpectedResponse(response)),
46459 }
46460 }
46461
46462 ///Update a page
46463 ///
46464 ///Update properties for a page. Note that updating a page title or icon
46465 /// requires you to be a Doc Maker in the applicable workspace.
46466 ///
46467 ///
46468 ///Sends a `PUT` request to `/docs/{docId}/pages/{pageIdOrName}`
46469 ///
46470 ///Arguments:
46471 /// - `doc_id`: ID of the doc.
46472 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46473 /// because they're easily prone to being changed by users. If you're
46474 /// using a name, be sure to URI-encode it. If you provide a name and
46475 /// there are multiple pages with the same name, an arbitrary one will be
46476 /// selected.
46477 ///
46478 /// - `body`: Parameters for updating a page.
46479 pub async fn update_page<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str, body: &'a types::PageUpdate) -> Result<ResponseValue<types::PageUpdateResult>, Error<types::UpdatePageResponse>> {
46480 let url = format!("{}/docs/{}/pages/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46481 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46482 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46483 #[allow(unused_mut)]
46484 let mut request = self
46485 .client
46486 .put(url)
46487 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46488 .json(&body)
46489 .headers(header_map)
46490 .build()?;
46491 let info = OperationInfo {
46492 operation_id: "update_page",
46493 };
46494 self.pre(&mut request, &info).await?;
46495 let result = self.exec(request, &info).await;
46496 self.post(&result, &info).await?;
46497 let response = result?;
46498 match response.status().as_u16() {
46499 202u16 => ResponseValue::from_response(response).await,
46500 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46501 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46502 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46503 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46504 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46505 _ => Err(Error::UnexpectedResponse(response)),
46506 }
46507 }
46508
46509 ///Delete a page
46510 ///
46511 ///Deletes the specified page.
46512 ///
46513 ///Sends a `DELETE` request to `/docs/{docId}/pages/{pageIdOrName}`
46514 ///
46515 ///Arguments:
46516 /// - `doc_id`: ID of the doc.
46517 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46518 /// because they're easily prone to being changed by users. If you're
46519 /// using a name, be sure to URI-encode it. If you provide a name and
46520 /// there are multiple pages with the same name, an arbitrary one will be
46521 /// selected.
46522 pub async fn delete_page<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str) -> Result<ResponseValue<types::PageDeleteResult>, Error<types::DeletePageResponse>> {
46523 let url = format!("{}/docs/{}/pages/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46524 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46525 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46526 #[allow(unused_mut)]
46527 let mut request = self
46528 .client
46529 .delete(url)
46530 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46531 .headers(header_map)
46532 .build()?;
46533 let info = OperationInfo {
46534 operation_id: "delete_page",
46535 };
46536 self.pre(&mut request, &info).await?;
46537 let result = self.exec(request, &info).await;
46538 self.post(&result, &info).await?;
46539 let response = result?;
46540 match response.status().as_u16() {
46541 202u16 => ResponseValue::from_response(response).await,
46542 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46543 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46544 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46545 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46546 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46547 _ => Err(Error::UnexpectedResponse(response)),
46548 }
46549 }
46550
46551 ///List page content
46552 ///
46553 ///Returns a list of content elements in a page.
46554 ///
46555 ///Sends a `GET` request to `/docs/{docId}/pages/{pageIdOrName}/content`
46556 ///
46557 ///Arguments:
46558 /// - `doc_id`: ID of the doc.
46559 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46560 /// because they're easily prone to being changed by users. If you're
46561 /// using a name, be sure to URI-encode it. If you provide a name and
46562 /// there are multiple pages with the same name, an arbitrary one will be
46563 /// selected.
46564 ///
46565 /// - `content_format`: The format to return content in. Defaults to
46566 /// plainText.
46567 /// - `limit`: Maximum number of content items to return in this query.
46568 /// - `page_token`: An opaque token used to fetch the next page of results.
46569 pub async fn list_page_content<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str, content_format: Option<types::ListPageContentContentFormat>, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PageContentList>, Error<types::ListPageContentResponse>> {
46570 let url = format!("{}/docs/{}/pages/{}/content", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46571 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46572 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46573 #[allow(unused_mut)]
46574 let mut request = self
46575 .client
46576 .get(url)
46577 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46578 .query(&progenitor_client::QueryParam::new("contentFormat", &content_format))
46579 .query(&progenitor_client::QueryParam::new("limit", &limit))
46580 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46581 .headers(header_map)
46582 .build()?;
46583 let info = OperationInfo {
46584 operation_id: "list_page_content",
46585 };
46586 self.pre(&mut request, &info).await?;
46587 let result = self.exec(request, &info).await;
46588 self.post(&result, &info).await?;
46589 let response = result?;
46590 match response.status().as_u16() {
46591 200u16 => ResponseValue::from_response(response).await,
46592 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46593 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46594 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46595 410u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46596 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46597 _ => Err(Error::UnexpectedResponse(response)),
46598 }
46599 }
46600
46601 ///Delete page content
46602 ///
46603 ///Delete content from a page. You can delete specific elements by
46604 /// providing their IDs, or delete all content from the page.
46605 ///
46606 ///
46607 ///Sends a `DELETE` request to `/docs/{docId}/pages/{pageIdOrName}/content`
46608 ///
46609 ///Arguments:
46610 /// - `doc_id`: ID of the doc.
46611 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46612 /// because they're easily prone to being changed by users. If you're
46613 /// using a name, be sure to URI-encode it. If you provide a name and
46614 /// there are multiple pages with the same name, an arbitrary one will be
46615 /// selected.
46616 ///
46617 /// - `body`: Parameters for deleting page content.
46618 pub async fn delete_page_content<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str, body: &'a types::PageContentDelete) -> Result<ResponseValue<types::PageContentDeleteResult>, Error<types::DeletePageContentResponse>> {
46619 let url = format!("{}/docs/{}/pages/{}/content", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46620 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46621 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46622 #[allow(unused_mut)]
46623 let mut request = self
46624 .client
46625 .delete(url)
46626 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46627 .json(&body)
46628 .headers(header_map)
46629 .build()?;
46630 let info = OperationInfo {
46631 operation_id: "delete_page_content",
46632 };
46633 self.pre(&mut request, &info).await?;
46634 let result = self.exec(request, &info).await;
46635 self.post(&result, &info).await?;
46636 let response = result?;
46637 match response.status().as_u16() {
46638 202u16 => ResponseValue::from_response(response).await,
46639 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46640 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46641 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46642 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46643 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46644 _ => Err(Error::UnexpectedResponse(response)),
46645 }
46646 }
46647
46648 ///Begin content export
46649 ///
46650 ///Initiate an export of content for the given page.
46651 ///
46652 ///Sends a `POST` request to `/docs/{docId}/pages/{pageIdOrName}/export`
46653 ///
46654 ///Arguments:
46655 /// - `doc_id`: ID of the doc.
46656 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46657 /// because they're easily prone to being changed by users. If you're
46658 /// using a name, be sure to URI-encode it. If you provide a name and
46659 /// there are multiple pages with the same name, an arbitrary one will be
46660 /// selected.
46661 ///
46662 /// - `body`: Parameters for requesting a page content export.
46663 pub async fn begin_page_content_export<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str, body: &'a types::BeginPageContentExportRequest) -> Result<ResponseValue<types::BeginPageContentExportResponse>, Error<types::BeginPageContentExportResponse>> {
46664 let url = format!("{}/docs/{}/pages/{}/export", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()),);
46665 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46666 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46667 #[allow(unused_mut)]
46668 let mut request = self
46669 .client
46670 .post(url)
46671 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46672 .json(&body)
46673 .headers(header_map)
46674 .build()?;
46675 let info = OperationInfo {
46676 operation_id: "begin_page_content_export",
46677 };
46678 self.pre(&mut request, &info).await?;
46679 let result = self.exec(request, &info).await;
46680 self.post(&result, &info).await?;
46681 let response = result?;
46682 match response.status().as_u16() {
46683 202u16 => ResponseValue::from_response(response).await,
46684 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46685 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46686 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46687 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46688 410u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46689 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46690 _ => Err(Error::UnexpectedResponse(response)),
46691 }
46692 }
46693
46694 ///Content export status
46695 ///
46696 ///Check the status of a page content export
46697 ///
46698 ///Sends a `GET` request to
46699 /// `/docs/{docId}/pages/{pageIdOrName}/export/{requestId}`
46700 ///
46701 ///Arguments:
46702 /// - `doc_id`: ID of the doc.
46703 /// - `page_id_or_name`: ID or name of the page. Names are discouraged
46704 /// because they're easily prone to being changed by users. If you're
46705 /// using a name, be sure to URI-encode it. If you provide a name and
46706 /// there are multiple pages with the same name, an arbitrary one will be
46707 /// selected.
46708 ///
46709 /// - `request_id`: ID of the request.
46710 pub async fn get_page_content_export_status<'a>(&'a self, doc_id: &'a str, page_id_or_name: &'a str, request_id: &'a str) -> Result<ResponseValue<types::PageContentExportStatusResponse>, Error<types::GetPageContentExportStatusResponse>> {
46711 let url = format!("{}/docs/{}/pages/{}/export/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&page_id_or_name.to_string()), encode_path(&request_id.to_string()),);
46712 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46713 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46714 #[allow(unused_mut)]
46715 let mut request = self
46716 .client
46717 .get(url)
46718 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46719 .headers(header_map)
46720 .build()?;
46721 let info = OperationInfo {
46722 operation_id: "get_page_content_export_status",
46723 };
46724 self.pre(&mut request, &info).await?;
46725 let result = self.exec(request, &info).await;
46726 self.post(&result, &info).await?;
46727 let response = result?;
46728 match response.status().as_u16() {
46729 200u16 => ResponseValue::from_response(response).await,
46730 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46731 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46732 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46733 410u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46734 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46735 _ => Err(Error::UnexpectedResponse(response)),
46736 }
46737 }
46738
46739 ///List tables
46740 ///
46741 ///Returns a list of tables in a Coda doc.
46742 ///
46743 ///Sends a `GET` request to `/docs/{docId}/tables`
46744 ///
46745 ///Arguments:
46746 /// - `doc_id`: ID of the doc.
46747 /// - `limit`: Maximum number of results to return in this query.
46748 /// - `page_token`: An opaque token used to fetch the next page of results.
46749 /// - `sort_by`: Determines how to sort the given objects.
46750 /// - `table_types`: Comma-separated list of table types to include in
46751 /// results. If omitted, includes both tables and views.
46752 pub async fn list_tables<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<types::SortBy>, table_types: Option<&'a ::std::vec::Vec<types::TableTypeEnum>>) -> Result<ResponseValue<types::TableList>, Error<types::ListTablesResponse>> {
46753 let url = format!("{}/docs/{}/tables", self.baseurl, encode_path(&doc_id.to_string()),);
46754 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46755 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46756 #[allow(unused_mut)]
46757 let mut request = self
46758 .client
46759 .get(url)
46760 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46761 .query(&progenitor_client::QueryParam::new("limit", &limit))
46762 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46763 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
46764 .query(&progenitor_client::QueryParam::new("tableTypes", &table_types))
46765 .headers(header_map)
46766 .build()?;
46767 let info = OperationInfo {
46768 operation_id: "list_tables",
46769 };
46770 self.pre(&mut request, &info).await?;
46771 let result = self.exec(request, &info).await;
46772 self.post(&result, &info).await?;
46773 let response = result?;
46774 match response.status().as_u16() {
46775 200u16 => ResponseValue::from_response(response).await,
46776 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46777 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46778 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46779 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46780 _ => Err(Error::UnexpectedResponse(response)),
46781 }
46782 }
46783
46784 ///Get a table
46785 ///
46786 ///Returns details about a specific table or view.
46787 ///
46788 ///Sends a `GET` request to `/docs/{docId}/tables/{tableIdOrName}`
46789 ///
46790 ///Arguments:
46791 /// - `doc_id`: ID of the doc.
46792 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
46793 /// because they're easily prone to being changed by users. If you're
46794 /// using a name, be sure to URI-encode it.
46795 /// - `use_updated_table_layouts`: Return "detail" and "form" for the
46796 /// `layout` field of detail and form layouts respectively (instead of
46797 /// "masterDetail" for both)
46798 pub async fn get_table<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, use_updated_table_layouts: Option<bool>) -> Result<ResponseValue<types::Table>, Error<types::GetTableResponse>> {
46799 let url = format!("{}/docs/{}/tables/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()),);
46800 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46801 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46802 #[allow(unused_mut)]
46803 let mut request = self
46804 .client
46805 .get(url)
46806 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46807 .query(&progenitor_client::QueryParam::new("useUpdatedTableLayouts", &use_updated_table_layouts))
46808 .headers(header_map)
46809 .build()?;
46810 let info = OperationInfo {
46811 operation_id: "get_table",
46812 };
46813 self.pre(&mut request, &info).await?;
46814 let result = self.exec(request, &info).await;
46815 self.post(&result, &info).await?;
46816 let response = result?;
46817 match response.status().as_u16() {
46818 200u16 => ResponseValue::from_response(response).await,
46819 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46820 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46821 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46822 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46823 _ => Err(Error::UnexpectedResponse(response)),
46824 }
46825 }
46826
46827 ///List columns
46828 ///
46829 ///Returns a list of columns in a table.
46830 ///
46831 ///Sends a `GET` request to `/docs/{docId}/tables/{tableIdOrName}/columns`
46832 ///
46833 ///Arguments:
46834 /// - `doc_id`: ID of the doc.
46835 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
46836 /// because they're easily prone to being changed by users. If you're
46837 /// using a name, be sure to URI-encode it.
46838 /// - `limit`: Maximum number of results to return in this query.
46839 /// - `page_token`: An opaque token used to fetch the next page of results.
46840 /// - `visible_only`: If true, returns only visible columns for the table.
46841 /// This parameter only applies to base tables, and not views.
46842 pub async fn list_columns<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, visible_only: Option<bool>) -> Result<ResponseValue<types::ColumnList>, Error<types::ListColumnsResponse>> {
46843 let url = format!("{}/docs/{}/tables/{}/columns", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()),);
46844 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46845 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46846 #[allow(unused_mut)]
46847 let mut request = self
46848 .client
46849 .get(url)
46850 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46851 .query(&progenitor_client::QueryParam::new("limit", &limit))
46852 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46853 .query(&progenitor_client::QueryParam::new("visibleOnly", &visible_only))
46854 .headers(header_map)
46855 .build()?;
46856 let info = OperationInfo {
46857 operation_id: "list_columns",
46858 };
46859 self.pre(&mut request, &info).await?;
46860 let result = self.exec(request, &info).await;
46861 self.post(&result, &info).await?;
46862 let response = result?;
46863 match response.status().as_u16() {
46864 200u16 => ResponseValue::from_response(response).await,
46865 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46866 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46867 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46868 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
46869 _ => Err(Error::UnexpectedResponse(response)),
46870 }
46871 }
46872
46873 ///List table rows
46874 ///
46875 ///Returns a list of rows in a table.
46876 ///### Value results
46877 ///The `valueFormat` parameter dictates in what format the API should
46878 /// return values for individual cells.
46879 /// * `simple` (default): Returns cell values as the following JSON values:
46880 /// `string`, `number`, or `boolean`. Array values (like multiselects) are
46881 /// returned as comma-delimited strings.
46882 /// * `simpleWithArrays`: Singleton values are returned as `simple`. Array
46883 /// values are returned as JSON arrays and the values within are `simple`
46884 /// values (including nested arrays).
46885 /// * `rich`: If applicable, returns many values with further encoding,
46886 /// allowing API users to have lossless access to data in Coda.
46887 /// * For `text` values, returns data in Markdown syntax. If the text field
46888 /// is simple text (e.g. has no formatting),
46889 /// the field will be fully escaped with triple-ticks. E.g
46890 /// `
46891 /// ```This is plain text```
46892 /// `
46893 /// * For `currency`, `lookup`, `image`, `person` and `hyperlink` values, the value will be encoded in [JSON-LD](https://json-ld.org/) format.
46894 ///
46895 ///```json
46896 /// // Currency
46897 /// {
46898 /// "@context": "http://schema.org",
46899 /// "@type": "MonetaryAmount",
46900 /// "currency": "USD",
46901 /// "amount": 42.42
46902 /// }
46903 ///
46904 /// // Lookup
46905 /// {
46906 /// "@context": "http://schema.org",
46907 /// "@type": "StructuredValue",
46908 /// "additionalType": "row",
46909 /// "name": "Row Name",
46910 /// "rowId": "i-123456789",
46911 /// "tableId": "grid-123456789",
46912 /// "tableUrl": "https://coda.io/d/_d123456789/grid-123456789",
46913 /// "url": "https://coda.io/d/_d123456789/grid-123456789#_r42",
46914 /// }
46915 ///
46916 /// // Hyperlink
46917 /// {
46918 /// "@context": "http://schema.org",
46919 /// "@type": "WebPage",
46920 /// "name": "Coda",
46921 /// "url": "https://coda.io"
46922 /// }
46923 ///
46924 /// // Image
46925 /// {
46926 /// "@context": "http://schema.org",
46927 /// "@type": "ImageObject",
46928 /// "name": "Coda logo",
46929 /// "url": "https://coda.io/logo.jpg"
46930 /// }
46931 ///
46932 /// // People
46933 /// {
46934 /// "@context": "http://schema.org",
46935 /// "@type": "Person",
46936 /// "name": "Art Vandalay",
46937 /// "email": "art@vandalayindustries.com"
46938 /// }
46939 /// ```
46940 ///
46941 ///
46942 ///Sends a `GET` request to `/docs/{docId}/tables/{tableIdOrName}/rows`
46943 ///
46944 ///Arguments:
46945 /// - `doc_id`: ID of the doc.
46946 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
46947 /// because they're easily prone to being changed by users. If you're
46948 /// using a name, be sure to URI-encode it.
46949 /// - `limit`: Maximum number of results to return in this query.
46950 /// - `page_token`: An opaque token used to fetch the next page of results.
46951 /// - `query`: Query used to filter returned rows, specified as
46952 /// `<column_id_or_name>:<value>`. If you'd like to use a column name
46953 /// instead of an ID, you must quote it (e.g., `"My Column":123`). Also
46954 /// note that `value` is a JSON value; if you'd like to use a string, you
46955 /// must surround it in quotes (e.g., `"groceries"`).
46956 ///
46957 /// - `sort_by`: Specifies the sort order of the rows returned. If left
46958 /// unspecified, rows are returned by creation time ascending. "UpdatedAt"
46959 /// sort ordering is the order of rows based upon when they were last
46960 /// updated. This does not include updates to calculated values. "Natural"
46961 /// sort ordering is the order that the rows appear in the table view in
46962 /// the application. This ordering is only meaningfully defined for rows
46963 /// that are visible (unfiltered). Because of this, using this sort order
46964 /// will imply visibleOnly=true, that is, to only return visible rows. If
46965 /// you pass sortBy=natural and visibleOnly=false explicitly, this will
46966 /// result in a Bad Request error as this condition cannot be satisfied.
46967 ///
46968 /// - `sync_token`: An opaque token returned from a previous call that can
46969 /// be used to return results that are relevant to the query since the
46970 /// call where the syncToken was generated.
46971 ///
46972 /// - `use_column_names`: Use column names instead of column IDs in the
46973 /// returned output. This is generally discouraged as it is fragile. If
46974 /// columns are renamed, code using original names may throw errors.
46975 ///
46976 /// - `value_format`: The format that cell values are returned as.
46977 /// - `visible_only`: If true, returns only visible rows and columns for the
46978 /// table.
46979 pub async fn list_rows<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, query: Option<&'a str>, sort_by: Option<types::RowsSortBy>, sync_token: Option<&'a str>, use_column_names: Option<bool>, value_format: Option<types::ValueFormat>, visible_only: Option<bool>) -> Result<ResponseValue<types::RowList>, Error<types::ListRowsResponse>> {
46980 let url = format!("{}/docs/{}/tables/{}/rows", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()),);
46981 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
46982 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
46983 #[allow(unused_mut)]
46984 let mut request = self
46985 .client
46986 .get(url)
46987 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
46988 .query(&progenitor_client::QueryParam::new("limit", &limit))
46989 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
46990 .query(&progenitor_client::QueryParam::new("query", &query))
46991 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
46992 .query(&progenitor_client::QueryParam::new("syncToken", &sync_token))
46993 .query(&progenitor_client::QueryParam::new("useColumnNames", &use_column_names))
46994 .query(&progenitor_client::QueryParam::new("valueFormat", &value_format))
46995 .query(&progenitor_client::QueryParam::new("visibleOnly", &visible_only))
46996 .headers(header_map)
46997 .build()?;
46998 let info = OperationInfo {
46999 operation_id: "list_rows",
47000 };
47001 self.pre(&mut request, &info).await?;
47002 let result = self.exec(request, &info).await;
47003 self.post(&result, &info).await?;
47004 let response = result?;
47005 match response.status().as_u16() {
47006 200u16 => ResponseValue::from_response(response).await,
47007 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47008 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47009 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47010 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47011 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47012 _ => Err(Error::UnexpectedResponse(response)),
47013 }
47014 }
47015
47016 ///Insert/upsert rows
47017 ///
47018 ///Inserts rows into a table, optionally updating existing rows if any
47019 /// upsert key columns are provided. This endpoint will always return a 202,
47020 /// so long as the doc and table exist and are accessible (and the update is
47021 /// structurally valid). Row inserts/upserts are generally processed within
47022 /// several seconds. Note: this endpoint only works for base tables, not
47023 /// views. When upserting, if multiple rows match the specified key
47024 /// column(s), they will all be updated with the specified value.
47025 ///
47026 ///
47027 ///Sends a `POST` request to `/docs/{docId}/tables/{tableIdOrName}/rows`
47028 ///
47029 ///Arguments:
47030 /// - `doc_id`: ID of the doc.
47031 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47032 /// because they're easily prone to being changed by users. If you're
47033 /// using a name, be sure to URI-encode it.
47034 /// - `disable_parsing`: If true, the API will not attempt to parse the data
47035 /// in any way.
47036 /// - `body`: Rows to insert or upsert.
47037 pub async fn upsert_rows<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, disable_parsing: Option<bool>, body: &'a types::RowsUpsert) -> Result<ResponseValue<types::RowsUpsertResult>, Error<types::UpsertRowsResponse>> {
47038 let url = format!("{}/docs/{}/tables/{}/rows", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()),);
47039 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47040 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47041 #[allow(unused_mut)]
47042 let mut request = self
47043 .client
47044 .post(url)
47045 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47046 .json(&body)
47047 .query(&progenitor_client::QueryParam::new("disableParsing", &disable_parsing))
47048 .headers(header_map)
47049 .build()?;
47050 let info = OperationInfo {
47051 operation_id: "upsert_rows",
47052 };
47053 self.pre(&mut request, &info).await?;
47054 let result = self.exec(request, &info).await;
47055 self.post(&result, &info).await?;
47056 let response = result?;
47057 match response.status().as_u16() {
47058 202u16 => ResponseValue::from_response(response).await,
47059 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47060 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47061 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47062 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47063 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47064 _ => Err(Error::UnexpectedResponse(response)),
47065 }
47066 }
47067
47068 ///Delete multiple rows
47069 ///
47070 ///Deletes the specified rows from the table or view. This endpoint will
47071 /// always return a 202. Row deletions are generally processed within
47072 /// several seconds.
47073 ///
47074 ///
47075 ///Sends a `DELETE` request to `/docs/{docId}/tables/{tableIdOrName}/rows`
47076 ///
47077 ///Arguments:
47078 /// - `doc_id`: ID of the doc.
47079 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47080 /// because they're easily prone to being changed by users. If you're
47081 /// using a name, be sure to URI-encode it.
47082 /// - `body`: Rows to delete.
47083 pub async fn delete_rows<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, body: &'a types::RowsDelete) -> Result<ResponseValue<types::RowsDeleteResult>, Error<types::DeleteRowsResponse>> {
47084 let url = format!("{}/docs/{}/tables/{}/rows", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()),);
47085 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47086 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47087 #[allow(unused_mut)]
47088 let mut request = self
47089 .client
47090 .delete(url)
47091 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47092 .json(&body)
47093 .headers(header_map)
47094 .build()?;
47095 let info = OperationInfo {
47096 operation_id: "delete_rows",
47097 };
47098 self.pre(&mut request, &info).await?;
47099 let result = self.exec(request, &info).await;
47100 self.post(&result, &info).await?;
47101 let response = result?;
47102 match response.status().as_u16() {
47103 202u16 => ResponseValue::from_response(response).await,
47104 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47105 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47106 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47107 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47108 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47109 _ => Err(Error::UnexpectedResponse(response)),
47110 }
47111 }
47112
47113 ///Get a row
47114 ///
47115 ///Returns details about a row in a table.
47116 ///
47117 ///Sends a `GET` request to
47118 /// `/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}`
47119 ///
47120 ///Arguments:
47121 /// - `doc_id`: ID of the doc.
47122 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47123 /// because they're easily prone to being changed by users. If you're
47124 /// using a name, be sure to URI-encode it.
47125 /// - `row_id_or_name`: ID or name of the row. Names are discouraged because
47126 /// they're easily prone to being changed by users. If you're using a
47127 /// name, be sure to URI-encode it. If there are multiple rows with the
47128 /// same value in the identifying column, an arbitrary one will be
47129 /// selected.
47130 ///
47131 /// - `use_column_names`: Use column names instead of column IDs in the
47132 /// returned output. This is generally discouraged as it is fragile. If
47133 /// columns are renamed, code using original names may throw errors.
47134 ///
47135 /// - `value_format`: The format that cell values are returned as.
47136 pub async fn get_row<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, use_column_names: Option<bool>, value_format: Option<types::ValueFormat>) -> Result<ResponseValue<types::RowDetail>, Error<types::GetRowResponse>> {
47137 let url = format!("{}/docs/{}/tables/{}/rows/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()), encode_path(&row_id_or_name.to_string()),);
47138 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47139 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47140 #[allow(unused_mut)]
47141 let mut request = self
47142 .client
47143 .get(url)
47144 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47145 .query(&progenitor_client::QueryParam::new("useColumnNames", &use_column_names))
47146 .query(&progenitor_client::QueryParam::new("valueFormat", &value_format))
47147 .headers(header_map)
47148 .build()?;
47149 let info = OperationInfo {
47150 operation_id: "get_row",
47151 };
47152 self.pre(&mut request, &info).await?;
47153 let result = self.exec(request, &info).await;
47154 self.post(&result, &info).await?;
47155 let response = result?;
47156 match response.status().as_u16() {
47157 200u16 => ResponseValue::from_response(response).await,
47158 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47159 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47160 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47161 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47162 _ => Err(Error::UnexpectedResponse(response)),
47163 }
47164 }
47165
47166 ///Update row
47167 ///
47168 ///Updates the specified row in the table. This endpoint will always return
47169 /// a 202, so long as the row exists and is accessible (and the update is
47170 /// structurally valid). Row updates are generally processed within several
47171 /// seconds. When updating using a name as opposed to an ID, an arbitrary
47172 /// row will be affected.
47173 ///
47174 ///
47175 ///Sends a `PUT` request to
47176 /// `/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}`
47177 ///
47178 ///Arguments:
47179 /// - `doc_id`: ID of the doc.
47180 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47181 /// because they're easily prone to being changed by users. If you're
47182 /// using a name, be sure to URI-encode it.
47183 /// - `row_id_or_name`: ID or name of the row. Names are discouraged because
47184 /// they're easily prone to being changed by users. If you're using a
47185 /// name, be sure to URI-encode it. If there are multiple rows with the
47186 /// same value in the identifying column, an arbitrary one will be
47187 /// selected.
47188 ///
47189 /// - `disable_parsing`: If true, the API will not attempt to parse the data
47190 /// in any way.
47191 /// - `body`: Row update.
47192 pub async fn update_row<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, disable_parsing: Option<bool>, body: &'a types::RowUpdate) -> Result<ResponseValue<types::RowUpdateResult>, Error<types::UpdateRowResponse>> {
47193 let url = format!("{}/docs/{}/tables/{}/rows/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()), encode_path(&row_id_or_name.to_string()),);
47194 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47195 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47196 #[allow(unused_mut)]
47197 let mut request = self
47198 .client
47199 .put(url)
47200 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47201 .json(&body)
47202 .query(&progenitor_client::QueryParam::new("disableParsing", &disable_parsing))
47203 .headers(header_map)
47204 .build()?;
47205 let info = OperationInfo {
47206 operation_id: "update_row",
47207 };
47208 self.pre(&mut request, &info).await?;
47209 let result = self.exec(request, &info).await;
47210 self.post(&result, &info).await?;
47211 let response = result?;
47212 match response.status().as_u16() {
47213 202u16 => ResponseValue::from_response(response).await,
47214 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47215 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47216 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47217 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47218 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47219 _ => Err(Error::UnexpectedResponse(response)),
47220 }
47221 }
47222
47223 ///Delete row
47224 ///
47225 ///Deletes the specified row from the table or view. This endpoint will
47226 /// always return a 202, so long as the row exists and is accessible (and
47227 /// the update is structurally valid). Row deletions are generally processed
47228 /// within several seconds. When deleting using a name as opposed to an ID,
47229 /// an arbitrary row will be removed.
47230 ///
47231 ///
47232 ///Sends a `DELETE` request to
47233 /// `/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}`
47234 ///
47235 ///Arguments:
47236 /// - `doc_id`: ID of the doc.
47237 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47238 /// because they're easily prone to being changed by users. If you're
47239 /// using a name, be sure to URI-encode it.
47240 /// - `row_id_or_name`: ID or name of the row. Names are discouraged because
47241 /// they're easily prone to being changed by users. If you're using a
47242 /// name, be sure to URI-encode it. If there are multiple rows with the
47243 /// same value in the identifying column, an arbitrary one will be
47244 /// selected.
47245 pub async fn delete_row<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str) -> Result<ResponseValue<types::RowDeleteResult>, Error<types::DeleteRowResponse>> {
47246 let url = format!("{}/docs/{}/tables/{}/rows/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()), encode_path(&row_id_or_name.to_string()),);
47247 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47248 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47249 #[allow(unused_mut)]
47250 let mut request = self
47251 .client
47252 .delete(url)
47253 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47254 .headers(header_map)
47255 .build()?;
47256 let info = OperationInfo {
47257 operation_id: "delete_row",
47258 };
47259 self.pre(&mut request, &info).await?;
47260 let result = self.exec(request, &info).await;
47261 self.post(&result, &info).await?;
47262 let response = result?;
47263 match response.status().as_u16() {
47264 202u16 => ResponseValue::from_response(response).await,
47265 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47266 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47267 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47268 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47269 _ => Err(Error::UnexpectedResponse(response)),
47270 }
47271 }
47272
47273 ///Push a button
47274 ///
47275 ///Pushes a button on a row in a table.
47276 ///Authorization note: This action is available to API tokens that are
47277 /// authorized to write to the table. However, the underlying button can
47278 /// perform any action on the document, including writing to other tables
47279 /// and performing Pack actions.
47280 ///
47281 ///
47282 ///Sends a `POST` request to
47283 /// `/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}/buttons/
47284 /// {columnIdOrName}`
47285 ///
47286 ///Arguments:
47287 /// - `doc_id`: ID of the doc.
47288 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47289 /// because they're easily prone to being changed by users. If you're
47290 /// using a name, be sure to URI-encode it.
47291 /// - `row_id_or_name`: ID or name of the row. Names are discouraged because
47292 /// they're easily prone to being changed by users. If you're using a
47293 /// name, be sure to URI-encode it. If there are multiple rows with the
47294 /// same value in the identifying column, an arbitrary one will be
47295 /// selected.
47296 ///
47297 /// - `column_id_or_name`: ID or name of the column. Names are discouraged
47298 /// because they're easily prone to being changed by users. If you're
47299 /// using a name, be sure to URI-encode it.
47300 pub async fn push_button<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, column_id_or_name: &'a str) -> Result<ResponseValue<types::PushButtonResult>, Error<types::PushButtonResponse>> {
47301 let url = format!("{}/docs/{}/tables/{}/rows/{}/buttons/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()), encode_path(&row_id_or_name.to_string()), encode_path(&column_id_or_name.to_string()),);
47302 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47303 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47304 #[allow(unused_mut)]
47305 let mut request = self
47306 .client
47307 .post(url)
47308 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47309 .headers(header_map)
47310 .build()?;
47311 let info = OperationInfo {
47312 operation_id: "push_button",
47313 };
47314 self.pre(&mut request, &info).await?;
47315 let result = self.exec(request, &info).await;
47316 self.post(&result, &info).await?;
47317 let response = result?;
47318 match response.status().as_u16() {
47319 202u16 => ResponseValue::from_response(response).await,
47320 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47321 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47322 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47323 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47324 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47325 _ => Err(Error::UnexpectedResponse(response)),
47326 }
47327 }
47328
47329 ///Get a column
47330 ///
47331 ///Returns details about a column in a table.
47332 ///
47333 ///Sends a `GET` request to
47334 /// `/docs/{docId}/tables/{tableIdOrName}/columns/{columnIdOrName}`
47335 ///
47336 ///Arguments:
47337 /// - `doc_id`: ID of the doc.
47338 /// - `table_id_or_name`: ID or name of the table. Names are discouraged
47339 /// because they're easily prone to being changed by users. If you're
47340 /// using a name, be sure to URI-encode it.
47341 /// - `column_id_or_name`: ID or name of the column. Names are discouraged
47342 /// because they're easily prone to being changed by users. If you're
47343 /// using a name, be sure to URI-encode it.
47344 pub async fn get_column<'a>(&'a self, doc_id: &'a str, table_id_or_name: &'a str, column_id_or_name: &'a str) -> Result<ResponseValue<types::ColumnDetail>, Error<types::GetColumnResponse>> {
47345 let url = format!("{}/docs/{}/tables/{}/columns/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&table_id_or_name.to_string()), encode_path(&column_id_or_name.to_string()),);
47346 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47347 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47348 #[allow(unused_mut)]
47349 let mut request = self
47350 .client
47351 .get(url)
47352 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47353 .headers(header_map)
47354 .build()?;
47355 let info = OperationInfo {
47356 operation_id: "get_column",
47357 };
47358 self.pre(&mut request, &info).await?;
47359 let result = self.exec(request, &info).await;
47360 self.post(&result, &info).await?;
47361 let response = result?;
47362 match response.status().as_u16() {
47363 200u16 => ResponseValue::from_response(response).await,
47364 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47365 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47366 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47367 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47368 _ => Err(Error::UnexpectedResponse(response)),
47369 }
47370 }
47371
47372 ///List formulas
47373 ///
47374 ///Returns a list of named formulas in a Coda doc.
47375 ///
47376 ///Sends a `GET` request to `/docs/{docId}/formulas`
47377 ///
47378 ///Arguments:
47379 /// - `doc_id`: ID of the doc.
47380 /// - `limit`: Maximum number of results to return in this query.
47381 /// - `page_token`: An opaque token used to fetch the next page of results.
47382 /// - `sort_by`: Determines how to sort the given objects.
47383 pub async fn list_formulas<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<types::SortBy>) -> Result<ResponseValue<types::FormulaList>, Error<types::ListFormulasResponse>> {
47384 let url = format!("{}/docs/{}/formulas", self.baseurl, encode_path(&doc_id.to_string()),);
47385 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47386 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47387 #[allow(unused_mut)]
47388 let mut request = self
47389 .client
47390 .get(url)
47391 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47392 .query(&progenitor_client::QueryParam::new("limit", &limit))
47393 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
47394 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
47395 .headers(header_map)
47396 .build()?;
47397 let info = OperationInfo {
47398 operation_id: "list_formulas",
47399 };
47400 self.pre(&mut request, &info).await?;
47401 let result = self.exec(request, &info).await;
47402 self.post(&result, &info).await?;
47403 let response = result?;
47404 match response.status().as_u16() {
47405 200u16 => ResponseValue::from_response(response).await,
47406 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47407 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47408 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47409 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47410 _ => Err(Error::UnexpectedResponse(response)),
47411 }
47412 }
47413
47414 ///Get a formula
47415 ///
47416 ///Returns info on a formula.
47417 ///
47418 ///Sends a `GET` request to `/docs/{docId}/formulas/{formulaIdOrName}`
47419 ///
47420 ///Arguments:
47421 /// - `doc_id`: ID of the doc.
47422 /// - `formula_id_or_name`: ID or name of the formula. Names are discouraged
47423 /// because they're easily prone to being changed by users. If you're
47424 /// using a name, be sure to URI-encode it.
47425 pub async fn get_formula<'a>(&'a self, doc_id: &'a str, formula_id_or_name: &'a str) -> Result<ResponseValue<types::Formula>, Error<types::GetFormulaResponse>> {
47426 let url = format!("{}/docs/{}/formulas/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&formula_id_or_name.to_string()),);
47427 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47428 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47429 #[allow(unused_mut)]
47430 let mut request = self
47431 .client
47432 .get(url)
47433 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47434 .headers(header_map)
47435 .build()?;
47436 let info = OperationInfo {
47437 operation_id: "get_formula",
47438 };
47439 self.pre(&mut request, &info).await?;
47440 let result = self.exec(request, &info).await;
47441 self.post(&result, &info).await?;
47442 let response = result?;
47443 match response.status().as_u16() {
47444 200u16 => ResponseValue::from_response(response).await,
47445 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47446 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47447 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47448 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47449 _ => Err(Error::UnexpectedResponse(response)),
47450 }
47451 }
47452
47453 ///List controls
47454 ///
47455 ///Returns a list of controls in a Coda doc.
47456 ///
47457 ///Sends a `GET` request to `/docs/{docId}/controls`
47458 ///
47459 ///Arguments:
47460 /// - `doc_id`: ID of the doc.
47461 /// - `limit`: Maximum number of results to return in this query.
47462 /// - `page_token`: An opaque token used to fetch the next page of results.
47463 /// - `sort_by`: Determines how to sort the given objects.
47464 pub async fn list_controls<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<types::SortBy>) -> Result<ResponseValue<types::ControlList>, Error<types::ListControlsResponse>> {
47465 let url = format!("{}/docs/{}/controls", self.baseurl, encode_path(&doc_id.to_string()),);
47466 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47467 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47468 #[allow(unused_mut)]
47469 let mut request = self
47470 .client
47471 .get(url)
47472 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47473 .query(&progenitor_client::QueryParam::new("limit", &limit))
47474 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
47475 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
47476 .headers(header_map)
47477 .build()?;
47478 let info = OperationInfo {
47479 operation_id: "list_controls",
47480 };
47481 self.pre(&mut request, &info).await?;
47482 let result = self.exec(request, &info).await;
47483 self.post(&result, &info).await?;
47484 let response = result?;
47485 match response.status().as_u16() {
47486 200u16 => ResponseValue::from_response(response).await,
47487 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47488 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47489 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47490 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47491 _ => Err(Error::UnexpectedResponse(response)),
47492 }
47493 }
47494
47495 ///Get a control
47496 ///
47497 ///Returns info on a control.
47498 ///
47499 ///Sends a `GET` request to `/docs/{docId}/controls/{controlIdOrName}`
47500 ///
47501 ///Arguments:
47502 /// - `doc_id`: ID of the doc.
47503 /// - `control_id_or_name`: ID or name of the control. Names are discouraged
47504 /// because they're easily prone to being changed by users. If you're
47505 /// using a name, be sure to URI-encode it.
47506 pub async fn get_control<'a>(&'a self, doc_id: &'a str, control_id_or_name: &'a str) -> Result<ResponseValue<types::Control>, Error<types::GetControlResponse>> {
47507 let url = format!("{}/docs/{}/controls/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&control_id_or_name.to_string()),);
47508 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47509 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47510 #[allow(unused_mut)]
47511 let mut request = self
47512 .client
47513 .get(url)
47514 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47515 .headers(header_map)
47516 .build()?;
47517 let info = OperationInfo {
47518 operation_id: "get_control",
47519 };
47520 self.pre(&mut request, &info).await?;
47521 let result = self.exec(request, &info).await;
47522 self.post(&result, &info).await?;
47523 let response = result?;
47524 match response.status().as_u16() {
47525 200u16 => ResponseValue::from_response(response).await,
47526 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47527 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47528 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47529 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47530 _ => Err(Error::UnexpectedResponse(response)),
47531 }
47532 }
47533
47534 ///List custom doc domains
47535 ///
47536 ///List all custom domains for a published doc.
47537 ///
47538 ///Sends a `GET` request to `/docs/${docId}/domains`
47539 ///
47540 ///Arguments:
47541 /// - `doc_id`: ID of the doc.
47542 pub async fn list_custom_doc_domains<'a>(&'a self, doc_id: &'a str) -> Result<ResponseValue<types::CustomDocDomainList>, Error<types::ListCustomDocDomainsResponse>> {
47543 let url = format!("{}/docs/${}/domains", self.baseurl, encode_path(&doc_id.to_string()),);
47544 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47545 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47546 #[allow(unused_mut)]
47547 let mut request = self
47548 .client
47549 .get(url)
47550 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47551 .headers(header_map)
47552 .build()?;
47553 let info = OperationInfo {
47554 operation_id: "list_custom_doc_domains",
47555 };
47556 self.pre(&mut request, &info).await?;
47557 let result = self.exec(request, &info).await;
47558 self.post(&result, &info).await?;
47559 let response = result?;
47560 match response.status().as_u16() {
47561 200u16 => ResponseValue::from_response(response).await,
47562 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47563 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47564 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47565 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47566 _ => Err(Error::UnexpectedResponse(response)),
47567 }
47568 }
47569
47570 ///Add custom domain
47571 ///
47572 ///Add a custom domain to a published doc.
47573 ///
47574 ///Sends a `POST` request to `/docs/${docId}/domains`
47575 ///
47576 ///Arguments:
47577 /// - `doc_id`: ID of the doc.
47578 /// - `body`: Parameters for adding a custom domain to a published doc.
47579 pub async fn add_custom_doc_domain<'a>(&'a self, doc_id: &'a str, body: &'a types::AddCustomDocDomainRequest) -> Result<ResponseValue<types::AddCustomDocDomainResponse>, Error<types::AddCustomDocDomainResponse>> {
47580 let url = format!("{}/docs/${}/domains", self.baseurl, encode_path(&doc_id.to_string()),);
47581 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47582 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47583 #[allow(unused_mut)]
47584 let mut request = self
47585 .client
47586 .post(url)
47587 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47588 .json(&body)
47589 .headers(header_map)
47590 .build()?;
47591 let info = OperationInfo {
47592 operation_id: "add_custom_doc_domain",
47593 };
47594 self.pre(&mut request, &info).await?;
47595 let result = self.exec(request, &info).await;
47596 self.post(&result, &info).await?;
47597 let response = result?;
47598 match response.status().as_u16() {
47599 202u16 => ResponseValue::from_response(response).await,
47600 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47601 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47602 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47603 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47604 _ => Err(Error::UnexpectedResponse(response)),
47605 }
47606 }
47607
47608 ///Deletes a custom domain
47609 ///
47610 ///Deletes a custom domain from a published doc.
47611 ///
47612 ///Sends a `DELETE` request to `/docs/{docId}/domains/{customDocDomain}`
47613 ///
47614 ///Arguments:
47615 /// - `doc_id`: ID of the doc.
47616 /// - `custom_doc_domain`: A custom domain for a published doc.
47617 pub async fn delete_custom_doc_domain<'a>(&'a self, doc_id: &'a str, custom_doc_domain: &'a str) -> Result<ResponseValue<types::DeleteCustomDocDomainResponse>, Error<types::DeleteCustomDocDomainResponse>> {
47618 let url = format!("{}/docs/{}/domains/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&custom_doc_domain.to_string()),);
47619 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47620 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47621 #[allow(unused_mut)]
47622 let mut request = self
47623 .client
47624 .delete(url)
47625 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47626 .headers(header_map)
47627 .build()?;
47628 let info = OperationInfo {
47629 operation_id: "delete_custom_doc_domain",
47630 };
47631 self.pre(&mut request, &info).await?;
47632 let result = self.exec(request, &info).await;
47633 self.post(&result, &info).await?;
47634 let response = result?;
47635 match response.status().as_u16() {
47636 200u16 => ResponseValue::from_response(response).await,
47637 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47638 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47639 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47640 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47641 _ => Err(Error::UnexpectedResponse(response)),
47642 }
47643 }
47644
47645 ///Updates a custom domain
47646 ///
47647 ///Updates properties of a document's custom domain.
47648 ///
47649 ///Sends a `PATCH` request to `/docs/{docId}/domains/{customDocDomain}`
47650 ///
47651 ///Arguments:
47652 /// - `doc_id`: ID of the doc.
47653 /// - `custom_doc_domain`: A custom domain for a published doc.
47654 /// - `body`: Properties of a custom domain to update.
47655 pub async fn update_custom_doc_domain<'a>(&'a self, doc_id: &'a str, custom_doc_domain: &'a str, body: &'a types::UpdateCustomDocDomainRequest) -> Result<ResponseValue<types::UpdateCustomDocDomainResponse>, Error<types::UpdateCustomDocDomainResponse>> {
47656 let url = format!("{}/docs/{}/domains/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&custom_doc_domain.to_string()),);
47657 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47658 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47659 #[allow(unused_mut)]
47660 let mut request = self
47661 .client
47662 .patch(url)
47663 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47664 .json(&body)
47665 .headers(header_map)
47666 .build()?;
47667 let info = OperationInfo {
47668 operation_id: "update_custom_doc_domain",
47669 };
47670 self.pre(&mut request, &info).await?;
47671 let result = self.exec(request, &info).await;
47672 self.post(&result, &info).await?;
47673 let response = result?;
47674 match response.status().as_u16() {
47675 200u16 => ResponseValue::from_response(response).await,
47676 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47677 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47678 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47679 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47680 _ => Err(Error::UnexpectedResponse(response)),
47681 }
47682 }
47683
47684 ///Gets custom doc domains providers
47685 ///
47686 ///Gets the provider (ie. GoDaddy) of a custom domain.
47687 ///
47688 ///Sends a `GET` request to `/domains/provider/{customDocDomain}`
47689 ///
47690 ///Arguments:
47691 /// - `custom_doc_domain`: A custom domain for a published doc.
47692 pub async fn get_custom_doc_domain_provider<'a>(&'a self, custom_doc_domain: &'a str) -> Result<ResponseValue<types::CustomDocDomainProviderResponse>, Error<types::GetCustomDocDomainProviderResponse>> {
47693 let url = format!("{}/domains/provider/{}", self.baseurl, encode_path(&custom_doc_domain.to_string()),);
47694 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47695 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47696 #[allow(unused_mut)]
47697 let mut request = self
47698 .client
47699 .get(url)
47700 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47701 .headers(header_map)
47702 .build()?;
47703 let info = OperationInfo {
47704 operation_id: "get_custom_doc_domain_provider",
47705 };
47706 self.pre(&mut request, &info).await?;
47707 let result = self.exec(request, &info).await;
47708 self.post(&result, &info).await?;
47709 let response = result?;
47710 match response.status().as_u16() {
47711 200u16 => ResponseValue::from_response(response).await,
47712 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47713 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47714 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47715 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47716 _ => Err(Error::UnexpectedResponse(response)),
47717 }
47718 }
47719
47720 ///Get folder
47721 ///
47722 ///Returns the requested folder.
47723 ///
47724 ///
47725 ///Sends a `GET` request to `/folders/{folderId}`
47726 ///
47727 ///Arguments:
47728 /// - `folder_id`: ID of the folder.
47729 pub async fn get_folder<'a>(&'a self, folder_id: &'a str) -> Result<ResponseValue<types::Folder>, Error<types::GetFolderResponse>> {
47730 let url = format!("{}/folders/{}", self.baseurl, encode_path(&folder_id.to_string()),);
47731 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47732 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47733 #[allow(unused_mut)]
47734 let mut request = self
47735 .client
47736 .get(url)
47737 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47738 .headers(header_map)
47739 .build()?;
47740 let info = OperationInfo {
47741 operation_id: "get_folder",
47742 };
47743 self.pre(&mut request, &info).await?;
47744 let result = self.exec(request, &info).await;
47745 self.post(&result, &info).await?;
47746 let response = result?;
47747 match response.status().as_u16() {
47748 200u16 => ResponseValue::from_response(response).await,
47749 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47750 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47751 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47752 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47753 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47754 _ => Err(Error::UnexpectedResponse(response)),
47755 }
47756 }
47757
47758 ///Get user info
47759 ///
47760 ///Returns basic info about the current user.
47761 ///
47762 ///Sends a `GET` request to `/whoami`
47763 pub async fn whoami<'a>(&'a self) -> Result<ResponseValue<types::User>, Error<types::WhoamiResponse>> {
47764 let url = format!("{}/whoami", self.baseurl,);
47765 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47766 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47767 #[allow(unused_mut)]
47768 let mut request = self
47769 .client
47770 .get(url)
47771 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47772 .headers(header_map)
47773 .build()?;
47774 let info = OperationInfo {
47775 operation_id: "whoami",
47776 };
47777 self.pre(&mut request, &info).await?;
47778 let result = self.exec(request, &info).await;
47779 self.post(&result, &info).await?;
47780 let response = result?;
47781 match response.status().as_u16() {
47782 200u16 => ResponseValue::from_response(response).await,
47783 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47784 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47785 _ => Err(Error::UnexpectedResponse(response)),
47786 }
47787 }
47788
47789 ///Resolve browser link
47790 ///
47791 ///Given a browser link to a Coda object, attempts to find it and return
47792 /// metadata that can be used to get more info on it. Returns a 400 if the
47793 /// URL does not appear to be a Coda URL or a 404 if the resource cannot be
47794 /// located with the current credentials.
47795 ///
47796 ///
47797 ///Sends a `GET` request to `/resolveBrowserLink`
47798 ///
47799 ///Arguments:
47800 /// - `degrade_gracefully`: By default, attempting to resolve the Coda URL
47801 /// of a deleted object will result in an error. If this flag is set, the
47802 /// next-available object, all the way up to the doc itself, will be
47803 /// resolved.
47804 ///
47805 /// - `url`: The browser link to try to resolve.
47806 pub async fn resolve_browser_link<'a>(&'a self, degrade_gracefully: Option<bool>, url: &'a str) -> Result<ResponseValue<types::ApiLink>, Error<types::ResolveBrowserLinkResponse>> {
47807 let _url = format!("{}/resolveBrowserLink", self.baseurl,);
47808 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47809 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47810 #[allow(unused_mut)]
47811 let mut request = self
47812 .client
47813 .get(_url)
47814 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47815 .query(&progenitor_client::QueryParam::new("degradeGracefully", °rade_gracefully))
47816 .query(&progenitor_client::QueryParam::new("url", &url))
47817 .headers(header_map)
47818 .build()?;
47819 let info = OperationInfo {
47820 operation_id: "resolve_browser_link",
47821 };
47822 self.pre(&mut request, &info).await?;
47823 let result = self.exec(request, &info).await;
47824 self.post(&result, &info).await?;
47825 let response = result?;
47826 match response.status().as_u16() {
47827 200u16 => ResponseValue::from_response(response).await,
47828 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47829 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47830 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47831 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47832 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47833 _ => Err(Error::UnexpectedResponse(response)),
47834 }
47835 }
47836
47837 ///Get mutation status
47838 ///
47839 ///Get the status for an asynchronous mutation to know whether or not it
47840 /// has been completed. Each API endpoint that mutates a document will
47841 /// return a request id that you can pass to this endpoint to check the
47842 /// completion status. Status information is not guaranteed to be available
47843 /// for more than one day after the mutation was completed. It is intended
47844 /// to be used shortly after the request was made.
47845 ///
47846 ///
47847 ///Sends a `GET` request to `/mutationStatus/{requestId}`
47848 ///
47849 ///Arguments:
47850 /// - `request_id`: ID of the request.
47851 pub async fn get_mutation_status<'a>(&'a self, request_id: &'a str) -> Result<ResponseValue<types::MutationStatus>, Error<types::GetMutationStatusResponse>> {
47852 let url = format!("{}/mutationStatus/{}", self.baseurl, encode_path(&request_id.to_string()),);
47853 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47854 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47855 #[allow(unused_mut)]
47856 let mut request = self
47857 .client
47858 .get(url)
47859 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47860 .headers(header_map)
47861 .build()?;
47862 let info = OperationInfo {
47863 operation_id: "get_mutation_status",
47864 };
47865 self.pre(&mut request, &info).await?;
47866 let result = self.exec(request, &info).await;
47867 self.post(&result, &info).await?;
47868 let response = result?;
47869 match response.status().as_u16() {
47870 200u16 => ResponseValue::from_response(response).await,
47871 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47872 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47873 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47874 _ => Err(Error::UnexpectedResponse(response)),
47875 }
47876 }
47877
47878 ///Trigger automation
47879 ///
47880 ///Triggers webhook-invoked automation
47881 ///
47882 ///Sends a `POST` request to `/docs/{docId}/hooks/automation/{ruleId}`
47883 ///
47884 ///Arguments:
47885 /// - `doc_id`: ID of the doc.
47886 /// - `rule_id`: ID of the automation rule.
47887 /// - `body`: Payload for webhook
47888 pub async fn trigger_webhook_automation<'a>(&'a self, doc_id: &'a str, rule_id: &'a str, body: &'a types::WebhookTriggerPayload) -> Result<ResponseValue<types::WebhookTriggerResult>, Error<types::TriggerWebhookAutomationResponse>> {
47889 let url = format!("{}/docs/{}/hooks/automation/{}", self.baseurl, encode_path(&doc_id.to_string()), encode_path(&rule_id.to_string()),);
47890 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47891 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47892 #[allow(unused_mut)]
47893 let mut request = self
47894 .client
47895 .post(url)
47896 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47897 .json(&body)
47898 .headers(header_map)
47899 .build()?;
47900 let info = OperationInfo {
47901 operation_id: "trigger_webhook_automation",
47902 };
47903 self.pre(&mut request, &info).await?;
47904 let result = self.exec(request, &info).await;
47905 self.post(&result, &info).await?;
47906 let response = result?;
47907 match response.status().as_u16() {
47908 202u16 => ResponseValue::from_response(response).await,
47909 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47910 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47911 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47912 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47913 422u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47914 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47915 _ => Err(Error::UnexpectedResponse(response)),
47916 }
47917 }
47918
47919 ///List doc analytics
47920 ///
47921 ///Returns analytics data for available docs per day.
47922 ///
47923 ///
47924 ///Sends a `GET` request to `/analytics/docs`
47925 ///
47926 ///Arguments:
47927 /// - `direction`: Direction to sort results in.
47928 /// - `doc_ids`: List of docIds to fetch.
47929 /// - `is_published`: Limit results to only published items.
47930 /// - `limit`: Maximum number of results to return in this query.
47931 /// - `order_by`: Use this parameter to order the doc analytics returned.
47932 /// - `page_token`: An opaque token used to fetch the next page of results.
47933 /// - `query`: Search term used to filter down results.
47934 /// - `scale`: Quantization period over which to view analytics. Defaults to
47935 /// daily.
47936 /// - `since_date`: Limit results to activity on or after this date.
47937 /// - `until_date`: Limit results to activity on or before this date.
47938 /// - `workspace_id`: ID of the workspace.
47939 pub async fn list_doc_analytics<'a>(&'a self, direction: Option<types::SortDirection>, doc_ids: Option<&'a ::std::vec::Vec<::std::string::String>>, is_published: Option<bool>, limit: Option<::std::num::NonZeroU64>, order_by: Option<types::DocAnalyticsOrderBy>, page_token: Option<&'a str>, query: Option<&'a str>, scale: Option<types::AnalyticsScale>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::DocAnalyticsCollection>, Error<types::ListDocAnalyticsResponse>> {
47940 let url = format!("{}/analytics/docs", self.baseurl,);
47941 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47942 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47943 #[allow(unused_mut)]
47944 let mut request = self
47945 .client
47946 .get(url)
47947 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
47948 .query(&progenitor_client::QueryParam::new("direction", &direction))
47949 .query(&progenitor_client::QueryParam::new("docIds", &doc_ids))
47950 .query(&progenitor_client::QueryParam::new("isPublished", &is_published))
47951 .query(&progenitor_client::QueryParam::new("limit", &limit))
47952 .query(&progenitor_client::QueryParam::new("orderBy", &order_by))
47953 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
47954 .query(&progenitor_client::QueryParam::new("query", &query))
47955 .query(&progenitor_client::QueryParam::new("scale", &scale))
47956 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
47957 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
47958 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
47959 .headers(header_map)
47960 .build()?;
47961 let info = OperationInfo {
47962 operation_id: "list_doc_analytics",
47963 };
47964 self.pre(&mut request, &info).await?;
47965 let result = self.exec(request, &info).await;
47966 self.post(&result, &info).await?;
47967 let response = result?;
47968 match response.status().as_u16() {
47969 200u16 => ResponseValue::from_response(response).await,
47970 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47971 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
47972 _ => Err(Error::UnexpectedResponse(response)),
47973 }
47974 }
47975
47976 ///List page analytics
47977 ///
47978 ///Returns analytics data for a given doc within the day.
47979 ///This method will return a 401 if the given doc is not in an Enterprise
47980 /// workspace.
47981 ///
47982 ///
47983 ///Sends a `GET` request to `/analytics/docs/{docId}/pages`
47984 ///
47985 ///Arguments:
47986 /// - `doc_id`: ID of the doc.
47987 /// - `limit`: Maximum number of results to return in this query.
47988 /// - `page_token`: An opaque token used to fetch the next page of results.
47989 /// - `since_date`: Limit results to activity on or after this date.
47990 /// - `until_date`: Limit results to activity on or before this date.
47991 pub async fn list_page_analytics<'a>(&'a self, doc_id: &'a str, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>) -> Result<ResponseValue<types::PageAnalyticsCollection>, Error<types::ListPageAnalyticsResponse>> {
47992 let url = format!("{}/analytics/docs/{}/pages", self.baseurl, encode_path(&doc_id.to_string()),);
47993 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
47994 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
47995 #[allow(unused_mut)]
47996 let mut request = self
47997 .client
47998 .get(url)
47999 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48000 .query(&progenitor_client::QueryParam::new("limit", &limit))
48001 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48002 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
48003 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
48004 .headers(header_map)
48005 .build()?;
48006 let info = OperationInfo {
48007 operation_id: "list_page_analytics",
48008 };
48009 self.pre(&mut request, &info).await?;
48010 let result = self.exec(request, &info).await;
48011 self.post(&result, &info).await?;
48012 let response = result?;
48013 match response.status().as_u16() {
48014 200u16 => ResponseValue::from_response(response).await,
48015 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48016 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48017 _ => Err(Error::UnexpectedResponse(response)),
48018 }
48019 }
48020
48021 ///Get doc analytics summary
48022 ///
48023 ///Returns summarized analytics data for available docs.
48024 ///
48025 ///
48026 ///Sends a `GET` request to `/analytics/docs/summary`
48027 ///
48028 ///Arguments:
48029 /// - `is_published`: Limit results to only published items.
48030 /// - `since_date`: Limit results to activity on or after this date.
48031 /// - `until_date`: Limit results to activity on or before this date.
48032 /// - `workspace_id`: ID of the workspace.
48033 pub async fn list_doc_analytics_summary<'a>(&'a self, is_published: Option<bool>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::DocAnalyticsSummary>, Error<types::ListDocAnalyticsSummaryResponse>> {
48034 let url = format!("{}/analytics/docs/summary", self.baseurl,);
48035 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48036 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48037 #[allow(unused_mut)]
48038 let mut request = self
48039 .client
48040 .get(url)
48041 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48042 .query(&progenitor_client::QueryParam::new("isPublished", &is_published))
48043 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
48044 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
48045 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
48046 .headers(header_map)
48047 .build()?;
48048 let info = OperationInfo {
48049 operation_id: "list_doc_analytics_summary",
48050 };
48051 self.pre(&mut request, &info).await?;
48052 let result = self.exec(request, &info).await;
48053 self.post(&result, &info).await?;
48054 let response = result?;
48055 match response.status().as_u16() {
48056 200u16 => ResponseValue::from_response(response).await,
48057 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48058 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48059 _ => Err(Error::UnexpectedResponse(response)),
48060 }
48061 }
48062
48063 ///List Pack analytics
48064 ///
48065 ///Returns analytics data for Packs the user can edit.
48066 ///
48067 ///
48068 ///Sends a `GET` request to `/analytics/packs`
48069 ///
48070 ///Arguments:
48071 /// - `direction`: Direction to sort results in.
48072 /// - `is_published`: Limit results to only published items. If false or
48073 /// unspecified, returns all items including published ones.
48074 ///
48075 /// - `limit`: Maximum number of results to return in this query.
48076 /// - `order_by`: Use this parameter to order the Pack analytics returned.
48077 /// - `pack_ids`: Which Pack IDs to fetch.
48078 /// - `page_token`: An opaque token used to fetch the next page of results.
48079 /// - `query`: Search term used to filter down results.
48080 /// - `scale`: Quantization period over which to view analytics. Defaults to
48081 /// daily.
48082 /// - `since_date`: Limit results to activity on or after this date.
48083 /// - `until_date`: Limit results to activity on or before this date.
48084 /// - `workspace_id`: ID of the workspace.
48085 pub async fn list_pack_analytics<'a>(&'a self, direction: Option<types::SortDirection>, is_published: Option<bool>, limit: Option<::std::num::NonZeroU64>, order_by: Option<types::PackAnalyticsOrderBy>, pack_ids: Option<&'a ::std::vec::Vec<i64>>, page_token: Option<&'a str>, query: Option<&'a str>, scale: Option<types::AnalyticsScale>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::PackAnalyticsCollection>, Error<types::ListPackAnalyticsResponse>> {
48086 let url = format!("{}/analytics/packs", self.baseurl,);
48087 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48088 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48089 #[allow(unused_mut)]
48090 let mut request = self
48091 .client
48092 .get(url)
48093 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48094 .query(&progenitor_client::QueryParam::new("direction", &direction))
48095 .query(&progenitor_client::QueryParam::new("isPublished", &is_published))
48096 .query(&progenitor_client::QueryParam::new("limit", &limit))
48097 .query(&progenitor_client::QueryParam::new("orderBy", &order_by))
48098 .query(&progenitor_client::QueryParam::new("packIds", &pack_ids))
48099 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48100 .query(&progenitor_client::QueryParam::new("query", &query))
48101 .query(&progenitor_client::QueryParam::new("scale", &scale))
48102 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
48103 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
48104 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
48105 .headers(header_map)
48106 .build()?;
48107 let info = OperationInfo {
48108 operation_id: "list_pack_analytics",
48109 };
48110 self.pre(&mut request, &info).await?;
48111 let result = self.exec(request, &info).await;
48112 self.post(&result, &info).await?;
48113 let response = result?;
48114 match response.status().as_u16() {
48115 200u16 => ResponseValue::from_response(response).await,
48116 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48117 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48118 _ => Err(Error::UnexpectedResponse(response)),
48119 }
48120 }
48121
48122 ///Get Pack analytics summary
48123 ///
48124 ///Returns summarized analytics data for Packs the user can edit.
48125 ///
48126 ///
48127 ///Sends a `GET` request to `/analytics/packs/summary`
48128 ///
48129 ///Arguments:
48130 /// - `is_published`: Limit results to only published items. If false or
48131 /// unspecified, returns all items including published ones.
48132 ///
48133 /// - `pack_ids`: Which Pack IDs to fetch.
48134 /// - `since_date`: Limit results to activity on or after this date.
48135 /// - `until_date`: Limit results to activity on or before this date.
48136 /// - `workspace_id`: ID of the workspace.
48137 pub async fn list_pack_analytics_summary<'a>(&'a self, is_published: Option<bool>, pack_ids: Option<&'a ::std::vec::Vec<i64>>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::PackAnalyticsSummary>, Error<types::ListPackAnalyticsSummaryResponse>> {
48138 let url = format!("{}/analytics/packs/summary", self.baseurl,);
48139 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48140 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48141 #[allow(unused_mut)]
48142 let mut request = self
48143 .client
48144 .get(url)
48145 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48146 .query(&progenitor_client::QueryParam::new("isPublished", &is_published))
48147 .query(&progenitor_client::QueryParam::new("packIds", &pack_ids))
48148 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
48149 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
48150 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
48151 .headers(header_map)
48152 .build()?;
48153 let info = OperationInfo {
48154 operation_id: "list_pack_analytics_summary",
48155 };
48156 self.pre(&mut request, &info).await?;
48157 let result = self.exec(request, &info).await;
48158 self.post(&result, &info).await?;
48159 let response = result?;
48160 match response.status().as_u16() {
48161 200u16 => ResponseValue::from_response(response).await,
48162 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48163 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48164 _ => Err(Error::UnexpectedResponse(response)),
48165 }
48166 }
48167
48168 ///List Pack formula analytics
48169 ///
48170 ///Returns analytics data for Pack formulas.
48171 ///
48172 ///
48173 ///Sends a `GET` request to `/analytics/packs/{packId}/formulas`
48174 ///
48175 ///Arguments:
48176 /// - `pack_id`: ID of a Pack
48177 /// - `direction`: Direction to sort results in.
48178 /// - `limit`: Maximum number of results to return in this query.
48179 /// - `order_by`: Use this parameter to order the Pack formula analytics
48180 /// returned.
48181 /// - `pack_formula_names`: A list of Pack formula names (case-sensitive)
48182 /// for which to retrieve analytics.
48183 /// - `pack_formula_types`: A list of Pack formula types corresponding to
48184 /// the `packFormulaNames`. If specified, this must have the same length
48185 /// as `packFormulaNames`.
48186 /// - `page_token`: An opaque token used to fetch the next page of results.
48187 /// - `scale`: Quantization period over which to view analytics. Defaults to
48188 /// daily.
48189 /// - `since_date`: Limit results to activity on or after this date.
48190 /// - `until_date`: Limit results to activity on or before this date.
48191 pub async fn list_pack_formula_analytics<'a>(&'a self, pack_id: ::std::num::NonZeroU64, direction: Option<types::SortDirection>, limit: Option<::std::num::NonZeroU64>, order_by: Option<types::PackFormulaAnalyticsOrderBy>, pack_formula_names: Option<&'a ::std::vec::Vec<::std::string::String>>, pack_formula_types: Option<&'a ::std::vec::Vec<types::PackFormulaType>>, page_token: Option<&'a str>, scale: Option<types::AnalyticsScale>, since_date: Option<&'a ::chrono::naive::NaiveDate>, until_date: Option<&'a ::chrono::naive::NaiveDate>) -> Result<ResponseValue<types::PackFormulaAnalyticsCollection>, Error<types::ListPackFormulaAnalyticsResponse>> {
48192 let url = format!("{}/analytics/packs/{}/formulas", self.baseurl, encode_path(&pack_id.to_string()),);
48193 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48194 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48195 #[allow(unused_mut)]
48196 let mut request = self
48197 .client
48198 .get(url)
48199 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48200 .query(&progenitor_client::QueryParam::new("direction", &direction))
48201 .query(&progenitor_client::QueryParam::new("limit", &limit))
48202 .query(&progenitor_client::QueryParam::new("orderBy", &order_by))
48203 .query(&progenitor_client::QueryParam::new("packFormulaNames", &pack_formula_names))
48204 .query(&progenitor_client::QueryParam::new("packFormulaTypes", &pack_formula_types))
48205 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48206 .query(&progenitor_client::QueryParam::new("scale", &scale))
48207 .query(&progenitor_client::QueryParam::new("sinceDate", &since_date))
48208 .query(&progenitor_client::QueryParam::new("untilDate", &until_date))
48209 .headers(header_map)
48210 .build()?;
48211 let info = OperationInfo {
48212 operation_id: "list_pack_formula_analytics",
48213 };
48214 self.pre(&mut request, &info).await?;
48215 let result = self.exec(request, &info).await;
48216 self.post(&result, &info).await?;
48217 let response = result?;
48218 match response.status().as_u16() {
48219 200u16 => ResponseValue::from_response(response).await,
48220 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48221 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48222 _ => Err(Error::UnexpectedResponse(response)),
48223 }
48224 }
48225
48226 ///Get analytics last updated day
48227 ///
48228 ///Returns days based on Pacific Standard Time when analytics were last
48229 /// updated.
48230 ///
48231 ///
48232 ///Sends a `GET` request to `/analytics/updated`
48233 pub async fn get_analytics_last_updated<'a>(&'a self) -> Result<ResponseValue<types::AnalyticsLastUpdatedResponse>, Error<types::GetAnalyticsLastUpdatedResponse>> {
48234 let url = format!("{}/analytics/updated", self.baseurl,);
48235 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48236 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48237 #[allow(unused_mut)]
48238 let mut request = self
48239 .client
48240 .get(url)
48241 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48242 .headers(header_map)
48243 .build()?;
48244 let info = OperationInfo {
48245 operation_id: "get_analytics_last_updated",
48246 };
48247 self.pre(&mut request, &info).await?;
48248 let result = self.exec(request, &info).await;
48249 self.post(&result, &info).await?;
48250 let response = result?;
48251 match response.status().as_u16() {
48252 200u16 => ResponseValue::from_response(response).await,
48253 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48254 _ => Err(Error::UnexpectedResponse(response)),
48255 }
48256 }
48257
48258 ///List workspace users
48259 ///
48260 ///Returns a list of members in the given workspace. This list will be
48261 /// ordered with the requesting user first and then ordered by role.
48262 ///
48263 ///
48264 ///Sends a `GET` request to `/workspaces/{workspaceId}/users`
48265 ///
48266 ///Arguments:
48267 /// - `workspace_id`: ID of the workspace.
48268 /// - `included_roles`: Show only the members that match the included roles.
48269 /// Multiple roles can be specified with a comma-delimited list.
48270 /// - `page_token`: An opaque token used to fetch the next page of results.
48271 pub async fn list_workspace_members<'a>(&'a self, workspace_id: &'a str, included_roles: Option<&'a ::std::vec::Vec<types::WorkspaceUserRole>>, page_token: Option<&'a str>) -> Result<ResponseValue<types::WorkspaceMembersList>, Error<types::ListWorkspaceMembersResponse>> {
48272 let url = format!("{}/workspaces/{}/users", self.baseurl, encode_path(&workspace_id.to_string()),);
48273 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48274 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48275 #[allow(unused_mut)]
48276 let mut request = self
48277 .client
48278 .get(url)
48279 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48280 .query(&progenitor_client::QueryParam::new("includedRoles", &included_roles))
48281 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48282 .headers(header_map)
48283 .build()?;
48284 let info = OperationInfo {
48285 operation_id: "list_workspace_members",
48286 };
48287 self.pre(&mut request, &info).await?;
48288 let result = self.exec(request, &info).await;
48289 self.post(&result, &info).await?;
48290 let response = result?;
48291 match response.status().as_u16() {
48292 200u16 => ResponseValue::from_response(response).await,
48293 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48294 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48295 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48296 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48297 _ => Err(Error::UnexpectedResponse(response)),
48298 }
48299 }
48300
48301 ///Updates user role
48302 ///
48303 ///Updates the workspace user role of a user that matches the parameters.
48304 /// Only succeeds if the requesting user has admin permissions in the
48305 /// workspace.
48306 ///
48307 ///
48308 ///Sends a `POST` request to `/workspaces/{workspaceId}/users/role`
48309 ///
48310 ///Arguments:
48311 /// - `workspace_id`: ID of the workspace.
48312 /// - `body`: Parameters for changing the user role.
48313 pub async fn change_user_role<'a>(&'a self, workspace_id: &'a str, body: &'a types::ChangeRole) -> Result<ResponseValue<types::ChangeRoleResult>, Error<types::ChangeUserRoleResponse>> {
48314 let url = format!("{}/workspaces/{}/users/role", self.baseurl, encode_path(&workspace_id.to_string()),);
48315 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48316 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48317 #[allow(unused_mut)]
48318 let mut request = self
48319 .client
48320 .post(url)
48321 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48322 .json(&body)
48323 .headers(header_map)
48324 .build()?;
48325 let info = OperationInfo {
48326 operation_id: "change_user_role",
48327 };
48328 self.pre(&mut request, &info).await?;
48329 let result = self.exec(request, &info).await;
48330 self.post(&result, &info).await?;
48331 let response = result?;
48332 match response.status().as_u16() {
48333 200u16 => ResponseValue::from_response(response).await,
48334 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48335 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48336 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48337 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48338 _ => Err(Error::UnexpectedResponse(response)),
48339 }
48340 }
48341
48342 ///List workspace roles
48343 ///
48344 ///Returns a list of the counts of users over time by role for the
48345 /// workspace.
48346 ///
48347 ///
48348 ///Sends a `GET` request to `/workspaces/{workspaceId}/roles`
48349 ///
48350 ///Arguments:
48351 /// - `workspace_id`: ID of the workspace.
48352 pub async fn list_workspace_role_activity<'a>(&'a self, workspace_id: &'a str) -> Result<ResponseValue<types::GetWorkspaceRoleActivity>, Error<types::ListWorkspaceRoleActivityResponse>> {
48353 let url = format!("{}/workspaces/{}/roles", self.baseurl, encode_path(&workspace_id.to_string()),);
48354 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48355 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48356 #[allow(unused_mut)]
48357 let mut request = self
48358 .client
48359 .get(url)
48360 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48361 .headers(header_map)
48362 .build()?;
48363 let info = OperationInfo {
48364 operation_id: "list_workspace_role_activity",
48365 };
48366 self.pre(&mut request, &info).await?;
48367 let result = self.exec(request, &info).await;
48368 self.post(&result, &info).await?;
48369 let response = result?;
48370 match response.status().as_u16() {
48371 200u16 => ResponseValue::from_response(response).await,
48372 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48373 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48374 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48375 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48376 _ => Err(Error::UnexpectedResponse(response)),
48377 }
48378 }
48379
48380 ///List Packs
48381 ///
48382 ///Get the list of accessible Packs.
48383 ///
48384 ///
48385 ///Sends a `GET` request to `/packs`
48386 ///
48387 ///Arguments:
48388 /// - `access_type`: Deprecated, use accessTypes instead. Filter to only
48389 /// return the Packs for which the current user has this access type
48390 /// - `access_types`: Filter to only return the Packs for which the current
48391 /// user has these access types.
48392 /// - `direction`: Direction to sort results in.
48393 /// - `exclude_individual_acls`: Do not include Packs that are only shared
48394 /// with the user individually.
48395 /// - `exclude_public_packs`: Only get Packs shared with users/workspaces,
48396 /// not publicly.
48397 /// - `exclude_workspace_acls`: Do not include Packs that are only shared
48398 /// with workspaces.
48399 /// - `limit`: Maximum number of results to return in this query.
48400 /// - `only_workspace_id`: Use only this workspace (not all of a user's
48401 /// workspaces) to check for Packs shared via workspace ACL.
48402 /// - `pack_entrypoint`: Entrypoint for which this pack call is being made.
48403 /// Used to filter non relevant packs
48404 /// - `page_token`: An opaque token used to fetch the next page of results.
48405 /// - `parent_workspace_ids`: Filter to only Packs whose parent workspace is
48406 /// one of the given IDs.
48407 /// - `sort_by`: The sort order of the Packs returned.
48408 pub async fn list_packs<'a>(&'a self, access_type: Option<types::PackAccessType>, access_types: Option<&'a ::std::vec::Vec<types::PackAccessType>>, direction: Option<types::SortDirection>, exclude_individual_acls: Option<bool>, exclude_public_packs: Option<bool>, exclude_workspace_acls: Option<bool>, limit: Option<::std::num::NonZeroU64>, only_workspace_id: Option<&'a str>, pack_entrypoint: Option<types::PackEntrypoint>, page_token: Option<&'a str>, parent_workspace_ids: Option<&'a ::std::vec::Vec<::std::string::String>>, sort_by: Option<types::PacksSortBy>) -> Result<ResponseValue<types::PackSummaryList>, Error<types::ListPacksResponse>> {
48409 let url = format!("{}/packs", self.baseurl,);
48410 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48411 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48412 #[allow(unused_mut)]
48413 let mut request = self
48414 .client
48415 .get(url)
48416 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48417 .query(&progenitor_client::QueryParam::new("accessType", &access_type))
48418 .query(&progenitor_client::QueryParam::new("accessTypes", &access_types))
48419 .query(&progenitor_client::QueryParam::new("direction", &direction))
48420 .query(&progenitor_client::QueryParam::new("excludeIndividualAcls", &exclude_individual_acls))
48421 .query(&progenitor_client::QueryParam::new("excludePublicPacks", &exclude_public_packs))
48422 .query(&progenitor_client::QueryParam::new("excludeWorkspaceAcls", &exclude_workspace_acls))
48423 .query(&progenitor_client::QueryParam::new("limit", &limit))
48424 .query(&progenitor_client::QueryParam::new("onlyWorkspaceId", &only_workspace_id))
48425 .query(&progenitor_client::QueryParam::new("packEntrypoint", &pack_entrypoint))
48426 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48427 .query(&progenitor_client::QueryParam::new("parentWorkspaceIds", &parent_workspace_ids))
48428 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
48429 .headers(header_map)
48430 .build()?;
48431 let info = OperationInfo {
48432 operation_id: "list_packs",
48433 };
48434 self.pre(&mut request, &info).await?;
48435 let result = self.exec(request, &info).await;
48436 self.post(&result, &info).await?;
48437 let response = result?;
48438 match response.status().as_u16() {
48439 200u16 => ResponseValue::from_response(response).await,
48440 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48441 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48442 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48443 _ => Err(Error::UnexpectedResponse(response)),
48444 }
48445 }
48446
48447 ///Create Pack
48448 ///
48449 ///Creates a new Pack, essentially registering a new Pack ID. The contents
48450 /// of the Pack will be uploaded separately.
48451 ///
48452 ///
48453 ///Sends a `POST` request to `/packs`
48454 ///
48455 ///Arguments:
48456 /// - `body`: Parameters for creating the Pack.
48457 pub async fn create_pack<'a>(&'a self, body: &'a types::CreatePackRequest) -> Result<ResponseValue<types::CreatePackResponse>, Error<types::CreatePackResponse>> {
48458 let url = format!("{}/packs", self.baseurl,);
48459 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48460 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48461 #[allow(unused_mut)]
48462 let mut request = self
48463 .client
48464 .post(url)
48465 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48466 .json(&body)
48467 .headers(header_map)
48468 .build()?;
48469 let info = OperationInfo {
48470 operation_id: "create_pack",
48471 };
48472 self.pre(&mut request, &info).await?;
48473 let result = self.exec(request, &info).await;
48474 self.post(&result, &info).await?;
48475 let response = result?;
48476 match response.status().as_u16() {
48477 200u16 => ResponseValue::from_response(response).await,
48478 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48479 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48480 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48481 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48482 _ => Err(Error::UnexpectedResponse(response)),
48483 }
48484 }
48485
48486 ///Get a single Pack
48487 ///
48488 ///Returns a single Pack.
48489 ///
48490 ///
48491 ///Sends a `GET` request to `/packs/{packId}`
48492 ///
48493 ///Arguments:
48494 /// - `pack_id`: ID of a Pack
48495 pub async fn get_pack<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::Pack>, Error<types::GetPackResponse>> {
48496 let url = format!("{}/packs/{}", self.baseurl, encode_path(&pack_id.to_string()),);
48497 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48498 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48499 #[allow(unused_mut)]
48500 let mut request = self
48501 .client
48502 .get(url)
48503 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48504 .headers(header_map)
48505 .build()?;
48506 let info = OperationInfo {
48507 operation_id: "get_pack",
48508 };
48509 self.pre(&mut request, &info).await?;
48510 let result = self.exec(request, &info).await;
48511 self.post(&result, &info).await?;
48512 let response = result?;
48513 match response.status().as_u16() {
48514 200u16 => ResponseValue::from_response(response).await,
48515 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48516 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48517 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48518 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48519 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48520 _ => Err(Error::UnexpectedResponse(response)),
48521 }
48522 }
48523
48524 ///Delete Pack
48525 ///
48526 ///Delete a given Pack.
48527 ///
48528 ///
48529 ///Sends a `DELETE` request to `/packs/{packId}`
48530 ///
48531 ///Arguments:
48532 /// - `pack_id`: ID of a Pack
48533 pub async fn delete_pack<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::DeletePackResponse>, Error<types::DeletePackResponse>> {
48534 let url = format!("{}/packs/{}", self.baseurl, encode_path(&pack_id.to_string()),);
48535 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48536 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48537 #[allow(unused_mut)]
48538 let mut request = self
48539 .client
48540 .delete(url)
48541 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48542 .headers(header_map)
48543 .build()?;
48544 let info = OperationInfo {
48545 operation_id: "delete_pack",
48546 };
48547 self.pre(&mut request, &info).await?;
48548 let result = self.exec(request, &info).await;
48549 self.post(&result, &info).await?;
48550 let response = result?;
48551 match response.status().as_u16() {
48552 200u16 => ResponseValue::from_response(response).await,
48553 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48554 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48555 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48556 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48557 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48558 _ => Err(Error::UnexpectedResponse(response)),
48559 }
48560 }
48561
48562 ///Update Pack
48563 ///
48564 ///Update an existing Pack for non-versioned fields.
48565 ///
48566 ///
48567 ///Sends a `PATCH` request to `/packs/{packId}`
48568 ///
48569 ///Arguments:
48570 /// - `pack_id`: ID of a Pack
48571 /// - `body`: Parameters for updating the Pack.
48572 pub async fn update_pack<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::UpdatePackRequest) -> Result<ResponseValue<types::Pack>, Error<types::UpdatePackResponse>> {
48573 let url = format!("{}/packs/{}", self.baseurl, encode_path(&pack_id.to_string()),);
48574 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48575 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48576 #[allow(unused_mut)]
48577 let mut request = self
48578 .client
48579 .patch(url)
48580 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48581 .json(&body)
48582 .headers(header_map)
48583 .build()?;
48584 let info = OperationInfo {
48585 operation_id: "update_pack",
48586 };
48587 self.pre(&mut request, &info).await?;
48588 let result = self.exec(request, &info).await;
48589 self.post(&result, &info).await?;
48590 let response = result?;
48591 match response.status().as_u16() {
48592 200u16 => ResponseValue::from_response(response).await,
48593 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48594 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48595 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48596 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48597 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48598 _ => Err(Error::UnexpectedResponse(response)),
48599 }
48600 }
48601
48602 ///Gets the JSON Schema for Pack configuration
48603 ///
48604 ///Returns a JSON Schema applicable for customizing the pack using Pack
48605 /// configurations.
48606 ///
48607 ///
48608 ///Sends a `GET` request to `/packs/{packId}/configurations/schema`
48609 ///
48610 ///Arguments:
48611 /// - `pack_id`: ID of a Pack
48612 pub async fn get_pack_configuration_schema<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::GetPackConfigurationJsonSchemaResponse>, Error<types::GetPackConfigurationSchemaResponse>> {
48613 let url = format!("{}/packs/{}/configurations/schema", self.baseurl, encode_path(&pack_id.to_string()),);
48614 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48615 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48616 #[allow(unused_mut)]
48617 let mut request = self
48618 .client
48619 .get(url)
48620 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48621 .headers(header_map)
48622 .build()?;
48623 let info = OperationInfo {
48624 operation_id: "get_pack_configuration_schema",
48625 };
48626 self.pre(&mut request, &info).await?;
48627 let result = self.exec(request, &info).await;
48628 self.post(&result, &info).await?;
48629 let response = result?;
48630 match response.status().as_u16() {
48631 200u16 => ResponseValue::from_response(response).await,
48632 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48633 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48634 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48635 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48636 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48637 _ => Err(Error::UnexpectedResponse(response)),
48638 }
48639 }
48640
48641 ///List the versions for a Pack
48642 ///
48643 ///Get the list of versions of a Pack.
48644 ///
48645 ///
48646 ///Sends a `GET` request to `/packs/{packId}/versions`
48647 ///
48648 ///Arguments:
48649 /// - `pack_id`: ID of a Pack
48650 /// - `limit`: Maximum number of results to return in this query.
48651 /// - `page_token`: An opaque token used to fetch the next page of results.
48652 pub async fn list_pack_versions<'a>(&'a self, pack_id: ::std::num::NonZeroU64, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PackVersionList>, Error<types::ListPackVersionsResponse>> {
48653 let url = format!("{}/packs/{}/versions", self.baseurl, encode_path(&pack_id.to_string()),);
48654 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48655 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48656 #[allow(unused_mut)]
48657 let mut request = self
48658 .client
48659 .get(url)
48660 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48661 .query(&progenitor_client::QueryParam::new("limit", &limit))
48662 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48663 .headers(header_map)
48664 .build()?;
48665 let info = OperationInfo {
48666 operation_id: "list_pack_versions",
48667 };
48668 self.pre(&mut request, &info).await?;
48669 let result = self.exec(request, &info).await;
48670 self.post(&result, &info).await?;
48671 let response = result?;
48672 match response.status().as_u16() {
48673 200u16 => ResponseValue::from_response(response).await,
48674 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48675 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48676 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48677 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48678 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48679 _ => Err(Error::UnexpectedResponse(response)),
48680 }
48681 }
48682
48683 ///Get the next valid version for a Pack
48684 ///
48685 ///Get the next valid version based on the proposed metadata.
48686 ///
48687 ///
48688 ///Sends a `POST` request to `/packs/{packId}/nextVersion`
48689 ///
48690 ///Arguments:
48691 /// - `pack_id`: ID of a Pack
48692 /// - `body`
48693 pub async fn get_next_pack_version<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::GetNextPackVersionRequest) -> Result<ResponseValue<types::NextPackVersionInfo>, Error<types::GetNextPackVersionResponse>> {
48694 let url = format!("{}/packs/{}/nextVersion", self.baseurl, encode_path(&pack_id.to_string()),);
48695 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48696 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48697 #[allow(unused_mut)]
48698 let mut request = self
48699 .client
48700 .post(url)
48701 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48702 .json(&body)
48703 .headers(header_map)
48704 .build()?;
48705 let info = OperationInfo {
48706 operation_id: "get_next_pack_version",
48707 };
48708 self.pre(&mut request, &info).await?;
48709 let result = self.exec(request, &info).await;
48710 self.post(&result, &info).await?;
48711 let response = result?;
48712 match response.status().as_u16() {
48713 200u16 => ResponseValue::from_response(response).await,
48714 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48715 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48716 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48717 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48718 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48719 _ => Err(Error::UnexpectedResponse(response)),
48720 }
48721 }
48722
48723 ///Get the difference between two pack versions
48724 ///
48725 ///Gets information about the difference between the specified previous
48726 /// version and next version of a Pack.
48727 ///
48728 ///
48729 ///Sends a `GET` request to
48730 /// `/packs/{packId}/versions/{basePackVersion}/diff/{targetPackVersion}`
48731 ///
48732 ///Arguments:
48733 /// - `pack_id`: ID of a Pack
48734 /// - `base_pack_version`: Semantic version of the previous Pack version.
48735 /// - `target_pack_version`: Semantic version of the new Pack version.
48736 pub async fn get_pack_version_diffs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, base_pack_version: &'a str, target_pack_version: &'a str) -> Result<ResponseValue<types::PackVersionDiffs>, Error<types::GetPackVersionDiffsResponse>> {
48737 let url = format!("{}/packs/{}/versions/{}/diff/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&base_pack_version.to_string()), encode_path(&target_pack_version.to_string()),);
48738 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48739 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48740 #[allow(unused_mut)]
48741 let mut request = self
48742 .client
48743 .get(url)
48744 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48745 .headers(header_map)
48746 .build()?;
48747 let info = OperationInfo {
48748 operation_id: "get_pack_version_diffs",
48749 };
48750 self.pre(&mut request, &info).await?;
48751 let result = self.exec(request, &info).await;
48752 self.post(&result, &info).await?;
48753 let response = result?;
48754 match response.status().as_u16() {
48755 200u16 => ResponseValue::from_response(response).await,
48756 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48757 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48758 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48759 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48760 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48761 _ => Err(Error::UnexpectedResponse(response)),
48762 }
48763 }
48764
48765 ///Register Pack version
48766 ///
48767 ///Registers a new Pack version. This simply returns a signed URL to use
48768 /// for uploading the Pack version definition. Following the completion of
48769 /// the upload, POST to /apis/v1/packs/{packId}/versions/{packVersion}
48770 /// trigger the rest of the creation process.
48771 ///
48772 ///
48773 ///Sends a `POST` request to
48774 /// `/packs/{packId}/versions/{packVersion}/register`
48775 ///
48776 ///Arguments:
48777 /// - `pack_id`: ID of a Pack
48778 /// - `pack_version`: Semantic version of a Pack
48779 /// - `body`: Parameters for registering the Pack.
48780 pub async fn register_pack_version<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_version: &'a str, body: &'a types::RegisterPackVersionRequest) -> Result<ResponseValue<types::PackVersionUploadInfo>, Error<types::RegisterPackVersionResponse>> {
48781 let url = format!("{}/packs/{}/versions/{}/register", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_version.to_string()),);
48782 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48783 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48784 #[allow(unused_mut)]
48785 let mut request = self
48786 .client
48787 .post(url)
48788 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48789 .json(&body)
48790 .headers(header_map)
48791 .build()?;
48792 let info = OperationInfo {
48793 operation_id: "register_pack_version",
48794 };
48795 self.pre(&mut request, &info).await?;
48796 let result = self.exec(request, &info).await;
48797 self.post(&result, &info).await?;
48798 let response = result?;
48799 match response.status().as_u16() {
48800 200u16 => ResponseValue::from_response(response).await,
48801 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48802 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48803 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48804 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48805 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48806 _ => Err(Error::UnexpectedResponse(response)),
48807 }
48808 }
48809
48810 ///Pack version upload complete
48811 ///
48812 ///Note the completion of the upload of a Pack version bundle in order to
48813 /// create that Pack version.
48814 ///
48815 ///
48816 ///Sends a `POST` request to
48817 /// `/packs/{packId}/versions/{packVersion}/uploadComplete`
48818 ///
48819 ///Arguments:
48820 /// - `pack_id`: ID of a Pack
48821 /// - `pack_version`: Semantic version of a Pack
48822 /// - `body`: Parameters for Pack version upload complete.
48823 pub async fn pack_version_upload_complete<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_version: &'a str, body: &'a types::CreatePackVersionRequest) -> Result<ResponseValue<types::CreatePackVersionResponse>, Error<types::PackVersionUploadCompleteResponse>> {
48824 let url = format!("{}/packs/{}/versions/{}/uploadComplete", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_version.to_string()),);
48825 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48826 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48827 #[allow(unused_mut)]
48828 let mut request = self
48829 .client
48830 .post(url)
48831 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48832 .json(&body)
48833 .headers(header_map)
48834 .build()?;
48835 let info = OperationInfo {
48836 operation_id: "pack_version_upload_complete",
48837 };
48838 self.pre(&mut request, &info).await?;
48839 let result = self.exec(request, &info).await;
48840 self.post(&result, &info).await?;
48841 let response = result?;
48842 match response.status().as_u16() {
48843 200u16 => ResponseValue::from_response(response).await,
48844 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48845 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48846 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48847 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48848 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48849 _ => Err(Error::UnexpectedResponse(response)),
48850 }
48851 }
48852
48853 ///List the releases for a Pack
48854 ///
48855 ///Get the list of releases of a Pack.
48856 ///
48857 ///
48858 ///Sends a `GET` request to `/packs/{packId}/releases`
48859 ///
48860 ///Arguments:
48861 /// - `pack_id`: ID of a Pack
48862 /// - `limit`: Maximum number of results to return in this query.
48863 /// - `page_token`: An opaque token used to fetch the next page of results.
48864 pub async fn list_pack_releases<'a>(&'a self, pack_id: ::std::num::NonZeroU64, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PackReleaseList>, Error<types::ListPackReleasesResponse>> {
48865 let url = format!("{}/packs/{}/releases", self.baseurl, encode_path(&pack_id.to_string()),);
48866 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48867 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48868 #[allow(unused_mut)]
48869 let mut request = self
48870 .client
48871 .get(url)
48872 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48873 .query(&progenitor_client::QueryParam::new("limit", &limit))
48874 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
48875 .headers(header_map)
48876 .build()?;
48877 let info = OperationInfo {
48878 operation_id: "list_pack_releases",
48879 };
48880 self.pre(&mut request, &info).await?;
48881 let result = self.exec(request, &info).await;
48882 self.post(&result, &info).await?;
48883 let response = result?;
48884 match response.status().as_u16() {
48885 200u16 => ResponseValue::from_response(response).await,
48886 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48887 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48888 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48889 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48890 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48891 _ => Err(Error::UnexpectedResponse(response)),
48892 }
48893 }
48894
48895 ///Create a new Pack release
48896 ///
48897 ///Creates a new Pack release based on an existing Pack version.
48898 ///
48899 ///
48900 ///Sends a `POST` request to `/packs/{packId}/releases`
48901 ///
48902 ///Arguments:
48903 /// - `pack_id`: ID of a Pack
48904 /// - `body`: Parameters to create the Pack release.
48905 pub async fn create_pack_release<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::CreatePackReleaseRequest) -> Result<ResponseValue<types::PackRelease>, Error<types::CreatePackReleaseResponse>> {
48906 let url = format!("{}/packs/{}/releases", self.baseurl, encode_path(&pack_id.to_string()),);
48907 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48908 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48909 #[allow(unused_mut)]
48910 let mut request = self
48911 .client
48912 .post(url)
48913 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48914 .json(&body)
48915 .headers(header_map)
48916 .build()?;
48917 let info = OperationInfo {
48918 operation_id: "create_pack_release",
48919 };
48920 self.pre(&mut request, &info).await?;
48921 let result = self.exec(request, &info).await;
48922 self.post(&result, &info).await?;
48923 let response = result?;
48924 match response.status().as_u16() {
48925 200u16 => ResponseValue::from_response(response).await,
48926 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48927 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48928 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48929 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48930 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48931 _ => Err(Error::UnexpectedResponse(response)),
48932 }
48933 }
48934
48935 ///Update an existing Pack release
48936 ///
48937 ///Update details of a Pack release.
48938 ///
48939 ///
48940 ///Sends a `PUT` request to `/packs/{packId}/releases/{packReleaseId}`
48941 ///
48942 ///Arguments:
48943 /// - `pack_id`: ID of a Pack
48944 /// - `pack_release_id`: ID of a Pack release
48945 /// - `body`: Parameters to update the Pack release.
48946 pub async fn update_pack_release<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_release_id: ::std::num::NonZeroU64, body: &'a types::UpdatePackReleaseRequest) -> Result<ResponseValue<types::PackRelease>, Error<types::UpdatePackReleaseResponse>> {
48947 let url = format!("{}/packs/{}/releases/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_release_id.to_string()),);
48948 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48949 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48950 #[allow(unused_mut)]
48951 let mut request = self
48952 .client
48953 .put(url)
48954 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48955 .json(&body)
48956 .headers(header_map)
48957 .build()?;
48958 let info = OperationInfo {
48959 operation_id: "update_pack_release",
48960 };
48961 self.pre(&mut request, &info).await?;
48962 let result = self.exec(request, &info).await;
48963 self.post(&result, &info).await?;
48964 let response = result?;
48965 match response.status().as_u16() {
48966 200u16 => ResponseValue::from_response(response).await,
48967 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48968 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48969 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48970 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48971 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
48972 _ => Err(Error::UnexpectedResponse(response)),
48973 }
48974 }
48975
48976 ///Retrieve the OAuth configuration of the Pack
48977 ///
48978 ///Retrieve the OAuth configuration of the Pack for display purpose.
48979 /// Secrets will be returned with masks.
48980 ///
48981 ///
48982 ///Sends a `GET` request to `/packs/{packId}/oauthConfig`
48983 ///
48984 ///Arguments:
48985 /// - `pack_id`: ID of a Pack
48986 pub async fn get_pack_oauth_config<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::PackOauthConfigMetadata>, Error<types::GetPackOauthConfigResponse>> {
48987 let url = format!("{}/packs/{}/oauthConfig", self.baseurl, encode_path(&pack_id.to_string()),);
48988 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
48989 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
48990 #[allow(unused_mut)]
48991 let mut request = self
48992 .client
48993 .get(url)
48994 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
48995 .headers(header_map)
48996 .build()?;
48997 let info = OperationInfo {
48998 operation_id: "get_pack_oauth_config",
48999 };
49000 self.pre(&mut request, &info).await?;
49001 let result = self.exec(request, &info).await;
49002 self.post(&result, &info).await?;
49003 let response = result?;
49004 match response.status().as_u16() {
49005 200u16 => ResponseValue::from_response(response).await,
49006 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49007 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49008 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49009 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49010 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49011 _ => Err(Error::UnexpectedResponse(response)),
49012 }
49013 }
49014
49015 ///Set the OAuth configurations of the Pack
49016 ///
49017 ///Set the OAuth configurations of the Pack, including client id and
49018 /// secret.
49019 ///
49020 ///
49021 ///Sends a `PUT` request to `/packs/{packId}/oauthConfig`
49022 ///
49023 ///Arguments:
49024 /// - `pack_id`: ID of a Pack
49025 /// - `body`: Parameters to set the Pack OAuth configuration.
49026 pub async fn set_pack_oauth_config<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::SetPackOauthConfigRequest) -> Result<ResponseValue<types::PackOauthConfigMetadata>, Error<types::SetPackOauthConfigResponse>> {
49027 let url = format!("{}/packs/{}/oauthConfig", self.baseurl, encode_path(&pack_id.to_string()),);
49028 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49029 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49030 #[allow(unused_mut)]
49031 let mut request = self
49032 .client
49033 .put(url)
49034 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49035 .json(&body)
49036 .headers(header_map)
49037 .build()?;
49038 let info = OperationInfo {
49039 operation_id: "set_pack_oauth_config",
49040 };
49041 self.pre(&mut request, &info).await?;
49042 let result = self.exec(request, &info).await;
49043 self.post(&result, &info).await?;
49044 let response = result?;
49045 match response.status().as_u16() {
49046 200u16 => ResponseValue::from_response(response).await,
49047 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49048 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49049 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49050 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49051 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49052 _ => Err(Error::UnexpectedResponse(response)),
49053 }
49054 }
49055
49056 ///Retrieve the system connection metadata of the Pack
49057 ///
49058 ///Retrieve the system connection metadata of the Pack.
49059 ///
49060 ///
49061 ///Sends a `GET` request to `/packs/{packId}/systemConnection`
49062 ///
49063 ///Arguments:
49064 /// - `pack_id`: ID of a Pack
49065 pub async fn get_pack_system_connection<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::PackSystemConnectionMetadata>, Error<types::GetPackSystemConnectionResponse>> {
49066 let url = format!("{}/packs/{}/systemConnection", self.baseurl, encode_path(&pack_id.to_string()),);
49067 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49068 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49069 #[allow(unused_mut)]
49070 let mut request = self
49071 .client
49072 .get(url)
49073 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49074 .headers(header_map)
49075 .build()?;
49076 let info = OperationInfo {
49077 operation_id: "get_pack_system_connection",
49078 };
49079 self.pre(&mut request, &info).await?;
49080 let result = self.exec(request, &info).await;
49081 self.post(&result, &info).await?;
49082 let response = result?;
49083 match response.status().as_u16() {
49084 200u16 => ResponseValue::from_response(response).await,
49085 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49086 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49087 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49088 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49089 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49090 _ => Err(Error::UnexpectedResponse(response)),
49091 }
49092 }
49093
49094 ///Set the system connection credentials of the Pack
49095 ///
49096 ///Set the system connection credentials of the Pack.
49097 ///
49098 ///
49099 ///Sends a `PUT` request to `/packs/{packId}/systemConnection`
49100 ///
49101 ///Arguments:
49102 /// - `pack_id`: ID of a Pack
49103 /// - `body`: Parameters to set the Pack system connection credentials.
49104 pub async fn set_pack_system_connection<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::SetPackSystemConnectionRequest) -> Result<ResponseValue<types::PackSystemConnectionMetadata>, Error<types::SetPackSystemConnectionResponse>> {
49105 let url = format!("{}/packs/{}/systemConnection", self.baseurl, encode_path(&pack_id.to_string()),);
49106 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49107 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49108 #[allow(unused_mut)]
49109 let mut request = self
49110 .client
49111 .put(url)
49112 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49113 .json(&body)
49114 .headers(header_map)
49115 .build()?;
49116 let info = OperationInfo {
49117 operation_id: "set_pack_system_connection",
49118 };
49119 self.pre(&mut request, &info).await?;
49120 let result = self.exec(request, &info).await;
49121 self.post(&result, &info).await?;
49122 let response = result?;
49123 match response.status().as_u16() {
49124 200u16 => ResponseValue::from_response(response).await,
49125 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49126 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49127 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49128 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49129 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49130 _ => Err(Error::UnexpectedResponse(response)),
49131 }
49132 }
49133
49134 ///Patch the system connection credentials of the Pack
49135 ///
49136 ///Patch the system connection credentials of the Pack.
49137 ///
49138 ///
49139 ///Sends a `PATCH` request to `/packs/{packId}/systemConnection`
49140 ///
49141 ///Arguments:
49142 /// - `pack_id`: ID of a Pack
49143 /// - `body`: Parameters to patch the Pack system connection credentials.
49144 pub async fn patch_pack_system_connection<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::PatchPackSystemConnectionRequest) -> Result<ResponseValue<types::PackSystemConnectionMetadata>, Error<types::PatchPackSystemConnectionResponse>> {
49145 let url = format!("{}/packs/{}/systemConnection", self.baseurl, encode_path(&pack_id.to_string()),);
49146 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49147 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49148 #[allow(unused_mut)]
49149 let mut request = self
49150 .client
49151 .patch(url)
49152 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49153 .json(&body)
49154 .headers(header_map)
49155 .build()?;
49156 let info = OperationInfo {
49157 operation_id: "patch_pack_system_connection",
49158 };
49159 self.pre(&mut request, &info).await?;
49160 let result = self.exec(request, &info).await;
49161 self.post(&result, &info).await?;
49162 let response = result?;
49163 match response.status().as_u16() {
49164 200u16 => ResponseValue::from_response(response).await,
49165 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49166 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49167 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49168 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49169 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49170 _ => Err(Error::UnexpectedResponse(response)),
49171 }
49172 }
49173
49174 ///List permissions for a Pack
49175 ///
49176 ///Get user, workspace, and/or global permissions for a given Pack.
49177 ///
49178 ///
49179 ///Sends a `GET` request to `/packs/{packId}/permissions`
49180 ///
49181 ///Arguments:
49182 /// - `pack_id`: ID of a Pack
49183 pub async fn get_pack_permissions<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::PackPermissionList>, Error<types::GetPackPermissionsResponse>> {
49184 let url = format!("{}/packs/{}/permissions", self.baseurl, encode_path(&pack_id.to_string()),);
49185 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49186 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49187 #[allow(unused_mut)]
49188 let mut request = self
49189 .client
49190 .get(url)
49191 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49192 .headers(header_map)
49193 .build()?;
49194 let info = OperationInfo {
49195 operation_id: "get_pack_permissions",
49196 };
49197 self.pre(&mut request, &info).await?;
49198 let result = self.exec(request, &info).await;
49199 self.post(&result, &info).await?;
49200 let response = result?;
49201 match response.status().as_u16() {
49202 200u16 => ResponseValue::from_response(response).await,
49203 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49204 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49205 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49206 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49207 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49208 _ => Err(Error::UnexpectedResponse(response)),
49209 }
49210 }
49211
49212 ///Add a permission for Pack
49213 ///
49214 ///Create or modify user, workspace, or global permissions for a given
49215 /// Pack.
49216 ///
49217 ///
49218 ///Sends a `POST` request to `/packs/{packId}/permissions`
49219 ///
49220 ///Arguments:
49221 /// - `pack_id`: ID of a Pack
49222 /// - `body`: Parameters for creating/updating Pack permissions.
49223 pub async fn add_pack_permission<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::AddPackPermissionRequest) -> Result<ResponseValue<types::AddPackPermissionResponse>, Error<types::AddPackPermissionResponse>> {
49224 let url = format!("{}/packs/{}/permissions", self.baseurl, encode_path(&pack_id.to_string()),);
49225 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49226 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49227 #[allow(unused_mut)]
49228 let mut request = self
49229 .client
49230 .post(url)
49231 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49232 .json(&body)
49233 .headers(header_map)
49234 .build()?;
49235 let info = OperationInfo {
49236 operation_id: "add_pack_permission",
49237 };
49238 self.pre(&mut request, &info).await?;
49239 let result = self.exec(request, &info).await;
49240 self.post(&result, &info).await?;
49241 let response = result?;
49242 match response.status().as_u16() {
49243 200u16 => ResponseValue::from_response(response).await,
49244 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49245 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49246 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49247 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49248 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49249 _ => Err(Error::UnexpectedResponse(response)),
49250 }
49251 }
49252
49253 ///Delete a user's own permissions for Pack
49254 ///
49255 ///Delete a user's own permissions for a given Pack.
49256 ///
49257 ///
49258 ///Sends a `DELETE` request to `/packs/{packId}/permissions`
49259 ///
49260 ///Arguments:
49261 /// - `pack_id`: ID of a Pack
49262 pub async fn delete_user_pack_permission<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::DeleteUserPackPermissionsResponse>, Error<types::DeleteUserPackPermissionResponse>> {
49263 let url = format!("{}/packs/{}/permissions", self.baseurl, encode_path(&pack_id.to_string()),);
49264 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49265 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49266 #[allow(unused_mut)]
49267 let mut request = self
49268 .client
49269 .delete(url)
49270 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49271 .headers(header_map)
49272 .build()?;
49273 let info = OperationInfo {
49274 operation_id: "delete_user_pack_permission",
49275 };
49276 self.pre(&mut request, &info).await?;
49277 let result = self.exec(request, &info).await;
49278 self.post(&result, &info).await?;
49279 let response = result?;
49280 match response.status().as_u16() {
49281 200u16 => ResponseValue::from_response(response).await,
49282 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49283 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49284 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49285 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49286 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49287 _ => Err(Error::UnexpectedResponse(response)),
49288 }
49289 }
49290
49291 ///Delete a permission for Pack
49292 ///
49293 ///Delete user, workspace, or global permissions for a given Pack.
49294 ///
49295 ///
49296 ///Sends a `DELETE` request to `/packs/{packId}/permissions/{permissionId}`
49297 ///
49298 ///Arguments:
49299 /// - `pack_id`: ID of a Pack
49300 /// - `permission_id`: ID of a permission on a doc.
49301 pub async fn delete_pack_permission<'a>(&'a self, pack_id: ::std::num::NonZeroU64, permission_id: &'a str) -> Result<ResponseValue<types::DeletePackPermissionResponse>, Error<types::DeletePackPermissionResponse>> {
49302 let url = format!("{}/packs/{}/permissions/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&permission_id.to_string()),);
49303 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49304 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49305 #[allow(unused_mut)]
49306 let mut request = self
49307 .client
49308 .delete(url)
49309 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49310 .headers(header_map)
49311 .build()?;
49312 let info = OperationInfo {
49313 operation_id: "delete_pack_permission",
49314 };
49315 self.pre(&mut request, &info).await?;
49316 let result = self.exec(request, &info).await;
49317 self.post(&result, &info).await?;
49318 let response = result?;
49319 match response.status().as_u16() {
49320 200u16 => ResponseValue::from_response(response).await,
49321 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49322 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49323 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49324 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49325 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49326 _ => Err(Error::UnexpectedResponse(response)),
49327 }
49328 }
49329
49330 ///List pending Pack invitations for the current user
49331 ///
49332 ///Get pending Pack invitations for the authenticated user.
49333 ///
49334 ///
49335 ///Sends a `GET` request to `/packs/invitations`
49336 ///
49337 ///Arguments:
49338 /// - `limit`: Maximum number of results to return in this query.
49339 /// - `page_token`: An opaque token used to fetch the next page of results.
49340 pub async fn list_user_pack_invitations<'a>(&'a self, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PackInvitationWithPackList>, Error<types::ListUserPackInvitationsResponse>> {
49341 let url = format!("{}/packs/invitations", self.baseurl,);
49342 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49343 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49344 #[allow(unused_mut)]
49345 let mut request = self
49346 .client
49347 .get(url)
49348 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49349 .query(&progenitor_client::QueryParam::new("limit", &limit))
49350 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
49351 .headers(header_map)
49352 .build()?;
49353 let info = OperationInfo {
49354 operation_id: "list_user_pack_invitations",
49355 };
49356 self.pre(&mut request, &info).await?;
49357 let result = self.exec(request, &info).await;
49358 self.post(&result, &info).await?;
49359 let response = result?;
49360 match response.status().as_u16() {
49361 200u16 => ResponseValue::from_response(response).await,
49362 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49363 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49364 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49365 _ => Err(Error::UnexpectedResponse(response)),
49366 }
49367 }
49368
49369 ///List invitations for a Pack
49370 ///
49371 ///Get pending invitations for a given Pack.
49372 ///
49373 ///
49374 ///Sends a `GET` request to `/packs/{packId}/invitations`
49375 ///
49376 ///Arguments:
49377 /// - `pack_id`: ID of a Pack
49378 /// - `limit`: Maximum number of results to return in this query.
49379 /// - `page_token`: An opaque token used to fetch the next page of results.
49380 pub async fn list_pack_invitations<'a>(&'a self, pack_id: ::std::num::NonZeroU64, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::PackInvitationList>, Error<types::ListPackInvitationsResponse>> {
49381 let url = format!("{}/packs/{}/invitations", self.baseurl, encode_path(&pack_id.to_string()),);
49382 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49383 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49384 #[allow(unused_mut)]
49385 let mut request = self
49386 .client
49387 .get(url)
49388 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49389 .query(&progenitor_client::QueryParam::new("limit", &limit))
49390 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
49391 .headers(header_map)
49392 .build()?;
49393 let info = OperationInfo {
49394 operation_id: "list_pack_invitations",
49395 };
49396 self.pre(&mut request, &info).await?;
49397 let result = self.exec(request, &info).await;
49398 self.post(&result, &info).await?;
49399 let response = result?;
49400 match response.status().as_u16() {
49401 200u16 => ResponseValue::from_response(response).await,
49402 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49403 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49404 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49405 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49406 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49407 _ => Err(Error::UnexpectedResponse(response)),
49408 }
49409 }
49410
49411 ///Create an invitation for Pack
49412 ///
49413 ///Create an invitation for a user to access a Pack.
49414 ///
49415 ///
49416 ///Sends a `POST` request to `/packs/{packId}/invitations`
49417 ///
49418 ///Arguments:
49419 /// - `pack_id`: ID of a Pack
49420 /// - `body`: Parameters for creating Pack invitation.
49421 pub async fn create_pack_invitation<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::CreatePackInvitationRequest) -> Result<ResponseValue<types::CreatePackInvitationResponse>, Error<types::CreatePackInvitationResponse>> {
49422 let url = format!("{}/packs/{}/invitations", self.baseurl, encode_path(&pack_id.to_string()),);
49423 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49424 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49425 #[allow(unused_mut)]
49426 let mut request = self
49427 .client
49428 .post(url)
49429 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49430 .json(&body)
49431 .headers(header_map)
49432 .build()?;
49433 let info = OperationInfo {
49434 operation_id: "create_pack_invitation",
49435 };
49436 self.pre(&mut request, &info).await?;
49437 let result = self.exec(request, &info).await;
49438 self.post(&result, &info).await?;
49439 let response = result?;
49440 match response.status().as_u16() {
49441 200u16 => ResponseValue::from_response(response).await,
49442 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49443 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49444 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49445 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49446 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49447 _ => Err(Error::UnexpectedResponse(response)),
49448 }
49449 }
49450
49451 ///Update an invitation for Pack
49452 ///
49453 ///Update the access level of an existing Pack invitation.
49454 ///
49455 ///
49456 ///Sends a `PUT` request to `/packs/{packId}/invitations/{invitationId}`
49457 ///
49458 ///Arguments:
49459 /// - `pack_id`: ID of a Pack
49460 /// - `invitation_id`: ID of a Pack invitation
49461 /// - `body`: Parameters for updating Pack invitation.
49462 pub async fn update_pack_invitation<'a>(&'a self, pack_id: ::std::num::NonZeroU64, invitation_id: &'a ::uuid::Uuid, body: &'a types::UpdatePackInvitationRequest) -> Result<ResponseValue<types::UpdatePackInvitationResponse>, Error<types::UpdatePackInvitationResponse>> {
49463 let url = format!("{}/packs/{}/invitations/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&invitation_id.to_string()),);
49464 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49465 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49466 #[allow(unused_mut)]
49467 let mut request = self
49468 .client
49469 .put(url)
49470 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49471 .json(&body)
49472 .headers(header_map)
49473 .build()?;
49474 let info = OperationInfo {
49475 operation_id: "update_pack_invitation",
49476 };
49477 self.pre(&mut request, &info).await?;
49478 let result = self.exec(request, &info).await;
49479 self.post(&result, &info).await?;
49480 let response = result?;
49481 match response.status().as_u16() {
49482 200u16 => ResponseValue::from_response(response).await,
49483 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49484 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49485 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49486 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49487 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49488 _ => Err(Error::UnexpectedResponse(response)),
49489 }
49490 }
49491
49492 ///Revoke an invitation for Pack
49493 ///
49494 ///Revoke a pending Pack invitation.
49495 ///
49496 ///
49497 ///Sends a `DELETE` request to `/packs/{packId}/invitations/{invitationId}`
49498 ///
49499 ///Arguments:
49500 /// - `pack_id`: ID of a Pack
49501 /// - `invitation_id`: ID of a Pack invitation
49502 pub async fn delete_pack_invitation<'a>(&'a self, pack_id: ::std::num::NonZeroU64, invitation_id: &'a ::uuid::Uuid) -> Result<ResponseValue<types::DeletePackInvitationResponse>, Error<types::DeletePackInvitationResponse>> {
49503 let url = format!("{}/packs/{}/invitations/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&invitation_id.to_string()),);
49504 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49505 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49506 #[allow(unused_mut)]
49507 let mut request = self
49508 .client
49509 .delete(url)
49510 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49511 .headers(header_map)
49512 .build()?;
49513 let info = OperationInfo {
49514 operation_id: "delete_pack_invitation",
49515 };
49516 self.pre(&mut request, &info).await?;
49517 let result = self.exec(request, &info).await;
49518 self.post(&result, &info).await?;
49519 let response = result?;
49520 match response.status().as_u16() {
49521 200u16 => ResponseValue::from_response(response).await,
49522 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49523 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49524 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49525 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49526 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49527 _ => Err(Error::UnexpectedResponse(response)),
49528 }
49529 }
49530
49531 ///Reply to a Pack invitation
49532 ///
49533 ///Reply to a Pack invitation (accept or reject). Requires authentication
49534 /// as the invited user.
49535 ///
49536 ///
49537 ///Sends a `POST` request to `/packs/invitations/{invitationId}/reply`
49538 ///
49539 ///Arguments:
49540 /// - `invitation_id`: ID of a Pack invitation
49541 /// - `body`: Parameters for replying to Pack invitation.
49542 pub async fn reply_to_pack_invitation<'a>(&'a self, invitation_id: &'a ::uuid::Uuid, body: &'a types::HandlePackInvitationRequest) -> Result<ResponseValue<types::HandlePackInvitationResponse>, Error<types::ReplyToPackInvitationResponse>> {
49543 let url = format!("{}/packs/invitations/{}/reply", self.baseurl, encode_path(&invitation_id.to_string()),);
49544 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49545 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49546 #[allow(unused_mut)]
49547 let mut request = self
49548 .client
49549 .post(url)
49550 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49551 .json(&body)
49552 .headers(header_map)
49553 .build()?;
49554 let info = OperationInfo {
49555 operation_id: "reply_to_pack_invitation",
49556 };
49557 self.pre(&mut request, &info).await?;
49558 let result = self.exec(request, &info).await;
49559 self.post(&result, &info).await?;
49560 let response = result?;
49561 match response.status().as_u16() {
49562 200u16 => ResponseValue::from_response(response).await,
49563 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49564 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49565 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49566 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49567 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49568 _ => Err(Error::UnexpectedResponse(response)),
49569 }
49570 }
49571
49572 ///List makers for Pack
49573 ///
49574 ///List makers for a given pack.
49575 ///
49576 ///
49577 ///Sends a `GET` request to `/packs/{packId}/makers`
49578 ///
49579 ///Arguments:
49580 /// - `pack_id`: ID of a Pack
49581 pub async fn list_pack_makers<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::ListPackMakersResponse>, Error<types::ListPackMakersResponse>> {
49582 let url = format!("{}/packs/{}/makers", self.baseurl, encode_path(&pack_id.to_string()),);
49583 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49584 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49585 #[allow(unused_mut)]
49586 let mut request = self
49587 .client
49588 .get(url)
49589 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49590 .headers(header_map)
49591 .build()?;
49592 let info = OperationInfo {
49593 operation_id: "list_pack_makers",
49594 };
49595 self.pre(&mut request, &info).await?;
49596 let result = self.exec(request, &info).await;
49597 self.post(&result, &info).await?;
49598 let response = result?;
49599 match response.status().as_u16() {
49600 200u16 => ResponseValue::from_response(response).await,
49601 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49602 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49603 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49604 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49605 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49606 _ => Err(Error::UnexpectedResponse(response)),
49607 }
49608 }
49609
49610 ///Add a maker for Pack
49611 ///
49612 ///Set a maker for a given Pack. Used to display makers for a pack in the
49613 /// corresponding packs page.
49614 ///
49615 ///
49616 ///Sends a `POST` request to `/packs/{packId}/maker`
49617 ///
49618 ///Arguments:
49619 /// - `pack_id`: ID of a Pack
49620 /// - `body`: Payload for adding a Pack maker.
49621 pub async fn add_pack_maker<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::AddPackMakerRequest) -> Result<ResponseValue<types::AddPackMakerResponse>, Error<types::AddPackMakerResponse>> {
49622 let url = format!("{}/packs/{}/maker", self.baseurl, encode_path(&pack_id.to_string()),);
49623 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49624 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49625 #[allow(unused_mut)]
49626 let mut request = self
49627 .client
49628 .post(url)
49629 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49630 .json(&body)
49631 .headers(header_map)
49632 .build()?;
49633 let info = OperationInfo {
49634 operation_id: "add_pack_maker",
49635 };
49636 self.pre(&mut request, &info).await?;
49637 let result = self.exec(request, &info).await;
49638 self.post(&result, &info).await?;
49639 let response = result?;
49640 match response.status().as_u16() {
49641 200u16 => ResponseValue::from_response(response).await,
49642 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49643 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49644 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49645 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49646 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49647 _ => Err(Error::UnexpectedResponse(response)),
49648 }
49649 }
49650
49651 ///Delete a maker for Pack
49652 ///
49653 ///Delete a maker for a given Pack, who will not be displayed in the
49654 /// corresponding packs page.
49655 ///
49656 ///
49657 ///Sends a `DELETE` request to `/packs/{packId}/maker/{loginId}`
49658 ///
49659 ///Arguments:
49660 /// - `pack_id`: ID of a Pack
49661 /// - `login_id`: Email of a Coda user.
49662 pub async fn delete_pack_maker<'a>(&'a self, pack_id: ::std::num::NonZeroU64, login_id: &'a str) -> Result<ResponseValue<types::DeletePackMakerResponse>, Error<types::DeletePackMakerResponse>> {
49663 let url = format!("{}/packs/{}/maker/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&login_id.to_string()),);
49664 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49665 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49666 #[allow(unused_mut)]
49667 let mut request = self
49668 .client
49669 .delete(url)
49670 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49671 .headers(header_map)
49672 .build()?;
49673 let info = OperationInfo {
49674 operation_id: "delete_pack_maker",
49675 };
49676 self.pre(&mut request, &info).await?;
49677 let result = self.exec(request, &info).await;
49678 self.post(&result, &info).await?;
49679 let response = result?;
49680 match response.status().as_u16() {
49681 200u16 => ResponseValue::from_response(response).await,
49682 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49683 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49684 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49685 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49686 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49687 _ => Err(Error::UnexpectedResponse(response)),
49688 }
49689 }
49690
49691 ///List categories for Pack
49692 ///
49693 ///List publishing categories for a given pack.
49694 ///
49695 ///
49696 ///Sends a `GET` request to `/packs/{packId}/categories`
49697 ///
49698 ///Arguments:
49699 /// - `pack_id`: ID of a Pack
49700 pub async fn list_pack_categories<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::ListPackCategoriesResponse>, Error<types::ListPackCategoriesResponse>> {
49701 let url = format!("{}/packs/{}/categories", self.baseurl, encode_path(&pack_id.to_string()),);
49702 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49703 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49704 #[allow(unused_mut)]
49705 let mut request = self
49706 .client
49707 .get(url)
49708 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49709 .headers(header_map)
49710 .build()?;
49711 let info = OperationInfo {
49712 operation_id: "list_pack_categories",
49713 };
49714 self.pre(&mut request, &info).await?;
49715 let result = self.exec(request, &info).await;
49716 self.post(&result, &info).await?;
49717 let response = result?;
49718 match response.status().as_u16() {
49719 200u16 => ResponseValue::from_response(response).await,
49720 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49721 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49722 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49723 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49724 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49725 _ => Err(Error::UnexpectedResponse(response)),
49726 }
49727 }
49728
49729 ///Add a category for Pack
49730 ///
49731 ///Add a publishing category for a given pack.
49732 ///
49733 ///
49734 ///Sends a `POST` request to `/packs/{packId}/category`
49735 ///
49736 ///Arguments:
49737 /// - `pack_id`: ID of a Pack
49738 /// - `body`: Payload for adding a Pack category.
49739 pub async fn add_pack_category<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::AddPackCategoryRequest) -> Result<ResponseValue<types::AddPackCategoryResponse>, Error<types::AddPackCategoryResponse>> {
49740 let url = format!("{}/packs/{}/category", self.baseurl, encode_path(&pack_id.to_string()),);
49741 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49742 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49743 #[allow(unused_mut)]
49744 let mut request = self
49745 .client
49746 .post(url)
49747 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49748 .json(&body)
49749 .headers(header_map)
49750 .build()?;
49751 let info = OperationInfo {
49752 operation_id: "add_pack_category",
49753 };
49754 self.pre(&mut request, &info).await?;
49755 let result = self.exec(request, &info).await;
49756 self.post(&result, &info).await?;
49757 let response = result?;
49758 match response.status().as_u16() {
49759 200u16 => ResponseValue::from_response(response).await,
49760 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49761 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49762 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49763 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49764 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49765 _ => Err(Error::UnexpectedResponse(response)),
49766 }
49767 }
49768
49769 ///Delete a category for Pack
49770 ///
49771 ///Delete a publishing category for a given pack.
49772 ///
49773 ///
49774 ///Sends a `DELETE` request to `/packs/{packId}/category/{categoryName}`
49775 ///
49776 ///Arguments:
49777 /// - `pack_id`: ID of a Pack
49778 /// - `category_name`: Name of a publishing category
49779 pub async fn delete_pack_category<'a>(&'a self, pack_id: ::std::num::NonZeroU64, category_name: &'a str) -> Result<ResponseValue<types::DeletePackCategoryResponse>, Error<types::DeletePackCategoryResponse>> {
49780 let url = format!("{}/packs/{}/category/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&category_name.to_string()),);
49781 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49782 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49783 #[allow(unused_mut)]
49784 let mut request = self
49785 .client
49786 .delete(url)
49787 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49788 .headers(header_map)
49789 .build()?;
49790 let info = OperationInfo {
49791 operation_id: "delete_pack_category",
49792 };
49793 self.pre(&mut request, &info).await?;
49794 let result = self.exec(request, &info).await;
49795 self.post(&result, &info).await?;
49796 let response = result?;
49797 match response.status().as_u16() {
49798 200u16 => ResponseValue::from_response(response).await,
49799 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49800 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49801 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49802 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49803 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49804 _ => Err(Error::UnexpectedResponse(response)),
49805 }
49806 }
49807
49808 ///Upload a Pack asset
49809 ///
49810 ///Request a signed s3 URL to upload your Pack asset.
49811 ///
49812 ///
49813 ///Sends a `POST` request to `/packs/{packId}/uploadAsset`
49814 ///
49815 ///Arguments:
49816 /// - `pack_id`: ID of a Pack
49817 /// - `body`: Parameters to specify the asset being uploaded.
49818 pub async fn upload_pack_asset<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::UploadPackAssetRequest) -> Result<ResponseValue<types::PackAssetUploadInfo>, Error<types::UploadPackAssetResponse>> {
49819 let url = format!("{}/packs/{}/uploadAsset", self.baseurl, encode_path(&pack_id.to_string()),);
49820 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49821 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49822 #[allow(unused_mut)]
49823 let mut request = self
49824 .client
49825 .post(url)
49826 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49827 .json(&body)
49828 .headers(header_map)
49829 .build()?;
49830 let info = OperationInfo {
49831 operation_id: "upload_pack_asset",
49832 };
49833 self.pre(&mut request, &info).await?;
49834 let result = self.exec(request, &info).await;
49835 self.post(&result, &info).await?;
49836 let response = result?;
49837 match response.status().as_u16() {
49838 200u16 => ResponseValue::from_response(response).await,
49839 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49840 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49841 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49842 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49843 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49844 _ => Err(Error::UnexpectedResponse(response)),
49845 }
49846 }
49847
49848 ///Upload Pack source code
49849 ///
49850 ///Request a signed s3 URL to upload your Pack source code.
49851 ///
49852 ///
49853 ///Sends a `POST` request to `/packs/{packId}/uploadSourceCode`
49854 ///
49855 ///Arguments:
49856 /// - `pack_id`: ID of a Pack
49857 /// - `body`: Parameters to specify the source code being uploaded.
49858 pub async fn upload_pack_source_code<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::UploadPackSourceCodeRequest) -> Result<ResponseValue<types::PackSourceCodeUploadInfo>, Error<types::UploadPackSourceCodeResponse>> {
49859 let url = format!("{}/packs/{}/uploadSourceCode", self.baseurl, encode_path(&pack_id.to_string()),);
49860 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49861 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49862 #[allow(unused_mut)]
49863 let mut request = self
49864 .client
49865 .post(url)
49866 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49867 .json(&body)
49868 .headers(header_map)
49869 .build()?;
49870 let info = OperationInfo {
49871 operation_id: "upload_pack_source_code",
49872 };
49873 self.pre(&mut request, &info).await?;
49874 let result = self.exec(request, &info).await;
49875 self.post(&result, &info).await?;
49876 let response = result?;
49877 match response.status().as_u16() {
49878 200u16 => ResponseValue::from_response(response).await,
49879 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49880 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49881 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49882 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49883 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49884 _ => Err(Error::UnexpectedResponse(response)),
49885 }
49886 }
49887
49888 ///Pack asset upload complete
49889 ///
49890 ///Note the completion of the upload of a Pack asset.
49891 ///
49892 ///
49893 ///Sends a `POST` request to
49894 /// `/packs/{packId}/assets/{packAssetId}/assetType/{packAssetType}/
49895 /// uploadComplete`
49896 ///
49897 ///Arguments:
49898 /// - `pack_id`: ID of a Pack
49899 /// - `pack_asset_id`: Unique identifier for a Pack asset.
49900 /// - `pack_asset_type`: Pack asset type.
49901 pub async fn pack_asset_upload_complete<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_asset_id: &'a str, pack_asset_type: types::PackAssetType) -> Result<ResponseValue<types::PackAssetUploadCompleteResponse>, Error<types::PackAssetUploadCompleteResponse>> {
49902 let url = format!("{}/packs/{}/assets/{}/assetType/{}/uploadComplete", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_asset_id.to_string()), encode_path(&pack_asset_type.to_string()),);
49903 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49904 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49905 #[allow(unused_mut)]
49906 let mut request = self
49907 .client
49908 .post(url)
49909 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49910 .headers(header_map)
49911 .build()?;
49912 let info = OperationInfo {
49913 operation_id: "pack_asset_upload_complete",
49914 };
49915 self.pre(&mut request, &info).await?;
49916 let result = self.exec(request, &info).await;
49917 self.post(&result, &info).await?;
49918 let response = result?;
49919 match response.status().as_u16() {
49920 200u16 => ResponseValue::from_response(response).await,
49921 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49922 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49923 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49924 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49925 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49926 _ => Err(Error::UnexpectedResponse(response)),
49927 }
49928 }
49929
49930 ///Pack source code upload complete
49931 ///
49932 ///Note the completion of the upload of a Pack source code.
49933 ///
49934 ///
49935 ///Sends a `POST` request to
49936 /// `/packs/{packId}/versions/{packVersion}/sourceCode/uploadComplete`
49937 ///
49938 ///Arguments:
49939 /// - `pack_id`: ID of a Pack
49940 /// - `pack_version`: Semantic version of a Pack
49941 /// - `body`: Parameters to specify the source code being uploaded.
49942 pub async fn pack_source_code_upload_complete<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_version: &'a str, body: &'a types::PackSourceCodeUploadCompleteRequest) -> Result<ResponseValue<types::PackSourceCodeUploadCompleteResponse>, Error<types::PackSourceCodeUploadCompleteResponse>> {
49943 let url = format!("{}/packs/{}/versions/{}/sourceCode/uploadComplete", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_version.to_string()),);
49944 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49945 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49946 #[allow(unused_mut)]
49947 let mut request = self
49948 .client
49949 .post(url)
49950 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49951 .json(&body)
49952 .headers(header_map)
49953 .build()?;
49954 let info = OperationInfo {
49955 operation_id: "pack_source_code_upload_complete",
49956 };
49957 self.pre(&mut request, &info).await?;
49958 let result = self.exec(request, &info).await;
49959 self.post(&result, &info).await?;
49960 let response = result?;
49961 match response.status().as_u16() {
49962 200u16 => ResponseValue::from_response(response).await,
49963 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49964 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49965 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49966 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49967 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
49968 _ => Err(Error::UnexpectedResponse(response)),
49969 }
49970 }
49971
49972 ///get the source code for a Pack version
49973 ///
49974 ///Get temporary links used to download the source code for the given
49975 /// packId and version
49976 ///
49977 ///
49978 ///Sends a `GET` request to
49979 /// `/packs/{packId}/versions/{packVersion}/sourceCode`
49980 ///
49981 ///Arguments:
49982 /// - `pack_id`: ID of a Pack
49983 /// - `pack_version`: Semantic version of a Pack
49984 pub async fn get_pack_source_code<'a>(&'a self, pack_id: ::std::num::NonZeroU64, pack_version: &'a str) -> Result<ResponseValue<types::PackSourceCodeInfo>, Error<types::GetPackSourceCodeResponse>> {
49985 let url = format!("{}/packs/{}/versions/{}/sourceCode", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&pack_version.to_string()),);
49986 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
49987 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
49988 #[allow(unused_mut)]
49989 let mut request = self
49990 .client
49991 .get(url)
49992 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
49993 .headers(header_map)
49994 .build()?;
49995 let info = OperationInfo {
49996 operation_id: "get_pack_source_code",
49997 };
49998 self.pre(&mut request, &info).await?;
49999 let result = self.exec(request, &info).await;
50000 self.post(&result, &info).await?;
50001 let response = result?;
50002 match response.status().as_u16() {
50003 200u16 => ResponseValue::from_response(response).await,
50004 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50005 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50006 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50007 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50008 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50009 _ => Err(Error::UnexpectedResponse(response)),
50010 }
50011 }
50012
50013 ///List the Pack listings accessible to a user
50014 ///
50015 ///Get listings of public Packs and Packs created by you.
50016 ///
50017 ///
50018 ///Sends a `GET` request to `/packs/listings`
50019 ///
50020 ///Arguments:
50021 /// - `certified_agents_only`: Only include Packs that are certified for
50022 /// agent use. Depending on server configuration, may also include Packs
50023 /// that the user is an admin of.
50024 ///
50025 /// - `direction`: Direction to sort results in.
50026 /// - `exclude_individual_acls`: Do not include Packs that are only shared
50027 /// with the user individually.
50028 /// - `exclude_public_packs`: Only get Packs shared with users/workspaces,
50029 /// not publicly.
50030 /// - `exclude_workspace_acls`: Do not include Packs that are only shared
50031 /// with workspaces.
50032 /// - `install_context`: Type of installation context for which Pack
50033 /// information is being requested.
50034 /// - `limit`: Maximum number of results to return in this query.
50035 /// - `only_workspace_id`: Use only this workspace (not all of a user's
50036 /// workspaces) to check for Packs shared via workspace ACL.
50037 /// - `order_by`: Deprecated: use sortBy instead.
50038 /// - `pack_access_types`: Pack access types.
50039 /// - `pack_entrypoint`: Entrypoint for which this pack call is being made.
50040 /// Used to filter non relevant packs
50041 /// - `pack_ids`: Which Pack IDs to fetch.
50042 /// - `page_token`: An opaque token used to fetch the next page of results.
50043 /// - `parent_workspace_ids`: Filter to only Packs whose parent workspace is
50044 /// one of the given IDs.
50045 /// - `sort_by`: Specify a sort order for the returned Pack listings
50046 /// returned.
50047 pub async fn list_pack_listings<'a>(&'a self, certified_agents_only: Option<bool>, direction: Option<types::SortDirection>, exclude_individual_acls: Option<bool>, exclude_public_packs: Option<bool>, exclude_workspace_acls: Option<bool>, install_context: Option<types::PackListingInstallContextType>, limit: Option<::std::num::NonZeroU64>, only_workspace_id: Option<&'a str>, order_by: Option<types::PackListingsSortBy>, pack_access_types: Option<&'a types::PackAccessTypes>, pack_entrypoint: Option<types::PackEntrypoint>, pack_ids: Option<&'a ::std::vec::Vec<i64>>, page_token: Option<&'a str>, parent_workspace_ids: Option<&'a ::std::vec::Vec<::std::string::String>>, sort_by: Option<types::PackListingsSortBy>) -> Result<ResponseValue<types::PackListingList>, Error<types::ListPackListingsResponse>> {
50048 let url = format!("{}/packs/listings", self.baseurl,);
50049 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50050 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50051 #[allow(unused_mut)]
50052 let mut request = self
50053 .client
50054 .get(url)
50055 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50056 .query(&progenitor_client::QueryParam::new("certifiedAgentsOnly", &certified_agents_only))
50057 .query(&progenitor_client::QueryParam::new("direction", &direction))
50058 .query(&progenitor_client::QueryParam::new("excludeIndividualAcls", &exclude_individual_acls))
50059 .query(&progenitor_client::QueryParam::new("excludePublicPacks", &exclude_public_packs))
50060 .query(&progenitor_client::QueryParam::new("excludeWorkspaceAcls", &exclude_workspace_acls))
50061 .query(&progenitor_client::QueryParam::new("installContext", &install_context))
50062 .query(&progenitor_client::QueryParam::new("limit", &limit))
50063 .query(&progenitor_client::QueryParam::new("onlyWorkspaceId", &only_workspace_id))
50064 .query(&progenitor_client::QueryParam::new("orderBy", &order_by))
50065 .query(&progenitor_client::QueryParam::new("packAccessTypes", &pack_access_types))
50066 .query(&progenitor_client::QueryParam::new("packEntrypoint", &pack_entrypoint))
50067 .query(&progenitor_client::QueryParam::new("packIds", &pack_ids))
50068 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50069 .query(&progenitor_client::QueryParam::new("parentWorkspaceIds", &parent_workspace_ids))
50070 .query(&progenitor_client::QueryParam::new("sortBy", &sort_by))
50071 .headers(header_map)
50072 .build()?;
50073 let info = OperationInfo {
50074 operation_id: "list_pack_listings",
50075 };
50076 self.pre(&mut request, &info).await?;
50077 let result = self.exec(request, &info).await;
50078 self.post(&result, &info).await?;
50079 let response = result?;
50080 match response.status().as_u16() {
50081 200u16 => ResponseValue::from_response(response).await,
50082 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50083 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50084 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50085 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50086 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50087 _ => Err(Error::UnexpectedResponse(response)),
50088 }
50089 }
50090
50091 ///Get detailed listing information for a Pack
50092 ///
50093 ///Get detailed listing information for a Pack.
50094 ///
50095 ///
50096 ///Sends a `GET` request to `/packs/{packId}/listing`
50097 ///
50098 ///Arguments:
50099 /// - `pack_id`: ID of a Pack
50100 /// - `doc_id`: ID of the target document for checking installation
50101 /// privileges
50102 /// - `ingestion_id`: ID of the target ingestion for checking limit settings
50103 /// - `install_context`: Type of installation context for which Pack
50104 /// information is being requested.
50105 /// - `release_channel`: Release channel for which Pack information is being
50106 /// requested.
50107 /// - `workspace_id`: ID of the target workspace (if applicable) for
50108 /// checking installation privileges.
50109 pub async fn get_pack_listing<'a>(&'a self, pack_id: ::std::num::NonZeroU64, doc_id: Option<&'a str>, ingestion_id: Option<&'a str>, install_context: Option<types::PackListingInstallContextType>, release_channel: Option<types::IngestionPackReleaseChannel>, workspace_id: Option<&'a str>) -> Result<ResponseValue<types::PackListingDetail>, Error<types::GetPackListingResponse>> {
50110 let url = format!("{}/packs/{}/listing", self.baseurl, encode_path(&pack_id.to_string()),);
50111 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50112 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50113 #[allow(unused_mut)]
50114 let mut request = self
50115 .client
50116 .get(url)
50117 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50118 .query(&progenitor_client::QueryParam::new("docId", &doc_id))
50119 .query(&progenitor_client::QueryParam::new("ingestionId", &ingestion_id))
50120 .query(&progenitor_client::QueryParam::new("installContext", &install_context))
50121 .query(&progenitor_client::QueryParam::new("releaseChannel", &release_channel))
50122 .query(&progenitor_client::QueryParam::new("workspaceId", &workspace_id))
50123 .headers(header_map)
50124 .build()?;
50125 let info = OperationInfo {
50126 operation_id: "get_pack_listing",
50127 };
50128 self.pre(&mut request, &info).await?;
50129 let result = self.exec(request, &info).await;
50130 self.post(&result, &info).await?;
50131 let response = result?;
50132 match response.status().as_u16() {
50133 200u16 => ResponseValue::from_response(response).await,
50134 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50135 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50136 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50137 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50138 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50139 _ => Err(Error::UnexpectedResponse(response)),
50140 }
50141 }
50142
50143 ///Retrieve the logs of a Pack
50144 ///
50145 ///Retrieve the logs of a Pack for debugging purpose.
50146 ///
50147 ///
50148 ///Sends a `GET` request to `/packs/{packId}/docs/{docId}/logs`
50149 ///
50150 ///Arguments:
50151 /// - `pack_id`: ID of a Pack
50152 /// - `doc_id`: ID of the doc.
50153 /// - `after_timestamp`: Only return logs after the given time
50154 /// (non-inclusive).
50155 ///
50156 /// - `before_timestamp`: Only return logs before the given time
50157 /// (non-inclusive).
50158 ///
50159 /// - `limit`: Maximum number of results to return in this query.
50160 /// - `log_types`: Only return logs of the given types.
50161 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50162 /// Default is desc.
50163 ///
50164 /// - `page_token`: An opaque token used to fetch the next page of results.
50165 /// - `q`: A search query that follows Lucene syntax.
50166 ///
50167 /// - `request_ids`: Only return logs matching provided request IDs.
50168 pub async fn list_pack_logs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, doc_id: &'a str, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, limit: Option<::std::num::NonZeroU64>, log_types: Option<&'a ::std::vec::Vec<types::PackLogType>>, order: Option<types::ListPackLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a ::std::vec::Vec<::std::string::String>>) -> Result<ResponseValue<types::PackLogsList>, Error<types::ListPackLogsResponse>> {
50169 let url = format!("{}/packs/{}/docs/{}/logs", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&doc_id.to_string()),);
50170 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50171 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50172 #[allow(unused_mut)]
50173 let mut request = self
50174 .client
50175 .get(url)
50176 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50177 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50178 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50179 .query(&progenitor_client::QueryParam::new("limit", &limit))
50180 .query(&progenitor_client::QueryParam::new("logTypes", &log_types))
50181 .query(&progenitor_client::QueryParam::new("order", &order))
50182 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50183 .query(&progenitor_client::QueryParam::new("q", &q))
50184 .query(&progenitor_client::QueryParam::new("requestIds", &request_ids))
50185 .headers(header_map)
50186 .build()?;
50187 let info = OperationInfo {
50188 operation_id: "list_pack_logs",
50189 };
50190 self.pre(&mut request, &info).await?;
50191 let result = self.exec(request, &info).await;
50192 self.post(&result, &info).await?;
50193 let response = result?;
50194 match response.status().as_u16() {
50195 200u16 => ResponseValue::from_response(response).await,
50196 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50197 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50198 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50199 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50200 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50201 _ => Err(Error::UnexpectedResponse(response)),
50202 }
50203 }
50204
50205 ///Retrieve the logs of a Ingestion
50206 ///
50207 ///Retrieve the logs of a Ingestion for debugging purpose.
50208 ///
50209 ///Sends a `GET` request to
50210 /// `/packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/
50211 /// logs`
50212 ///
50213 ///Arguments:
50214 /// - `pack_id`: ID of a Pack
50215 /// - `tenant_id`: ID of the tenant.
50216 /// - `root_ingestion_id`: ID of the root ingestion.
50217 /// - `after_timestamp`: Only return logs after the given time
50218 /// (non-inclusive).
50219 ///
50220 /// - `before_timestamp`: Only return logs before the given time
50221 /// (non-inclusive).
50222 ///
50223 /// - `ingestion_execution_id`: ID of the ingestion execution.
50224 /// - `ingestion_status`: Only fetch logs with the given ingestion status.
50225 /// This only works in combination with the onlyExecutionCompletions
50226 /// parameter.
50227 ///
50228 /// - `limit`: Maximum number of results to return in this query.
50229 /// - `log_types`: Only return logs of the given types.
50230 /// - `only_execution_completions`: Only fetch logs that represent the
50231 /// completion of a child execution.
50232 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50233 /// Default is desc.
50234 ///
50235 /// - `page_token`: An opaque token used to fetch the next page of results.
50236 /// - `q`: A search query that follows Lucene syntax.
50237 ///
50238 /// - `request_ids`: Only return logs matching provided request IDs.
50239 pub async fn list_ingestion_logs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a ::uuid::Uuid, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, ingestion_execution_id: Option<&'a ::uuid::Uuid>, ingestion_status: Option<types::IngestionStatus>, limit: Option<::std::num::NonZeroU64>, log_types: Option<&'a ::std::vec::Vec<types::PackLogType>>, only_execution_completions: Option<bool>, order: Option<types::ListIngestionLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a ::std::vec::Vec<::std::string::String>>) -> Result<ResponseValue<types::PackLogsList>, Error<types::ListIngestionLogsResponse>> {
50240 let url = format!("{}/packs/{}/tenantId/{}/rootIngestionId/{}/logs", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&tenant_id.to_string()), encode_path(&root_ingestion_id.to_string()),);
50241 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50242 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50243 #[allow(unused_mut)]
50244 let mut request = self
50245 .client
50246 .get(url)
50247 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50248 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50249 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50250 .query(&progenitor_client::QueryParam::new("ingestionExecutionId", &ingestion_execution_id))
50251 .query(&progenitor_client::QueryParam::new("ingestionStatus", &ingestion_status))
50252 .query(&progenitor_client::QueryParam::new("limit", &limit))
50253 .query(&progenitor_client::QueryParam::new("logTypes", &log_types))
50254 .query(&progenitor_client::QueryParam::new("onlyExecutionCompletions", &only_execution_completions))
50255 .query(&progenitor_client::QueryParam::new("order", &order))
50256 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50257 .query(&progenitor_client::QueryParam::new("q", &q))
50258 .query(&progenitor_client::QueryParam::new("requestIds", &request_ids))
50259 .headers(header_map)
50260 .build()?;
50261 let info = OperationInfo {
50262 operation_id: "list_ingestion_logs",
50263 };
50264 self.pre(&mut request, &info).await?;
50265 let result = self.exec(request, &info).await;
50266 self.post(&result, &info).await?;
50267 let response = result?;
50268 match response.status().as_u16() {
50269 200u16 => ResponseValue::from_response(response).await,
50270 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50271 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50272 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50273 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50274 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50275 _ => Err(Error::UnexpectedResponse(response)),
50276 }
50277 }
50278
50279 ///Retrieve the grouped logs of a Pack
50280 ///
50281 ///Retrieve the grouped logs of a Pack for debugging purpose.
50282 ///
50283 ///
50284 ///Sends a `GET` request to `/packs/{packId}/docs/{docId}/groupedLogs`
50285 ///
50286 ///Arguments:
50287 /// - `pack_id`: ID of a Pack
50288 /// - `doc_id`: ID of the doc.
50289 /// - `after_timestamp`: Only return logs after the given time
50290 /// (non-inclusive).
50291 ///
50292 /// - `before_timestamp`: Only return logs before the given time
50293 /// (non-inclusive).
50294 ///
50295 /// - `limit`: Maximum number of results to return in this query.
50296 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50297 /// Default is desc.
50298 ///
50299 /// - `page_token`: An opaque token used to fetch the next page of results.
50300 /// - `q`: A search query that follows Lucene syntax.
50301 pub async fn list_grouped_pack_logs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, doc_id: &'a str, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, limit: Option<::std::num::NonZeroU64>, order: Option<types::ListGroupedPackLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>) -> Result<ResponseValue<types::GroupedPackLogsList>, Error<types::ListGroupedPackLogsResponse>> {
50302 let url = format!("{}/packs/{}/docs/{}/groupedLogs", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&doc_id.to_string()),);
50303 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50304 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50305 #[allow(unused_mut)]
50306 let mut request = self
50307 .client
50308 .get(url)
50309 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50310 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50311 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50312 .query(&progenitor_client::QueryParam::new("limit", &limit))
50313 .query(&progenitor_client::QueryParam::new("order", &order))
50314 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50315 .query(&progenitor_client::QueryParam::new("q", &q))
50316 .headers(header_map)
50317 .build()?;
50318 let info = OperationInfo {
50319 operation_id: "list_grouped_pack_logs",
50320 };
50321 self.pre(&mut request, &info).await?;
50322 let result = self.exec(request, &info).await;
50323 self.post(&result, &info).await?;
50324 let response = result?;
50325 match response.status().as_u16() {
50326 200u16 => ResponseValue::from_response(response).await,
50327 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50328 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50329 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50330 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50331 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50332 _ => Err(Error::UnexpectedResponse(response)),
50333 }
50334 }
50335
50336 ///Retrieve the grouped logs of a Pack for a specific ingestionExecutionId
50337 ///
50338 ///Retrieve the grouped logs of a Pack for debugging purpose.
50339 ///
50340 ///
50341 ///Sends a `GET` request to
50342 /// `/packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/
50343 /// groupedLogs`
50344 ///
50345 ///Arguments:
50346 /// - `pack_id`: ID of a Pack
50347 /// - `tenant_id`: ID of the tenant.
50348 /// - `root_ingestion_id`: ID of the root ingestion.
50349 /// - `after_timestamp`: Only return logs after the given time
50350 /// (non-inclusive).
50351 ///
50352 /// - `before_timestamp`: Only return logs before the given time
50353 /// (non-inclusive).
50354 ///
50355 /// - `ingestion_execution_id`: ID of the ingestion execution.
50356 /// - `limit`: Maximum number of results to return in this query.
50357 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50358 /// Default is desc.
50359 ///
50360 /// - `page_token`: An opaque token used to fetch the next page of results.
50361 /// - `q`: A search query that follows Lucene syntax.
50362 pub async fn list_grouped_ingestion_logs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a ::uuid::Uuid, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, ingestion_execution_id: Option<&'a ::uuid::Uuid>, limit: Option<::std::num::NonZeroU64>, order: Option<types::ListGroupedIngestionLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>) -> Result<ResponseValue<types::GroupedPackLogsList>, Error<types::ListGroupedIngestionLogsResponse>> {
50363 let url = format!("{}/packs/{}/tenantId/{}/rootIngestionId/{}/groupedLogs", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&tenant_id.to_string()), encode_path(&root_ingestion_id.to_string()),);
50364 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50365 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50366 #[allow(unused_mut)]
50367 let mut request = self
50368 .client
50369 .get(url)
50370 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50371 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50372 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50373 .query(&progenitor_client::QueryParam::new("ingestionExecutionId", &ingestion_execution_id))
50374 .query(&progenitor_client::QueryParam::new("limit", &limit))
50375 .query(&progenitor_client::QueryParam::new("order", &order))
50376 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50377 .query(&progenitor_client::QueryParam::new("q", &q))
50378 .headers(header_map)
50379 .build()?;
50380 let info = OperationInfo {
50381 operation_id: "list_grouped_ingestion_logs",
50382 };
50383 self.pre(&mut request, &info).await?;
50384 let result = self.exec(request, &info).await;
50385 self.post(&result, &info).await?;
50386 let response = result?;
50387 match response.status().as_u16() {
50388 200u16 => ResponseValue::from_response(response).await,
50389 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50390 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50391 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50392 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50393 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50394 _ => Err(Error::UnexpectedResponse(response)),
50395 }
50396 }
50397
50398 ///Retrieve a list of ingestion batch executions for the given root
50399 /// ingestion id
50400 ///
50401 ///Retrieve the ingestion batch executions of a root ingestion for
50402 /// debugging purpose.
50403 ///
50404 ///
50405 ///Sends a `GET` request to
50406 /// `/packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/
50407 /// ingestionBatchExecutions`
50408 ///
50409 ///Arguments:
50410 /// - `pack_id`: ID of a Pack
50411 /// - `tenant_id`: ID of the tenant.
50412 /// - `root_ingestion_id`: ID of the root ingestion.
50413 /// - `datasource`: Only show batch executions for this datasource (sync
50414 /// table).
50415 /// - `execution_type`: Only show batch executions with this execution type.
50416 /// - `include_deleted_ingestions`: Include deleted ingestion executions in
50417 /// the response
50418 /// - `ingestion_execution_id`: Only retrieve this single batch execution.
50419 /// - `ingestion_id`: Only show batch executions for this sync table
50420 /// ingestion.
50421 /// - `ingestion_status`: Only show batch executions with this status.
50422 /// - `limit`: Maximum number of results to return in this query.
50423 /// - `page_token`: An opaque token used to fetch the next page of results.
50424 pub async fn list_ingestion_batch_executions<'a>(&'a self, pack_id: ::std::num::NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a ::uuid::Uuid, datasource: Option<&'a str>, execution_type: Option<types::IngestionExecutionType>, include_deleted_ingestions: Option<bool>, ingestion_execution_id: Option<&'a str>, ingestion_id: Option<&'a str>, ingestion_status: Option<types::IngestionStatus>, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::IngestionBatchExecutionsList>, Error<types::ListIngestionBatchExecutionsResponse>> {
50425 let url = format!("{}/packs/{}/tenantId/{}/rootIngestionId/{}/ingestionBatchExecutions", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&tenant_id.to_string()), encode_path(&root_ingestion_id.to_string()),);
50426 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50427 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50428 #[allow(unused_mut)]
50429 let mut request = self
50430 .client
50431 .get(url)
50432 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50433 .query(&progenitor_client::QueryParam::new("datasource", &datasource))
50434 .query(&progenitor_client::QueryParam::new("executionType", &execution_type))
50435 .query(&progenitor_client::QueryParam::new("includeDeletedIngestions", &include_deleted_ingestions))
50436 .query(&progenitor_client::QueryParam::new("ingestionExecutionId", &ingestion_execution_id))
50437 .query(&progenitor_client::QueryParam::new("ingestionId", &ingestion_id))
50438 .query(&progenitor_client::QueryParam::new("ingestionStatus", &ingestion_status))
50439 .query(&progenitor_client::QueryParam::new("limit", &limit))
50440 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50441 .headers(header_map)
50442 .build()?;
50443 let info = OperationInfo {
50444 operation_id: "list_ingestion_batch_executions",
50445 };
50446 self.pre(&mut request, &info).await?;
50447 let result = self.exec(request, &info).await;
50448 self.post(&result, &info).await?;
50449 let response = result?;
50450 match response.status().as_u16() {
50451 200u16 => ResponseValue::from_response(response).await,
50452 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50453 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50454 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50455 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50456 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50457 _ => Err(Error::UnexpectedResponse(response)),
50458 }
50459 }
50460
50461 ///Retrieve a list of parent items for the given ingestion batch execution
50462 /// id
50463 ///
50464 ///Retrieve the parent items of a ingestion batch execution for debugging
50465 /// purpose.
50466 ///
50467 ///
50468 ///Sends a `GET` request to
50469 /// `/packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/
50470 /// ingestionBatchExecutions/{ingestionExecutionId}/parentItems`
50471 ///
50472 ///Arguments:
50473 /// - `pack_id`: ID of a Pack
50474 /// - `tenant_id`: ID of the tenant.
50475 /// - `root_ingestion_id`: ID of the root ingestion.
50476 /// - `ingestion_execution_id`: Only show parent items for this ingestion
50477 /// batch execution.
50478 /// - `ingestion_id`: The ID of the sync table ingestion. Enables faster
50479 /// lookup.
50480 /// - `ingestion_status`: Only show parent items with this status.
50481 /// - `limit`: Maximum number of results to return in this query.
50482 /// - `page_token`: An opaque token used to fetch the next page of results.
50483 pub async fn list_ingestion_parent_items<'a>(&'a self, pack_id: ::std::num::NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a ::uuid::Uuid, ingestion_execution_id: &'a ::uuid::Uuid, ingestion_id: &'a ::uuid::Uuid, ingestion_status: Option<types::IngestionStatus>, limit: Option<::std::num::NonZeroU64>, page_token: Option<&'a str>) -> Result<ResponseValue<types::IngestionParentItemsList>, Error<types::ListIngestionParentItemsResponse>> {
50484 let url = format!("{}/packs/{}/tenantId/{}/rootIngestionId/{}/ingestionBatchExecutions/{}/parentItems", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&tenant_id.to_string()), encode_path(&root_ingestion_id.to_string()), encode_path(&ingestion_execution_id.to_string()),);
50485 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50486 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50487 #[allow(unused_mut)]
50488 let mut request = self
50489 .client
50490 .get(url)
50491 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50492 .query(&progenitor_client::QueryParam::new("ingestionId", &ingestion_id))
50493 .query(&progenitor_client::QueryParam::new("ingestionStatus", &ingestion_status))
50494 .query(&progenitor_client::QueryParam::new("limit", &limit))
50495 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50496 .headers(header_map)
50497 .build()?;
50498 let info = OperationInfo {
50499 operation_id: "list_ingestion_parent_items",
50500 };
50501 self.pre(&mut request, &info).await?;
50502 let result = self.exec(request, &info).await;
50503 self.post(&result, &info).await?;
50504 let response = result?;
50505 match response.status().as_u16() {
50506 200u16 => ResponseValue::from_response(response).await,
50507 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50508 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50509 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50510 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50511 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50512 _ => Err(Error::UnexpectedResponse(response)),
50513 }
50514 }
50515
50516 ///Retrieve the information for a specific log
50517 ///
50518 ///Retrieve the ingestion execution ids of a root ingestion for debugging
50519 /// purpose.
50520 ///
50521 ///
50522 ///Sends a `GET` request to
50523 /// `/packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/
50524 /// logs/{logId}`
50525 ///
50526 ///Arguments:
50527 /// - `pack_id`: ID of a Pack
50528 /// - `tenant_id`: ID of the tenant.
50529 /// - `root_ingestion_id`: ID of the root ingestion.
50530 /// - `log_id`: The id of the log to retrieve.
50531 ///
50532 /// - `details_key`: The key of the details to retrieve.
50533 pub async fn get_pack_log_details<'a>(&'a self, pack_id: ::std::num::NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a ::uuid::Uuid, log_id: &'a str, details_key: &'a str) -> Result<ResponseValue<types::PackLogDetails>, Error<types::GetPackLogDetailsResponse>> {
50534 let url = format!("{}/packs/{}/tenantId/{}/rootIngestionId/{}/logs/{}", self.baseurl, encode_path(&pack_id.to_string()), encode_path(&tenant_id.to_string()), encode_path(&root_ingestion_id.to_string()), encode_path(&log_id.to_string()),);
50535 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50536 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50537 #[allow(unused_mut)]
50538 let mut request = self
50539 .client
50540 .get(url)
50541 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50542 .query(&progenitor_client::QueryParam::new("detailsKey", &details_key))
50543 .headers(header_map)
50544 .build()?;
50545 let info = OperationInfo {
50546 operation_id: "get_pack_log_details",
50547 };
50548 self.pre(&mut request, &info).await?;
50549 let result = self.exec(request, &info).await;
50550 self.post(&result, &info).await?;
50551 let response = result?;
50552 match response.status().as_u16() {
50553 200u16 => ResponseValue::from_response(response).await,
50554 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50555 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50556 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50557 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50558 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50559 _ => Err(Error::UnexpectedResponse(response)),
50560 }
50561 }
50562
50563 ///List featured docs for a Pack
50564 ///
50565 ///Returns a list of featured doc ids for a Pack.
50566 ///
50567 ///
50568 ///Sends a `GET` request to `/packs/{packId}/featuredDocs`
50569 ///
50570 ///Arguments:
50571 /// - `pack_id`: ID of a Pack
50572 pub async fn list_pack_featured_docs<'a>(&'a self, pack_id: ::std::num::NonZeroU64) -> Result<ResponseValue<types::PackFeaturedDocsResponse>, Error<types::ListPackFeaturedDocsResponse>> {
50573 let url = format!("{}/packs/{}/featuredDocs", self.baseurl, encode_path(&pack_id.to_string()),);
50574 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50575 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50576 #[allow(unused_mut)]
50577 let mut request = self
50578 .client
50579 .get(url)
50580 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50581 .headers(header_map)
50582 .build()?;
50583 let info = OperationInfo {
50584 operation_id: "list_pack_featured_docs",
50585 };
50586 self.pre(&mut request, &info).await?;
50587 let result = self.exec(request, &info).await;
50588 self.post(&result, &info).await?;
50589 let response = result?;
50590 match response.status().as_u16() {
50591 200u16 => ResponseValue::from_response(response).await,
50592 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50593 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50594 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50595 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50596 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50597 _ => Err(Error::UnexpectedResponse(response)),
50598 }
50599 }
50600
50601 ///Update featured docs for a Pack
50602 ///
50603 ///Create or replace the featured docs for a Pack.
50604 ///
50605 ///
50606 ///Sends a `PUT` request to `/packs/{packId}/featuredDocs`
50607 ///
50608 ///Arguments:
50609 /// - `pack_id`: ID of a Pack
50610 /// - `body`: Parameters for updating the Pack's featured docs.
50611 pub async fn update_pack_featured_docs<'a>(&'a self, pack_id: ::std::num::NonZeroU64, body: &'a types::UpdatePackFeaturedDocsRequest) -> Result<ResponseValue<types::UpdatePackFeaturedDocsResponse>, Error<types::UpdatePackFeaturedDocsResponse>> {
50612 let url = format!("{}/packs/{}/featuredDocs", self.baseurl, encode_path(&pack_id.to_string()),);
50613 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50614 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50615 #[allow(unused_mut)]
50616 let mut request = self
50617 .client
50618 .put(url)
50619 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50620 .json(&body)
50621 .headers(header_map)
50622 .build()?;
50623 let info = OperationInfo {
50624 operation_id: "update_pack_featured_docs",
50625 };
50626 self.pre(&mut request, &info).await?;
50627 let result = self.exec(request, &info).await;
50628 self.post(&result, &info).await?;
50629 let response = result?;
50630 match response.status().as_u16() {
50631 200u16 => ResponseValue::from_response(response).await,
50632 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50633 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50634 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50635 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50636 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50637 _ => Err(Error::UnexpectedResponse(response)),
50638 }
50639 }
50640
50641 ///Add a go link
50642 ///
50643 ///Adds a new go link for the organization.
50644 ///
50645 ///Sends a `POST` request to `/organizations/{organizationId}/goLinks`
50646 ///
50647 ///Arguments:
50648 /// - `organization_id`: ID of the organization.
50649 /// - `body`: The request body for creating a go link.
50650 pub async fn add_go_link<'a>(&'a self, organization_id: &'a str, body: &'a types::AddGoLinkRequest) -> Result<ResponseValue<types::AddGoLinkResult>, Error<types::AddGoLinkResponse>> {
50651 let url = format!("{}/organizations/{}/goLinks", self.baseurl, encode_path(&organization_id.to_string()),);
50652 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50653 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50654 #[allow(unused_mut)]
50655 let mut request = self
50656 .client
50657 .post(url)
50658 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50659 .json(&body)
50660 .headers(header_map)
50661 .build()?;
50662 let info = OperationInfo {
50663 operation_id: "add_go_link",
50664 };
50665 self.pre(&mut request, &info).await?;
50666 let result = self.exec(request, &info).await;
50667 self.post(&result, &info).await?;
50668 let response = result?;
50669 match response.status().as_u16() {
50670 200u16 => ResponseValue::from_response(response).await,
50671 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50672 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50673 _ => Err(Error::UnexpectedResponse(response)),
50674 }
50675 }
50676
50677 ///Retrieve the chat sessions of an agent instance
50678 ///
50679 ///Retrieve the chat sessions of an agent instance for debugging purpose.
50680 ///
50681 ///Sends a `GET` request to
50682 /// `/go/tenants/{tenantId}/agentInstances/{agentInstanceId}/
50683 /// agentSessionIds`
50684 ///
50685 ///Arguments:
50686 /// - `tenant_id`: ID of the tenant.
50687 /// - `agent_instance_id`: ID of the agent instance.
50688 /// - `after_timestamp`: Only return logs after the given time
50689 /// (non-inclusive).
50690 ///
50691 /// - `agent_session_id`: ID of the agent chat session.
50692 /// - `before_timestamp`: Only return logs before the given time
50693 /// (non-inclusive).
50694 ///
50695 /// - `limit`: Maximum number of results to return in this query.
50696 /// - `log_types`: Only return logs of the given types.
50697 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50698 /// Default is desc.
50699 ///
50700 /// - `page_token`: An opaque token used to fetch the next page of results.
50701 /// - `q`: A search query that follows Lucene syntax.
50702 ///
50703 /// - `request_ids`: Only return logs matching provided request IDs.
50704 pub async fn list_agent_session_ids<'a>(&'a self, tenant_id: &'a str, agent_instance_id: &'a ::uuid::Uuid, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, agent_session_id: Option<&'a ::uuid::Uuid>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, limit: Option<::std::num::NonZeroU64>, log_types: Option<&'a ::std::vec::Vec<types::PackLogType>>, order: Option<types::ListAgentSessionIdsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a ::std::vec::Vec<::std::string::String>>) -> Result<ResponseValue<types::PackLogsList>, Error<types::ListAgentSessionIdsResponse>> {
50705 let url = format!("{}/go/tenants/{}/agentInstances/{}/agentSessionIds", self.baseurl, encode_path(&tenant_id.to_string()), encode_path(&agent_instance_id.to_string()),);
50706 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50707 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50708 #[allow(unused_mut)]
50709 let mut request = self
50710 .client
50711 .get(url)
50712 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50713 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50714 .query(&progenitor_client::QueryParam::new("agentSessionId", &agent_session_id))
50715 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50716 .query(&progenitor_client::QueryParam::new("limit", &limit))
50717 .query(&progenitor_client::QueryParam::new("logTypes", &log_types))
50718 .query(&progenitor_client::QueryParam::new("order", &order))
50719 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50720 .query(&progenitor_client::QueryParam::new("q", &q))
50721 .query(&progenitor_client::QueryParam::new("requestIds", &request_ids))
50722 .headers(header_map)
50723 .build()?;
50724 let info = OperationInfo {
50725 operation_id: "list_agent_session_ids",
50726 };
50727 self.pre(&mut request, &info).await?;
50728 let result = self.exec(request, &info).await;
50729 self.post(&result, &info).await?;
50730 let response = result?;
50731 match response.status().as_u16() {
50732 200u16 => ResponseValue::from_response(response).await,
50733 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50734 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50735 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50736 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50737 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50738 _ => Err(Error::UnexpectedResponse(response)),
50739 }
50740 }
50741
50742 ///Retrieve the logs of an agent instance
50743 ///
50744 ///Retrieve the logs of an agent instance for debugging purpose.
50745 ///
50746 ///Sends a `GET` request to
50747 /// `/go/tenants/{tenantId}/agentInstances/{agentInstanceId}/logs`
50748 ///
50749 ///Arguments:
50750 /// - `tenant_id`: ID of the tenant.
50751 /// - `agent_instance_id`: ID of the agent instance.
50752 /// - `after_timestamp`: Only return logs after the given time
50753 /// (non-inclusive).
50754 ///
50755 /// - `agent_session_id`: ID of the agent chat session.
50756 /// - `before_timestamp`: Only return logs before the given time
50757 /// (non-inclusive).
50758 ///
50759 /// - `limit`: Maximum number of results to return in this query.
50760 /// - `log_types`: Only return logs of the given types.
50761 /// - `order`: Specifies if the logs will be returned in time desc or asc.
50762 /// Default is desc.
50763 ///
50764 /// - `page_token`: An opaque token used to fetch the next page of results.
50765 /// - `q`: A search query that follows Lucene syntax.
50766 ///
50767 /// - `request_ids`: Only return logs matching provided request IDs.
50768 pub async fn list_agent_logs<'a>(&'a self, tenant_id: &'a str, agent_instance_id: &'a ::uuid::Uuid, after_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, agent_session_id: Option<&'a ::uuid::Uuid>, before_timestamp: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>, limit: Option<::std::num::NonZeroU64>, log_types: Option<&'a ::std::vec::Vec<types::PackLogType>>, order: Option<types::ListAgentLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a ::std::vec::Vec<::std::string::String>>) -> Result<ResponseValue<types::PackLogsList>, Error<types::ListAgentLogsResponse>> {
50769 let url = format!("{}/go/tenants/{}/agentInstances/{}/logs", self.baseurl, encode_path(&tenant_id.to_string()), encode_path(&agent_instance_id.to_string()),);
50770 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50771 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50772 #[allow(unused_mut)]
50773 let mut request = self
50774 .client
50775 .get(url)
50776 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50777 .query(&progenitor_client::QueryParam::new("afterTimestamp", &after_timestamp))
50778 .query(&progenitor_client::QueryParam::new("agentSessionId", &agent_session_id))
50779 .query(&progenitor_client::QueryParam::new("beforeTimestamp", &before_timestamp))
50780 .query(&progenitor_client::QueryParam::new("limit", &limit))
50781 .query(&progenitor_client::QueryParam::new("logTypes", &log_types))
50782 .query(&progenitor_client::QueryParam::new("order", &order))
50783 .query(&progenitor_client::QueryParam::new("pageToken", &page_token))
50784 .query(&progenitor_client::QueryParam::new("q", &q))
50785 .query(&progenitor_client::QueryParam::new("requestIds", &request_ids))
50786 .headers(header_map)
50787 .build()?;
50788 let info = OperationInfo {
50789 operation_id: "list_agent_logs",
50790 };
50791 self.pre(&mut request, &info).await?;
50792 let result = self.exec(request, &info).await;
50793 self.post(&result, &info).await?;
50794 let response = result?;
50795 match response.status().as_u16() {
50796 200u16 => ResponseValue::from_response(response).await,
50797 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50798 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50799 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50800 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50801 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50802 _ => Err(Error::UnexpectedResponse(response)),
50803 }
50804 }
50805
50806 ///Retrieve the information for a specific log
50807 ///
50808 ///Retrieve the log details of given logId.
50809 ///
50810 ///
50811 ///Sends a `GET` request to
50812 /// `/go/tenants/{tenantId}/agentInstances/{agentInstanceId}/logs/{logId}`
50813 ///
50814 ///Arguments:
50815 /// - `tenant_id`: ID of the tenant.
50816 /// - `agent_instance_id`: ID of the agent instance.
50817 /// - `log_id`: The id of the log to retrieve.
50818 ///
50819 /// - `details_key`: The key of the details to retrieve.
50820 pub async fn get_agent_pack_log_details<'a>(&'a self, tenant_id: &'a str, agent_instance_id: &'a ::uuid::Uuid, log_id: &'a str, details_key: &'a str) -> Result<ResponseValue<types::PackLogDetails>, Error<types::GetAgentPackLogDetailsResponse>> {
50821 let url = format!("{}/go/tenants/{}/agentInstances/{}/logs/{}", self.baseurl, encode_path(&tenant_id.to_string()), encode_path(&agent_instance_id.to_string()), encode_path(&log_id.to_string()),);
50822 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50823 header_map.append(::reqwest::header::HeaderName::from_static("api-version"), ::reqwest::header::HeaderValue::from_static(Self::api_version()));
50824 #[allow(unused_mut)]
50825 let mut request = self
50826 .client
50827 .get(url)
50828 .header(::reqwest::header::ACCEPT, ::reqwest::header::HeaderValue::from_static("application/json"))
50829 .query(&progenitor_client::QueryParam::new("detailsKey", &details_key))
50830 .headers(header_map)
50831 .build()?;
50832 let info = OperationInfo {
50833 operation_id: "get_agent_pack_log_details",
50834 };
50835 self.pre(&mut request, &info).await?;
50836 let result = self.exec(request, &info).await;
50837 self.post(&result, &info).await?;
50838 let response = result?;
50839 match response.status().as_u16() {
50840 200u16 => ResponseValue::from_response(response).await,
50841 400u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50842 401u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50843 403u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50844 404u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50845 429u16 => Err(Error::ErrorResponse(ResponseValue::from_response(response).await?)),
50846 _ => Err(Error::UnexpectedResponse(response)),
50847 }
50848 }
50849}
50850
50851/// Items consumers will typically use such as the Client.
50852pub mod prelude {
50853 #[allow(unused_imports)]
50854 pub use super::RawClient;
50855}
50856mod ext;
50857pub use ext::*;
50858mod client;
50859pub use client::*;
50860mod limiter;
50861pub use limiter::*;
50862#[cfg(test)]
50863pub mod test;