google_docs1/
api.rs

1#![allow(clippy::ptr_arg)]
2
3use std::collections::{BTreeSet, HashMap};
4
5use tokio::time::sleep;
6
7// ##############
8// UTILITIES ###
9// ############
10
11/// Identifies the an OAuth2 authorization scope.
12/// A scope is needed when requesting an
13/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
14#[derive(PartialEq, Eq, Ord, PartialOrd, Hash, Debug, Clone, Copy)]
15pub enum Scope {
16    /// See, edit, create, and delete all your Google Docs documents
17    Document,
18
19    /// See all your Google Docs documents
20    DocumentReadonly,
21
22    /// See, edit, create, and delete all of your Google Drive files
23    Drive,
24
25    /// See, edit, create, and delete only the specific Google Drive files you use with this app
26    DriveFile,
27
28    /// See and download all your Google Drive files
29    DriveReadonly,
30}
31
32impl AsRef<str> for Scope {
33    fn as_ref(&self) -> &str {
34        match *self {
35            Scope::Document => "https://www.googleapis.com/auth/documents",
36            Scope::DocumentReadonly => "https://www.googleapis.com/auth/documents.readonly",
37            Scope::Drive => "https://www.googleapis.com/auth/drive",
38            Scope::DriveFile => "https://www.googleapis.com/auth/drive.file",
39            Scope::DriveReadonly => "https://www.googleapis.com/auth/drive.readonly",
40        }
41    }
42}
43
44#[allow(clippy::derivable_impls)]
45impl Default for Scope {
46    fn default() -> Scope {
47        Scope::DocumentReadonly
48    }
49}
50
51// ########
52// HUB ###
53// ######
54
55/// Central instance to access all Docs related resource activities
56///
57/// # Examples
58///
59/// Instantiate a new hub
60///
61/// ```test_harness,no_run
62/// extern crate hyper;
63/// extern crate hyper_rustls;
64/// extern crate google_docs1 as docs1;
65/// use docs1::api::BatchUpdateDocumentRequest;
66/// use docs1::{Result, Error};
67/// # async fn dox() {
68/// use docs1::{Docs, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
69///
70/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
71/// // `client_secret`, among other things.
72/// let secret: yup_oauth2::ApplicationSecret = Default::default();
73/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
74/// // unless you replace  `None` with the desired Flow.
75/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
76/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
77/// // retrieve them from storage.
78/// let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
79///     secret,
80///     yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
81/// ).build().await.unwrap();
82///
83/// let client = hyper_util::client::legacy::Client::builder(
84///     hyper_util::rt::TokioExecutor::new()
85/// )
86/// .build(
87///     hyper_rustls::HttpsConnectorBuilder::new()
88///         .with_native_roots()
89///         .unwrap()
90///         .https_or_http()
91///         .enable_http1()
92///         .build()
93/// );
94/// let mut hub = Docs::new(client, auth);
95/// // As the method needs a request, you would usually fill it with the desired information
96/// // into the respective structure. Some of the parts shown here might not be applicable !
97/// // Values shown here are possibly random and not representative !
98/// let mut req = BatchUpdateDocumentRequest::default();
99///
100/// // You can configure optional parameters by calling the respective setters at will, and
101/// // execute the final call using `doit()`.
102/// // Values shown here are possibly random and not representative !
103/// let result = hub.documents().batch_update(req, "documentId")
104///              .doit().await;
105///
106/// match result {
107///     Err(e) => match e {
108///         // The Error enum provides details about what exactly happened.
109///         // You can also just use its `Debug`, `Display` or `Error` traits
110///          Error::HttpError(_)
111///         |Error::Io(_)
112///         |Error::MissingAPIKey
113///         |Error::MissingToken(_)
114///         |Error::Cancelled
115///         |Error::UploadSizeLimitExceeded(_, _)
116///         |Error::Failure(_)
117///         |Error::BadRequest(_)
118///         |Error::FieldClash(_)
119///         |Error::JsonDecodeError(_, _) => println!("{}", e),
120///     },
121///     Ok(res) => println!("Success: {:?}", res),
122/// }
123/// # }
124/// ```
125#[derive(Clone)]
126pub struct Docs<C> {
127    pub client: common::Client<C>,
128    pub auth: Box<dyn common::GetToken>,
129    _user_agent: String,
130    _base_url: String,
131    _root_url: String,
132}
133
134impl<C> common::Hub for Docs<C> {}
135
136impl<'a, C> Docs<C> {
137    pub fn new<A: 'static + common::GetToken>(client: common::Client<C>, auth: A) -> Docs<C> {
138        Docs {
139            client,
140            auth: Box::new(auth),
141            _user_agent: "google-api-rust-client/6.0.0".to_string(),
142            _base_url: "https://docs.googleapis.com/".to_string(),
143            _root_url: "https://docs.googleapis.com/".to_string(),
144        }
145    }
146
147    pub fn documents(&'a self) -> DocumentMethods<'a, C> {
148        DocumentMethods { hub: self }
149    }
150
151    /// Set the user-agent header field to use in all requests to the server.
152    /// It defaults to `google-api-rust-client/6.0.0`.
153    ///
154    /// Returns the previously set user-agent.
155    pub fn user_agent(&mut self, agent_name: String) -> String {
156        std::mem::replace(&mut self._user_agent, agent_name)
157    }
158
159    /// Set the base url to use in all requests to the server.
160    /// It defaults to `https://docs.googleapis.com/`.
161    ///
162    /// Returns the previously set base url.
163    pub fn base_url(&mut self, new_base_url: String) -> String {
164        std::mem::replace(&mut self._base_url, new_base_url)
165    }
166
167    /// Set the root url to use in all requests to the server.
168    /// It defaults to `https://docs.googleapis.com/`.
169    ///
170    /// Returns the previously set root url.
171    pub fn root_url(&mut self, new_root_url: String) -> String {
172        std::mem::replace(&mut self._root_url, new_root_url)
173    }
174}
175
176// ############
177// SCHEMAS ###
178// ##########
179/// A ParagraphElement representing a spot in the text that's dynamically replaced with content that can change over time, like a page number.
180///
181/// This type is not used in any activity, and only used as *part* of another schema.
182///
183#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
184#[serde_with::serde_as]
185#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
186pub struct AutoText {
187    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
188    #[serde(rename = "suggestedDeletionIds")]
189    pub suggested_deletion_ids: Option<Vec<String>>,
190    /// The suggested insertion IDs. An AutoText may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
191    #[serde(rename = "suggestedInsertionIds")]
192    pub suggested_insertion_ids: Option<Vec<String>>,
193    /// The suggested text style changes to this AutoText, keyed by suggestion ID.
194    #[serde(rename = "suggestedTextStyleChanges")]
195    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
196    /// The text style of this AutoText.
197    #[serde(rename = "textStyle")]
198    pub text_style: Option<TextStyle>,
199    /// The type of this auto text.
200    #[serde(rename = "type")]
201    pub type_: Option<String>,
202}
203
204impl common::Part for AutoText {}
205
206/// Represents the background of a document.
207///
208/// This type is not used in any activity, and only used as *part* of another schema.
209///
210#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
211#[serde_with::serde_as]
212#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
213pub struct Background {
214    /// The background color.
215    pub color: Option<OptionalColor>,
216}
217
218impl common::Part for Background {}
219
220/// A mask that indicates which of the fields on the base Background have been changed in this suggestion. For any field set to true, the Backgound has a new suggested value.
221///
222/// This type is not used in any activity, and only used as *part* of another schema.
223///
224#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
225#[serde_with::serde_as]
226#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
227pub struct BackgroundSuggestionState {
228    /// Indicates whether the current background color has been modified in this suggestion.
229    #[serde(rename = "backgroundColorSuggested")]
230    pub background_color_suggested: Option<bool>,
231}
232
233impl common::Part for BackgroundSuggestionState {}
234
235/// Request message for BatchUpdateDocument.
236///
237/// # Activities
238///
239/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
240/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
241///
242/// * [batch update documents](DocumentBatchUpdateCall) (request)
243#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
244#[serde_with::serde_as]
245#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
246pub struct BatchUpdateDocumentRequest {
247    /// A list of updates to apply to the document.
248    pub requests: Option<Vec<Request>>,
249    /// Provides control over how write requests are executed.
250    #[serde(rename = "writeControl")]
251    pub write_control: Option<WriteControl>,
252}
253
254impl common::RequestValue for BatchUpdateDocumentRequest {}
255
256/// Response message from a BatchUpdateDocument request.
257///
258/// # Activities
259///
260/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
261/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
262///
263/// * [batch update documents](DocumentBatchUpdateCall) (response)
264#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
265#[serde_with::serde_as]
266#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
267pub struct BatchUpdateDocumentResponse {
268    /// The ID of the document to which the updates were applied to.
269    #[serde(rename = "documentId")]
270    pub document_id: Option<String>,
271    /// The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.
272    pub replies: Option<Vec<Response>>,
273    /// The updated write control after applying the request.
274    #[serde(rename = "writeControl")]
275    pub write_control: Option<WriteControl>,
276}
277
278impl common::ResponseResult for BatchUpdateDocumentResponse {}
279
280/// The document body. The body typically contains the full document contents except for headers, footers, and footnotes.
281///
282/// This type is not used in any activity, and only used as *part* of another schema.
283///
284#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
285#[serde_with::serde_as]
286#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
287pub struct Body {
288    /// The contents of the body. The indexes for the body's content begin at zero.
289    pub content: Option<Vec<StructuralElement>>,
290}
291
292impl common::Part for Body {}
293
294/// Describes the bullet of a paragraph.
295///
296/// This type is not used in any activity, and only used as *part* of another schema.
297///
298#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
299#[serde_with::serde_as]
300#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
301pub struct Bullet {
302    /// The ID of the list this paragraph belongs to.
303    #[serde(rename = "listId")]
304    pub list_id: Option<String>,
305    /// The nesting level of this paragraph in the list.
306    #[serde(rename = "nestingLevel")]
307    pub nesting_level: Option<i32>,
308    /// The paragraph-specific text style applied to this bullet.
309    #[serde(rename = "textStyle")]
310    pub text_style: Option<TextStyle>,
311}
312
313impl common::Part for Bullet {}
314
315/// A mask that indicates which of the fields on the base Bullet have been changed in this suggestion. For any field set to true, there's a new suggested value.
316///
317/// This type is not used in any activity, and only used as *part* of another schema.
318///
319#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
320#[serde_with::serde_as]
321#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
322pub struct BulletSuggestionState {
323    /// Indicates if there was a suggested change to the list_id.
324    #[serde(rename = "listIdSuggested")]
325    pub list_id_suggested: Option<bool>,
326    /// Indicates if there was a suggested change to the nesting_level.
327    #[serde(rename = "nestingLevelSuggested")]
328    pub nesting_level_suggested: Option<bool>,
329    /// A mask that indicates which of the fields in text style have been changed in this suggestion.
330    #[serde(rename = "textStyleSuggestionState")]
331    pub text_style_suggestion_state: Option<TextStyleSuggestionState>,
332}
333
334impl common::Part for BulletSuggestionState {}
335
336/// A solid color.
337///
338/// This type is not used in any activity, and only used as *part* of another schema.
339///
340#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
341#[serde_with::serde_as]
342#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
343pub struct Color {
344    /// The RGB color value.
345    #[serde(rename = "rgbColor")]
346    pub rgb_color: Option<RgbColor>,
347}
348
349impl common::Part for Color {}
350
351/// A ParagraphElement representing a column break. A column break makes the subsequent text start at the top of the next column.
352///
353/// This type is not used in any activity, and only used as *part* of another schema.
354///
355#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
356#[serde_with::serde_as]
357#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
358pub struct ColumnBreak {
359    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
360    #[serde(rename = "suggestedDeletionIds")]
361    pub suggested_deletion_ids: Option<Vec<String>>,
362    /// The suggested insertion IDs. A ColumnBreak may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
363    #[serde(rename = "suggestedInsertionIds")]
364    pub suggested_insertion_ids: Option<Vec<String>>,
365    /// The suggested text style changes to this ColumnBreak, keyed by suggestion ID.
366    #[serde(rename = "suggestedTextStyleChanges")]
367    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
368    /// The text style of this ColumnBreak. Similar to text content, like text runs and footnote references, the text style of a column break can affect content layout as well as the styling of text inserted next to it.
369    #[serde(rename = "textStyle")]
370    pub text_style: Option<TextStyle>,
371}
372
373impl common::Part for ColumnBreak {}
374
375/// Creates a Footer. The new footer is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a footer of the specified type already exists, a 400 bad request error is returned.
376///
377/// This type is not used in any activity, and only used as *part* of another schema.
378///
379#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
380#[serde_with::serde_as]
381#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
382pub struct CreateFooterRequest {
383    /// The location of the SectionBreak immediately preceding the section whose SectionStyle this footer should belong to. If this is unset or refers to the first section break in the document, the footer applies to the document style.
384    #[serde(rename = "sectionBreakLocation")]
385    pub section_break_location: Option<Location>,
386    /// The type of footer to create.
387    #[serde(rename = "type")]
388    pub type_: Option<String>,
389}
390
391impl common::Part for CreateFooterRequest {}
392
393/// The result of creating a footer.
394///
395/// This type is not used in any activity, and only used as *part* of another schema.
396///
397#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
398#[serde_with::serde_as]
399#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
400pub struct CreateFooterResponse {
401    /// The ID of the created footer.
402    #[serde(rename = "footerId")]
403    pub footer_id: Option<String>,
404}
405
406impl common::Part for CreateFooterResponse {}
407
408/// Creates a Footnote segment and inserts a new FootnoteReference to it at the given location. The new Footnote segment will contain a space followed by a newline character.
409///
410/// This type is not used in any activity, and only used as *part* of another schema.
411///
412#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
413#[serde_with::serde_as]
414#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
415pub struct CreateFootnoteRequest {
416    /// Inserts the footnote reference at the end of the document body. Footnote references cannot be inserted inside a header, footer or footnote. Since footnote references can only be inserted in the body, the segment ID field must be empty.
417    #[serde(rename = "endOfSegmentLocation")]
418    pub end_of_segment_location: Option<EndOfSegmentLocation>,
419    /// Inserts the footnote reference at a specific index in the document. The footnote reference must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Footnote references cannot be inserted inside an equation, header, footer or footnote. Since footnote references can only be inserted in the body, the segment ID field must be empty.
420    pub location: Option<Location>,
421}
422
423impl common::Part for CreateFootnoteRequest {}
424
425/// The result of creating a footnote.
426///
427/// This type is not used in any activity, and only used as *part* of another schema.
428///
429#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
430#[serde_with::serde_as]
431#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
432pub struct CreateFootnoteResponse {
433    /// The ID of the created footnote.
434    #[serde(rename = "footnoteId")]
435    pub footnote_id: Option<String>,
436}
437
438impl common::Part for CreateFootnoteResponse {}
439
440/// Creates a Header. The new header is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a header of the specified type already exists, a 400 bad request error is returned.
441///
442/// This type is not used in any activity, and only used as *part* of another schema.
443///
444#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
445#[serde_with::serde_as]
446#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
447pub struct CreateHeaderRequest {
448    /// The location of the SectionBreak which begins the section this header should belong to. If `section_break_location' is unset or if it refers to the first section break in the document body, the header applies to the DocumentStyle
449    #[serde(rename = "sectionBreakLocation")]
450    pub section_break_location: Option<Location>,
451    /// The type of header to create.
452    #[serde(rename = "type")]
453    pub type_: Option<String>,
454}
455
456impl common::Part for CreateHeaderRequest {}
457
458/// The result of creating a header.
459///
460/// This type is not used in any activity, and only used as *part* of another schema.
461///
462#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
463#[serde_with::serde_as]
464#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
465pub struct CreateHeaderResponse {
466    /// The ID of the created header.
467    #[serde(rename = "headerId")]
468    pub header_id: Option<String>,
469}
470
471impl common::Part for CreateHeaderResponse {}
472
473/// Creates a NamedRange referencing the given range.
474///
475/// This type is not used in any activity, and only used as *part* of another schema.
476///
477#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
478#[serde_with::serde_as]
479#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
480pub struct CreateNamedRangeRequest {
481    /// The name of the NamedRange. Names do not need to be unique. Names must be at least 1 character and no more than 256 characters, measured in UTF-16 code units.
482    pub name: Option<String>,
483    /// The range to apply the name to.
484    pub range: Option<Range>,
485}
486
487impl common::Part for CreateNamedRangeRequest {}
488
489/// The result of creating a named range.
490///
491/// This type is not used in any activity, and only used as *part* of another schema.
492///
493#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
494#[serde_with::serde_as]
495#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
496pub struct CreateNamedRangeResponse {
497    /// The ID of the created named range.
498    #[serde(rename = "namedRangeId")]
499    pub named_range_id: Option<String>,
500}
501
502impl common::Part for CreateNamedRangeResponse {}
503
504/// Creates bullets for all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text. If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list.
505///
506/// This type is not used in any activity, and only used as *part* of another schema.
507///
508#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
509#[serde_with::serde_as]
510#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
511pub struct CreateParagraphBulletsRequest {
512    /// The kinds of bullet glyphs to be used.
513    #[serde(rename = "bulletPreset")]
514    pub bullet_preset: Option<String>,
515    /// The range to apply the bullet preset to.
516    pub range: Option<Range>,
517}
518
519impl common::Part for CreateParagraphBulletsRequest {}
520
521/// The crop properties of an image. The crop rectangle is represented using fractional offsets from the original content's 4 edges. - If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the image's original bounding rectangle. - If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the image's original bounding rectangle. - If all offsets and rotation angle are 0, the image is not cropped.
522///
523/// This type is not used in any activity, and only used as *part* of another schema.
524///
525#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
526#[serde_with::serde_as]
527#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
528pub struct CropProperties {
529    /// The clockwise rotation angle of the crop rectangle around its center, in radians. Rotation is applied after the offsets.
530    pub angle: Option<f32>,
531    /// The offset specifies how far inwards the bottom edge of the crop rectangle is from the bottom edge of the original content as a fraction of the original content's height.
532    #[serde(rename = "offsetBottom")]
533    pub offset_bottom: Option<f32>,
534    /// The offset specifies how far inwards the left edge of the crop rectangle is from the left edge of the original content as a fraction of the original content's width.
535    #[serde(rename = "offsetLeft")]
536    pub offset_left: Option<f32>,
537    /// The offset specifies how far inwards the right edge of the crop rectangle is from the right edge of the original content as a fraction of the original content's width.
538    #[serde(rename = "offsetRight")]
539    pub offset_right: Option<f32>,
540    /// The offset specifies how far inwards the top edge of the crop rectangle is from the top edge of the original content as a fraction of the original content's height.
541    #[serde(rename = "offsetTop")]
542    pub offset_top: Option<f32>,
543}
544
545impl common::Part for CropProperties {}
546
547/// A mask that indicates which of the fields on the base CropProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
548///
549/// This type is not used in any activity, and only used as *part* of another schema.
550///
551#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
552#[serde_with::serde_as]
553#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
554pub struct CropPropertiesSuggestionState {
555    /// Indicates if there was a suggested change to angle.
556    #[serde(rename = "angleSuggested")]
557    pub angle_suggested: Option<bool>,
558    /// Indicates if there was a suggested change to offset_bottom.
559    #[serde(rename = "offsetBottomSuggested")]
560    pub offset_bottom_suggested: Option<bool>,
561    /// Indicates if there was a suggested change to offset_left.
562    #[serde(rename = "offsetLeftSuggested")]
563    pub offset_left_suggested: Option<bool>,
564    /// Indicates if there was a suggested change to offset_right.
565    #[serde(rename = "offsetRightSuggested")]
566    pub offset_right_suggested: Option<bool>,
567    /// Indicates if there was a suggested change to offset_top.
568    #[serde(rename = "offsetTopSuggested")]
569    pub offset_top_suggested: Option<bool>,
570}
571
572impl common::Part for CropPropertiesSuggestionState {}
573
574/// Deletes content from the document.
575///
576/// This type is not used in any activity, and only used as *part* of another schema.
577///
578#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
579#[serde_with::serde_as]
580#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
581pub struct DeleteContentRangeRequest {
582    /// The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a 400 bad request error is returned. Some examples of invalid delete requests include: * Deleting one code unit of a surrogate pair. * Deleting the last newline character of a Body, Header, Footer, Footnote, TableCell or TableOfContents. * Deleting the start or end of a Table, TableOfContents or Equation without deleting the entire element. * Deleting the newline character before a Table, TableOfContents or SectionBreak without deleting the element. * Deleting individual rows or cells of a table. Deleting the content within a table cell is allowed.
583    pub range: Option<Range>,
584}
585
586impl common::Part for DeleteContentRangeRequest {}
587
588/// Deletes a Footer from the document.
589///
590/// This type is not used in any activity, and only used as *part* of another schema.
591///
592#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
593#[serde_with::serde_as]
594#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
595pub struct DeleteFooterRequest {
596    /// The id of the footer to delete. If this footer is defined on DocumentStyle, the reference to this footer is removed, resulting in no footer of that type for the first section of the document. If this footer is defined on a SectionStyle, the reference to this footer is removed and the footer of that type is now continued from the previous section.
597    #[serde(rename = "footerId")]
598    pub footer_id: Option<String>,
599}
600
601impl common::Part for DeleteFooterRequest {}
602
603/// Deletes a Header from the document.
604///
605/// This type is not used in any activity, and only used as *part* of another schema.
606///
607#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
608#[serde_with::serde_as]
609#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
610pub struct DeleteHeaderRequest {
611    /// The id of the header to delete. If this header is defined on DocumentStyle, the reference to this header is removed, resulting in no header of that type for the first section of the document. If this header is defined on a SectionStyle, the reference to this header is removed and the header of that type is now continued from the previous section.
612    #[serde(rename = "headerId")]
613    pub header_id: Option<String>,
614}
615
616impl common::Part for DeleteHeaderRequest {}
617
618/// Deletes a NamedRange.
619///
620/// This type is not used in any activity, and only used as *part* of another schema.
621///
622#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
623#[serde_with::serde_as]
624#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
625pub struct DeleteNamedRangeRequest {
626    /// The name of the range(s) to delete. All named ranges with the given name will be deleted.
627    pub name: Option<String>,
628    /// The ID of the named range to delete.
629    #[serde(rename = "namedRangeId")]
630    pub named_range_id: Option<String>,
631}
632
633impl common::Part for DeleteNamedRangeRequest {}
634
635/// Deletes bullets from all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph.
636///
637/// This type is not used in any activity, and only used as *part* of another schema.
638///
639#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
640#[serde_with::serde_as]
641#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
642pub struct DeleteParagraphBulletsRequest {
643    /// The range to delete bullets from.
644    pub range: Option<Range>,
645}
646
647impl common::Part for DeleteParagraphBulletsRequest {}
648
649/// Deletes a PositionedObject from the document.
650///
651/// This type is not used in any activity, and only used as *part* of another schema.
652///
653#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
654#[serde_with::serde_as]
655#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
656pub struct DeletePositionedObjectRequest {
657    /// The ID of the positioned object to delete.
658    #[serde(rename = "objectId")]
659    pub object_id: Option<String>,
660}
661
662impl common::Part for DeletePositionedObjectRequest {}
663
664/// Deletes a column from a table.
665///
666/// This type is not used in any activity, and only used as *part* of another schema.
667///
668#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
669#[serde_with::serde_as]
670#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
671pub struct DeleteTableColumnRequest {
672    /// The reference table cell location from which the column will be deleted. The column this cell spans will be deleted. If this is a merged cell that spans multiple columns, all columns that the cell spans will be deleted. If no columns remain in the table after this deletion, the whole table is deleted.
673    #[serde(rename = "tableCellLocation")]
674    pub table_cell_location: Option<TableCellLocation>,
675}
676
677impl common::Part for DeleteTableColumnRequest {}
678
679/// Deletes a row from a table.
680///
681/// This type is not used in any activity, and only used as *part* of another schema.
682///
683#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
684#[serde_with::serde_as]
685#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
686pub struct DeleteTableRowRequest {
687    /// The reference table cell location from which the row will be deleted. The row this cell spans will be deleted. If this is a merged cell that spans multiple rows, all rows that the cell spans will be deleted. If no rows remain in the table after this deletion, the whole table is deleted.
688    #[serde(rename = "tableCellLocation")]
689    pub table_cell_location: Option<TableCellLocation>,
690}
691
692impl common::Part for DeleteTableRowRequest {}
693
694/// A magnitude in a single direction in the specified units.
695///
696/// This type is not used in any activity, and only used as *part* of another schema.
697///
698#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
699#[serde_with::serde_as]
700#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
701pub struct Dimension {
702    /// The magnitude.
703    pub magnitude: Option<f64>,
704    /// The units for magnitude.
705    pub unit: Option<String>,
706}
707
708impl common::Part for Dimension {}
709
710/// A Google Docs document.
711///
712/// # Activities
713///
714/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
715/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
716///
717/// * [batch update documents](DocumentBatchUpdateCall) (none)
718/// * [create documents](DocumentCreateCall) (request|response)
719/// * [get documents](DocumentGetCall) (response)
720#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
721#[serde_with::serde_as]
722#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
723pub struct Document {
724    /// Output only. The main body of the document.
725    pub body: Option<Body>,
726    /// Output only. The ID of the document.
727    #[serde(rename = "documentId")]
728    pub document_id: Option<String>,
729    /// Output only. The style of the document.
730    #[serde(rename = "documentStyle")]
731    pub document_style: Option<DocumentStyle>,
732    /// Output only. The footers in the document, keyed by footer ID.
733    pub footers: Option<HashMap<String, Footer>>,
734    /// Output only. The footnotes in the document, keyed by footnote ID.
735    pub footnotes: Option<HashMap<String, Footnote>>,
736    /// Output only. The headers in the document, keyed by header ID.
737    pub headers: Option<HashMap<String, Header>>,
738    /// Output only. The inline objects in the document, keyed by object ID.
739    #[serde(rename = "inlineObjects")]
740    pub inline_objects: Option<HashMap<String, InlineObject>>,
741    /// Output only. The lists in the document, keyed by list ID.
742    pub lists: Option<HashMap<String, List>>,
743    /// Output only. The named ranges in the document, keyed by name.
744    #[serde(rename = "namedRanges")]
745    pub named_ranges: Option<HashMap<String, NamedRanges>>,
746    /// Output only. The named styles of the document.
747    #[serde(rename = "namedStyles")]
748    pub named_styles: Option<NamedStyles>,
749    /// Output only. The positioned objects in the document, keyed by object ID.
750    #[serde(rename = "positionedObjects")]
751    pub positioned_objects: Option<HashMap<String, PositionedObject>>,
752    /// Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The revision ID is not a sequential number but an opaque string. The format of the revision ID might change over time. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated. However, a changed ID can also be due to internal factors such as ID format changes.
753    #[serde(rename = "revisionId")]
754    pub revision_id: Option<String>,
755    /// Output only. The suggested changes to the style of the document, keyed by suggestion ID.
756    #[serde(rename = "suggestedDocumentStyleChanges")]
757    pub suggested_document_style_changes: Option<HashMap<String, SuggestedDocumentStyle>>,
758    /// Output only. The suggested changes to the named styles of the document, keyed by suggestion ID.
759    #[serde(rename = "suggestedNamedStylesChanges")]
760    pub suggested_named_styles_changes: Option<HashMap<String, SuggestedNamedStyles>>,
761    /// Output only. The suggestions view mode applied to the document. Note: When editing a document, changes must be based on a document with SUGGESTIONS_INLINE.
762    #[serde(rename = "suggestionsViewMode")]
763    pub suggestions_view_mode: Option<String>,
764    /// The title of the document.
765    pub title: Option<String>,
766}
767
768impl common::RequestValue for Document {}
769impl common::Resource for Document {}
770impl common::ResponseResult for Document {}
771
772/// The style of the document.
773///
774/// This type is not used in any activity, and only used as *part* of another schema.
775///
776#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
777#[serde_with::serde_as]
778#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
779pub struct DocumentStyle {
780    /// The background of the document. Documents cannot have a transparent background color.
781    pub background: Option<Background>,
782    /// The ID of the default footer. If not set, there's no default footer. This property is read-only.
783    #[serde(rename = "defaultFooterId")]
784    pub default_footer_id: Option<String>,
785    /// The ID of the default header. If not set, there's no default header. This property is read-only.
786    #[serde(rename = "defaultHeaderId")]
787    pub default_header_id: Option<String>,
788    /// The ID of the footer used only for even pages. The value of use_even_page_header_footer determines whether to use the default_footer_id or this value for the footer on even pages. If not set, there's no even page footer. This property is read-only.
789    #[serde(rename = "evenPageFooterId")]
790    pub even_page_footer_id: Option<String>,
791    /// The ID of the header used only for even pages. The value of use_even_page_header_footer determines whether to use the default_header_id or this value for the header on even pages. If not set, there's no even page header. This property is read-only.
792    #[serde(rename = "evenPageHeaderId")]
793    pub even_page_header_id: Option<String>,
794    /// The ID of the footer used only for the first page. If not set then a unique footer for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_footer_id or this value for the footer on the first page. If not set, there's no first page footer. This property is read-only.
795    #[serde(rename = "firstPageFooterId")]
796    pub first_page_footer_id: Option<String>,
797    /// The ID of the header used only for the first page. If not set then a unique header for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_header_id or this value for the header on the first page. If not set, there's no first page header. This property is read-only.
798    #[serde(rename = "firstPageHeaderId")]
799    pub first_page_header_id: Option<String>,
800    /// Optional. Indicates whether to flip the dimensions of the page_size, which allows changing the page orientation between portrait and landscape.
801    #[serde(rename = "flipPageOrientation")]
802    pub flip_page_orientation: Option<bool>,
803    /// The bottom page margin. Updating the bottom page margin on the document style clears the bottom page margin on all section styles.
804    #[serde(rename = "marginBottom")]
805    pub margin_bottom: Option<Dimension>,
806    /// The amount of space between the bottom of the page and the contents of the footer.
807    #[serde(rename = "marginFooter")]
808    pub margin_footer: Option<Dimension>,
809    /// The amount of space between the top of the page and the contents of the header.
810    #[serde(rename = "marginHeader")]
811    pub margin_header: Option<Dimension>,
812    /// The left page margin. Updating the left page margin on the document style clears the left page margin on all section styles. It may also cause columns to resize in all sections.
813    #[serde(rename = "marginLeft")]
814    pub margin_left: Option<Dimension>,
815    /// The right page margin. Updating the right page margin on the document style clears the right page margin on all section styles. It may also cause columns to resize in all sections.
816    #[serde(rename = "marginRight")]
817    pub margin_right: Option<Dimension>,
818    /// The top page margin. Updating the top page margin on the document style clears the top page margin on all section styles.
819    #[serde(rename = "marginTop")]
820    pub margin_top: Option<Dimension>,
821    /// The page number from which to start counting the number of pages.
822    #[serde(rename = "pageNumberStart")]
823    pub page_number_start: Option<i32>,
824    /// The size of a page in the document.
825    #[serde(rename = "pageSize")]
826    pub page_size: Option<Size>,
827    /// Indicates whether DocumentStyle margin_header, SectionStyle margin_header and DocumentStyle margin_footer, SectionStyle margin_footer are respected. When false, the default values in the Docs editor for header and footer margin are used. This property is read-only.
828    #[serde(rename = "useCustomHeaderFooterMargins")]
829    pub use_custom_header_footer_margins: Option<bool>,
830    /// Indicates whether to use the even page header / footer IDs for the even pages.
831    #[serde(rename = "useEvenPageHeaderFooter")]
832    pub use_even_page_header_footer: Option<bool>,
833    /// Indicates whether to use the first page header / footer IDs for the first page.
834    #[serde(rename = "useFirstPageHeaderFooter")]
835    pub use_first_page_header_footer: Option<bool>,
836}
837
838impl common::Part for DocumentStyle {}
839
840/// A mask that indicates which of the fields on the base DocumentStyle have been changed in this suggestion. For any field set to true, there's a new suggested value.
841///
842/// This type is not used in any activity, and only used as *part* of another schema.
843///
844#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
845#[serde_with::serde_as]
846#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
847pub struct DocumentStyleSuggestionState {
848    /// A mask that indicates which of the fields in background have been changed in this suggestion.
849    #[serde(rename = "backgroundSuggestionState")]
850    pub background_suggestion_state: Option<BackgroundSuggestionState>,
851    /// Indicates if there was a suggested change to default_footer_id.
852    #[serde(rename = "defaultFooterIdSuggested")]
853    pub default_footer_id_suggested: Option<bool>,
854    /// Indicates if there was a suggested change to default_header_id.
855    #[serde(rename = "defaultHeaderIdSuggested")]
856    pub default_header_id_suggested: Option<bool>,
857    /// Indicates if there was a suggested change to even_page_footer_id.
858    #[serde(rename = "evenPageFooterIdSuggested")]
859    pub even_page_footer_id_suggested: Option<bool>,
860    /// Indicates if there was a suggested change to even_page_header_id.
861    #[serde(rename = "evenPageHeaderIdSuggested")]
862    pub even_page_header_id_suggested: Option<bool>,
863    /// Indicates if there was a suggested change to first_page_footer_id.
864    #[serde(rename = "firstPageFooterIdSuggested")]
865    pub first_page_footer_id_suggested: Option<bool>,
866    /// Indicates if there was a suggested change to first_page_header_id.
867    #[serde(rename = "firstPageHeaderIdSuggested")]
868    pub first_page_header_id_suggested: Option<bool>,
869    /// Optional. Indicates if there was a suggested change to flip_page_orientation.
870    #[serde(rename = "flipPageOrientationSuggested")]
871    pub flip_page_orientation_suggested: Option<bool>,
872    /// Indicates if there was a suggested change to margin_bottom.
873    #[serde(rename = "marginBottomSuggested")]
874    pub margin_bottom_suggested: Option<bool>,
875    /// Indicates if there was a suggested change to margin_footer.
876    #[serde(rename = "marginFooterSuggested")]
877    pub margin_footer_suggested: Option<bool>,
878    /// Indicates if there was a suggested change to margin_header.
879    #[serde(rename = "marginHeaderSuggested")]
880    pub margin_header_suggested: Option<bool>,
881    /// Indicates if there was a suggested change to margin_left.
882    #[serde(rename = "marginLeftSuggested")]
883    pub margin_left_suggested: Option<bool>,
884    /// Indicates if there was a suggested change to margin_right.
885    #[serde(rename = "marginRightSuggested")]
886    pub margin_right_suggested: Option<bool>,
887    /// Indicates if there was a suggested change to margin_top.
888    #[serde(rename = "marginTopSuggested")]
889    pub margin_top_suggested: Option<bool>,
890    /// Indicates if there was a suggested change to page_number_start.
891    #[serde(rename = "pageNumberStartSuggested")]
892    pub page_number_start_suggested: Option<bool>,
893    /// A mask that indicates which of the fields in size have been changed in this suggestion.
894    #[serde(rename = "pageSizeSuggestionState")]
895    pub page_size_suggestion_state: Option<SizeSuggestionState>,
896    /// Indicates if there was a suggested change to use_custom_header_footer_margins.
897    #[serde(rename = "useCustomHeaderFooterMarginsSuggested")]
898    pub use_custom_header_footer_margins_suggested: Option<bool>,
899    /// Indicates if there was a suggested change to use_even_page_header_footer.
900    #[serde(rename = "useEvenPageHeaderFooterSuggested")]
901    pub use_even_page_header_footer_suggested: Option<bool>,
902    /// Indicates if there was a suggested change to use_first_page_header_footer.
903    #[serde(rename = "useFirstPageHeaderFooterSuggested")]
904    pub use_first_page_header_footer_suggested: Option<bool>,
905}
906
907impl common::Part for DocumentStyleSuggestionState {}
908
909/// The properties of an embedded drawing and used to differentiate the object type. An embedded drawing is one that's created and edited within a document. Note that extensive details are not supported.
910///
911/// This type is not used in any activity, and only used as *part* of another schema.
912///
913#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
914#[serde_with::serde_as]
915#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
916pub struct EmbeddedDrawingProperties {
917    _never_set: Option<bool>,
918}
919
920impl common::Part for EmbeddedDrawingProperties {}
921
922/// A mask that indicates which of the fields on the base EmbeddedDrawingProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
923///
924/// This type is not used in any activity, and only used as *part* of another schema.
925///
926#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
927#[serde_with::serde_as]
928#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
929pub struct EmbeddedDrawingPropertiesSuggestionState {
930    _never_set: Option<bool>,
931}
932
933impl common::Part for EmbeddedDrawingPropertiesSuggestionState {}
934
935/// An embedded object in the document.
936///
937/// This type is not used in any activity, and only used as *part* of another schema.
938///
939#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
940#[serde_with::serde_as]
941#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
942pub struct EmbeddedObject {
943    /// The description of the embedded object. The `title` and `description` are both combined to display alt text.
944    pub description: Option<String>,
945    /// The properties of an embedded drawing.
946    #[serde(rename = "embeddedDrawingProperties")]
947    pub embedded_drawing_properties: Option<EmbeddedDrawingProperties>,
948    /// The border of the embedded object.
949    #[serde(rename = "embeddedObjectBorder")]
950    pub embedded_object_border: Option<EmbeddedObjectBorder>,
951    /// The properties of an image.
952    #[serde(rename = "imageProperties")]
953    pub image_properties: Option<ImageProperties>,
954    /// A reference to the external linked source content. For example, it contains a reference to the source Google Sheets chart when the embedded object is a linked chart. If unset, then the embedded object is not linked.
955    #[serde(rename = "linkedContentReference")]
956    pub linked_content_reference: Option<LinkedContentReference>,
957    /// The bottom margin of the embedded object.
958    #[serde(rename = "marginBottom")]
959    pub margin_bottom: Option<Dimension>,
960    /// The left margin of the embedded object.
961    #[serde(rename = "marginLeft")]
962    pub margin_left: Option<Dimension>,
963    /// The right margin of the embedded object.
964    #[serde(rename = "marginRight")]
965    pub margin_right: Option<Dimension>,
966    /// The top margin of the embedded object.
967    #[serde(rename = "marginTop")]
968    pub margin_top: Option<Dimension>,
969    /// The visible size of the image after cropping.
970    pub size: Option<Size>,
971    /// The title of the embedded object. The `title` and `description` are both combined to display alt text.
972    pub title: Option<String>,
973}
974
975impl common::Part for EmbeddedObject {}
976
977/// A border around an EmbeddedObject.
978///
979/// This type is not used in any activity, and only used as *part* of another schema.
980///
981#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
982#[serde_with::serde_as]
983#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
984pub struct EmbeddedObjectBorder {
985    /// The color of the border.
986    pub color: Option<OptionalColor>,
987    /// The dash style of the border.
988    #[serde(rename = "dashStyle")]
989    pub dash_style: Option<String>,
990    /// The property state of the border property.
991    #[serde(rename = "propertyState")]
992    pub property_state: Option<String>,
993    /// The width of the border.
994    pub width: Option<Dimension>,
995}
996
997impl common::Part for EmbeddedObjectBorder {}
998
999/// A mask that indicates which of the fields on the base EmbeddedObjectBorder have been changed in this suggestion. For any field set to true, there's a new suggested value.
1000///
1001/// This type is not used in any activity, and only used as *part* of another schema.
1002///
1003#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1004#[serde_with::serde_as]
1005#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1006pub struct EmbeddedObjectBorderSuggestionState {
1007    /// Indicates if there was a suggested change to color.
1008    #[serde(rename = "colorSuggested")]
1009    pub color_suggested: Option<bool>,
1010    /// Indicates if there was a suggested change to dash_style.
1011    #[serde(rename = "dashStyleSuggested")]
1012    pub dash_style_suggested: Option<bool>,
1013    /// Indicates if there was a suggested change to property_state.
1014    #[serde(rename = "propertyStateSuggested")]
1015    pub property_state_suggested: Option<bool>,
1016    /// Indicates if there was a suggested change to width.
1017    #[serde(rename = "widthSuggested")]
1018    pub width_suggested: Option<bool>,
1019}
1020
1021impl common::Part for EmbeddedObjectBorderSuggestionState {}
1022
1023/// A mask that indicates which of the fields on the base EmbeddedObject have been changed in this suggestion. For any field set to true, there's a new suggested value.
1024///
1025/// This type is not used in any activity, and only used as *part* of another schema.
1026///
1027#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1028#[serde_with::serde_as]
1029#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1030pub struct EmbeddedObjectSuggestionState {
1031    /// Indicates if there was a suggested change to description.
1032    #[serde(rename = "descriptionSuggested")]
1033    pub description_suggested: Option<bool>,
1034    /// A mask that indicates which of the fields in embedded_drawing_properties have been changed in this suggestion.
1035    #[serde(rename = "embeddedDrawingPropertiesSuggestionState")]
1036    pub embedded_drawing_properties_suggestion_state:
1037        Option<EmbeddedDrawingPropertiesSuggestionState>,
1038    /// A mask that indicates which of the fields in embedded_object_border have been changed in this suggestion.
1039    #[serde(rename = "embeddedObjectBorderSuggestionState")]
1040    pub embedded_object_border_suggestion_state: Option<EmbeddedObjectBorderSuggestionState>,
1041    /// A mask that indicates which of the fields in image_properties have been changed in this suggestion.
1042    #[serde(rename = "imagePropertiesSuggestionState")]
1043    pub image_properties_suggestion_state: Option<ImagePropertiesSuggestionState>,
1044    /// A mask that indicates which of the fields in linked_content_reference have been changed in this suggestion.
1045    #[serde(rename = "linkedContentReferenceSuggestionState")]
1046    pub linked_content_reference_suggestion_state: Option<LinkedContentReferenceSuggestionState>,
1047    /// Indicates if there was a suggested change to margin_bottom.
1048    #[serde(rename = "marginBottomSuggested")]
1049    pub margin_bottom_suggested: Option<bool>,
1050    /// Indicates if there was a suggested change to margin_left.
1051    #[serde(rename = "marginLeftSuggested")]
1052    pub margin_left_suggested: Option<bool>,
1053    /// Indicates if there was a suggested change to margin_right.
1054    #[serde(rename = "marginRightSuggested")]
1055    pub margin_right_suggested: Option<bool>,
1056    /// Indicates if there was a suggested change to margin_top.
1057    #[serde(rename = "marginTopSuggested")]
1058    pub margin_top_suggested: Option<bool>,
1059    /// A mask that indicates which of the fields in size have been changed in this suggestion.
1060    #[serde(rename = "sizeSuggestionState")]
1061    pub size_suggestion_state: Option<SizeSuggestionState>,
1062    /// Indicates if there was a suggested change to title.
1063    #[serde(rename = "titleSuggested")]
1064    pub title_suggested: Option<bool>,
1065}
1066
1067impl common::Part for EmbeddedObjectSuggestionState {}
1068
1069/// Location at the end of a body, header, footer or footnote. The location is immediately before the last newline in the document segment.
1070///
1071/// This type is not used in any activity, and only used as *part* of another schema.
1072///
1073#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1074#[serde_with::serde_as]
1075#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1076pub struct EndOfSegmentLocation {
1077    /// The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
1078    #[serde(rename = "segmentId")]
1079    pub segment_id: Option<String>,
1080}
1081
1082impl common::Part for EndOfSegmentLocation {}
1083
1084/// A ParagraphElement representing an equation.
1085///
1086/// This type is not used in any activity, and only used as *part* of another schema.
1087///
1088#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1089#[serde_with::serde_as]
1090#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1091pub struct Equation {
1092    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1093    #[serde(rename = "suggestedDeletionIds")]
1094    pub suggested_deletion_ids: Option<Vec<String>>,
1095    /// The suggested insertion IDs. An Equation may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
1096    #[serde(rename = "suggestedInsertionIds")]
1097    pub suggested_insertion_ids: Option<Vec<String>>,
1098}
1099
1100impl common::Part for Equation {}
1101
1102/// A document footer.
1103///
1104/// This type is not used in any activity, and only used as *part* of another schema.
1105///
1106#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1107#[serde_with::serde_as]
1108#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1109pub struct Footer {
1110    /// The contents of the footer. The indexes for a footer's content begin at zero.
1111    pub content: Option<Vec<StructuralElement>>,
1112    /// The ID of the footer.
1113    #[serde(rename = "footerId")]
1114    pub footer_id: Option<String>,
1115}
1116
1117impl common::Part for Footer {}
1118
1119/// A document footnote.
1120///
1121/// This type is not used in any activity, and only used as *part* of another schema.
1122///
1123#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1124#[serde_with::serde_as]
1125#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1126pub struct Footnote {
1127    /// The contents of the footnote. The indexes for a footnote's content begin at zero.
1128    pub content: Option<Vec<StructuralElement>>,
1129    /// The ID of the footnote.
1130    #[serde(rename = "footnoteId")]
1131    pub footnote_id: Option<String>,
1132}
1133
1134impl common::Part for Footnote {}
1135
1136/// A ParagraphElement representing a footnote reference. A footnote reference is the inline content rendered with a number and is used to identify the footnote.
1137///
1138/// This type is not used in any activity, and only used as *part* of another schema.
1139///
1140#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1141#[serde_with::serde_as]
1142#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1143pub struct FootnoteReference {
1144    /// The ID of the footnote that contains the content of this footnote reference.
1145    #[serde(rename = "footnoteId")]
1146    pub footnote_id: Option<String>,
1147    /// The rendered number of this footnote.
1148    #[serde(rename = "footnoteNumber")]
1149    pub footnote_number: Option<String>,
1150    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1151    #[serde(rename = "suggestedDeletionIds")]
1152    pub suggested_deletion_ids: Option<Vec<String>>,
1153    /// The suggested insertion IDs. A FootnoteReference may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
1154    #[serde(rename = "suggestedInsertionIds")]
1155    pub suggested_insertion_ids: Option<Vec<String>>,
1156    /// The suggested text style changes to this FootnoteReference, keyed by suggestion ID.
1157    #[serde(rename = "suggestedTextStyleChanges")]
1158    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
1159    /// The text style of this FootnoteReference.
1160    #[serde(rename = "textStyle")]
1161    pub text_style: Option<TextStyle>,
1162}
1163
1164impl common::Part for FootnoteReference {}
1165
1166/// A document header.
1167///
1168/// This type is not used in any activity, and only used as *part* of another schema.
1169///
1170#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1171#[serde_with::serde_as]
1172#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1173pub struct Header {
1174    /// The contents of the header. The indexes for a header's content begin at zero.
1175    pub content: Option<Vec<StructuralElement>>,
1176    /// The ID of the header.
1177    #[serde(rename = "headerId")]
1178    pub header_id: Option<String>,
1179}
1180
1181impl common::Part for Header {}
1182
1183/// A ParagraphElement representing a horizontal line.
1184///
1185/// This type is not used in any activity, and only used as *part* of another schema.
1186///
1187#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1188#[serde_with::serde_as]
1189#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1190pub struct HorizontalRule {
1191    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1192    #[serde(rename = "suggestedDeletionIds")]
1193    pub suggested_deletion_ids: Option<Vec<String>>,
1194    /// The suggested insertion IDs. A HorizontalRule may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
1195    #[serde(rename = "suggestedInsertionIds")]
1196    pub suggested_insertion_ids: Option<Vec<String>>,
1197    /// The suggested text style changes to this HorizontalRule, keyed by suggestion ID.
1198    #[serde(rename = "suggestedTextStyleChanges")]
1199    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
1200    /// The text style of this HorizontalRule. Similar to text content, like text runs and footnote references, the text style of a horizontal rule can affect content layout as well as the styling of text inserted next to it.
1201    #[serde(rename = "textStyle")]
1202    pub text_style: Option<TextStyle>,
1203}
1204
1205impl common::Part for HorizontalRule {}
1206
1207/// The properties of an image.
1208///
1209/// This type is not used in any activity, and only used as *part* of another schema.
1210///
1211#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1212#[serde_with::serde_as]
1213#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1214pub struct ImageProperties {
1215    /// The clockwise rotation angle of the image, in radians.
1216    pub angle: Option<f32>,
1217    /// The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect.
1218    pub brightness: Option<f32>,
1219    /// A URI to the image with a default lifetime of 30 minutes. This URI is tagged with the account of the requester. Anyone with the URI effectively accesses the image as the original requester. Access to the image may be lost if the document's sharing settings change.
1220    #[serde(rename = "contentUri")]
1221    pub content_uri: Option<String>,
1222    /// The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect.
1223    pub contrast: Option<f32>,
1224    /// The crop properties of the image.
1225    #[serde(rename = "cropProperties")]
1226    pub crop_properties: Option<CropProperties>,
1227    /// The source URI is the URI used to insert the image. The source URI can be empty.
1228    #[serde(rename = "sourceUri")]
1229    pub source_uri: Option<String>,
1230    /// The transparency effect of the image. The value should be in the interval [0.0, 1.0], where 0 means no effect and 1 means transparent.
1231    pub transparency: Option<f32>,
1232}
1233
1234impl common::Part for ImageProperties {}
1235
1236/// A mask that indicates which of the fields on the base ImageProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
1237///
1238/// This type is not used in any activity, and only used as *part* of another schema.
1239///
1240#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1241#[serde_with::serde_as]
1242#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1243pub struct ImagePropertiesSuggestionState {
1244    /// Indicates if there was a suggested change to angle.
1245    #[serde(rename = "angleSuggested")]
1246    pub angle_suggested: Option<bool>,
1247    /// Indicates if there was a suggested change to brightness.
1248    #[serde(rename = "brightnessSuggested")]
1249    pub brightness_suggested: Option<bool>,
1250    /// Indicates if there was a suggested change to content_uri.
1251    #[serde(rename = "contentUriSuggested")]
1252    pub content_uri_suggested: Option<bool>,
1253    /// Indicates if there was a suggested change to contrast.
1254    #[serde(rename = "contrastSuggested")]
1255    pub contrast_suggested: Option<bool>,
1256    /// A mask that indicates which of the fields in crop_properties have been changed in this suggestion.
1257    #[serde(rename = "cropPropertiesSuggestionState")]
1258    pub crop_properties_suggestion_state: Option<CropPropertiesSuggestionState>,
1259    /// Indicates if there was a suggested change to source_uri.
1260    #[serde(rename = "sourceUriSuggested")]
1261    pub source_uri_suggested: Option<bool>,
1262    /// Indicates if there was a suggested change to transparency.
1263    #[serde(rename = "transparencySuggested")]
1264    pub transparency_suggested: Option<bool>,
1265}
1266
1267impl common::Part for ImagePropertiesSuggestionState {}
1268
1269/// An object that appears inline with text. An InlineObject contains an EmbeddedObject such as an image.
1270///
1271/// This type is not used in any activity, and only used as *part* of another schema.
1272///
1273#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1274#[serde_with::serde_as]
1275#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1276pub struct InlineObject {
1277    /// The properties of this inline object.
1278    #[serde(rename = "inlineObjectProperties")]
1279    pub inline_object_properties: Option<InlineObjectProperties>,
1280    /// The ID of this inline object. Can be used to update an object’s properties.
1281    #[serde(rename = "objectId")]
1282    pub object_id: Option<String>,
1283    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1284    #[serde(rename = "suggestedDeletionIds")]
1285    pub suggested_deletion_ids: Option<Vec<String>>,
1286    /// The suggested changes to the inline object properties, keyed by suggestion ID.
1287    #[serde(rename = "suggestedInlineObjectPropertiesChanges")]
1288    pub suggested_inline_object_properties_changes:
1289        Option<HashMap<String, SuggestedInlineObjectProperties>>,
1290    /// The suggested insertion ID. If empty, then this is not a suggested insertion.
1291    #[serde(rename = "suggestedInsertionId")]
1292    pub suggested_insertion_id: Option<String>,
1293}
1294
1295impl common::Part for InlineObject {}
1296
1297/// A ParagraphElement that contains an InlineObject.
1298///
1299/// This type is not used in any activity, and only used as *part* of another schema.
1300///
1301#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1302#[serde_with::serde_as]
1303#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1304pub struct InlineObjectElement {
1305    /// The ID of the InlineObject this element contains.
1306    #[serde(rename = "inlineObjectId")]
1307    pub inline_object_id: Option<String>,
1308    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1309    #[serde(rename = "suggestedDeletionIds")]
1310    pub suggested_deletion_ids: Option<Vec<String>>,
1311    /// The suggested insertion IDs. An InlineObjectElement may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
1312    #[serde(rename = "suggestedInsertionIds")]
1313    pub suggested_insertion_ids: Option<Vec<String>>,
1314    /// The suggested text style changes to this InlineObject, keyed by suggestion ID.
1315    #[serde(rename = "suggestedTextStyleChanges")]
1316    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
1317    /// The text style of this InlineObjectElement. Similar to text content, like text runs and footnote references, the text style of an inline object element can affect content layout as well as the styling of text inserted next to it.
1318    #[serde(rename = "textStyle")]
1319    pub text_style: Option<TextStyle>,
1320}
1321
1322impl common::Part for InlineObjectElement {}
1323
1324/// Properties of an InlineObject.
1325///
1326/// This type is not used in any activity, and only used as *part* of another schema.
1327///
1328#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1329#[serde_with::serde_as]
1330#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1331pub struct InlineObjectProperties {
1332    /// The embedded object of this inline object.
1333    #[serde(rename = "embeddedObject")]
1334    pub embedded_object: Option<EmbeddedObject>,
1335}
1336
1337impl common::Part for InlineObjectProperties {}
1338
1339/// A mask that indicates which of the fields on the base InlineObjectProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
1340///
1341/// This type is not used in any activity, and only used as *part* of another schema.
1342///
1343#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1344#[serde_with::serde_as]
1345#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1346pub struct InlineObjectPropertiesSuggestionState {
1347    /// A mask that indicates which of the fields in embedded_object have been changed in this suggestion.
1348    #[serde(rename = "embeddedObjectSuggestionState")]
1349    pub embedded_object_suggestion_state: Option<EmbeddedObjectSuggestionState>,
1350}
1351
1352impl common::Part for InlineObjectPropertiesSuggestionState {}
1353
1354/// Inserts an InlineObject containing an image at the given location.
1355///
1356/// This type is not used in any activity, and only used as *part* of another schema.
1357///
1358#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1359#[serde_with::serde_as]
1360#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1361pub struct InsertInlineImageRequest {
1362    /// Inserts the text at the end of a header, footer or the document body. Inline images cannot be inserted inside a footnote.
1363    #[serde(rename = "endOfSegmentLocation")]
1364    pub end_of_segment_location: Option<EndOfSegmentLocation>,
1365    /// Inserts the image at a specific index in the document. The image must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Inline images cannot be inserted inside a footnote or equation.
1366    pub location: Option<Location>,
1367    /// The size that the image should appear as in the document. This property is optional and the final size of the image in the document is determined by the following rules: * If neither width nor height is specified, then a default size of the image is calculated based on its resolution. * If one dimension is specified then the other dimension is calculated to preserve the aspect ratio of the image. * If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio.
1368    #[serde(rename = "objectSize")]
1369    pub object_size: Option<Size>,
1370    /// The image URI. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URI must be publicly accessible and at most 2 kB in length. The URI itself is saved with the image, and exposed via the ImageProperties.content_uri field.
1371    pub uri: Option<String>,
1372}
1373
1374impl common::Part for InsertInlineImageRequest {}
1375
1376/// The result of inserting an inline image.
1377///
1378/// This type is not used in any activity, and only used as *part* of another schema.
1379///
1380#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1381#[serde_with::serde_as]
1382#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1383pub struct InsertInlineImageResponse {
1384    /// The ID of the created InlineObject.
1385    #[serde(rename = "objectId")]
1386    pub object_id: Option<String>,
1387}
1388
1389impl common::Part for InsertInlineImageResponse {}
1390
1391/// The result of inserting an embedded Google Sheets chart.
1392///
1393/// This type is not used in any activity, and only used as *part* of another schema.
1394///
1395#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1396#[serde_with::serde_as]
1397#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1398pub struct InsertInlineSheetsChartResponse {
1399    /// The object ID of the inserted chart.
1400    #[serde(rename = "objectId")]
1401    pub object_id: Option<String>,
1402}
1403
1404impl common::Part for InsertInlineSheetsChartResponse {}
1405
1406/// Inserts a page break followed by a newline at the specified location.
1407///
1408/// This type is not used in any activity, and only used as *part* of another schema.
1409///
1410#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1411#[serde_with::serde_as]
1412#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1413pub struct InsertPageBreakRequest {
1414    /// Inserts the page break at the end of the document body. Page breaks cannot be inserted inside a footnote, header or footer. Since page breaks can only be inserted inside the body, the segment ID field must be empty.
1415    #[serde(rename = "endOfSegmentLocation")]
1416    pub end_of_segment_location: Option<EndOfSegmentLocation>,
1417    /// Inserts the page break at a specific index in the document. The page break must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Page breaks cannot be inserted inside a table, equation, footnote, header or footer. Since page breaks can only be inserted inside the body, the segment ID field must be empty.
1418    pub location: Option<Location>,
1419}
1420
1421impl common::Part for InsertPageBreakRequest {}
1422
1423/// Inserts a section break at the given location. A newline character will be inserted before the section break.
1424///
1425/// This type is not used in any activity, and only used as *part* of another schema.
1426///
1427#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1428#[serde_with::serde_as]
1429#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1430pub struct InsertSectionBreakRequest {
1431    /// Inserts a newline and a section break at the end of the document body. Section breaks cannot be inserted inside a footnote, header or footer. Because section breaks can only be inserted inside the body, the segment ID field must be empty.
1432    #[serde(rename = "endOfSegmentLocation")]
1433    pub end_of_segment_location: Option<EndOfSegmentLocation>,
1434    /// Inserts a newline and a section break at a specific index in the document. The section break must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Section breaks cannot be inserted inside a table, equation, footnote, header, or footer. Since section breaks can only be inserted inside the body, the segment ID field must be empty.
1435    pub location: Option<Location>,
1436    /// The type of section to insert.
1437    #[serde(rename = "sectionType")]
1438    pub section_type: Option<String>,
1439}
1440
1441impl common::Part for InsertSectionBreakRequest {}
1442
1443/// Inserts an empty column into a table.
1444///
1445/// This type is not used in any activity, and only used as *part* of another schema.
1446///
1447#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1448#[serde_with::serde_as]
1449#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1450pub struct InsertTableColumnRequest {
1451    /// Whether to insert new column to the right of the reference cell location. - `True`: insert to the right. - `False`: insert to the left.
1452    #[serde(rename = "insertRight")]
1453    pub insert_right: Option<bool>,
1454    /// The reference table cell location from which columns will be inserted. A new column will be inserted to the left (or right) of the column where the reference cell is. If the reference cell is a merged cell, a new column will be inserted to the left (or right) of the merged cell.
1455    #[serde(rename = "tableCellLocation")]
1456    pub table_cell_location: Option<TableCellLocation>,
1457}
1458
1459impl common::Part for InsertTableColumnRequest {}
1460
1461/// Inserts a table at the specified location. A newline character will be inserted before the inserted table.
1462///
1463/// This type is not used in any activity, and only used as *part* of another schema.
1464///
1465#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1466#[serde_with::serde_as]
1467#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1468pub struct InsertTableRequest {
1469    /// The number of columns in the table.
1470    pub columns: Option<i32>,
1471    /// Inserts the table at the end of the given header, footer or document body. A newline character will be inserted before the inserted table. Tables cannot be inserted inside a footnote.
1472    #[serde(rename = "endOfSegmentLocation")]
1473    pub end_of_segment_location: Option<EndOfSegmentLocation>,
1474    /// Inserts the table at a specific model index. A newline character will be inserted before the inserted table, therefore the table start index will be at the specified location index + 1. The table must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between an existing table and its preceding paragraph). Tables cannot be inserted inside a footnote or equation.
1475    pub location: Option<Location>,
1476    /// The number of rows in the table.
1477    pub rows: Option<i32>,
1478}
1479
1480impl common::Part for InsertTableRequest {}
1481
1482/// Inserts an empty row into a table.
1483///
1484/// This type is not used in any activity, and only used as *part* of another schema.
1485///
1486#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1487#[serde_with::serde_as]
1488#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1489pub struct InsertTableRowRequest {
1490    /// Whether to insert new row below the reference cell location. - `True`: insert below the cell. - `False`: insert above the cell.
1491    #[serde(rename = "insertBelow")]
1492    pub insert_below: Option<bool>,
1493    /// The reference table cell location from which rows will be inserted. A new row will be inserted above (or below) the row where the reference cell is. If the reference cell is a merged cell, a new row will be inserted above (or below) the merged cell.
1494    #[serde(rename = "tableCellLocation")]
1495    pub table_cell_location: Option<TableCellLocation>,
1496}
1497
1498impl common::Part for InsertTableRowRequest {}
1499
1500/// Inserts text at the specified location.
1501///
1502/// This type is not used in any activity, and only used as *part* of another schema.
1503///
1504#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1505#[serde_with::serde_as]
1506#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1507pub struct InsertTextRequest {
1508    /// Inserts the text at the end of a header, footer, footnote or the document body.
1509    #[serde(rename = "endOfSegmentLocation")]
1510    pub end_of_segment_location: Option<EndOfSegmentLocation>,
1511    /// Inserts the text at a specific index in the document. Text must be inserted inside the bounds of an existing Paragraph. For instance, text cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). The text must be inserted in the preceding paragraph.
1512    pub location: Option<Location>,
1513    /// The text to be inserted. Inserting a newline character will implicitly create a new Paragraph at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets. Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text style for the inserted text will match the text immediately before the insertion index. Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text.
1514    pub text: Option<String>,
1515}
1516
1517impl common::Part for InsertTextRequest {}
1518
1519/// A reference to another portion of a document or an external URL resource.
1520///
1521/// This type is not used in any activity, and only used as *part* of another schema.
1522///
1523#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1524#[serde_with::serde_as]
1525#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1526pub struct Link {
1527    /// The ID of a bookmark in this document.
1528    #[serde(rename = "bookmarkId")]
1529    pub bookmark_id: Option<String>,
1530    /// The ID of a heading in this document.
1531    #[serde(rename = "headingId")]
1532    pub heading_id: Option<String>,
1533    /// An external URL.
1534    pub url: Option<String>,
1535}
1536
1537impl common::Part for Link {}
1538
1539/// A reference to the external linked source content.
1540///
1541/// This type is not used in any activity, and only used as *part* of another schema.
1542///
1543#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1544#[serde_with::serde_as]
1545#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1546pub struct LinkedContentReference {
1547    /// A reference to the linked chart.
1548    #[serde(rename = "sheetsChartReference")]
1549    pub sheets_chart_reference: Option<SheetsChartReference>,
1550}
1551
1552impl common::Part for LinkedContentReference {}
1553
1554/// A mask that indicates which of the fields on the base LinkedContentReference have been changed in this suggestion. For any field set to true, there's a new suggested value.
1555///
1556/// This type is not used in any activity, and only used as *part* of another schema.
1557///
1558#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1559#[serde_with::serde_as]
1560#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1561pub struct LinkedContentReferenceSuggestionState {
1562    /// A mask that indicates which of the fields in sheets_chart_reference have been changed in this suggestion.
1563    #[serde(rename = "sheetsChartReferenceSuggestionState")]
1564    pub sheets_chart_reference_suggestion_state: Option<SheetsChartReferenceSuggestionState>,
1565}
1566
1567impl common::Part for LinkedContentReferenceSuggestionState {}
1568
1569/// A List represents the list attributes for a group of paragraphs that all belong to the same list. A paragraph that's part of a list has a reference to the list's ID in its bullet.
1570///
1571/// This type is not used in any activity, and only used as *part* of another schema.
1572///
1573#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1574#[serde_with::serde_as]
1575#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1576pub struct List {
1577    /// The properties of the list.
1578    #[serde(rename = "listProperties")]
1579    pub list_properties: Option<ListProperties>,
1580    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this list.
1581    #[serde(rename = "suggestedDeletionIds")]
1582    pub suggested_deletion_ids: Option<Vec<String>>,
1583    /// The suggested insertion ID. If empty, then this is not a suggested insertion.
1584    #[serde(rename = "suggestedInsertionId")]
1585    pub suggested_insertion_id: Option<String>,
1586    /// The suggested changes to the list properties, keyed by suggestion ID.
1587    #[serde(rename = "suggestedListPropertiesChanges")]
1588    pub suggested_list_properties_changes: Option<HashMap<String, SuggestedListProperties>>,
1589}
1590
1591impl common::Part for List {}
1592
1593/// The properties of a list that describe the look and feel of bullets belonging to paragraphs associated with a list.
1594///
1595/// This type is not used in any activity, and only used as *part* of another schema.
1596///
1597#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1598#[serde_with::serde_as]
1599#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1600pub struct ListProperties {
1601    /// Describes the properties of the bullets at the associated level. A list has at most 9 levels of nesting with nesting level 0 corresponding to the top-most level and nesting level 8 corresponding to the most nested level. The nesting levels are returned in ascending order with the least nested returned first.
1602    #[serde(rename = "nestingLevels")]
1603    pub nesting_levels: Option<Vec<NestingLevel>>,
1604}
1605
1606impl common::Part for ListProperties {}
1607
1608/// A mask that indicates which of the fields on the base ListProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
1609///
1610/// This type is not used in any activity, and only used as *part* of another schema.
1611///
1612#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1613#[serde_with::serde_as]
1614#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1615pub struct ListPropertiesSuggestionState {
1616    /// A mask that indicates which of the fields on the corresponding NestingLevel in nesting_levels have been changed in this suggestion. The nesting level suggestion states are returned in ascending order of the nesting level with the least nested returned first.
1617    #[serde(rename = "nestingLevelsSuggestionStates")]
1618    pub nesting_levels_suggestion_states: Option<Vec<NestingLevelSuggestionState>>,
1619}
1620
1621impl common::Part for ListPropertiesSuggestionState {}
1622
1623/// A particular location in the document.
1624///
1625/// This type is not used in any activity, and only used as *part* of another schema.
1626///
1627#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1628#[serde_with::serde_as]
1629#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1630pub struct Location {
1631    /// The zero-based index, in UTF-16 code units. The index is relative to the beginning of the segment specified by segment_id.
1632    pub index: Option<i32>,
1633    /// The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
1634    #[serde(rename = "segmentId")]
1635    pub segment_id: Option<String>,
1636}
1637
1638impl common::Part for Location {}
1639
1640/// Merges cells in a Table.
1641///
1642/// This type is not used in any activity, and only used as *part* of another schema.
1643///
1644#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1645#[serde_with::serde_as]
1646#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1647pub struct MergeTableCellsRequest {
1648    /// The table range specifying which cells of the table to merge. Any text in the cells being merged will be concatenated and stored in the "head" cell of the range. This is the upper-left cell of the range when the content direction is left to right, and the upper-right cell of the range otherwise. If the range is non-rectangular (which can occur in some cases where the range covers cells that are already merged or where the table is non-rectangular), a 400 bad request error is returned.
1649    #[serde(rename = "tableRange")]
1650    pub table_range: Option<TableRange>,
1651}
1652
1653impl common::Part for MergeTableCellsRequest {}
1654
1655/// A collection of Ranges with the same named range ID. Named ranges allow developers to associate parts of a document with an arbitrary user-defined label so their contents can be programmatically read or edited later. A document can contain multiple named ranges with the same name, but every named range has a unique ID. A named range is created with a single Range, and content inserted inside a named range generally expands that range. However, certain document changes can cause the range to be split into multiple ranges. Named ranges are not private. All applications and collaborators that have access to the document can see its named ranges.
1656///
1657/// This type is not used in any activity, and only used as *part* of another schema.
1658///
1659#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1660#[serde_with::serde_as]
1661#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1662pub struct NamedRange {
1663    /// The name of the named range.
1664    pub name: Option<String>,
1665    /// The ID of the named range.
1666    #[serde(rename = "namedRangeId")]
1667    pub named_range_id: Option<String>,
1668    /// The ranges that belong to this named range.
1669    pub ranges: Option<Vec<Range>>,
1670}
1671
1672impl common::Part for NamedRange {}
1673
1674/// A collection of all the NamedRanges in the document that share a given name.
1675///
1676/// This type is not used in any activity, and only used as *part* of another schema.
1677///
1678#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1679#[serde_with::serde_as]
1680#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1681pub struct NamedRanges {
1682    /// The name that all the named ranges share.
1683    pub name: Option<String>,
1684    /// The NamedRanges that share the same name.
1685    #[serde(rename = "namedRanges")]
1686    pub named_ranges: Option<Vec<NamedRange>>,
1687}
1688
1689impl common::Part for NamedRanges {}
1690
1691/// A named style. Paragraphs in the document can inherit their TextStyle and ParagraphStyle from this named style when they have the same named style type.
1692///
1693/// This type is not used in any activity, and only used as *part* of another schema.
1694///
1695#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1696#[serde_with::serde_as]
1697#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1698pub struct NamedStyle {
1699    /// The type of this named style.
1700    #[serde(rename = "namedStyleType")]
1701    pub named_style_type: Option<String>,
1702    /// The paragraph style of this named style.
1703    #[serde(rename = "paragraphStyle")]
1704    pub paragraph_style: Option<ParagraphStyle>,
1705    /// The text style of this named style.
1706    #[serde(rename = "textStyle")]
1707    pub text_style: Option<TextStyle>,
1708}
1709
1710impl common::Part for NamedStyle {}
1711
1712/// A suggestion state of a NamedStyle message.
1713///
1714/// This type is not used in any activity, and only used as *part* of another schema.
1715///
1716#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1717#[serde_with::serde_as]
1718#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1719pub struct NamedStyleSuggestionState {
1720    /// The named style type that this suggestion state corresponds to. This field is provided as a convenience for matching the NamedStyleSuggestionState with its corresponding NamedStyle.
1721    #[serde(rename = "namedStyleType")]
1722    pub named_style_type: Option<String>,
1723    /// A mask that indicates which of the fields in paragraph style have been changed in this suggestion.
1724    #[serde(rename = "paragraphStyleSuggestionState")]
1725    pub paragraph_style_suggestion_state: Option<ParagraphStyleSuggestionState>,
1726    /// A mask that indicates which of the fields in text style have been changed in this suggestion.
1727    #[serde(rename = "textStyleSuggestionState")]
1728    pub text_style_suggestion_state: Option<TextStyleSuggestionState>,
1729}
1730
1731impl common::Part for NamedStyleSuggestionState {}
1732
1733/// The named styles. Paragraphs in the document can inherit their TextStyle and ParagraphStyle from these named styles.
1734///
1735/// This type is not used in any activity, and only used as *part* of another schema.
1736///
1737#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1738#[serde_with::serde_as]
1739#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1740pub struct NamedStyles {
1741    /// The named styles. There's an entry for each of the possible named style types.
1742    pub styles: Option<Vec<NamedStyle>>,
1743}
1744
1745impl common::Part for NamedStyles {}
1746
1747/// The suggestion state of a NamedStyles message.
1748///
1749/// This type is not used in any activity, and only used as *part* of another schema.
1750///
1751#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1752#[serde_with::serde_as]
1753#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1754pub struct NamedStylesSuggestionState {
1755    /// A mask that indicates which of the fields on the corresponding NamedStyle in styles have been changed in this suggestion. The order of these named style suggestion states matches the order of the corresponding named style within the named styles suggestion.
1756    #[serde(rename = "stylesSuggestionStates")]
1757    pub styles_suggestion_states: Option<Vec<NamedStyleSuggestionState>>,
1758}
1759
1760impl common::Part for NamedStylesSuggestionState {}
1761
1762/// Contains properties describing the look and feel of a list bullet at a given level of nesting.
1763///
1764/// This type is not used in any activity, and only used as *part* of another schema.
1765///
1766#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1767#[serde_with::serde_as]
1768#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1769pub struct NestingLevel {
1770    /// The alignment of the bullet within the space allotted for rendering the bullet.
1771    #[serde(rename = "bulletAlignment")]
1772    pub bullet_alignment: Option<String>,
1773    /// The format string used by bullets at this level of nesting. The glyph format contains one or more placeholders, and these placeholders are replaced with the appropriate values depending on the glyph_type or glyph_symbol. The placeholders follow the pattern `%[nesting_level]`. Furthermore, placeholders can have prefixes and suffixes. Thus, the glyph format follows the pattern `%[nesting_level]`. Note that the prefix and suffix are optional and can be arbitrary strings. For example, the glyph format `%0.` indicates that the rendered glyph will replace the placeholder with the corresponding glyph for nesting level 0 followed by a period as the suffix. So a list with a glyph type of UPPER_ALPHA and glyph format `%0.` at nesting level 0 will result in a list with rendered glyphs `A.` `B.` `C.` The glyph format can contain placeholders for the current nesting level as well as placeholders for parent nesting levels. For example, a list can have a glyph format of `%0.` at nesting level 0 and a glyph format of `%0.%1.` at nesting level 1. Assuming both nesting levels have DECIMAL glyph types, this would result in a list with rendered glyphs `1.` `2.` ` 2.1.` ` 2.2.` `3.` For nesting levels that are ordered, the string that replaces a placeholder in the glyph format for a particular paragraph depends on the paragraph's order within the list.
1774    #[serde(rename = "glyphFormat")]
1775    pub glyph_format: Option<String>,
1776    /// A custom glyph symbol used by bullets when paragraphs at this level of nesting are unordered. The glyph symbol replaces placeholders within the glyph_format. For example, if the glyph_symbol is the solid circle corresponding to Unicode U+25cf code point and the glyph_format is `%0`, the rendered glyph would be the solid circle.
1777    #[serde(rename = "glyphSymbol")]
1778    pub glyph_symbol: Option<String>,
1779    /// The type of glyph used by bullets when paragraphs at this level of nesting are ordered. The glyph type determines the type of glyph used to replace placeholders within the glyph_format when paragraphs at this level of nesting are ordered. For example, if the nesting level is 0, the glyph_format is `%0.` and the glyph type is DECIMAL, then the rendered glyph would replace the placeholder `%0` in the glyph format with a number corresponding to list item's order within the list.
1780    #[serde(rename = "glyphType")]
1781    pub glyph_type: Option<String>,
1782    /// The amount of indentation for the first line of paragraphs at this level of nesting.
1783    #[serde(rename = "indentFirstLine")]
1784    pub indent_first_line: Option<Dimension>,
1785    /// The amount of indentation for paragraphs at this level of nesting. Applied to the side that corresponds to the start of the text, based on the paragraph's content direction.
1786    #[serde(rename = "indentStart")]
1787    pub indent_start: Option<Dimension>,
1788    /// The number of the first list item at this nesting level. A value of 0 is treated as a value of 1 for lettered lists and Roman numeral lists. For values of both 0 and 1, lettered and Roman numeral lists will begin at `a` and `i` respectively. This value is ignored for nesting levels with unordered glyphs.
1789    #[serde(rename = "startNumber")]
1790    pub start_number: Option<i32>,
1791    /// The text style of bullets at this level of nesting.
1792    #[serde(rename = "textStyle")]
1793    pub text_style: Option<TextStyle>,
1794}
1795
1796impl common::Part for NestingLevel {}
1797
1798/// A mask that indicates which of the fields on the base NestingLevel have been changed in this suggestion. For any field set to true, there's a new suggested value.
1799///
1800/// This type is not used in any activity, and only used as *part* of another schema.
1801///
1802#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1803#[serde_with::serde_as]
1804#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1805pub struct NestingLevelSuggestionState {
1806    /// Indicates if there was a suggested change to bullet_alignment.
1807    #[serde(rename = "bulletAlignmentSuggested")]
1808    pub bullet_alignment_suggested: Option<bool>,
1809    /// Indicates if there was a suggested change to glyph_format.
1810    #[serde(rename = "glyphFormatSuggested")]
1811    pub glyph_format_suggested: Option<bool>,
1812    /// Indicates if there was a suggested change to glyph_symbol.
1813    #[serde(rename = "glyphSymbolSuggested")]
1814    pub glyph_symbol_suggested: Option<bool>,
1815    /// Indicates if there was a suggested change to glyph_type.
1816    #[serde(rename = "glyphTypeSuggested")]
1817    pub glyph_type_suggested: Option<bool>,
1818    /// Indicates if there was a suggested change to indent_first_line.
1819    #[serde(rename = "indentFirstLineSuggested")]
1820    pub indent_first_line_suggested: Option<bool>,
1821    /// Indicates if there was a suggested change to indent_start.
1822    #[serde(rename = "indentStartSuggested")]
1823    pub indent_start_suggested: Option<bool>,
1824    /// Indicates if there was a suggested change to start_number.
1825    #[serde(rename = "startNumberSuggested")]
1826    pub start_number_suggested: Option<bool>,
1827    /// A mask that indicates which of the fields in text style have been changed in this suggestion.
1828    #[serde(rename = "textStyleSuggestionState")]
1829    pub text_style_suggestion_state: Option<TextStyleSuggestionState>,
1830}
1831
1832impl common::Part for NestingLevelSuggestionState {}
1833
1834/// A collection of object IDs.
1835///
1836/// This type is not used in any activity, and only used as *part* of another schema.
1837///
1838#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1839#[serde_with::serde_as]
1840#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1841pub struct ObjectReferences {
1842    /// The object IDs.
1843    #[serde(rename = "objectIds")]
1844    pub object_ids: Option<Vec<String>>,
1845}
1846
1847impl common::Part for ObjectReferences {}
1848
1849/// A color that can either be fully opaque or fully transparent.
1850///
1851/// This type is not used in any activity, and only used as *part* of another schema.
1852///
1853#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1854#[serde_with::serde_as]
1855#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1856pub struct OptionalColor {
1857    /// If set, this will be used as an opaque color. If unset, this represents a transparent color.
1858    pub color: Option<Color>,
1859}
1860
1861impl common::Part for OptionalColor {}
1862
1863/// A ParagraphElement representing a page break. A page break makes the subsequent text start at the top of the next page.
1864///
1865/// This type is not used in any activity, and only used as *part* of another schema.
1866///
1867#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1868#[serde_with::serde_as]
1869#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1870pub struct PageBreak {
1871    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
1872    #[serde(rename = "suggestedDeletionIds")]
1873    pub suggested_deletion_ids: Option<Vec<String>>,
1874    /// The suggested insertion IDs. A PageBreak may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
1875    #[serde(rename = "suggestedInsertionIds")]
1876    pub suggested_insertion_ids: Option<Vec<String>>,
1877    /// The suggested text style changes to this PageBreak, keyed by suggestion ID.
1878    #[serde(rename = "suggestedTextStyleChanges")]
1879    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
1880    /// The text style of this PageBreak. Similar to text content, like text runs and footnote references, the text style of a page break can affect content layout as well as the styling of text inserted next to it.
1881    #[serde(rename = "textStyle")]
1882    pub text_style: Option<TextStyle>,
1883}
1884
1885impl common::Part for PageBreak {}
1886
1887/// A StructuralElement representing a paragraph. A paragraph is a range of content that's terminated with a newline character.
1888///
1889/// This type is not used in any activity, and only used as *part* of another schema.
1890///
1891#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1892#[serde_with::serde_as]
1893#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1894pub struct Paragraph {
1895    /// The bullet for this paragraph. If not present, the paragraph does not belong to a list.
1896    pub bullet: Option<Bullet>,
1897    /// The content of the paragraph, broken down into its component parts.
1898    pub elements: Option<Vec<ParagraphElement>>,
1899    /// The style of this paragraph.
1900    #[serde(rename = "paragraphStyle")]
1901    pub paragraph_style: Option<ParagraphStyle>,
1902    /// The IDs of the positioned objects tethered to this paragraph.
1903    #[serde(rename = "positionedObjectIds")]
1904    pub positioned_object_ids: Option<Vec<String>>,
1905    /// The suggested changes to this paragraph's bullet.
1906    #[serde(rename = "suggestedBulletChanges")]
1907    pub suggested_bullet_changes: Option<HashMap<String, SuggestedBullet>>,
1908    /// The suggested paragraph style changes to this paragraph, keyed by suggestion ID.
1909    #[serde(rename = "suggestedParagraphStyleChanges")]
1910    pub suggested_paragraph_style_changes: Option<HashMap<String, SuggestedParagraphStyle>>,
1911    /// The IDs of the positioned objects suggested to be attached to this paragraph, keyed by suggestion ID.
1912    #[serde(rename = "suggestedPositionedObjectIds")]
1913    pub suggested_positioned_object_ids: Option<HashMap<String, ObjectReferences>>,
1914}
1915
1916impl common::Part for Paragraph {}
1917
1918/// A border around a paragraph.
1919///
1920/// This type is not used in any activity, and only used as *part* of another schema.
1921///
1922#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1923#[serde_with::serde_as]
1924#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1925pub struct ParagraphBorder {
1926    /// The color of the border.
1927    pub color: Option<OptionalColor>,
1928    /// The dash style of the border.
1929    #[serde(rename = "dashStyle")]
1930    pub dash_style: Option<String>,
1931    /// The padding of the border.
1932    pub padding: Option<Dimension>,
1933    /// The width of the border.
1934    pub width: Option<Dimension>,
1935}
1936
1937impl common::Part for ParagraphBorder {}
1938
1939/// A ParagraphElement describes content within a Paragraph.
1940///
1941/// This type is not used in any activity, and only used as *part* of another schema.
1942///
1943#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1944#[serde_with::serde_as]
1945#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1946pub struct ParagraphElement {
1947    /// An auto text paragraph element.
1948    #[serde(rename = "autoText")]
1949    pub auto_text: Option<AutoText>,
1950    /// A column break paragraph element.
1951    #[serde(rename = "columnBreak")]
1952    pub column_break: Option<ColumnBreak>,
1953    /// The zero-base end index of this paragraph element, exclusive, in UTF-16 code units.
1954    #[serde(rename = "endIndex")]
1955    pub end_index: Option<i32>,
1956    /// An equation paragraph element.
1957    pub equation: Option<Equation>,
1958    /// A footnote reference paragraph element.
1959    #[serde(rename = "footnoteReference")]
1960    pub footnote_reference: Option<FootnoteReference>,
1961    /// A horizontal rule paragraph element.
1962    #[serde(rename = "horizontalRule")]
1963    pub horizontal_rule: Option<HorizontalRule>,
1964    /// An inline object paragraph element.
1965    #[serde(rename = "inlineObjectElement")]
1966    pub inline_object_element: Option<InlineObjectElement>,
1967    /// A page break paragraph element.
1968    #[serde(rename = "pageBreak")]
1969    pub page_break: Option<PageBreak>,
1970    /// A paragraph element that links to a person or email address.
1971    pub person: Option<Person>,
1972    /// A paragraph element that links to a Google resource (such as a file in Google Drive, a YouTube video, or a Calendar event.)
1973    #[serde(rename = "richLink")]
1974    pub rich_link: Option<RichLink>,
1975    /// The zero-based start index of this paragraph element, in UTF-16 code units.
1976    #[serde(rename = "startIndex")]
1977    pub start_index: Option<i32>,
1978    /// A text run paragraph element.
1979    #[serde(rename = "textRun")]
1980    pub text_run: Option<TextRun>,
1981}
1982
1983impl common::Part for ParagraphElement {}
1984
1985/// Styles that apply to a whole paragraph. Inherited paragraph styles are represented as unset fields in this message. A paragraph style's parent depends on where the paragraph style is defined: * The ParagraphStyle on a Paragraph inherits from the paragraph's corresponding named style type. * The ParagraphStyle on a named style inherits from the normal text named style. * The ParagraphStyle of the normal text named style inherits from the default paragraph style in the Docs editor. * The ParagraphStyle on a Paragraph element that's contained in a table may inherit its paragraph style from the table style. If the paragraph style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
1986///
1987/// This type is not used in any activity, and only used as *part* of another schema.
1988///
1989#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
1990#[serde_with::serde_as]
1991#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
1992pub struct ParagraphStyle {
1993    /// The text alignment for this paragraph.
1994    pub alignment: Option<String>,
1995    /// Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent.
1996    #[serde(rename = "avoidWidowAndOrphan")]
1997    pub avoid_widow_and_orphan: Option<bool>,
1998    /// The border between this paragraph and the next and previous paragraphs. If unset, the value is inherited from the parent. The between border is rendered when the adjacent paragraph has the same border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
1999    #[serde(rename = "borderBetween")]
2000    pub border_between: Option<ParagraphBorder>,
2001    /// The border at the bottom of this paragraph. If unset, the value is inherited from the parent. The bottom border is rendered when the paragraph below has different border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
2002    #[serde(rename = "borderBottom")]
2003    pub border_bottom: Option<ParagraphBorder>,
2004    /// The border to the left of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
2005    #[serde(rename = "borderLeft")]
2006    pub border_left: Option<ParagraphBorder>,
2007    /// The border to the right of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
2008    #[serde(rename = "borderRight")]
2009    pub border_right: Option<ParagraphBorder>,
2010    /// The border at the top of this paragraph. If unset, the value is inherited from the parent. The top border is rendered when the paragraph above has different border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
2011    #[serde(rename = "borderTop")]
2012    pub border_top: Option<ParagraphBorder>,
2013    /// The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since paragraph direction is not inherited.
2014    pub direction: Option<String>,
2015    /// The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only.
2016    #[serde(rename = "headingId")]
2017    pub heading_id: Option<String>,
2018    /// The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction. If unset, the value is inherited from the parent.
2019    #[serde(rename = "indentEnd")]
2020    pub indent_end: Option<Dimension>,
2021    /// The amount of indentation for the first line of the paragraph. If unset, the value is inherited from the parent.
2022    #[serde(rename = "indentFirstLine")]
2023    pub indent_first_line: Option<Dimension>,
2024    /// The amount of indentation for the paragraph on the side that corresponds to the start of the text, based on the current paragraph direction. If unset, the value is inherited from the parent.
2025    #[serde(rename = "indentStart")]
2026    pub indent_start: Option<Dimension>,
2027    /// Whether all lines of the paragraph should be laid out on the same page or column if possible. If unset, the value is inherited from the parent.
2028    #[serde(rename = "keepLinesTogether")]
2029    pub keep_lines_together: Option<bool>,
2030    /// Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible. If unset, the value is inherited from the parent.
2031    #[serde(rename = "keepWithNext")]
2032    pub keep_with_next: Option<bool>,
2033    /// The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent.
2034    #[serde(rename = "lineSpacing")]
2035    pub line_spacing: Option<f32>,
2036    /// The named style type of the paragraph. Since updating the named style type affects other properties within ParagraphStyle, the named style type is applied before the other properties are updated.
2037    #[serde(rename = "namedStyleType")]
2038    pub named_style_type: Option<String>,
2039    /// Whether the current paragraph should always start at the beginning of a page. If unset, the value is inherited from the parent. Attempting to update page_break_before for paragraphs in unsupported regions, including Table, Header, Footer and Footnote, can result in an invalid document state that returns a 400 bad request error.
2040    #[serde(rename = "pageBreakBefore")]
2041    pub page_break_before: Option<bool>,
2042    /// The shading of the paragraph. If unset, the value is inherited from the parent.
2043    pub shading: Option<Shading>,
2044    /// The amount of extra space above the paragraph. If unset, the value is inherited from the parent.
2045    #[serde(rename = "spaceAbove")]
2046    pub space_above: Option<Dimension>,
2047    /// The amount of extra space below the paragraph. If unset, the value is inherited from the parent.
2048    #[serde(rename = "spaceBelow")]
2049    pub space_below: Option<Dimension>,
2050    /// The spacing mode for the paragraph.
2051    #[serde(rename = "spacingMode")]
2052    pub spacing_mode: Option<String>,
2053    /// A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only.
2054    #[serde(rename = "tabStops")]
2055    pub tab_stops: Option<Vec<TabStop>>,
2056}
2057
2058impl common::Part for ParagraphStyle {}
2059
2060/// A mask that indicates which of the fields on the base ParagraphStyle have been changed in this suggestion. For any field set to true, there's a new suggested value.
2061///
2062/// This type is not used in any activity, and only used as *part* of another schema.
2063///
2064#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2065#[serde_with::serde_as]
2066#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2067pub struct ParagraphStyleSuggestionState {
2068    /// Indicates if there was a suggested change to alignment.
2069    #[serde(rename = "alignmentSuggested")]
2070    pub alignment_suggested: Option<bool>,
2071    /// Indicates if there was a suggested change to avoid_widow_and_orphan.
2072    #[serde(rename = "avoidWidowAndOrphanSuggested")]
2073    pub avoid_widow_and_orphan_suggested: Option<bool>,
2074    /// Indicates if there was a suggested change to border_between.
2075    #[serde(rename = "borderBetweenSuggested")]
2076    pub border_between_suggested: Option<bool>,
2077    /// Indicates if there was a suggested change to border_bottom.
2078    #[serde(rename = "borderBottomSuggested")]
2079    pub border_bottom_suggested: Option<bool>,
2080    /// Indicates if there was a suggested change to border_left.
2081    #[serde(rename = "borderLeftSuggested")]
2082    pub border_left_suggested: Option<bool>,
2083    /// Indicates if there was a suggested change to border_right.
2084    #[serde(rename = "borderRightSuggested")]
2085    pub border_right_suggested: Option<bool>,
2086    /// Indicates if there was a suggested change to border_top.
2087    #[serde(rename = "borderTopSuggested")]
2088    pub border_top_suggested: Option<bool>,
2089    /// Indicates if there was a suggested change to direction.
2090    #[serde(rename = "directionSuggested")]
2091    pub direction_suggested: Option<bool>,
2092    /// Indicates if there was a suggested change to heading_id.
2093    #[serde(rename = "headingIdSuggested")]
2094    pub heading_id_suggested: Option<bool>,
2095    /// Indicates if there was a suggested change to indent_end.
2096    #[serde(rename = "indentEndSuggested")]
2097    pub indent_end_suggested: Option<bool>,
2098    /// Indicates if there was a suggested change to indent_first_line.
2099    #[serde(rename = "indentFirstLineSuggested")]
2100    pub indent_first_line_suggested: Option<bool>,
2101    /// Indicates if there was a suggested change to indent_start.
2102    #[serde(rename = "indentStartSuggested")]
2103    pub indent_start_suggested: Option<bool>,
2104    /// Indicates if there was a suggested change to keep_lines_together.
2105    #[serde(rename = "keepLinesTogetherSuggested")]
2106    pub keep_lines_together_suggested: Option<bool>,
2107    /// Indicates if there was a suggested change to keep_with_next.
2108    #[serde(rename = "keepWithNextSuggested")]
2109    pub keep_with_next_suggested: Option<bool>,
2110    /// Indicates if there was a suggested change to line_spacing.
2111    #[serde(rename = "lineSpacingSuggested")]
2112    pub line_spacing_suggested: Option<bool>,
2113    /// Indicates if there was a suggested change to named_style_type.
2114    #[serde(rename = "namedStyleTypeSuggested")]
2115    pub named_style_type_suggested: Option<bool>,
2116    /// Indicates if there was a suggested change to page_break_before.
2117    #[serde(rename = "pageBreakBeforeSuggested")]
2118    pub page_break_before_suggested: Option<bool>,
2119    /// A mask that indicates which of the fields in shading have been changed in this suggestion.
2120    #[serde(rename = "shadingSuggestionState")]
2121    pub shading_suggestion_state: Option<ShadingSuggestionState>,
2122    /// Indicates if there was a suggested change to space_above.
2123    #[serde(rename = "spaceAboveSuggested")]
2124    pub space_above_suggested: Option<bool>,
2125    /// Indicates if there was a suggested change to space_below.
2126    #[serde(rename = "spaceBelowSuggested")]
2127    pub space_below_suggested: Option<bool>,
2128    /// Indicates if there was a suggested change to spacing_mode.
2129    #[serde(rename = "spacingModeSuggested")]
2130    pub spacing_mode_suggested: Option<bool>,
2131}
2132
2133impl common::Part for ParagraphStyleSuggestionState {}
2134
2135/// A person or email address mentioned in a document. These mentions behave as a single, immutable element containing the person's name or email address.
2136///
2137/// This type is not used in any activity, and only used as *part* of another schema.
2138///
2139#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2140#[serde_with::serde_as]
2141#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2142pub struct Person {
2143    /// Output only. The unique ID of this link.
2144    #[serde(rename = "personId")]
2145    pub person_id: Option<String>,
2146    /// Output only. The properties of this Person. This field is always present.
2147    #[serde(rename = "personProperties")]
2148    pub person_properties: Option<PersonProperties>,
2149    /// IDs for suggestions that remove this person link from the document. A Person might have multiple deletion IDs if, for example, multiple users suggest deleting it. If empty, then this person link isn't suggested for deletion.
2150    #[serde(rename = "suggestedDeletionIds")]
2151    pub suggested_deletion_ids: Option<Vec<String>>,
2152    /// IDs for suggestions that insert this person link into the document. A Person might have multiple insertion IDs if it's a nested suggested change (a suggestion within a suggestion made by a different user, for example). If empty, then this person link isn't a suggested insertion.
2153    #[serde(rename = "suggestedInsertionIds")]
2154    pub suggested_insertion_ids: Option<Vec<String>>,
2155    /// The suggested text style changes to this Person, keyed by suggestion ID.
2156    #[serde(rename = "suggestedTextStyleChanges")]
2157    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
2158    /// The text style of this Person.
2159    #[serde(rename = "textStyle")]
2160    pub text_style: Option<TextStyle>,
2161}
2162
2163impl common::Part for Person {}
2164
2165/// Properties specific to a linked Person.
2166///
2167/// This type is not used in any activity, and only used as *part* of another schema.
2168///
2169#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2170#[serde_with::serde_as]
2171#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2172pub struct PersonProperties {
2173    /// Output only. The email address linked to this Person. This field is always present.
2174    pub email: Option<String>,
2175    /// Output only. The name of the person if it's displayed in the link text instead of the person's email address.
2176    pub name: Option<String>,
2177}
2178
2179impl common::Part for PersonProperties {}
2180
2181/// Updates the number of pinned table header rows in a table.
2182///
2183/// This type is not used in any activity, and only used as *part* of another schema.
2184///
2185#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2186#[serde_with::serde_as]
2187#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2188pub struct PinTableHeaderRowsRequest {
2189    /// The number of table rows to pin, where 0 implies that all rows are unpinned.
2190    #[serde(rename = "pinnedHeaderRowsCount")]
2191    pub pinned_header_rows_count: Option<i32>,
2192    /// The location where the table starts in the document.
2193    #[serde(rename = "tableStartLocation")]
2194    pub table_start_location: Option<Location>,
2195}
2196
2197impl common::Part for PinTableHeaderRowsRequest {}
2198
2199/// An object that's tethered to a Paragraph and positioned relative to the beginning of the paragraph. A PositionedObject contains an EmbeddedObject such as an image.
2200///
2201/// This type is not used in any activity, and only used as *part* of another schema.
2202///
2203#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2204#[serde_with::serde_as]
2205#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2206pub struct PositionedObject {
2207    /// The ID of this positioned object.
2208    #[serde(rename = "objectId")]
2209    pub object_id: Option<String>,
2210    /// The properties of this positioned object.
2211    #[serde(rename = "positionedObjectProperties")]
2212    pub positioned_object_properties: Option<PositionedObjectProperties>,
2213    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
2214    #[serde(rename = "suggestedDeletionIds")]
2215    pub suggested_deletion_ids: Option<Vec<String>>,
2216    /// The suggested insertion ID. If empty, then this is not a suggested insertion.
2217    #[serde(rename = "suggestedInsertionId")]
2218    pub suggested_insertion_id: Option<String>,
2219    /// The suggested changes to the positioned object properties, keyed by suggestion ID.
2220    #[serde(rename = "suggestedPositionedObjectPropertiesChanges")]
2221    pub suggested_positioned_object_properties_changes:
2222        Option<HashMap<String, SuggestedPositionedObjectProperties>>,
2223}
2224
2225impl common::Part for PositionedObject {}
2226
2227/// The positioning of a PositionedObject. The positioned object is positioned relative to the beginning of the Paragraph it's tethered to.
2228///
2229/// This type is not used in any activity, and only used as *part* of another schema.
2230///
2231#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2232#[serde_with::serde_as]
2233#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2234pub struct PositionedObjectPositioning {
2235    /// The layout of this positioned object.
2236    pub layout: Option<String>,
2237    /// The offset of the left edge of the positioned object relative to the beginning of the Paragraph it's tethered to. The exact positioning of the object can depend on other content in the document and the document's styling.
2238    #[serde(rename = "leftOffset")]
2239    pub left_offset: Option<Dimension>,
2240    /// The offset of the top edge of the positioned object relative to the beginning of the Paragraph it's tethered to. The exact positioning of the object can depend on other content in the document and the document's styling.
2241    #[serde(rename = "topOffset")]
2242    pub top_offset: Option<Dimension>,
2243}
2244
2245impl common::Part for PositionedObjectPositioning {}
2246
2247/// A mask that indicates which of the fields on the base PositionedObjectPositioning have been changed in this suggestion. For any field set to true, there's a new suggested value.
2248///
2249/// This type is not used in any activity, and only used as *part* of another schema.
2250///
2251#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2252#[serde_with::serde_as]
2253#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2254pub struct PositionedObjectPositioningSuggestionState {
2255    /// Indicates if there was a suggested change to layout.
2256    #[serde(rename = "layoutSuggested")]
2257    pub layout_suggested: Option<bool>,
2258    /// Indicates if there was a suggested change to left_offset.
2259    #[serde(rename = "leftOffsetSuggested")]
2260    pub left_offset_suggested: Option<bool>,
2261    /// Indicates if there was a suggested change to top_offset.
2262    #[serde(rename = "topOffsetSuggested")]
2263    pub top_offset_suggested: Option<bool>,
2264}
2265
2266impl common::Part for PositionedObjectPositioningSuggestionState {}
2267
2268/// Properties of a PositionedObject.
2269///
2270/// This type is not used in any activity, and only used as *part* of another schema.
2271///
2272#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2273#[serde_with::serde_as]
2274#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2275pub struct PositionedObjectProperties {
2276    /// The embedded object of this positioned object.
2277    #[serde(rename = "embeddedObject")]
2278    pub embedded_object: Option<EmbeddedObject>,
2279    /// The positioning of this positioned object relative to the newline of the Paragraph that references this positioned object.
2280    pub positioning: Option<PositionedObjectPositioning>,
2281}
2282
2283impl common::Part for PositionedObjectProperties {}
2284
2285/// A mask that indicates which of the fields on the base PositionedObjectProperties have been changed in this suggestion. For any field set to true, there's a new suggested value.
2286///
2287/// This type is not used in any activity, and only used as *part* of another schema.
2288///
2289#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2290#[serde_with::serde_as]
2291#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2292pub struct PositionedObjectPropertiesSuggestionState {
2293    /// A mask that indicates which of the fields in embedded_object have been changed in this suggestion.
2294    #[serde(rename = "embeddedObjectSuggestionState")]
2295    pub embedded_object_suggestion_state: Option<EmbeddedObjectSuggestionState>,
2296    /// A mask that indicates which of the fields in positioning have been changed in this suggestion.
2297    #[serde(rename = "positioningSuggestionState")]
2298    pub positioning_suggestion_state: Option<PositionedObjectPositioningSuggestionState>,
2299}
2300
2301impl common::Part for PositionedObjectPropertiesSuggestionState {}
2302
2303/// Specifies a contiguous range of text.
2304///
2305/// This type is not used in any activity, and only used as *part* of another schema.
2306///
2307#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2308#[serde_with::serde_as]
2309#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2310pub struct Range {
2311    /// The zero-based end index of this range, exclusive, in UTF-16 code units. In all current uses, an end index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges.
2312    #[serde(rename = "endIndex")]
2313    pub end_index: Option<i32>,
2314    /// The ID of the header, footer, or footnote that this range is contained in. An empty segment ID signifies the document's body.
2315    #[serde(rename = "segmentId")]
2316    pub segment_id: Option<String>,
2317    /// The zero-based start index of this range, in UTF-16 code units. In all current uses, a start index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges.
2318    #[serde(rename = "startIndex")]
2319    pub start_index: Option<i32>,
2320}
2321
2322impl common::Part for Range {}
2323
2324/// Replaces all instances of text matching a criteria with replace text.
2325///
2326/// This type is not used in any activity, and only used as *part* of another schema.
2327///
2328#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2329#[serde_with::serde_as]
2330#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2331pub struct ReplaceAllTextRequest {
2332    /// Finds text in the document matching this substring.
2333    #[serde(rename = "containsText")]
2334    pub contains_text: Option<SubstringMatchCriteria>,
2335    /// The text that will replace the matched text.
2336    #[serde(rename = "replaceText")]
2337    pub replace_text: Option<String>,
2338}
2339
2340impl common::Part for ReplaceAllTextRequest {}
2341
2342/// The result of replacing text.
2343///
2344/// This type is not used in any activity, and only used as *part* of another schema.
2345///
2346#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2347#[serde_with::serde_as]
2348#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2349pub struct ReplaceAllTextResponse {
2350    /// The number of occurrences changed by replacing all text.
2351    #[serde(rename = "occurrencesChanged")]
2352    pub occurrences_changed: Option<i32>,
2353}
2354
2355impl common::Part for ReplaceAllTextResponse {}
2356
2357/// Replaces an existing image with a new image. Replacing an image removes some image effects from the existing image in order to mirror the behavior of the Docs editor.
2358///
2359/// This type is not used in any activity, and only used as *part* of another schema.
2360///
2361#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2362#[serde_with::serde_as]
2363#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2364pub struct ReplaceImageRequest {
2365    /// The ID of the existing image that will be replaced. The ID can be retrieved from the response of a get request.
2366    #[serde(rename = "imageObjectId")]
2367    pub image_object_id: Option<String>,
2368    /// The replacement method.
2369    #[serde(rename = "imageReplaceMethod")]
2370    pub image_replace_method: Option<String>,
2371    /// The URI of the new image. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URI can't surpass 2 KB in length. The URI is saved with the image, and exposed through the ImageProperties.source_uri field.
2372    pub uri: Option<String>,
2373}
2374
2375impl common::Part for ReplaceImageRequest {}
2376
2377/// Replaces the contents of the specified NamedRange or NamedRanges with the given replacement content. Note that an individual NamedRange may consist of multiple discontinuous ranges. In this case, only the content in the first range will be replaced. The other ranges and their content will be deleted. In cases where replacing or deleting any ranges would result in an invalid document structure, a 400 bad request error is returned.
2378///
2379/// This type is not used in any activity, and only used as *part* of another schema.
2380///
2381#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2382#[serde_with::serde_as]
2383#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2384pub struct ReplaceNamedRangeContentRequest {
2385    /// The ID of the named range whose content will be replaced. If there is no named range with the given ID a 400 bad request error is returned.
2386    #[serde(rename = "namedRangeId")]
2387    pub named_range_id: Option<String>,
2388    /// The name of the NamedRanges whose content will be replaced. If there are multiple named ranges with the given name, then the content of each one will be replaced. If there are no named ranges with the given name, then the request will be a no-op.
2389    #[serde(rename = "namedRangeName")]
2390    pub named_range_name: Option<String>,
2391    /// Replaces the content of the specified named range(s) with the given text.
2392    pub text: Option<String>,
2393}
2394
2395impl common::Part for ReplaceNamedRangeContentRequest {}
2396
2397/// A single update to apply to a document.
2398///
2399/// This type is not used in any activity, and only used as *part* of another schema.
2400///
2401#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2402#[serde_with::serde_as]
2403#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2404pub struct Request {
2405    /// Creates a footer.
2406    #[serde(rename = "createFooter")]
2407    pub create_footer: Option<CreateFooterRequest>,
2408    /// Creates a footnote.
2409    #[serde(rename = "createFootnote")]
2410    pub create_footnote: Option<CreateFootnoteRequest>,
2411    /// Creates a header.
2412    #[serde(rename = "createHeader")]
2413    pub create_header: Option<CreateHeaderRequest>,
2414    /// Creates a named range.
2415    #[serde(rename = "createNamedRange")]
2416    pub create_named_range: Option<CreateNamedRangeRequest>,
2417    /// Creates bullets for paragraphs.
2418    #[serde(rename = "createParagraphBullets")]
2419    pub create_paragraph_bullets: Option<CreateParagraphBulletsRequest>,
2420    /// Deletes content from the document.
2421    #[serde(rename = "deleteContentRange")]
2422    pub delete_content_range: Option<DeleteContentRangeRequest>,
2423    /// Deletes a footer from the document.
2424    #[serde(rename = "deleteFooter")]
2425    pub delete_footer: Option<DeleteFooterRequest>,
2426    /// Deletes a header from the document.
2427    #[serde(rename = "deleteHeader")]
2428    pub delete_header: Option<DeleteHeaderRequest>,
2429    /// Deletes a named range.
2430    #[serde(rename = "deleteNamedRange")]
2431    pub delete_named_range: Option<DeleteNamedRangeRequest>,
2432    /// Deletes bullets from paragraphs.
2433    #[serde(rename = "deleteParagraphBullets")]
2434    pub delete_paragraph_bullets: Option<DeleteParagraphBulletsRequest>,
2435    /// Deletes a positioned object from the document.
2436    #[serde(rename = "deletePositionedObject")]
2437    pub delete_positioned_object: Option<DeletePositionedObjectRequest>,
2438    /// Deletes a column from a table.
2439    #[serde(rename = "deleteTableColumn")]
2440    pub delete_table_column: Option<DeleteTableColumnRequest>,
2441    /// Deletes a row from a table.
2442    #[serde(rename = "deleteTableRow")]
2443    pub delete_table_row: Option<DeleteTableRowRequest>,
2444    /// Inserts an inline image at the specified location.
2445    #[serde(rename = "insertInlineImage")]
2446    pub insert_inline_image: Option<InsertInlineImageRequest>,
2447    /// Inserts a page break at the specified location.
2448    #[serde(rename = "insertPageBreak")]
2449    pub insert_page_break: Option<InsertPageBreakRequest>,
2450    /// Inserts a section break at the specified location.
2451    #[serde(rename = "insertSectionBreak")]
2452    pub insert_section_break: Option<InsertSectionBreakRequest>,
2453    /// Inserts a table at the specified location.
2454    #[serde(rename = "insertTable")]
2455    pub insert_table: Option<InsertTableRequest>,
2456    /// Inserts an empty column into a table.
2457    #[serde(rename = "insertTableColumn")]
2458    pub insert_table_column: Option<InsertTableColumnRequest>,
2459    /// Inserts an empty row into a table.
2460    #[serde(rename = "insertTableRow")]
2461    pub insert_table_row: Option<InsertTableRowRequest>,
2462    /// Inserts text at the specified location.
2463    #[serde(rename = "insertText")]
2464    pub insert_text: Option<InsertTextRequest>,
2465    /// Merges cells in a table.
2466    #[serde(rename = "mergeTableCells")]
2467    pub merge_table_cells: Option<MergeTableCellsRequest>,
2468    /// Updates the number of pinned header rows in a table.
2469    #[serde(rename = "pinTableHeaderRows")]
2470    pub pin_table_header_rows: Option<PinTableHeaderRowsRequest>,
2471    /// Replaces all instances of the specified text.
2472    #[serde(rename = "replaceAllText")]
2473    pub replace_all_text: Option<ReplaceAllTextRequest>,
2474    /// Replaces an image in the document.
2475    #[serde(rename = "replaceImage")]
2476    pub replace_image: Option<ReplaceImageRequest>,
2477    /// Replaces the content in a named range.
2478    #[serde(rename = "replaceNamedRangeContent")]
2479    pub replace_named_range_content: Option<ReplaceNamedRangeContentRequest>,
2480    /// Unmerges cells in a table.
2481    #[serde(rename = "unmergeTableCells")]
2482    pub unmerge_table_cells: Option<UnmergeTableCellsRequest>,
2483    /// Updates the style of the document.
2484    #[serde(rename = "updateDocumentStyle")]
2485    pub update_document_style: Option<UpdateDocumentStyleRequest>,
2486    /// Updates the paragraph style at the specified range.
2487    #[serde(rename = "updateParagraphStyle")]
2488    pub update_paragraph_style: Option<UpdateParagraphStyleRequest>,
2489    /// Updates the section style of the specified range.
2490    #[serde(rename = "updateSectionStyle")]
2491    pub update_section_style: Option<UpdateSectionStyleRequest>,
2492    /// Updates the style of table cells.
2493    #[serde(rename = "updateTableCellStyle")]
2494    pub update_table_cell_style: Option<UpdateTableCellStyleRequest>,
2495    /// Updates the properties of columns in a table.
2496    #[serde(rename = "updateTableColumnProperties")]
2497    pub update_table_column_properties: Option<UpdateTableColumnPropertiesRequest>,
2498    /// Updates the row style in a table.
2499    #[serde(rename = "updateTableRowStyle")]
2500    pub update_table_row_style: Option<UpdateTableRowStyleRequest>,
2501    /// Updates the text style at the specified range.
2502    #[serde(rename = "updateTextStyle")]
2503    pub update_text_style: Option<UpdateTextStyleRequest>,
2504}
2505
2506impl common::Part for Request {}
2507
2508/// A single response from an update.
2509///
2510/// This type is not used in any activity, and only used as *part* of another schema.
2511///
2512#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2513#[serde_with::serde_as]
2514#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2515pub struct Response {
2516    /// The result of creating a footer.
2517    #[serde(rename = "createFooter")]
2518    pub create_footer: Option<CreateFooterResponse>,
2519    /// The result of creating a footnote.
2520    #[serde(rename = "createFootnote")]
2521    pub create_footnote: Option<CreateFootnoteResponse>,
2522    /// The result of creating a header.
2523    #[serde(rename = "createHeader")]
2524    pub create_header: Option<CreateHeaderResponse>,
2525    /// The result of creating a named range.
2526    #[serde(rename = "createNamedRange")]
2527    pub create_named_range: Option<CreateNamedRangeResponse>,
2528    /// The result of inserting an inline image.
2529    #[serde(rename = "insertInlineImage")]
2530    pub insert_inline_image: Option<InsertInlineImageResponse>,
2531    /// The result of inserting an inline Google Sheets chart.
2532    #[serde(rename = "insertInlineSheetsChart")]
2533    pub insert_inline_sheets_chart: Option<InsertInlineSheetsChartResponse>,
2534    /// The result of replacing text.
2535    #[serde(rename = "replaceAllText")]
2536    pub replace_all_text: Option<ReplaceAllTextResponse>,
2537}
2538
2539impl common::Part for Response {}
2540
2541/// An RGB color.
2542///
2543/// This type is not used in any activity, and only used as *part* of another schema.
2544///
2545#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2546#[serde_with::serde_as]
2547#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2548pub struct RgbColor {
2549    /// The blue component of the color, from 0.0 to 1.0.
2550    pub blue: Option<f32>,
2551    /// The green component of the color, from 0.0 to 1.0.
2552    pub green: Option<f32>,
2553    /// The red component of the color, from 0.0 to 1.0.
2554    pub red: Option<f32>,
2555}
2556
2557impl common::Part for RgbColor {}
2558
2559/// A link to a Google resource (such as a file in Drive, a YouTube video, or a Calendar event).
2560///
2561/// This type is not used in any activity, and only used as *part* of another schema.
2562///
2563#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2564#[serde_with::serde_as]
2565#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2566pub struct RichLink {
2567    /// Output only. The ID of this link.
2568    #[serde(rename = "richLinkId")]
2569    pub rich_link_id: Option<String>,
2570    /// Output only. The properties of this RichLink. This field is always present.
2571    #[serde(rename = "richLinkProperties")]
2572    pub rich_link_properties: Option<RichLinkProperties>,
2573    /// IDs for suggestions that remove this link from the document. A RichLink might have multiple deletion IDs if, for example, multiple users suggest deleting it. If empty, then this person link isn't suggested for deletion.
2574    #[serde(rename = "suggestedDeletionIds")]
2575    pub suggested_deletion_ids: Option<Vec<String>>,
2576    /// IDs for suggestions that insert this link into the document. A RichLink might have multiple insertion IDs if it's a nested suggested change (a suggestion within a suggestion made by a different user, for example). If empty, then this person link isn't a suggested insertion.
2577    #[serde(rename = "suggestedInsertionIds")]
2578    pub suggested_insertion_ids: Option<Vec<String>>,
2579    /// The suggested text style changes to this RichLink, keyed by suggestion ID.
2580    #[serde(rename = "suggestedTextStyleChanges")]
2581    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
2582    /// The text style of this RichLink.
2583    #[serde(rename = "textStyle")]
2584    pub text_style: Option<TextStyle>,
2585}
2586
2587impl common::Part for RichLink {}
2588
2589/// Properties specific to a RichLink.
2590///
2591/// This type is not used in any activity, and only used as *part* of another schema.
2592///
2593#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2594#[serde_with::serde_as]
2595#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2596pub struct RichLinkProperties {
2597    /// Output only. The [MIME type](https://developers.google.com/drive/api/v3/mime-types) of the RichLink, if there's one (for example, when it's a file in Drive).
2598    #[serde(rename = "mimeType")]
2599    pub mime_type: Option<String>,
2600    /// Output only. The title of the RichLink as displayed in the link. This title matches the title of the linked resource at the time of the insertion or last update of the link. This field is always present.
2601    pub title: Option<String>,
2602    /// Output only. The URI to the RichLink. This is always present.
2603    pub uri: Option<String>,
2604}
2605
2606impl common::Part for RichLinkProperties {}
2607
2608/// A StructuralElement representing a section break. A section is a range of content that has the same SectionStyle. A section break represents the start of a new section, and the section style applies to the section after the section break. The document body always begins with a section break.
2609///
2610/// This type is not used in any activity, and only used as *part* of another schema.
2611///
2612#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2613#[serde_with::serde_as]
2614#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2615pub struct SectionBreak {
2616    /// The style of the section after this section break.
2617    #[serde(rename = "sectionStyle")]
2618    pub section_style: Option<SectionStyle>,
2619    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
2620    #[serde(rename = "suggestedDeletionIds")]
2621    pub suggested_deletion_ids: Option<Vec<String>>,
2622    /// The suggested insertion IDs. A SectionBreak may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
2623    #[serde(rename = "suggestedInsertionIds")]
2624    pub suggested_insertion_ids: Option<Vec<String>>,
2625}
2626
2627impl common::Part for SectionBreak {}
2628
2629/// Properties that apply to a section's column.
2630///
2631/// This type is not used in any activity, and only used as *part* of another schema.
2632///
2633#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2634#[serde_with::serde_as]
2635#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2636pub struct SectionColumnProperties {
2637    /// The padding at the end of the column.
2638    #[serde(rename = "paddingEnd")]
2639    pub padding_end: Option<Dimension>,
2640    /// Output only. The width of the column.
2641    pub width: Option<Dimension>,
2642}
2643
2644impl common::Part for SectionColumnProperties {}
2645
2646/// The styling that applies to a section.
2647///
2648/// This type is not used in any activity, and only used as *part* of another schema.
2649///
2650#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2651#[serde_with::serde_as]
2652#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2653pub struct SectionStyle {
2654    /// The section's columns properties. If empty, the section contains one column with the default properties in the Docs editor. A section can be updated to have no more than 3 columns. When updating this property, setting a concrete value is required. Unsetting this property will result in a 400 bad request error.
2655    #[serde(rename = "columnProperties")]
2656    pub column_properties: Option<Vec<SectionColumnProperties>>,
2657    /// The style of column separators. This style can be set even when there's one column in the section. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2658    #[serde(rename = "columnSeparatorStyle")]
2659    pub column_separator_style: Option<String>,
2660    /// The content direction of this section. If unset, the value defaults to LEFT_TO_RIGHT. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2661    #[serde(rename = "contentDirection")]
2662    pub content_direction: Option<String>,
2663    /// The ID of the default footer. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's default_footer_id. This property is read-only.
2664    #[serde(rename = "defaultFooterId")]
2665    pub default_footer_id: Option<String>,
2666    /// The ID of the default header. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's default_header_id. This property is read-only.
2667    #[serde(rename = "defaultHeaderId")]
2668    pub default_header_id: Option<String>,
2669    /// The ID of the footer used only for even pages. If the value of DocumentStyle's use_even_page_header_footer is true, this value is used for the footers on even pages in the section. If it is false, the footers on even pages use the default_footer_id. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's even_page_footer_id. This property is read-only.
2670    #[serde(rename = "evenPageFooterId")]
2671    pub even_page_footer_id: Option<String>,
2672    /// The ID of the header used only for even pages. If the value of DocumentStyle's use_even_page_header_footer is true, this value is used for the headers on even pages in the section. If it is false, the headers on even pages use the default_header_id. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's even_page_header_id. This property is read-only.
2673    #[serde(rename = "evenPageHeaderId")]
2674    pub even_page_header_id: Option<String>,
2675    /// The ID of the footer used only for the first page of the section. If use_first_page_header_footer is true, this value is used for the footer on the first page of the section. If it's false, the footer on the first page of the section uses the default_footer_id. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's first_page_footer_id. This property is read-only.
2676    #[serde(rename = "firstPageFooterId")]
2677    pub first_page_footer_id: Option<String>,
2678    /// The ID of the header used only for the first page of the section. If use_first_page_header_footer is true, this value is used for the header on the first page of the section. If it's false, the header on the first page of the section uses the default_header_id. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's first_page_header_id. This property is read-only.
2679    #[serde(rename = "firstPageHeaderId")]
2680    pub first_page_header_id: Option<String>,
2681    /// Optional. Indicates whether to flip the dimensions of DocumentStyle's page_size for this section, which allows changing the page orientation between portrait and landscape. If unset, the value inherits from DocumentStyle's flip_page_orientation. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2682    #[serde(rename = "flipPageOrientation")]
2683    pub flip_page_orientation: Option<bool>,
2684    /// The bottom page margin of the section. If unset, the value defaults to margin_bottom from DocumentStyle. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2685    #[serde(rename = "marginBottom")]
2686    pub margin_bottom: Option<Dimension>,
2687    /// The footer margin of the section. If unset, the value defaults to margin_footer from DocumentStyle. If updated, use_custom_header_footer_margins is set to true on DocumentStyle. The value of use_custom_header_footer_margins on DocumentStyle indicates if a footer margin is being respected for this section When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2688    #[serde(rename = "marginFooter")]
2689    pub margin_footer: Option<Dimension>,
2690    /// The header margin of the section. If unset, the value defaults to margin_header from DocumentStyle. If updated, use_custom_header_footer_margins is set to true on DocumentStyle. The value of use_custom_header_footer_margins on DocumentStyle indicates if a header margin is being respected for this section. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2691    #[serde(rename = "marginHeader")]
2692    pub margin_header: Option<Dimension>,
2693    /// The left page margin of the section. If unset, the value defaults to margin_left from DocumentStyle. Updating the left margin causes columns in this section to resize. Since the margin affects column width, it's applied before column properties. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2694    #[serde(rename = "marginLeft")]
2695    pub margin_left: Option<Dimension>,
2696    /// The right page margin of the section. If unset, the value defaults to margin_right from DocumentStyle. Updating the right margin causes columns in this section to resize. Since the margin affects column width, it's applied before column properties. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2697    #[serde(rename = "marginRight")]
2698    pub margin_right: Option<Dimension>,
2699    /// The top page margin of the section. If unset, the value defaults to margin_top from DocumentStyle. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2700    #[serde(rename = "marginTop")]
2701    pub margin_top: Option<Dimension>,
2702    /// The page number from which to start counting the number of pages for this section. If unset, page numbering continues from the previous section. If the value is unset in the first SectionBreak, refer to DocumentStyle's page_number_start. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2703    #[serde(rename = "pageNumberStart")]
2704    pub page_number_start: Option<i32>,
2705    /// Output only. The type of section.
2706    #[serde(rename = "sectionType")]
2707    pub section_type: Option<String>,
2708    /// Indicates whether to use the first page header / footer IDs for the first page of the section. If unset, it inherits from DocumentStyle's use_first_page_header_footer for the first section. If the value is unset for subsequent sectors, it should be interpreted as false. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error.
2709    #[serde(rename = "useFirstPageHeaderFooter")]
2710    pub use_first_page_header_footer: Option<bool>,
2711}
2712
2713impl common::Part for SectionStyle {}
2714
2715/// The shading of a paragraph.
2716///
2717/// This type is not used in any activity, and only used as *part* of another schema.
2718///
2719#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2720#[serde_with::serde_as]
2721#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2722pub struct Shading {
2723    /// The background color of this paragraph shading.
2724    #[serde(rename = "backgroundColor")]
2725    pub background_color: Option<OptionalColor>,
2726}
2727
2728impl common::Part for Shading {}
2729
2730/// A mask that indicates which of the fields on the base Shading have been changed in this suggested change. For any field set to true, there's a new suggested value.
2731///
2732/// This type is not used in any activity, and only used as *part* of another schema.
2733///
2734#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2735#[serde_with::serde_as]
2736#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2737pub struct ShadingSuggestionState {
2738    /// Indicates if there was a suggested change to the Shading.
2739    #[serde(rename = "backgroundColorSuggested")]
2740    pub background_color_suggested: Option<bool>,
2741}
2742
2743impl common::Part for ShadingSuggestionState {}
2744
2745/// A reference to a linked chart embedded from Google Sheets.
2746///
2747/// This type is not used in any activity, and only used as *part* of another schema.
2748///
2749#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2750#[serde_with::serde_as]
2751#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2752pub struct SheetsChartReference {
2753    /// The ID of the specific chart in the Google Sheets spreadsheet that's embedded.
2754    #[serde(rename = "chartId")]
2755    pub chart_id: Option<i32>,
2756    /// The ID of the Google Sheets spreadsheet that contains the source chart.
2757    #[serde(rename = "spreadsheetId")]
2758    pub spreadsheet_id: Option<String>,
2759}
2760
2761impl common::Part for SheetsChartReference {}
2762
2763/// A mask that indicates which of the fields on the base SheetsChartReference have been changed in this suggestion. For any field set to true, there's a new suggested value.
2764///
2765/// This type is not used in any activity, and only used as *part* of another schema.
2766///
2767#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2768#[serde_with::serde_as]
2769#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2770pub struct SheetsChartReferenceSuggestionState {
2771    /// Indicates if there was a suggested change to chart_id.
2772    #[serde(rename = "chartIdSuggested")]
2773    pub chart_id_suggested: Option<bool>,
2774    /// Indicates if there was a suggested change to spreadsheet_id.
2775    #[serde(rename = "spreadsheetIdSuggested")]
2776    pub spreadsheet_id_suggested: Option<bool>,
2777}
2778
2779impl common::Part for SheetsChartReferenceSuggestionState {}
2780
2781/// A width and height.
2782///
2783/// This type is not used in any activity, and only used as *part* of another schema.
2784///
2785#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2786#[serde_with::serde_as]
2787#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2788pub struct Size {
2789    /// The height of the object.
2790    pub height: Option<Dimension>,
2791    /// The width of the object.
2792    pub width: Option<Dimension>,
2793}
2794
2795impl common::Part for Size {}
2796
2797/// A mask that indicates which of the fields on the base Size have been changed in this suggestion. For any field set to true, the Size has a new suggested value.
2798///
2799/// This type is not used in any activity, and only used as *part* of another schema.
2800///
2801#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2802#[serde_with::serde_as]
2803#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2804pub struct SizeSuggestionState {
2805    /// Indicates if there was a suggested change to height.
2806    #[serde(rename = "heightSuggested")]
2807    pub height_suggested: Option<bool>,
2808    /// Indicates if there was a suggested change to width.
2809    #[serde(rename = "widthSuggested")]
2810    pub width_suggested: Option<bool>,
2811}
2812
2813impl common::Part for SizeSuggestionState {}
2814
2815/// A StructuralElement describes content that provides structure to the document.
2816///
2817/// This type is not used in any activity, and only used as *part* of another schema.
2818///
2819#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2820#[serde_with::serde_as]
2821#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2822pub struct StructuralElement {
2823    /// The zero-based end index of this structural element, exclusive, in UTF-16 code units.
2824    #[serde(rename = "endIndex")]
2825    pub end_index: Option<i32>,
2826    /// A paragraph type of structural element.
2827    pub paragraph: Option<Paragraph>,
2828    /// A section break type of structural element.
2829    #[serde(rename = "sectionBreak")]
2830    pub section_break: Option<SectionBreak>,
2831    /// The zero-based start index of this structural element, in UTF-16 code units.
2832    #[serde(rename = "startIndex")]
2833    pub start_index: Option<i32>,
2834    /// A table type of structural element.
2835    pub table: Option<Table>,
2836    /// A table of contents type of structural element.
2837    #[serde(rename = "tableOfContents")]
2838    pub table_of_contents: Option<TableOfContents>,
2839}
2840
2841impl common::Part for StructuralElement {}
2842
2843/// A criteria that matches a specific string of text in the document.
2844///
2845/// This type is not used in any activity, and only used as *part* of another schema.
2846///
2847#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2848#[serde_with::serde_as]
2849#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2850pub struct SubstringMatchCriteria {
2851    /// Indicates whether the search should respect case: - `True`: the search is case sensitive. - `False`: the search is case insensitive.
2852    #[serde(rename = "matchCase")]
2853    pub match_case: Option<bool>,
2854    /// The text to search for in the document.
2855    pub text: Option<String>,
2856}
2857
2858impl common::Part for SubstringMatchCriteria {}
2859
2860/// A suggested change to a Bullet.
2861///
2862/// This type is not used in any activity, and only used as *part* of another schema.
2863///
2864#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2865#[serde_with::serde_as]
2866#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2867pub struct SuggestedBullet {
2868    /// A Bullet that only includes the changes made in this suggestion. This can be used along with the bullet_suggestion_state to see which fields have changed and their new values.
2869    pub bullet: Option<Bullet>,
2870    /// A mask that indicates which of the fields on the base Bullet have been changed in this suggestion.
2871    #[serde(rename = "bulletSuggestionState")]
2872    pub bullet_suggestion_state: Option<BulletSuggestionState>,
2873}
2874
2875impl common::Part for SuggestedBullet {}
2876
2877/// A suggested change to the DocumentStyle.
2878///
2879/// This type is not used in any activity, and only used as *part* of another schema.
2880///
2881#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2882#[serde_with::serde_as]
2883#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2884pub struct SuggestedDocumentStyle {
2885    /// A DocumentStyle that only includes the changes made in this suggestion. This can be used along with the document_style_suggestion_state to see which fields have changed and their new values.
2886    #[serde(rename = "documentStyle")]
2887    pub document_style: Option<DocumentStyle>,
2888    /// A mask that indicates which of the fields on the base DocumentStyle have been changed in this suggestion.
2889    #[serde(rename = "documentStyleSuggestionState")]
2890    pub document_style_suggestion_state: Option<DocumentStyleSuggestionState>,
2891}
2892
2893impl common::Part for SuggestedDocumentStyle {}
2894
2895/// A suggested change to InlineObjectProperties.
2896///
2897/// This type is not used in any activity, and only used as *part* of another schema.
2898///
2899#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2900#[serde_with::serde_as]
2901#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2902pub struct SuggestedInlineObjectProperties {
2903    /// An InlineObjectProperties that only includes the changes made in this suggestion. This can be used along with the inline_object_properties_suggestion_state to see which fields have changed and their new values.
2904    #[serde(rename = "inlineObjectProperties")]
2905    pub inline_object_properties: Option<InlineObjectProperties>,
2906    /// A mask that indicates which of the fields on the base InlineObjectProperties have been changed in this suggestion.
2907    #[serde(rename = "inlineObjectPropertiesSuggestionState")]
2908    pub inline_object_properties_suggestion_state: Option<InlineObjectPropertiesSuggestionState>,
2909}
2910
2911impl common::Part for SuggestedInlineObjectProperties {}
2912
2913/// A suggested change to ListProperties.
2914///
2915/// This type is not used in any activity, and only used as *part* of another schema.
2916///
2917#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2918#[serde_with::serde_as]
2919#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2920pub struct SuggestedListProperties {
2921    /// A ListProperties that only includes the changes made in this suggestion. This can be used along with the list_properties_suggestion_state to see which fields have changed and their new values.
2922    #[serde(rename = "listProperties")]
2923    pub list_properties: Option<ListProperties>,
2924    /// A mask that indicates which of the fields on the base ListProperties have been changed in this suggestion.
2925    #[serde(rename = "listPropertiesSuggestionState")]
2926    pub list_properties_suggestion_state: Option<ListPropertiesSuggestionState>,
2927}
2928
2929impl common::Part for SuggestedListProperties {}
2930
2931/// A suggested change to the NamedStyles.
2932///
2933/// This type is not used in any activity, and only used as *part* of another schema.
2934///
2935#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2936#[serde_with::serde_as]
2937#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2938pub struct SuggestedNamedStyles {
2939    /// A NamedStyles that only includes the changes made in this suggestion. This can be used along with the named_styles_suggestion_state to see which fields have changed and their new values.
2940    #[serde(rename = "namedStyles")]
2941    pub named_styles: Option<NamedStyles>,
2942    /// A mask that indicates which of the fields on the base NamedStyles have been changed in this suggestion.
2943    #[serde(rename = "namedStylesSuggestionState")]
2944    pub named_styles_suggestion_state: Option<NamedStylesSuggestionState>,
2945}
2946
2947impl common::Part for SuggestedNamedStyles {}
2948
2949/// A suggested change to a ParagraphStyle.
2950///
2951/// This type is not used in any activity, and only used as *part* of another schema.
2952///
2953#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2954#[serde_with::serde_as]
2955#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2956pub struct SuggestedParagraphStyle {
2957    /// A ParagraphStyle that only includes the changes made in this suggestion. This can be used along with the paragraph_style_suggestion_state to see which fields have changed and their new values.
2958    #[serde(rename = "paragraphStyle")]
2959    pub paragraph_style: Option<ParagraphStyle>,
2960    /// A mask that indicates which of the fields on the base ParagraphStyle have been changed in this suggestion.
2961    #[serde(rename = "paragraphStyleSuggestionState")]
2962    pub paragraph_style_suggestion_state: Option<ParagraphStyleSuggestionState>,
2963}
2964
2965impl common::Part for SuggestedParagraphStyle {}
2966
2967/// A suggested change to PositionedObjectProperties.
2968///
2969/// This type is not used in any activity, and only used as *part* of another schema.
2970///
2971#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2972#[serde_with::serde_as]
2973#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2974pub struct SuggestedPositionedObjectProperties {
2975    /// A PositionedObjectProperties that only includes the changes made in this suggestion. This can be used along with the positioned_object_properties_suggestion_state to see which fields have changed and their new values.
2976    #[serde(rename = "positionedObjectProperties")]
2977    pub positioned_object_properties: Option<PositionedObjectProperties>,
2978    /// A mask that indicates which of the fields on the base PositionedObjectProperties have been changed in this suggestion.
2979    #[serde(rename = "positionedObjectPropertiesSuggestionState")]
2980    pub positioned_object_properties_suggestion_state:
2981        Option<PositionedObjectPropertiesSuggestionState>,
2982}
2983
2984impl common::Part for SuggestedPositionedObjectProperties {}
2985
2986/// A suggested change to a TableCellStyle.
2987///
2988/// This type is not used in any activity, and only used as *part* of another schema.
2989///
2990#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
2991#[serde_with::serde_as]
2992#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
2993pub struct SuggestedTableCellStyle {
2994    /// A TableCellStyle that only includes the changes made in this suggestion. This can be used along with the table_cell_style_suggestion_state to see which fields have changed and their new values.
2995    #[serde(rename = "tableCellStyle")]
2996    pub table_cell_style: Option<TableCellStyle>,
2997    /// A mask that indicates which of the fields on the base TableCellStyle have been changed in this suggestion.
2998    #[serde(rename = "tableCellStyleSuggestionState")]
2999    pub table_cell_style_suggestion_state: Option<TableCellStyleSuggestionState>,
3000}
3001
3002impl common::Part for SuggestedTableCellStyle {}
3003
3004/// A suggested change to a TableRowStyle.
3005///
3006/// This type is not used in any activity, and only used as *part* of another schema.
3007///
3008#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3009#[serde_with::serde_as]
3010#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3011pub struct SuggestedTableRowStyle {
3012    /// A TableRowStyle that only includes the changes made in this suggestion. This can be used along with the table_row_style_suggestion_state to see which fields have changed and their new values.
3013    #[serde(rename = "tableRowStyle")]
3014    pub table_row_style: Option<TableRowStyle>,
3015    /// A mask that indicates which of the fields on the base TableRowStyle have been changed in this suggestion.
3016    #[serde(rename = "tableRowStyleSuggestionState")]
3017    pub table_row_style_suggestion_state: Option<TableRowStyleSuggestionState>,
3018}
3019
3020impl common::Part for SuggestedTableRowStyle {}
3021
3022/// A suggested change to a TextStyle.
3023///
3024/// This type is not used in any activity, and only used as *part* of another schema.
3025///
3026#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3027#[serde_with::serde_as]
3028#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3029pub struct SuggestedTextStyle {
3030    /// A TextStyle that only includes the changes made in this suggestion. This can be used along with the text_style_suggestion_state to see which fields have changed and their new values.
3031    #[serde(rename = "textStyle")]
3032    pub text_style: Option<TextStyle>,
3033    /// A mask that indicates which of the fields on the base TextStyle have been changed in this suggestion.
3034    #[serde(rename = "textStyleSuggestionState")]
3035    pub text_style_suggestion_state: Option<TextStyleSuggestionState>,
3036}
3037
3038impl common::Part for SuggestedTextStyle {}
3039
3040/// A tab stop within a paragraph.
3041///
3042/// This type is not used in any activity, and only used as *part* of another schema.
3043///
3044#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3045#[serde_with::serde_as]
3046#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3047pub struct TabStop {
3048    /// The alignment of this tab stop. If unset, the value defaults to START.
3049    pub alignment: Option<String>,
3050    /// The offset between this tab stop and the start margin.
3051    pub offset: Option<Dimension>,
3052}
3053
3054impl common::Part for TabStop {}
3055
3056/// A StructuralElement representing a table.
3057///
3058/// This type is not used in any activity, and only used as *part* of another schema.
3059///
3060#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3061#[serde_with::serde_as]
3062#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3063pub struct Table {
3064    /// Number of columns in the table. It's possible for a table to be non-rectangular, so some rows may have a different number of cells.
3065    pub columns: Option<i32>,
3066    /// Number of rows in the table.
3067    pub rows: Option<i32>,
3068    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
3069    #[serde(rename = "suggestedDeletionIds")]
3070    pub suggested_deletion_ids: Option<Vec<String>>,
3071    /// The suggested insertion IDs. A Table may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
3072    #[serde(rename = "suggestedInsertionIds")]
3073    pub suggested_insertion_ids: Option<Vec<String>>,
3074    /// The contents and style of each row.
3075    #[serde(rename = "tableRows")]
3076    pub table_rows: Option<Vec<TableRow>>,
3077    /// The style of the table.
3078    #[serde(rename = "tableStyle")]
3079    pub table_style: Option<TableStyle>,
3080}
3081
3082impl common::Part for Table {}
3083
3084/// The contents and style of a cell in a Table.
3085///
3086/// This type is not used in any activity, and only used as *part* of another schema.
3087///
3088#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3089#[serde_with::serde_as]
3090#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3091pub struct TableCell {
3092    /// The content of the cell.
3093    pub content: Option<Vec<StructuralElement>>,
3094    /// The zero-based end index of this cell, exclusive, in UTF-16 code units.
3095    #[serde(rename = "endIndex")]
3096    pub end_index: Option<i32>,
3097    /// The zero-based start index of this cell, in UTF-16 code units.
3098    #[serde(rename = "startIndex")]
3099    pub start_index: Option<i32>,
3100    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
3101    #[serde(rename = "suggestedDeletionIds")]
3102    pub suggested_deletion_ids: Option<Vec<String>>,
3103    /// The suggested insertion IDs. A TableCell may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
3104    #[serde(rename = "suggestedInsertionIds")]
3105    pub suggested_insertion_ids: Option<Vec<String>>,
3106    /// The suggested changes to the table cell style, keyed by suggestion ID.
3107    #[serde(rename = "suggestedTableCellStyleChanges")]
3108    pub suggested_table_cell_style_changes: Option<HashMap<String, SuggestedTableCellStyle>>,
3109    /// The style of the cell.
3110    #[serde(rename = "tableCellStyle")]
3111    pub table_cell_style: Option<TableCellStyle>,
3112}
3113
3114impl common::Part for TableCell {}
3115
3116/// A border around a table cell. Table cell borders cannot be transparent. To hide a table cell border, make its width 0.
3117///
3118/// This type is not used in any activity, and only used as *part* of another schema.
3119///
3120#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3121#[serde_with::serde_as]
3122#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3123pub struct TableCellBorder {
3124    /// The color of the border. This color cannot be transparent.
3125    pub color: Option<OptionalColor>,
3126    /// The dash style of the border.
3127    #[serde(rename = "dashStyle")]
3128    pub dash_style: Option<String>,
3129    /// The width of the border.
3130    pub width: Option<Dimension>,
3131}
3132
3133impl common::Part for TableCellBorder {}
3134
3135/// Location of a single cell within a table.
3136///
3137/// This type is not used in any activity, and only used as *part* of another schema.
3138///
3139#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3140#[serde_with::serde_as]
3141#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3142pub struct TableCellLocation {
3143    /// The zero-based column index. For example, the second column in the table has a column index of 1.
3144    #[serde(rename = "columnIndex")]
3145    pub column_index: Option<i32>,
3146    /// The zero-based row index. For example, the second row in the table has a row index of 1.
3147    #[serde(rename = "rowIndex")]
3148    pub row_index: Option<i32>,
3149    /// The location where the table starts in the document.
3150    #[serde(rename = "tableStartLocation")]
3151    pub table_start_location: Option<Location>,
3152}
3153
3154impl common::Part for TableCellLocation {}
3155
3156/// The style of a TableCell. Inherited table cell styles are represented as unset fields in this message. A table cell style can inherit from the table's style.
3157///
3158/// This type is not used in any activity, and only used as *part* of another schema.
3159///
3160#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3161#[serde_with::serde_as]
3162#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3163pub struct TableCellStyle {
3164    /// The background color of the cell.
3165    #[serde(rename = "backgroundColor")]
3166    pub background_color: Option<OptionalColor>,
3167    /// The bottom border of the cell.
3168    #[serde(rename = "borderBottom")]
3169    pub border_bottom: Option<TableCellBorder>,
3170    /// The left border of the cell.
3171    #[serde(rename = "borderLeft")]
3172    pub border_left: Option<TableCellBorder>,
3173    /// The right border of the cell.
3174    #[serde(rename = "borderRight")]
3175    pub border_right: Option<TableCellBorder>,
3176    /// The top border of the cell.
3177    #[serde(rename = "borderTop")]
3178    pub border_top: Option<TableCellBorder>,
3179    /// The column span of the cell. This property is read-only.
3180    #[serde(rename = "columnSpan")]
3181    pub column_span: Option<i32>,
3182    /// The alignment of the content in the table cell. The default alignment matches the alignment for newly created table cells in the Docs editor.
3183    #[serde(rename = "contentAlignment")]
3184    pub content_alignment: Option<String>,
3185    /// The bottom padding of the cell.
3186    #[serde(rename = "paddingBottom")]
3187    pub padding_bottom: Option<Dimension>,
3188    /// The left padding of the cell.
3189    #[serde(rename = "paddingLeft")]
3190    pub padding_left: Option<Dimension>,
3191    /// The right padding of the cell.
3192    #[serde(rename = "paddingRight")]
3193    pub padding_right: Option<Dimension>,
3194    /// The top padding of the cell.
3195    #[serde(rename = "paddingTop")]
3196    pub padding_top: Option<Dimension>,
3197    /// The row span of the cell. This property is read-only.
3198    #[serde(rename = "rowSpan")]
3199    pub row_span: Option<i32>,
3200}
3201
3202impl common::Part for TableCellStyle {}
3203
3204/// A mask that indicates which of the fields on the base TableCellStyle have been changed in this suggestion. For any field set to true, there's a new suggested value.
3205///
3206/// This type is not used in any activity, and only used as *part* of another schema.
3207///
3208#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3209#[serde_with::serde_as]
3210#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3211pub struct TableCellStyleSuggestionState {
3212    /// Indicates if there was a suggested change to background_color.
3213    #[serde(rename = "backgroundColorSuggested")]
3214    pub background_color_suggested: Option<bool>,
3215    /// Indicates if there was a suggested change to border_bottom.
3216    #[serde(rename = "borderBottomSuggested")]
3217    pub border_bottom_suggested: Option<bool>,
3218    /// Indicates if there was a suggested change to border_left.
3219    #[serde(rename = "borderLeftSuggested")]
3220    pub border_left_suggested: Option<bool>,
3221    /// Indicates if there was a suggested change to border_right.
3222    #[serde(rename = "borderRightSuggested")]
3223    pub border_right_suggested: Option<bool>,
3224    /// Indicates if there was a suggested change to border_top.
3225    #[serde(rename = "borderTopSuggested")]
3226    pub border_top_suggested: Option<bool>,
3227    /// Indicates if there was a suggested change to column_span.
3228    #[serde(rename = "columnSpanSuggested")]
3229    pub column_span_suggested: Option<bool>,
3230    /// Indicates if there was a suggested change to content_alignment.
3231    #[serde(rename = "contentAlignmentSuggested")]
3232    pub content_alignment_suggested: Option<bool>,
3233    /// Indicates if there was a suggested change to padding_bottom.
3234    #[serde(rename = "paddingBottomSuggested")]
3235    pub padding_bottom_suggested: Option<bool>,
3236    /// Indicates if there was a suggested change to padding_left.
3237    #[serde(rename = "paddingLeftSuggested")]
3238    pub padding_left_suggested: Option<bool>,
3239    /// Indicates if there was a suggested change to padding_right.
3240    #[serde(rename = "paddingRightSuggested")]
3241    pub padding_right_suggested: Option<bool>,
3242    /// Indicates if there was a suggested change to padding_top.
3243    #[serde(rename = "paddingTopSuggested")]
3244    pub padding_top_suggested: Option<bool>,
3245    /// Indicates if there was a suggested change to row_span.
3246    #[serde(rename = "rowSpanSuggested")]
3247    pub row_span_suggested: Option<bool>,
3248}
3249
3250impl common::Part for TableCellStyleSuggestionState {}
3251
3252/// The properties of a column in a table.
3253///
3254/// This type is not used in any activity, and only used as *part* of another schema.
3255///
3256#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3257#[serde_with::serde_as]
3258#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3259pub struct TableColumnProperties {
3260    /// The width of the column. Set when the column's `width_type` is FIXED_WIDTH.
3261    pub width: Option<Dimension>,
3262    /// The width type of the column.
3263    #[serde(rename = "widthType")]
3264    pub width_type: Option<String>,
3265}
3266
3267impl common::Part for TableColumnProperties {}
3268
3269/// A StructuralElement representing a table of contents.
3270///
3271/// This type is not used in any activity, and only used as *part* of another schema.
3272///
3273#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3274#[serde_with::serde_as]
3275#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3276pub struct TableOfContents {
3277    /// The content of the table of contents.
3278    pub content: Option<Vec<StructuralElement>>,
3279    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
3280    #[serde(rename = "suggestedDeletionIds")]
3281    pub suggested_deletion_ids: Option<Vec<String>>,
3282    /// The suggested insertion IDs. A TableOfContents may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
3283    #[serde(rename = "suggestedInsertionIds")]
3284    pub suggested_insertion_ids: Option<Vec<String>>,
3285}
3286
3287impl common::Part for TableOfContents {}
3288
3289/// A table range represents a reference to a subset of a table. It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this: [ ] A table range with table cell location = (table_start_location, row = 0, column = 0), row span = 3 and column span = 2 specifies the following cells: x x [ x x x ]
3290///
3291/// This type is not used in any activity, and only used as *part* of another schema.
3292///
3293#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3294#[serde_with::serde_as]
3295#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3296pub struct TableRange {
3297    /// The column span of the table range.
3298    #[serde(rename = "columnSpan")]
3299    pub column_span: Option<i32>,
3300    /// The row span of the table range.
3301    #[serde(rename = "rowSpan")]
3302    pub row_span: Option<i32>,
3303    /// The cell location where the table range starts.
3304    #[serde(rename = "tableCellLocation")]
3305    pub table_cell_location: Option<TableCellLocation>,
3306}
3307
3308impl common::Part for TableRange {}
3309
3310/// The contents and style of a row in a Table.
3311///
3312/// This type is not used in any activity, and only used as *part* of another schema.
3313///
3314#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3315#[serde_with::serde_as]
3316#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3317pub struct TableRow {
3318    /// The zero-based end index of this row, exclusive, in UTF-16 code units.
3319    #[serde(rename = "endIndex")]
3320    pub end_index: Option<i32>,
3321    /// The zero-based start index of this row, in UTF-16 code units.
3322    #[serde(rename = "startIndex")]
3323    pub start_index: Option<i32>,
3324    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
3325    #[serde(rename = "suggestedDeletionIds")]
3326    pub suggested_deletion_ids: Option<Vec<String>>,
3327    /// The suggested insertion IDs. A TableRow may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
3328    #[serde(rename = "suggestedInsertionIds")]
3329    pub suggested_insertion_ids: Option<Vec<String>>,
3330    /// The suggested style changes to this row, keyed by suggestion ID.
3331    #[serde(rename = "suggestedTableRowStyleChanges")]
3332    pub suggested_table_row_style_changes: Option<HashMap<String, SuggestedTableRowStyle>>,
3333    /// The contents and style of each cell in this row. It's possible for a table to be non-rectangular, so some rows may have a different number of cells than other rows in the same table.
3334    #[serde(rename = "tableCells")]
3335    pub table_cells: Option<Vec<TableCell>>,
3336    /// The style of the table row.
3337    #[serde(rename = "tableRowStyle")]
3338    pub table_row_style: Option<TableRowStyle>,
3339}
3340
3341impl common::Part for TableRow {}
3342
3343/// Styles that apply to a table row.
3344///
3345/// This type is not used in any activity, and only used as *part* of another schema.
3346///
3347#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3348#[serde_with::serde_as]
3349#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3350pub struct TableRowStyle {
3351    /// The minimum height of the row. The row will be rendered in the Docs editor at a height equal to or greater than this value in order to show all the content in the row's cells.
3352    #[serde(rename = "minRowHeight")]
3353    pub min_row_height: Option<Dimension>,
3354    /// Whether the row cannot overflow across page or column boundaries.
3355    #[serde(rename = "preventOverflow")]
3356    pub prevent_overflow: Option<bool>,
3357    /// Whether the row is a table header.
3358    #[serde(rename = "tableHeader")]
3359    pub table_header: Option<bool>,
3360}
3361
3362impl common::Part for TableRowStyle {}
3363
3364/// A mask that indicates which of the fields on the base TableRowStyle have been changed in this suggestion. For any field set to true, there's a new suggested value.
3365///
3366/// This type is not used in any activity, and only used as *part* of another schema.
3367///
3368#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3369#[serde_with::serde_as]
3370#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3371pub struct TableRowStyleSuggestionState {
3372    /// Indicates if there was a suggested change to min_row_height.
3373    #[serde(rename = "minRowHeightSuggested")]
3374    pub min_row_height_suggested: Option<bool>,
3375}
3376
3377impl common::Part for TableRowStyleSuggestionState {}
3378
3379/// Styles that apply to a table.
3380///
3381/// This type is not used in any activity, and only used as *part* of another schema.
3382///
3383#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3384#[serde_with::serde_as]
3385#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3386pub struct TableStyle {
3387    /// The properties of each column. Note that in Docs, tables contain rows and rows contain cells, similar to HTML. So the properties for a row can be found on the row's table_row_style.
3388    #[serde(rename = "tableColumnProperties")]
3389    pub table_column_properties: Option<Vec<TableColumnProperties>>,
3390}
3391
3392impl common::Part for TableStyle {}
3393
3394/// A ParagraphElement that represents a run of text that all has the same styling.
3395///
3396/// This type is not used in any activity, and only used as *part* of another schema.
3397///
3398#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3399#[serde_with::serde_as]
3400#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3401pub struct TextRun {
3402    /// The text of this run. Any non-text elements in the run are replaced with the Unicode character U+E907.
3403    pub content: Option<String>,
3404    /// The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
3405    #[serde(rename = "suggestedDeletionIds")]
3406    pub suggested_deletion_ids: Option<Vec<String>>,
3407    /// The suggested insertion IDs. A TextRun may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion.
3408    #[serde(rename = "suggestedInsertionIds")]
3409    pub suggested_insertion_ids: Option<Vec<String>>,
3410    /// The suggested text style changes to this run, keyed by suggestion ID.
3411    #[serde(rename = "suggestedTextStyleChanges")]
3412    pub suggested_text_style_changes: Option<HashMap<String, SuggestedTextStyle>>,
3413    /// The text style of this run.
3414    #[serde(rename = "textStyle")]
3415    pub text_style: Option<TextStyle>,
3416}
3417
3418impl common::Part for TextRun {}
3419
3420/// Represents the styling that can be applied to text. Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined: * The TextStyle of text in a Paragraph inherits from the paragraph's corresponding named style type. * The TextStyle on a named style inherits from the normal text named style. * The TextStyle of the normal text named style inherits from the default text style in the Docs editor. * The TextStyle on a Paragraph element that's contained in a table may inherit its text style from the table style. If the text style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
3421///
3422/// This type is not used in any activity, and only used as *part* of another schema.
3423///
3424#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3425#[serde_with::serde_as]
3426#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3427pub struct TextStyle {
3428    /// The background color of the text. If set, the color is either an RGB color or transparent, depending on the `color` field.
3429    #[serde(rename = "backgroundColor")]
3430    pub background_color: Option<OptionalColor>,
3431    /// The text's vertical offset from its normal position. Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically rendered in a smaller font size, computed based on the `font_size` field. Changes in this field don't affect the `font_size`.
3432    #[serde(rename = "baselineOffset")]
3433    pub baseline_offset: Option<String>,
3434    /// Whether or not the text is rendered as bold.
3435    pub bold: Option<bool>,
3436    /// The size of the text's font.
3437    #[serde(rename = "fontSize")]
3438    pub font_size: Option<Dimension>,
3439    /// The foreground color of the text. If set, the color is either an RGB color or transparent, depending on the `color` field.
3440    #[serde(rename = "foregroundColor")]
3441    pub foreground_color: Option<OptionalColor>,
3442    /// Whether or not the text is italicized.
3443    pub italic: Option<bool>,
3444    /// The hyperlink destination of the text. If unset, there's no link. Links are not inherited from parent text. Changing the link in an update request causes some other changes to the text style of the range: * When setting a link, the text foreground color will be updated to the default link color and the text will be underlined. If these fields are modified in the same request, those values will be used instead of the link defaults. * Setting a link on a text range that overlaps with an existing link will also update the existing link to point to the new URL. * Links are not settable on newline characters. As a result, setting a link on a text range that crosses a paragraph boundary, such as `"ABC\n123"`, will separate the newline character(s) into their own text runs. The link will be applied separately to the runs before and after the newline. * Removing a link will update the text style of the range to match the style of the preceding text (or the default text styles if the preceding text is another link) unless different styles are being set in the same request.
3445    pub link: Option<Link>,
3446    /// Whether or not the text is in small capital letters.
3447    #[serde(rename = "smallCaps")]
3448    pub small_caps: Option<bool>,
3449    /// Whether or not the text is struck through.
3450    pub strikethrough: Option<bool>,
3451    /// Whether or not the text is underlined.
3452    pub underline: Option<bool>,
3453    /// The font family and rendered weight of the text. If an update request specifies values for both `weighted_font_family` and `bold`, the `weighted_font_family` is applied first, then `bold`. If `weighted_font_family#weight` is not set, it defaults to `400`. If `weighted_font_family` is set, then `weighted_font_family#font_family` must also be set with a non-empty value. Otherwise, a 400 bad request error is returned.
3454    #[serde(rename = "weightedFontFamily")]
3455    pub weighted_font_family: Option<WeightedFontFamily>,
3456}
3457
3458impl common::Part for TextStyle {}
3459
3460/// A mask that indicates which of the fields on the base TextStyle have been changed in this suggestion. For any field set to true, there's a new suggested value.
3461///
3462/// This type is not used in any activity, and only used as *part* of another schema.
3463///
3464#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3465#[serde_with::serde_as]
3466#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3467pub struct TextStyleSuggestionState {
3468    /// Indicates if there was a suggested change to background_color.
3469    #[serde(rename = "backgroundColorSuggested")]
3470    pub background_color_suggested: Option<bool>,
3471    /// Indicates if there was a suggested change to baseline_offset.
3472    #[serde(rename = "baselineOffsetSuggested")]
3473    pub baseline_offset_suggested: Option<bool>,
3474    /// Indicates if there was a suggested change to bold.
3475    #[serde(rename = "boldSuggested")]
3476    pub bold_suggested: Option<bool>,
3477    /// Indicates if there was a suggested change to font_size.
3478    #[serde(rename = "fontSizeSuggested")]
3479    pub font_size_suggested: Option<bool>,
3480    /// Indicates if there was a suggested change to foreground_color.
3481    #[serde(rename = "foregroundColorSuggested")]
3482    pub foreground_color_suggested: Option<bool>,
3483    /// Indicates if there was a suggested change to italic.
3484    #[serde(rename = "italicSuggested")]
3485    pub italic_suggested: Option<bool>,
3486    /// Indicates if there was a suggested change to link.
3487    #[serde(rename = "linkSuggested")]
3488    pub link_suggested: Option<bool>,
3489    /// Indicates if there was a suggested change to small_caps.
3490    #[serde(rename = "smallCapsSuggested")]
3491    pub small_caps_suggested: Option<bool>,
3492    /// Indicates if there was a suggested change to strikethrough.
3493    #[serde(rename = "strikethroughSuggested")]
3494    pub strikethrough_suggested: Option<bool>,
3495    /// Indicates if there was a suggested change to underline.
3496    #[serde(rename = "underlineSuggested")]
3497    pub underline_suggested: Option<bool>,
3498    /// Indicates if there was a suggested change to weighted_font_family.
3499    #[serde(rename = "weightedFontFamilySuggested")]
3500    pub weighted_font_family_suggested: Option<bool>,
3501}
3502
3503impl common::Part for TextStyleSuggestionState {}
3504
3505/// Unmerges cells in a Table.
3506///
3507/// This type is not used in any activity, and only used as *part* of another schema.
3508///
3509#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3510#[serde_with::serde_as]
3511#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3512pub struct UnmergeTableCellsRequest {
3513    /// The table range specifying which cells of the table to unmerge. All merged cells in this range will be unmerged, and cells that are already unmerged will not be affected. If the range has no merged cells, the request will do nothing. If there is text in any of the merged cells, the text will remain in the "head" cell of the resulting block of unmerged cells. The "head" cell is the upper-left cell when the content direction is from left to right, and the upper-right otherwise.
3514    #[serde(rename = "tableRange")]
3515    pub table_range: Option<TableRange>,
3516}
3517
3518impl common::Part for UnmergeTableCellsRequest {}
3519
3520/// Updates the DocumentStyle.
3521///
3522/// This type is not used in any activity, and only used as *part* of another schema.
3523///
3524#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3525#[serde_with::serde_as]
3526#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3527pub struct UpdateDocumentStyleRequest {
3528    /// The styles to set on the document. Certain document style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of DocumentStyle for more information.
3529    #[serde(rename = "documentStyle")]
3530    pub document_style: Option<DocumentStyle>,
3531    /// The fields that should be updated. At least one field must be specified. The root `document_style` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the background, set `fields` to `"background"`.
3532    pub fields: Option<common::FieldMask>,
3533}
3534
3535impl common::Part for UpdateDocumentStyleRequest {}
3536
3537/// Update the styling of all paragraphs that overlap with the given range.
3538///
3539/// This type is not used in any activity, and only used as *part* of another schema.
3540///
3541#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3542#[serde_with::serde_as]
3543#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3544pub struct UpdateParagraphStyleRequest {
3545    /// The fields that should be updated. At least one field must be specified. The root `paragraph_style` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the paragraph style's alignment property, set `fields` to `"alignment"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.
3546    pub fields: Option<common::FieldMask>,
3547    /// The styles to set on the paragraphs. Certain paragraph style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of ParagraphStyle for more information.
3548    #[serde(rename = "paragraphStyle")]
3549    pub paragraph_style: Option<ParagraphStyle>,
3550    /// The range overlapping the paragraphs to style.
3551    pub range: Option<Range>,
3552}
3553
3554impl common::Part for UpdateParagraphStyleRequest {}
3555
3556/// Updates the SectionStyle.
3557///
3558/// This type is not used in any activity, and only used as *part* of another schema.
3559///
3560#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3561#[serde_with::serde_as]
3562#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3563pub struct UpdateSectionStyleRequest {
3564    /// The fields that should be updated. At least one field must be specified. The root `section_style` is implied and must not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the left margin, set `fields` to `"margin_left"`.
3565    pub fields: Option<common::FieldMask>,
3566    /// The range overlapping the sections to style. Because section breaks can only be inserted inside the body, the segment ID field must be empty.
3567    pub range: Option<Range>,
3568    /// The styles to be set on the section. Certain section style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of SectionStyle for more information.
3569    #[serde(rename = "sectionStyle")]
3570    pub section_style: Option<SectionStyle>,
3571}
3572
3573impl common::Part for UpdateSectionStyleRequest {}
3574
3575/// Updates the style of a range of table cells.
3576///
3577/// This type is not used in any activity, and only used as *part* of another schema.
3578///
3579#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3580#[serde_with::serde_as]
3581#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3582pub struct UpdateTableCellStyleRequest {
3583    /// The fields that should be updated. At least one field must be specified. The root `tableCellStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the table cell background color, set `fields` to `"backgroundColor"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.
3584    pub fields: Option<common::FieldMask>,
3585    /// The style to set on the table cells. When updating borders, if a cell shares a border with an adjacent cell, the corresponding border property of the adjacent cell is updated as well. Borders that are merged and invisible are not updated. Since updating a border shared by adjacent cells in the same request can cause conflicting border updates, border updates are applied in the following order: - `border_right` - `border_left` - `border_bottom` - `border_top`
3586    #[serde(rename = "tableCellStyle")]
3587    pub table_cell_style: Option<TableCellStyle>,
3588    /// The table range representing the subset of the table to which the updates are applied.
3589    #[serde(rename = "tableRange")]
3590    pub table_range: Option<TableRange>,
3591    /// The location where the table starts in the document. When specified, the updates are applied to all the cells in the table.
3592    #[serde(rename = "tableStartLocation")]
3593    pub table_start_location: Option<Location>,
3594}
3595
3596impl common::Part for UpdateTableCellStyleRequest {}
3597
3598/// Updates the TableColumnProperties of columns in a table.
3599///
3600/// This type is not used in any activity, and only used as *part* of another schema.
3601///
3602#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3603#[serde_with::serde_as]
3604#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3605pub struct UpdateTableColumnPropertiesRequest {
3606    /// The list of zero-based column indices whose property should be updated. If no indices are specified, all columns will be updated.
3607    #[serde(rename = "columnIndices")]
3608    pub column_indices: Option<Vec<i32>>,
3609    /// The fields that should be updated. At least one field must be specified. The root `tableColumnProperties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the column width, set `fields` to `"width"`.
3610    pub fields: Option<common::FieldMask>,
3611    /// The table column properties to update. If the value of `table_column_properties#width` is less than 5 points (5/72 inch), a 400 bad request error is returned.
3612    #[serde(rename = "tableColumnProperties")]
3613    pub table_column_properties: Option<TableColumnProperties>,
3614    /// The location where the table starts in the document.
3615    #[serde(rename = "tableStartLocation")]
3616    pub table_start_location: Option<Location>,
3617}
3618
3619impl common::Part for UpdateTableColumnPropertiesRequest {}
3620
3621/// Updates the TableRowStyle of rows in a table.
3622///
3623/// This type is not used in any activity, and only used as *part* of another schema.
3624///
3625#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3626#[serde_with::serde_as]
3627#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3628pub struct UpdateTableRowStyleRequest {
3629    /// The fields that should be updated. At least one field must be specified. The root `tableRowStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the minimum row height, set `fields` to `"min_row_height"`.
3630    pub fields: Option<common::FieldMask>,
3631    /// The list of zero-based row indices whose style should be updated. If no indices are specified, all rows will be updated.
3632    #[serde(rename = "rowIndices")]
3633    pub row_indices: Option<Vec<i32>>,
3634    /// The styles to be set on the rows.
3635    #[serde(rename = "tableRowStyle")]
3636    pub table_row_style: Option<TableRowStyle>,
3637    /// The location where the table starts in the document.
3638    #[serde(rename = "tableStartLocation")]
3639    pub table_start_location: Option<Location>,
3640}
3641
3642impl common::Part for UpdateTableRowStyleRequest {}
3643
3644/// Update the styling of text.
3645///
3646/// This type is not used in any activity, and only used as *part* of another schema.
3647///
3648#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3649#[serde_with::serde_as]
3650#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3651pub struct UpdateTextStyleRequest {
3652    /// The fields that should be updated. At least one field must be specified. The root `text_style` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the text style to bold, set `fields` to `"bold"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.
3653    pub fields: Option<common::FieldMask>,
3654    /// The range of text to style. The range may be extended to include adjacent newlines. If the range fully contains a paragraph belonging to a list, the paragraph's bullet is also updated with the matching text style. Ranges cannot be inserted inside a relative UpdateTextStyleRequest.
3655    pub range: Option<Range>,
3656    /// The styles to set on the text. If the value for a particular style matches that of the parent, that style will be set to inherit. Certain text style changes may cause other changes in order to to mirror the behavior of the Docs editor. See the documentation of TextStyle for more information.
3657    #[serde(rename = "textStyle")]
3658    pub text_style: Option<TextStyle>,
3659}
3660
3661impl common::Part for UpdateTextStyleRequest {}
3662
3663/// Represents a font family and weight of text.
3664///
3665/// This type is not used in any activity, and only used as *part* of another schema.
3666///
3667#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3668#[serde_with::serde_as]
3669#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3670pub struct WeightedFontFamily {
3671    /// The font family of the text. The font family can be any font from the Font menu in Docs or from [Google Fonts] (https://fonts.google.com/). If the font name is unrecognized, the text is rendered in `Arial`.
3672    #[serde(rename = "fontFamily")]
3673    pub font_family: Option<String>,
3674    /// The weight of the font. This field can have any value that's a multiple of `100` between `100` and `900`, inclusive. This range corresponds to the numerical values described in the CSS 2.1 Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness), with non-numerical values disallowed. The default value is `400` ("normal"). The font weight makes up just one component of the rendered font weight. A combination of the `weight` and the text style's resolved `bold` value determine the rendered weight, after accounting for inheritance: * If the text is bold and the weight is less than `400`, the rendered weight is 400. * If the text is bold and the weight is greater than or equal to `400` but is less than `700`, the rendered weight is `700`. * If the weight is greater than or equal to `700`, the rendered weight is equal to the weight. * If the text is not bold, the rendered weight is equal to the weight.
3675    pub weight: Option<i32>,
3676}
3677
3678impl common::Part for WeightedFontFamily {}
3679
3680/// Provides control over how write requests are executed.
3681///
3682/// This type is not used in any activity, and only used as *part* of another schema.
3683///
3684#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
3685#[serde_with::serde_as]
3686#[derive(Default, Clone, Debug, serde::Serialize, serde::Deserialize)]
3687pub struct WriteControl {
3688    /// The optional revision ID of the document the write request is applied to. If this is not the latest revision of the document, the request is not processed and returns a 400 bad request error. When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.
3689    #[serde(rename = "requiredRevisionId")]
3690    pub required_revision_id: Option<String>,
3691    /// The optional target revision ID of the document the write request is applied to. If collaborator changes have occurred after the document was read using the API, the changes produced by this write request are applied against the collaborator changes. This results in a new revision of the document that incorporates both the collaborator changes and the changes in the request, with the Docs server resolving conflicting changes. When using target revision ID, the API client can be thought of as another collaborator of the document. The target revision ID can only be used to write to recent versions of a document. If the target revision is too far behind the latest revision, the request is not processed and returns a 400 bad request error. The request should be tried again after retrieving the latest version of the document. Usually a revision ID remains valid for use as a target revision for several minutes after it's read, but for frequently edited documents this window might be shorter.
3692    #[serde(rename = "targetRevisionId")]
3693    pub target_revision_id: Option<String>,
3694}
3695
3696impl common::Part for WriteControl {}
3697
3698// ###################
3699// MethodBuilders ###
3700// #################
3701
3702/// A builder providing access to all methods supported on *document* resources.
3703/// It is not used directly, but through the [`Docs`] hub.
3704///
3705/// # Example
3706///
3707/// Instantiate a resource builder
3708///
3709/// ```test_harness,no_run
3710/// extern crate hyper;
3711/// extern crate hyper_rustls;
3712/// extern crate google_docs1 as docs1;
3713///
3714/// # async fn dox() {
3715/// use docs1::{Docs, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
3716///
3717/// let secret: yup_oauth2::ApplicationSecret = Default::default();
3718/// let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
3719///     secret,
3720///     yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
3721/// ).build().await.unwrap();
3722///
3723/// let client = hyper_util::client::legacy::Client::builder(
3724///     hyper_util::rt::TokioExecutor::new()
3725/// )
3726/// .build(
3727///     hyper_rustls::HttpsConnectorBuilder::new()
3728///         .with_native_roots()
3729///         .unwrap()
3730///         .https_or_http()
3731///         .enable_http1()
3732///         .build()
3733/// );
3734/// let mut hub = Docs::new(client, auth);
3735/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
3736/// // like `batch_update(...)`, `create(...)` and `get(...)`
3737/// // to build up your call.
3738/// let rb = hub.documents();
3739/// # }
3740/// ```
3741pub struct DocumentMethods<'a, C>
3742where
3743    C: 'a,
3744{
3745    hub: &'a Docs<C>,
3746}
3747
3748impl<'a, C> common::MethodsBuilder for DocumentMethods<'a, C> {}
3749
3750impl<'a, C> DocumentMethods<'a, C> {
3751    /// Create a builder to help you perform the following task:
3752    ///
3753    /// Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.
3754    ///
3755    /// # Arguments
3756    ///
3757    /// * `request` - No description provided.
3758    /// * `documentId` - The ID of the document to update.
3759    pub fn batch_update(
3760        &self,
3761        request: BatchUpdateDocumentRequest,
3762        document_id: &str,
3763    ) -> DocumentBatchUpdateCall<'a, C> {
3764        DocumentBatchUpdateCall {
3765            hub: self.hub,
3766            _request: request,
3767            _document_id: document_id.to_string(),
3768            _delegate: Default::default(),
3769            _additional_params: Default::default(),
3770            _scopes: Default::default(),
3771        }
3772    }
3773
3774    /// Create a builder to help you perform the following task:
3775    ///
3776    /// Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.
3777    ///
3778    /// # Arguments
3779    ///
3780    /// * `request` - No description provided.
3781    pub fn create(&self, request: Document) -> DocumentCreateCall<'a, C> {
3782        DocumentCreateCall {
3783            hub: self.hub,
3784            _request: request,
3785            _delegate: Default::default(),
3786            _additional_params: Default::default(),
3787            _scopes: Default::default(),
3788        }
3789    }
3790
3791    /// Create a builder to help you perform the following task:
3792    ///
3793    /// Gets the latest version of the specified document.
3794    ///
3795    /// # Arguments
3796    ///
3797    /// * `documentId` - The ID of the document to retrieve.
3798    pub fn get(&self, document_id: &str) -> DocumentGetCall<'a, C> {
3799        DocumentGetCall {
3800            hub: self.hub,
3801            _document_id: document_id.to_string(),
3802            _suggestions_view_mode: Default::default(),
3803            _delegate: Default::default(),
3804            _additional_params: Default::default(),
3805            _scopes: Default::default(),
3806        }
3807    }
3808}
3809
3810// ###################
3811// CallBuilders   ###
3812// #################
3813
3814/// Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.
3815///
3816/// A builder for the *batchUpdate* method supported by a *document* resource.
3817/// It is not used directly, but through a [`DocumentMethods`] instance.
3818///
3819/// # Example
3820///
3821/// Instantiate a resource method builder
3822///
3823/// ```test_harness,no_run
3824/// # extern crate hyper;
3825/// # extern crate hyper_rustls;
3826/// # extern crate google_docs1 as docs1;
3827/// use docs1::api::BatchUpdateDocumentRequest;
3828/// # async fn dox() {
3829/// # use docs1::{Docs, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
3830///
3831/// # let secret: yup_oauth2::ApplicationSecret = Default::default();
3832/// # let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
3833/// #     secret,
3834/// #     yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
3835/// # ).build().await.unwrap();
3836///
3837/// # let client = hyper_util::client::legacy::Client::builder(
3838/// #     hyper_util::rt::TokioExecutor::new()
3839/// # )
3840/// # .build(
3841/// #     hyper_rustls::HttpsConnectorBuilder::new()
3842/// #         .with_native_roots()
3843/// #         .unwrap()
3844/// #         .https_or_http()
3845/// #         .enable_http1()
3846/// #         .build()
3847/// # );
3848/// # let mut hub = Docs::new(client, auth);
3849/// // As the method needs a request, you would usually fill it with the desired information
3850/// // into the respective structure. Some of the parts shown here might not be applicable !
3851/// // Values shown here are possibly random and not representative !
3852/// let mut req = BatchUpdateDocumentRequest::default();
3853///
3854/// // You can configure optional parameters by calling the respective setters at will, and
3855/// // execute the final call using `doit()`.
3856/// // Values shown here are possibly random and not representative !
3857/// let result = hub.documents().batch_update(req, "documentId")
3858///              .doit().await;
3859/// # }
3860/// ```
3861pub struct DocumentBatchUpdateCall<'a, C>
3862where
3863    C: 'a,
3864{
3865    hub: &'a Docs<C>,
3866    _request: BatchUpdateDocumentRequest,
3867    _document_id: String,
3868    _delegate: Option<&'a mut dyn common::Delegate>,
3869    _additional_params: HashMap<String, String>,
3870    _scopes: BTreeSet<String>,
3871}
3872
3873impl<'a, C> common::CallBuilder for DocumentBatchUpdateCall<'a, C> {}
3874
3875impl<'a, C> DocumentBatchUpdateCall<'a, C>
3876where
3877    C: common::Connector,
3878{
3879    /// Perform the operation you have build so far.
3880    pub async fn doit(mut self) -> common::Result<(common::Response, BatchUpdateDocumentResponse)> {
3881        use std::borrow::Cow;
3882        use std::io::{Read, Seek};
3883
3884        use common::{url::Params, ToParts};
3885        use hyper::header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, LOCATION, USER_AGENT};
3886
3887        let mut dd = common::DefaultDelegate;
3888        let mut dlg: &mut dyn common::Delegate = self._delegate.unwrap_or(&mut dd);
3889        dlg.begin(common::MethodInfo {
3890            id: "docs.documents.batchUpdate",
3891            http_method: hyper::Method::POST,
3892        });
3893
3894        for &field in ["alt", "documentId"].iter() {
3895            if self._additional_params.contains_key(field) {
3896                dlg.finished(false);
3897                return Err(common::Error::FieldClash(field));
3898            }
3899        }
3900
3901        let mut params = Params::with_capacity(4 + self._additional_params.len());
3902        params.push("documentId", self._document_id);
3903
3904        params.extend(self._additional_params.iter());
3905
3906        params.push("alt", "json");
3907        let mut url = self.hub._base_url.clone() + "v1/documents/{documentId}:batchUpdate";
3908        if self._scopes.is_empty() {
3909            self._scopes.insert(Scope::Document.as_ref().to_string());
3910        }
3911
3912        #[allow(clippy::single_element_loop)]
3913        for &(find_this, param_name) in [("{documentId}", "documentId")].iter() {
3914            url = params.uri_replacement(url, param_name, find_this, false);
3915        }
3916        {
3917            let to_remove = ["documentId"];
3918            params.remove_params(&to_remove);
3919        }
3920
3921        let url = params.parse_with_url(&url);
3922
3923        let mut json_mime_type = mime::APPLICATION_JSON;
3924        let mut request_value_reader = {
3925            let mut value = serde_json::value::to_value(&self._request).expect("serde to work");
3926            common::remove_json_null_values(&mut value);
3927            let mut dst = std::io::Cursor::new(Vec::with_capacity(128));
3928            serde_json::to_writer(&mut dst, &value).unwrap();
3929            dst
3930        };
3931        let request_size = request_value_reader
3932            .seek(std::io::SeekFrom::End(0))
3933            .unwrap();
3934        request_value_reader
3935            .seek(std::io::SeekFrom::Start(0))
3936            .unwrap();
3937
3938        loop {
3939            let token = match self
3940                .hub
3941                .auth
3942                .get_token(&self._scopes.iter().map(String::as_str).collect::<Vec<_>>()[..])
3943                .await
3944            {
3945                Ok(token) => token,
3946                Err(e) => match dlg.token(e) {
3947                    Ok(token) => token,
3948                    Err(e) => {
3949                        dlg.finished(false);
3950                        return Err(common::Error::MissingToken(e));
3951                    }
3952                },
3953            };
3954            request_value_reader
3955                .seek(std::io::SeekFrom::Start(0))
3956                .unwrap();
3957            let mut req_result = {
3958                let client = &self.hub.client;
3959                dlg.pre_request();
3960                let mut req_builder = hyper::Request::builder()
3961                    .method(hyper::Method::POST)
3962                    .uri(url.as_str())
3963                    .header(USER_AGENT, self.hub._user_agent.clone());
3964
3965                if let Some(token) = token.as_ref() {
3966                    req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token));
3967                }
3968
3969                let request = req_builder
3970                    .header(CONTENT_TYPE, json_mime_type.to_string())
3971                    .header(CONTENT_LENGTH, request_size as u64)
3972                    .body(common::to_body(
3973                        request_value_reader.get_ref().clone().into(),
3974                    ));
3975
3976                client.request(request.unwrap()).await
3977            };
3978
3979            match req_result {
3980                Err(err) => {
3981                    if let common::Retry::After(d) = dlg.http_error(&err) {
3982                        sleep(d).await;
3983                        continue;
3984                    }
3985                    dlg.finished(false);
3986                    return Err(common::Error::HttpError(err));
3987                }
3988                Ok(res) => {
3989                    let (mut parts, body) = res.into_parts();
3990                    let mut body = common::Body::new(body);
3991                    if !parts.status.is_success() {
3992                        let bytes = common::to_bytes(body).await.unwrap_or_default();
3993                        let error = serde_json::from_str(&common::to_string(&bytes));
3994                        let response = common::to_response(parts, bytes.into());
3995
3996                        if let common::Retry::After(d) =
3997                            dlg.http_failure(&response, error.as_ref().ok())
3998                        {
3999                            sleep(d).await;
4000                            continue;
4001                        }
4002
4003                        dlg.finished(false);
4004
4005                        return Err(match error {
4006                            Ok(value) => common::Error::BadRequest(value),
4007                            _ => common::Error::Failure(response),
4008                        });
4009                    }
4010                    let response = {
4011                        let bytes = common::to_bytes(body).await.unwrap_or_default();
4012                        let encoded = common::to_string(&bytes);
4013                        match serde_json::from_str(&encoded) {
4014                            Ok(decoded) => (common::to_response(parts, bytes.into()), decoded),
4015                            Err(error) => {
4016                                dlg.response_json_decode_error(&encoded, &error);
4017                                return Err(common::Error::JsonDecodeError(
4018                                    encoded.to_string(),
4019                                    error,
4020                                ));
4021                            }
4022                        }
4023                    };
4024
4025                    dlg.finished(true);
4026                    return Ok(response);
4027                }
4028            }
4029        }
4030    }
4031
4032    ///
4033    /// Sets the *request* property to the given value.
4034    ///
4035    /// Even though the property as already been set when instantiating this call,
4036    /// we provide this method for API completeness.
4037    pub fn request(
4038        mut self,
4039        new_value: BatchUpdateDocumentRequest,
4040    ) -> DocumentBatchUpdateCall<'a, C> {
4041        self._request = new_value;
4042        self
4043    }
4044    /// The ID of the document to update.
4045    ///
4046    /// Sets the *document id* path property to the given value.
4047    ///
4048    /// Even though the property as already been set when instantiating this call,
4049    /// we provide this method for API completeness.
4050    pub fn document_id(mut self, new_value: &str) -> DocumentBatchUpdateCall<'a, C> {
4051        self._document_id = new_value.to_string();
4052        self
4053    }
4054    /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
4055    /// while executing the actual API request.
4056    ///
4057    /// ````text
4058    ///                   It should be used to handle progress information, and to implement a certain level of resilience.
4059    /// ````
4060    ///
4061    /// Sets the *delegate* property to the given value.
4062    pub fn delegate(
4063        mut self,
4064        new_value: &'a mut dyn common::Delegate,
4065    ) -> DocumentBatchUpdateCall<'a, C> {
4066        self._delegate = Some(new_value);
4067        self
4068    }
4069
4070    /// Set any additional parameter of the query string used in the request.
4071    /// It should be used to set parameters which are not yet available through their own
4072    /// setters.
4073    ///
4074    /// Please note that this method must not be used to set any of the known parameters
4075    /// which have their own setter method. If done anyway, the request will fail.
4076    ///
4077    /// # Additional Parameters
4078    ///
4079    /// * *$.xgafv* (query-string) - V1 error format.
4080    /// * *access_token* (query-string) - OAuth access token.
4081    /// * *alt* (query-string) - Data format for response.
4082    /// * *callback* (query-string) - JSONP
4083    /// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
4084    /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
4085    /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
4086    /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
4087    /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
4088    /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
4089    /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
4090    pub fn param<T>(mut self, name: T, value: T) -> DocumentBatchUpdateCall<'a, C>
4091    where
4092        T: AsRef<str>,
4093    {
4094        self._additional_params
4095            .insert(name.as_ref().to_string(), value.as_ref().to_string());
4096        self
4097    }
4098
4099    /// Identifies the authorization scope for the method you are building.
4100    ///
4101    /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant
4102    /// [`Scope::Document`].
4103    ///
4104    /// The `scope` will be added to a set of scopes. This is important as one can maintain access
4105    /// tokens for more than one scope.
4106    ///
4107    /// Usually there is more than one suitable scope to authorize an operation, some of which may
4108    /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
4109    /// sufficient, a read-write scope will do as well.
4110    pub fn add_scope<St>(mut self, scope: St) -> DocumentBatchUpdateCall<'a, C>
4111    where
4112        St: AsRef<str>,
4113    {
4114        self._scopes.insert(String::from(scope.as_ref()));
4115        self
4116    }
4117    /// Identifies the authorization scope(s) for the method you are building.
4118    ///
4119    /// See [`Self::add_scope()`] for details.
4120    pub fn add_scopes<I, St>(mut self, scopes: I) -> DocumentBatchUpdateCall<'a, C>
4121    where
4122        I: IntoIterator<Item = St>,
4123        St: AsRef<str>,
4124    {
4125        self._scopes
4126            .extend(scopes.into_iter().map(|s| String::from(s.as_ref())));
4127        self
4128    }
4129
4130    /// Removes all scopes, and no default scope will be used either.
4131    /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`]
4132    /// for details).
4133    pub fn clear_scopes(mut self) -> DocumentBatchUpdateCall<'a, C> {
4134        self._scopes.clear();
4135        self
4136    }
4137}
4138
4139/// Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.
4140///
4141/// A builder for the *create* method supported by a *document* resource.
4142/// It is not used directly, but through a [`DocumentMethods`] instance.
4143///
4144/// # Example
4145///
4146/// Instantiate a resource method builder
4147///
4148/// ```test_harness,no_run
4149/// # extern crate hyper;
4150/// # extern crate hyper_rustls;
4151/// # extern crate google_docs1 as docs1;
4152/// use docs1::api::Document;
4153/// # async fn dox() {
4154/// # use docs1::{Docs, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
4155///
4156/// # let secret: yup_oauth2::ApplicationSecret = Default::default();
4157/// # let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
4158/// #     secret,
4159/// #     yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
4160/// # ).build().await.unwrap();
4161///
4162/// # let client = hyper_util::client::legacy::Client::builder(
4163/// #     hyper_util::rt::TokioExecutor::new()
4164/// # )
4165/// # .build(
4166/// #     hyper_rustls::HttpsConnectorBuilder::new()
4167/// #         .with_native_roots()
4168/// #         .unwrap()
4169/// #         .https_or_http()
4170/// #         .enable_http1()
4171/// #         .build()
4172/// # );
4173/// # let mut hub = Docs::new(client, auth);
4174/// // As the method needs a request, you would usually fill it with the desired information
4175/// // into the respective structure. Some of the parts shown here might not be applicable !
4176/// // Values shown here are possibly random and not representative !
4177/// let mut req = Document::default();
4178///
4179/// // You can configure optional parameters by calling the respective setters at will, and
4180/// // execute the final call using `doit()`.
4181/// // Values shown here are possibly random and not representative !
4182/// let result = hub.documents().create(req)
4183///              .doit().await;
4184/// # }
4185/// ```
4186pub struct DocumentCreateCall<'a, C>
4187where
4188    C: 'a,
4189{
4190    hub: &'a Docs<C>,
4191    _request: Document,
4192    _delegate: Option<&'a mut dyn common::Delegate>,
4193    _additional_params: HashMap<String, String>,
4194    _scopes: BTreeSet<String>,
4195}
4196
4197impl<'a, C> common::CallBuilder for DocumentCreateCall<'a, C> {}
4198
4199impl<'a, C> DocumentCreateCall<'a, C>
4200where
4201    C: common::Connector,
4202{
4203    /// Perform the operation you have build so far.
4204    pub async fn doit(mut self) -> common::Result<(common::Response, Document)> {
4205        use std::borrow::Cow;
4206        use std::io::{Read, Seek};
4207
4208        use common::{url::Params, ToParts};
4209        use hyper::header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, LOCATION, USER_AGENT};
4210
4211        let mut dd = common::DefaultDelegate;
4212        let mut dlg: &mut dyn common::Delegate = self._delegate.unwrap_or(&mut dd);
4213        dlg.begin(common::MethodInfo {
4214            id: "docs.documents.create",
4215            http_method: hyper::Method::POST,
4216        });
4217
4218        for &field in ["alt"].iter() {
4219            if self._additional_params.contains_key(field) {
4220                dlg.finished(false);
4221                return Err(common::Error::FieldClash(field));
4222            }
4223        }
4224
4225        let mut params = Params::with_capacity(3 + self._additional_params.len());
4226
4227        params.extend(self._additional_params.iter());
4228
4229        params.push("alt", "json");
4230        let mut url = self.hub._base_url.clone() + "v1/documents";
4231        if self._scopes.is_empty() {
4232            self._scopes.insert(Scope::Document.as_ref().to_string());
4233        }
4234
4235        let url = params.parse_with_url(&url);
4236
4237        let mut json_mime_type = mime::APPLICATION_JSON;
4238        let mut request_value_reader = {
4239            let mut value = serde_json::value::to_value(&self._request).expect("serde to work");
4240            common::remove_json_null_values(&mut value);
4241            let mut dst = std::io::Cursor::new(Vec::with_capacity(128));
4242            serde_json::to_writer(&mut dst, &value).unwrap();
4243            dst
4244        };
4245        let request_size = request_value_reader
4246            .seek(std::io::SeekFrom::End(0))
4247            .unwrap();
4248        request_value_reader
4249            .seek(std::io::SeekFrom::Start(0))
4250            .unwrap();
4251
4252        loop {
4253            let token = match self
4254                .hub
4255                .auth
4256                .get_token(&self._scopes.iter().map(String::as_str).collect::<Vec<_>>()[..])
4257                .await
4258            {
4259                Ok(token) => token,
4260                Err(e) => match dlg.token(e) {
4261                    Ok(token) => token,
4262                    Err(e) => {
4263                        dlg.finished(false);
4264                        return Err(common::Error::MissingToken(e));
4265                    }
4266                },
4267            };
4268            request_value_reader
4269                .seek(std::io::SeekFrom::Start(0))
4270                .unwrap();
4271            let mut req_result = {
4272                let client = &self.hub.client;
4273                dlg.pre_request();
4274                let mut req_builder = hyper::Request::builder()
4275                    .method(hyper::Method::POST)
4276                    .uri(url.as_str())
4277                    .header(USER_AGENT, self.hub._user_agent.clone());
4278
4279                if let Some(token) = token.as_ref() {
4280                    req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token));
4281                }
4282
4283                let request = req_builder
4284                    .header(CONTENT_TYPE, json_mime_type.to_string())
4285                    .header(CONTENT_LENGTH, request_size as u64)
4286                    .body(common::to_body(
4287                        request_value_reader.get_ref().clone().into(),
4288                    ));
4289
4290                client.request(request.unwrap()).await
4291            };
4292
4293            match req_result {
4294                Err(err) => {
4295                    if let common::Retry::After(d) = dlg.http_error(&err) {
4296                        sleep(d).await;
4297                        continue;
4298                    }
4299                    dlg.finished(false);
4300                    return Err(common::Error::HttpError(err));
4301                }
4302                Ok(res) => {
4303                    let (mut parts, body) = res.into_parts();
4304                    let mut body = common::Body::new(body);
4305                    if !parts.status.is_success() {
4306                        let bytes = common::to_bytes(body).await.unwrap_or_default();
4307                        let error = serde_json::from_str(&common::to_string(&bytes));
4308                        let response = common::to_response(parts, bytes.into());
4309
4310                        if let common::Retry::After(d) =
4311                            dlg.http_failure(&response, error.as_ref().ok())
4312                        {
4313                            sleep(d).await;
4314                            continue;
4315                        }
4316
4317                        dlg.finished(false);
4318
4319                        return Err(match error {
4320                            Ok(value) => common::Error::BadRequest(value),
4321                            _ => common::Error::Failure(response),
4322                        });
4323                    }
4324                    let response = {
4325                        let bytes = common::to_bytes(body).await.unwrap_or_default();
4326                        let encoded = common::to_string(&bytes);
4327                        match serde_json::from_str(&encoded) {
4328                            Ok(decoded) => (common::to_response(parts, bytes.into()), decoded),
4329                            Err(error) => {
4330                                dlg.response_json_decode_error(&encoded, &error);
4331                                return Err(common::Error::JsonDecodeError(
4332                                    encoded.to_string(),
4333                                    error,
4334                                ));
4335                            }
4336                        }
4337                    };
4338
4339                    dlg.finished(true);
4340                    return Ok(response);
4341                }
4342            }
4343        }
4344    }
4345
4346    ///
4347    /// Sets the *request* property to the given value.
4348    ///
4349    /// Even though the property as already been set when instantiating this call,
4350    /// we provide this method for API completeness.
4351    pub fn request(mut self, new_value: Document) -> DocumentCreateCall<'a, C> {
4352        self._request = new_value;
4353        self
4354    }
4355    /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
4356    /// while executing the actual API request.
4357    ///
4358    /// ````text
4359    ///                   It should be used to handle progress information, and to implement a certain level of resilience.
4360    /// ````
4361    ///
4362    /// Sets the *delegate* property to the given value.
4363    pub fn delegate(
4364        mut self,
4365        new_value: &'a mut dyn common::Delegate,
4366    ) -> DocumentCreateCall<'a, C> {
4367        self._delegate = Some(new_value);
4368        self
4369    }
4370
4371    /// Set any additional parameter of the query string used in the request.
4372    /// It should be used to set parameters which are not yet available through their own
4373    /// setters.
4374    ///
4375    /// Please note that this method must not be used to set any of the known parameters
4376    /// which have their own setter method. If done anyway, the request will fail.
4377    ///
4378    /// # Additional Parameters
4379    ///
4380    /// * *$.xgafv* (query-string) - V1 error format.
4381    /// * *access_token* (query-string) - OAuth access token.
4382    /// * *alt* (query-string) - Data format for response.
4383    /// * *callback* (query-string) - JSONP
4384    /// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
4385    /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
4386    /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
4387    /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
4388    /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
4389    /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
4390    /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
4391    pub fn param<T>(mut self, name: T, value: T) -> DocumentCreateCall<'a, C>
4392    where
4393        T: AsRef<str>,
4394    {
4395        self._additional_params
4396            .insert(name.as_ref().to_string(), value.as_ref().to_string());
4397        self
4398    }
4399
4400    /// Identifies the authorization scope for the method you are building.
4401    ///
4402    /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant
4403    /// [`Scope::Document`].
4404    ///
4405    /// The `scope` will be added to a set of scopes. This is important as one can maintain access
4406    /// tokens for more than one scope.
4407    ///
4408    /// Usually there is more than one suitable scope to authorize an operation, some of which may
4409    /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
4410    /// sufficient, a read-write scope will do as well.
4411    pub fn add_scope<St>(mut self, scope: St) -> DocumentCreateCall<'a, C>
4412    where
4413        St: AsRef<str>,
4414    {
4415        self._scopes.insert(String::from(scope.as_ref()));
4416        self
4417    }
4418    /// Identifies the authorization scope(s) for the method you are building.
4419    ///
4420    /// See [`Self::add_scope()`] for details.
4421    pub fn add_scopes<I, St>(mut self, scopes: I) -> DocumentCreateCall<'a, C>
4422    where
4423        I: IntoIterator<Item = St>,
4424        St: AsRef<str>,
4425    {
4426        self._scopes
4427            .extend(scopes.into_iter().map(|s| String::from(s.as_ref())));
4428        self
4429    }
4430
4431    /// Removes all scopes, and no default scope will be used either.
4432    /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`]
4433    /// for details).
4434    pub fn clear_scopes(mut self) -> DocumentCreateCall<'a, C> {
4435        self._scopes.clear();
4436        self
4437    }
4438}
4439
4440/// Gets the latest version of the specified document.
4441///
4442/// A builder for the *get* method supported by a *document* resource.
4443/// It is not used directly, but through a [`DocumentMethods`] instance.
4444///
4445/// # Example
4446///
4447/// Instantiate a resource method builder
4448///
4449/// ```test_harness,no_run
4450/// # extern crate hyper;
4451/// # extern crate hyper_rustls;
4452/// # extern crate google_docs1 as docs1;
4453/// # async fn dox() {
4454/// # use docs1::{Docs, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
4455///
4456/// # let secret: yup_oauth2::ApplicationSecret = Default::default();
4457/// # let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
4458/// #     secret,
4459/// #     yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
4460/// # ).build().await.unwrap();
4461///
4462/// # let client = hyper_util::client::legacy::Client::builder(
4463/// #     hyper_util::rt::TokioExecutor::new()
4464/// # )
4465/// # .build(
4466/// #     hyper_rustls::HttpsConnectorBuilder::new()
4467/// #         .with_native_roots()
4468/// #         .unwrap()
4469/// #         .https_or_http()
4470/// #         .enable_http1()
4471/// #         .build()
4472/// # );
4473/// # let mut hub = Docs::new(client, auth);
4474/// // You can configure optional parameters by calling the respective setters at will, and
4475/// // execute the final call using `doit()`.
4476/// // Values shown here are possibly random and not representative !
4477/// let result = hub.documents().get("documentId")
4478///              .suggestions_view_mode("At")
4479///              .doit().await;
4480/// # }
4481/// ```
4482pub struct DocumentGetCall<'a, C>
4483where
4484    C: 'a,
4485{
4486    hub: &'a Docs<C>,
4487    _document_id: String,
4488    _suggestions_view_mode: Option<String>,
4489    _delegate: Option<&'a mut dyn common::Delegate>,
4490    _additional_params: HashMap<String, String>,
4491    _scopes: BTreeSet<String>,
4492}
4493
4494impl<'a, C> common::CallBuilder for DocumentGetCall<'a, C> {}
4495
4496impl<'a, C> DocumentGetCall<'a, C>
4497where
4498    C: common::Connector,
4499{
4500    /// Perform the operation you have build so far.
4501    pub async fn doit(mut self) -> common::Result<(common::Response, Document)> {
4502        use std::borrow::Cow;
4503        use std::io::{Read, Seek};
4504
4505        use common::{url::Params, ToParts};
4506        use hyper::header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, LOCATION, USER_AGENT};
4507
4508        let mut dd = common::DefaultDelegate;
4509        let mut dlg: &mut dyn common::Delegate = self._delegate.unwrap_or(&mut dd);
4510        dlg.begin(common::MethodInfo {
4511            id: "docs.documents.get",
4512            http_method: hyper::Method::GET,
4513        });
4514
4515        for &field in ["alt", "documentId", "suggestionsViewMode"].iter() {
4516            if self._additional_params.contains_key(field) {
4517                dlg.finished(false);
4518                return Err(common::Error::FieldClash(field));
4519            }
4520        }
4521
4522        let mut params = Params::with_capacity(4 + self._additional_params.len());
4523        params.push("documentId", self._document_id);
4524        if let Some(value) = self._suggestions_view_mode.as_ref() {
4525            params.push("suggestionsViewMode", value);
4526        }
4527
4528        params.extend(self._additional_params.iter());
4529
4530        params.push("alt", "json");
4531        let mut url = self.hub._base_url.clone() + "v1/documents/{documentId}";
4532        if self._scopes.is_empty() {
4533            self._scopes
4534                .insert(Scope::DocumentReadonly.as_ref().to_string());
4535        }
4536
4537        #[allow(clippy::single_element_loop)]
4538        for &(find_this, param_name) in [("{documentId}", "documentId")].iter() {
4539            url = params.uri_replacement(url, param_name, find_this, false);
4540        }
4541        {
4542            let to_remove = ["documentId"];
4543            params.remove_params(&to_remove);
4544        }
4545
4546        let url = params.parse_with_url(&url);
4547
4548        loop {
4549            let token = match self
4550                .hub
4551                .auth
4552                .get_token(&self._scopes.iter().map(String::as_str).collect::<Vec<_>>()[..])
4553                .await
4554            {
4555                Ok(token) => token,
4556                Err(e) => match dlg.token(e) {
4557                    Ok(token) => token,
4558                    Err(e) => {
4559                        dlg.finished(false);
4560                        return Err(common::Error::MissingToken(e));
4561                    }
4562                },
4563            };
4564            let mut req_result = {
4565                let client = &self.hub.client;
4566                dlg.pre_request();
4567                let mut req_builder = hyper::Request::builder()
4568                    .method(hyper::Method::GET)
4569                    .uri(url.as_str())
4570                    .header(USER_AGENT, self.hub._user_agent.clone());
4571
4572                if let Some(token) = token.as_ref() {
4573                    req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token));
4574                }
4575
4576                let request = req_builder
4577                    .header(CONTENT_LENGTH, 0_u64)
4578                    .body(common::to_body::<String>(None));
4579
4580                client.request(request.unwrap()).await
4581            };
4582
4583            match req_result {
4584                Err(err) => {
4585                    if let common::Retry::After(d) = dlg.http_error(&err) {
4586                        sleep(d).await;
4587                        continue;
4588                    }
4589                    dlg.finished(false);
4590                    return Err(common::Error::HttpError(err));
4591                }
4592                Ok(res) => {
4593                    let (mut parts, body) = res.into_parts();
4594                    let mut body = common::Body::new(body);
4595                    if !parts.status.is_success() {
4596                        let bytes = common::to_bytes(body).await.unwrap_or_default();
4597                        let error = serde_json::from_str(&common::to_string(&bytes));
4598                        let response = common::to_response(parts, bytes.into());
4599
4600                        if let common::Retry::After(d) =
4601                            dlg.http_failure(&response, error.as_ref().ok())
4602                        {
4603                            sleep(d).await;
4604                            continue;
4605                        }
4606
4607                        dlg.finished(false);
4608
4609                        return Err(match error {
4610                            Ok(value) => common::Error::BadRequest(value),
4611                            _ => common::Error::Failure(response),
4612                        });
4613                    }
4614                    let response = {
4615                        let bytes = common::to_bytes(body).await.unwrap_or_default();
4616                        let encoded = common::to_string(&bytes);
4617                        match serde_json::from_str(&encoded) {
4618                            Ok(decoded) => (common::to_response(parts, bytes.into()), decoded),
4619                            Err(error) => {
4620                                dlg.response_json_decode_error(&encoded, &error);
4621                                return Err(common::Error::JsonDecodeError(
4622                                    encoded.to_string(),
4623                                    error,
4624                                ));
4625                            }
4626                        }
4627                    };
4628
4629                    dlg.finished(true);
4630                    return Ok(response);
4631                }
4632            }
4633        }
4634    }
4635
4636    /// The ID of the document to retrieve.
4637    ///
4638    /// Sets the *document id* path property to the given value.
4639    ///
4640    /// Even though the property as already been set when instantiating this call,
4641    /// we provide this method for API completeness.
4642    pub fn document_id(mut self, new_value: &str) -> DocumentGetCall<'a, C> {
4643        self._document_id = new_value.to_string();
4644        self
4645    }
4646    /// The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used.
4647    ///
4648    /// Sets the *suggestions view mode* query property to the given value.
4649    pub fn suggestions_view_mode(mut self, new_value: &str) -> DocumentGetCall<'a, C> {
4650        self._suggestions_view_mode = Some(new_value.to_string());
4651        self
4652    }
4653    /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
4654    /// while executing the actual API request.
4655    ///
4656    /// ````text
4657    ///                   It should be used to handle progress information, and to implement a certain level of resilience.
4658    /// ````
4659    ///
4660    /// Sets the *delegate* property to the given value.
4661    pub fn delegate(mut self, new_value: &'a mut dyn common::Delegate) -> DocumentGetCall<'a, C> {
4662        self._delegate = Some(new_value);
4663        self
4664    }
4665
4666    /// Set any additional parameter of the query string used in the request.
4667    /// It should be used to set parameters which are not yet available through their own
4668    /// setters.
4669    ///
4670    /// Please note that this method must not be used to set any of the known parameters
4671    /// which have their own setter method. If done anyway, the request will fail.
4672    ///
4673    /// # Additional Parameters
4674    ///
4675    /// * *$.xgafv* (query-string) - V1 error format.
4676    /// * *access_token* (query-string) - OAuth access token.
4677    /// * *alt* (query-string) - Data format for response.
4678    /// * *callback* (query-string) - JSONP
4679    /// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
4680    /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
4681    /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
4682    /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
4683    /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
4684    /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
4685    /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
4686    pub fn param<T>(mut self, name: T, value: T) -> DocumentGetCall<'a, C>
4687    where
4688        T: AsRef<str>,
4689    {
4690        self._additional_params
4691            .insert(name.as_ref().to_string(), value.as_ref().to_string());
4692        self
4693    }
4694
4695    /// Identifies the authorization scope for the method you are building.
4696    ///
4697    /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant
4698    /// [`Scope::DocumentReadonly`].
4699    ///
4700    /// The `scope` will be added to a set of scopes. This is important as one can maintain access
4701    /// tokens for more than one scope.
4702    ///
4703    /// Usually there is more than one suitable scope to authorize an operation, some of which may
4704    /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
4705    /// sufficient, a read-write scope will do as well.
4706    pub fn add_scope<St>(mut self, scope: St) -> DocumentGetCall<'a, C>
4707    where
4708        St: AsRef<str>,
4709    {
4710        self._scopes.insert(String::from(scope.as_ref()));
4711        self
4712    }
4713    /// Identifies the authorization scope(s) for the method you are building.
4714    ///
4715    /// See [`Self::add_scope()`] for details.
4716    pub fn add_scopes<I, St>(mut self, scopes: I) -> DocumentGetCall<'a, C>
4717    where
4718        I: IntoIterator<Item = St>,
4719        St: AsRef<str>,
4720    {
4721        self._scopes
4722            .extend(scopes.into_iter().map(|s| String::from(s.as_ref())));
4723        self
4724    }
4725
4726    /// Removes all scopes, and no default scope will be used either.
4727    /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`]
4728    /// for details).
4729    pub fn clear_scopes(mut self) -> DocumentGetCall<'a, C> {
4730        self._scopes.clear();
4731        self
4732    }
4733}