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