diff --git a/discovery/slides-v1.json b/discovery/slides-v1.json index 8e7381427c..1b29a9210c 100644 --- a/discovery/slides-v1.json +++ b/discovery/slides-v1.json @@ -313,7 +313,7 @@ } } }, - "revision": "20201120", + "revision": "20210302", "rootUrl": "https://slides.googleapis.com/", "schemas": { "AffineTransform": { @@ -394,6 +394,39 @@ }, "type": "object" }, + "Autofit": { + "description": "The autofit properties of a Shape.", + "id": "Autofit", + "properties": { + "autofitType": { + "description": "The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED, the autofit type is inherited from a parent placeholder if it exists. The field is automatically set to NONE if a request is made that might affect text fitting within its bounding text box. In this case the font_scale is applied to the font_size and the line_spacing_reduction is applied to the line_spacing. Both properties are also reset to default values.", + "enum": [ + "AUTOFIT_TYPE_UNSPECIFIED", + "NONE", + "TEXT_AUTOFIT", + "SHAPE_AUTOFIT" + ], + "enumDescriptions": [ + "The autofit type is unspecified.", + "Do not autofit.", + "Shrink text on overflow to fit the shape.", + "Resize the shape to fit the text." + ], + "type": "string" + }, + "fontScale": { + "description": "The font scale applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this value multiplied by the font_size gives the font size that is rendered in the editor. This property is read-only.", + "format": "float", + "type": "number" + }, + "lineSpacingReduction": { + "description": "The line spacing reduction applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT, this value subtracted from the line_spacing gives the line spacing that is rendered in the editor. This property is read-only.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "BatchUpdatePresentationRequest": { "description": "Request message for PresentationsService.BatchUpdatePresentation.", "id": "BatchUpdatePresentationRequest", @@ -3330,9 +3363,13 @@ "type": "object" }, "ShapeProperties": { - "description": "The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value.", + "description": "The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. Any text autofit settings on the shape are automatically deactivated by requests that can impact how text fits in the shape.", "id": "ShapeProperties", "properties": { + "autofit": { + "$ref": "Autofit", + "description": "The autofit properties of the shape. This property is only set for shapes that allow text." + }, "contentAlignment": { "description": "The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor.", "enum": [ diff --git a/src/apis/slides/v1.ts b/src/apis/slides/v1.ts index 86e115b9a4..cbcc61318a 100644 --- a/src/apis/slides/v1.ts +++ b/src/apis/slides/v1.ts @@ -158,6 +158,23 @@ export namespace slides_v1 { */ unit?: string | null; } + /** + * The autofit properties of a Shape. + */ + export interface Schema$Autofit { + /** + * The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED, the autofit type is inherited from a parent placeholder if it exists. The field is automatically set to NONE if a request is made that might affect text fitting within its bounding text box. In this case the font_scale is applied to the font_size and the line_spacing_reduction is applied to the line_spacing. Both properties are also reset to default values. + */ + autofitType?: string | null; + /** + * The font scale applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this value multiplied by the font_size gives the font size that is rendered in the editor. This property is read-only. + */ + fontScale?: number | null; + /** + * The line spacing reduction applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT, this value subtracted from the line_spacing gives the line spacing that is rendered in the editor. This property is read-only. + */ + lineSpacingReduction?: number | null; + } /** * A TextElement kind that represents auto text. */ @@ -1740,9 +1757,13 @@ export namespace slides_v1 { solidFill?: Schema$SolidFill; } /** - * The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. + * The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. Any text autofit settings on the shape are automatically deactivated by requests that can impact how text fits in the shape. */ export interface Schema$ShapeProperties { + /** + * The autofit properties of the shape. This property is only set for shapes that allow text. + */ + autofit?: Schema$Autofit; /** * The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor. */