Title: `storage.key.Key`: add direct support for additional resource fields · Issue #313 · googleapis/google-cloud-python · GitHub
Open Graph Title: `storage.key.Key`: add direct support for additional resource fields · Issue #313 · googleapis/google-cloud-python
X Title: `storage.key.Key`: add direct support for additional resource fields · Issue #313 · googleapis/google-cloud-python
Description: The Object API resource representation defines a number of fields as "writable": acl[] cacheControl contentDisposition contentEncoding contentLanguage contentType crc32c md5Hash metadata{} name Key.from_dict currently captures them all i...
Open Graph Description: The Object API resource representation defines a number of fields as "writable": acl[] cacheControl contentDisposition contentEncoding contentLanguage contentType crc32c md5Hash metadata{} name Key...
X Description: The Object API resource representation defines a number of fields as "writable": acl[] cacheControl contentDisposition contentEncoding contentLanguage contentType crc32c md5Hash metadata{...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/313
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`storage.key.Key`: add direct support for additional resource fields ","articleBody":"The [Object API resource representation](https://cloud.google.com/storage/docs/json_api/v1/objects) defines a number of fields as \"writable\":\n- `acl[]`\n- `cacheControl`\n- `contentDisposition`\n- `contentEncoding`\n- `contentLanguage`\n- `contentType`\n- `crc32c`\n- `md5Hash`\n- `metadata{}`\n- `name`\n\n`Key.from_dict` currently captures them _all_ in the key's `metadata` attribute, but that name creates confusion with its `metadata` key (which stores application-defined key-value pairs).\n\nI think it would be cleaner to map each the non-user-defined fields onto separate attributes, and propagate them to the server via the [`insert`](https://cloud.google.com/storage/docs/json_api/v1/objects/insert), and [`patch`](https://cloud.google.com/storage/docs/json_api/v1/objects/patch) or [`update`](https://cloud.google.com/storage/docs/json_api/v1/objects/update) endpoints.\n\n`Key` should also expose read-only properties for the non-writable resource fields not already mapped, and which aren't constants:\n- `componentCount`\n- `etag`\n- `generation`\n- `id`\n- `mediaLink`\n- `metageneration`\n- `owner{}`\n- `selfLink`\n- `size`\n- `storageClass`\n- `timeDeleted`\n- `updated`\n","author":{"url":"https://github.com/tseaver","@type":"Person","name":"tseaver"},"datePublished":"2014-10-29T16:23:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/313/google-cloud-python/issues/313"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cc43a7d4-823d-cb7e-2f8c-178d6bc4e28f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A444:1E086E:F3CEAA:163260B:6A4E31D3 |
| html-safe-nonce | 31d9ec8fa21a6d00b21649df958c8114d8caefe8591db7d90633cdaa29f0f1ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDQ0OjFFMDg2RTpGM0NFQUE6MTYzMjYwQjo2QTRFMzFEMyIsInZpc2l0b3JfaWQiOiIxMjA0MjY4NTQwNDkzNzA1NjgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a1a868410b70ab112dcbe4db97f7475637ebc7b4a95b54995dedd7e8d79f485d |
| hovercard-subject-tag | issue:47169828 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/313/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b244ecd9c172ef1f193af0dfebf0fbc0a539b9003bcd1748e4082de43a4db214/googleapis/google-cloud-python/issues/313 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b244ecd9c172ef1f193af0dfebf0fbc0a539b9003bcd1748e4082de43a4db214/googleapis/google-cloud-python/issues/313 |
| og:image:alt | The Object API resource representation defines a number of fields as "writable": acl[] cacheControl contentDisposition contentEncoding contentLanguage contentType crc32c md5Hash metadata{} name Key... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tseaver |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42a6d378d7587a44c93aca255096cd66b7c8eb2d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width