[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-04 UTC。"],[],[],null,["Field masks are a way for API callers to list fields that a request should\nreturn or update. Using a\n[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)\nallows the API to avoid unnecessary work and improves performance. A field mask\nis used for both the read and update methods in the Google Slides API.\n\nFor a comparison of what's returned in a response body when you don't use a\nfield mask versus when you do, see [Working with partial\nresources](/workspace/slides/api/guides/performance#partial).\n\nRead with a field mask \n\nPresentations can be large, and often you don't need every part of the\n[`presentations`](/workspace/slides/api/reference/rest/v1/presentations)\nresource returned by a read request. You can limit what's returned in a\nSlides API response, using the `fields` URL parameter. For best\nperformance, [explicitly list only the fields you\nneed](/workspace/slides/how-tos/performance#partial) in the reply.\n\nThe format of the fields parameter is the same as the [JSON encoding of a\nFieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#json-encoding-field-masks).\nStated briefly, multiple different fields are comma-separated and subfields are\ndot-separated. Field names can be specified in **camelCase** or\n**separated_by_underscores**. For convenience, multiple subfields from the same\ntype can be listed within parentheses.\n\nThe following\n[`presentations.get`](/workspace/slides/api/reference/rest/v1/presentations/get)\nmethod request example uses a field mask of\n`slides.pageElements(objectId,size,transform)` to fetch only the object ID,\n[`Size`](/workspace/slides/api/reference/rest/v1/Size), and\n[transform](/workspace/slides/api/reference/rest/v1/presentations.pages/other#affinetransform)\nof a\n[`pageElement`](/workspace/slides/api/reference/rest/v1/presentations.pages#pageelement)\nobject on all slides in a presentation: \n\n```\nGET https://slides.googleapis.com/v1/presentations/presentationId?fields=slides.pageElements(objectId,size,transform)\n```\n\nThe response to this method call is a\n[`presentations`](/workspace/slides/api/reference/rest/v1/presentations) object\ncontaining the components requested in the field mask: \n\n {\n \"slides\": [\n {\n \"pageElements\": [\n {\n \"objectId\": \"\u003cvar translate=\"no\"\u003eOBJECT_ID\u003c/var\u003e\",\n \"size\": {\n \"width\": {\n \"magnitude\": 3000000,\n \"unit\": \"EMU\"\n },\n \"height\": {\n \"magnitude\": 3000000,\n \"unit\": \"EMU\"\n }\n },\n \"transform\": {\n \"scaleX\": 1,\n \"scaleY\": 1\n \"translateX\": 311708,\n \"translateY\": 744575,\n \"unit\": \"EMU\"\n }\n },\n {\n \"objectId\": \"\u003cvar translate=\"no\"\u003eOBJECT_ID\u003c/var\u003e\",\n \"size\": {\n \"width\": {\n \"magnitude\": 3000000,\n \"unit\": \"EMU\"\n },\n \"height\": {\n \"magnitude\": 3000000,\n \"unit\": \"EMU\"\n }\n },\n \"transform\": {\n \"scaleX\": 1,\n \"scaleY\": 1\n \"translateX\": 311700,\n \"translateY\": 2834125,\n \"unit\": \"EMU\"\n }\n }\n ]\n }\n ]\n }\n\nUpdate with a field mask \n\nSometimes you need to update only certain fields in an object while leaving the\nother fields unchanged. Update requests inside a\n[`presentations.batchUpdate`](/workspace/slides/api/reference/rest/v1/presentations/batchUpdate)\nmethod use field masks to tell the API which fields are being changed. The\nupdate request ignores any fields that aren't specified in the field mask,\nleaving them with their current values.\n\nYou can also unset a field by not specifying it in the updated message, but\nadding the field to the mask. This clears whatever value the field previously\nhad.\n\nThe syntax for update field masks is the same as read field masks.\n| A field mask of `*` is treated like a wildcard and is shorthand for specifying every field in a message. The wildcard syntax can produce unwanted results if the API is updated in the future, as read-only fields and newly added fields may cause errors. For production applications, always list the specific fields being updated in field masks and avoid using `*` wildcards.\n\nThe following example uses the\n[`UpdateShapePropertiesRequest`](/workspace/slides/api/reference/rest/v1/presentations/request#updateshapepropertiesrequest)\nmethod to change a shape's color fill to the `DARK1` theme color and unset the\nshape's outline: \n\n```\nPOST https://slides.googleapis.com/v1/presentations/presentationId:batchUpdate\n``` \n\n {\n \"requests\": [\n {\n \"updateShapeProperties\": {\n \"objectId\": \u003cvar translate=\"no\"\u003eOBJECT_ID\u003c/var\u003e,\n \"shapeProperties\": {\n \"shapeBackgroundFill\": {\n \"solidFill\": {\n \"color\": {\n \"themeColor\": \"DARK1\"\n }\n }\n }\n },\n \"fields\": \"shapeBackgroundFill.solidFill.color,outline\"\n }\n }\n ]\n }"]]