From b03cad3cf61c33edc52cc30f8ab9c9eb6db9f35b Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 12 Apr 2020 16:08:41 +0100 Subject: [PATCH] vendor: update google.golang.org/api/drive to pull in shortcuts definition --- go.mod | 2 +- go.sum | 7 +- .../api/drive/v2/drive-api.json | 90 +++- .../api/drive/v2/drive-gen.go | 384 ++++++++++++++---- .../api/drive/v3/drive-api.json | 60 ++- .../api/drive/v3/drive-gen.go | 238 ++++++++--- .../api/internal/gensupport/version.go | 53 +++ vendor/google.golang.org/api/internal/pool.go | 53 --- vendor/google.golang.org/api/option/option.go | 1 + .../api/storage/v1/storage-api.json | 40 +- .../api/storage/v1/storage-gen.go | 187 ++++++--- .../api/transport/http/dial.go | 17 +- vendor/modules.txt | 2 +- 13 files changed, 885 insertions(+), 249 deletions(-) create mode 100644 vendor/google.golang.org/api/internal/gensupport/version.go delete mode 100644 vendor/google.golang.org/api/internal/pool.go diff --git a/go.mod b/go.mod index 5ca5a2c64..91e808484 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae golang.org/x/text v0.3.2 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - google.golang.org/api v0.18.0 + google.golang.org/api v0.21.1-0.20200411000818-c8cf5cff125e google.golang.org/genproto v0.0.0-20200225123651-fc8f55426688 // indirect gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index 334731589..9de622bf1 100644 --- a/go.sum +++ b/go.sum @@ -416,12 +416,14 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367 h1:0IiAsCRByjO2QjX7ZPkw5oU9x+n1YqRL802rjC0c3Aw= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -523,6 +525,7 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56 h1:DFtSed2q3HtNuVazwVDZ4nSRS/JrZEig0gz2BY4VNrg= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -538,8 +541,8 @@ google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0 h1:TgDr+1inK2XVUKZx3BYAqQg/GwucGdBkzZjWaTg/I+A= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.21.1-0.20200411000818-c8cf5cff125e h1:apiFYpP/2xKVIDR0xuW1rrDQlSaBrCe62sQBAUthQFE= +google.golang.org/api v0.21.1-0.20200411000818-c8cf5cff125e/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/vendor/google.golang.org/api/drive/v2/drive-api.json b/vendor/google.golang.org/api/drive/v2/drive-api.json index 1d0911ba9..a1f776281 100644 --- a/vendor/google.golang.org/api/drive/v2/drive-api.json +++ b/vendor/google.golang.org/api/drive/v2/drive-api.json @@ -38,7 +38,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/CN38amP-kM1VVBkrUzbZOKj8dm4\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/UEl2PHBvsMjh3TSXQxSnNlF4wSs\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -542,6 +542,12 @@ "required": true, "type": "string" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root.", + "location": "query", + "type": "boolean" + }, "folderId": { "description": "The ID of the folder.", "location": "path", @@ -599,6 +605,12 @@ "folderId" ], "parameters": { + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + "location": "query", + "type": "boolean" + }, "folderId": { "description": "The ID of the folder.", "location": "path", @@ -1114,6 +1126,12 @@ "location": "query", "type": "boolean" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file to copy.", "location": "path", @@ -1394,6 +1412,12 @@ "location": "query", "type": "boolean" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + "location": "query", + "type": "boolean" + }, "ocr": { "default": "false", "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.", @@ -1603,6 +1627,12 @@ "location": "query", "type": "boolean" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file to update.", "location": "path", @@ -1865,6 +1895,12 @@ "location": "query", "type": "boolean" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file to update.", "location": "path", @@ -2069,6 +2105,12 @@ "parentId" ], "parameters": { + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file.", "location": "path", @@ -2132,6 +2174,12 @@ "fileId" ], "parameters": { + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file.", "location": "path", @@ -2339,12 +2387,24 @@ "location": "query", "type": "string" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID for the file or shared drive.", "location": "path", "required": true, "type": "string" }, + "moveToNewOwnersRoot": { + "default": "false", + "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.", + "location": "query", + "type": "boolean" + }, "sendNotificationEmails": { "default": "true", "description": "Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.", @@ -3382,7 +3442,7 @@ } } }, - "revision": "20200110", + "revision": "20200326", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -4467,6 +4527,10 @@ "description": "Whether the current user can add children to this folder. This is always false when the item is not a folder.", "type": "boolean" }, + "canAddMyDriveParent": { + "description": "Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.", + "type": "boolean" + }, "canChangeCopyRequiresWriterPermission": { "description": "Whether the current user can change the copyRequiresWriterPermission restriction of this file.", "type": "boolean" @@ -4563,6 +4627,10 @@ "description": "Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.", "type": "boolean" }, + "canRemoveMyDriveParent": { + "description": "Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.", + "type": "boolean" + }, "canRename": { "description": "Whether the current user can rename this file.", "type": "boolean" @@ -4768,7 +4836,7 @@ "type": "string" }, "rotation": { - "description": "The rotation in clockwise degrees from the image's original orientation.", + "description": "The number of clockwise 90 degree rotations applied from the image's original orientation.", "format": "int32", "type": "integer" }, @@ -4961,6 +5029,20 @@ "$ref": "User", "description": "User that shared the item with the current user, if available." }, + "shortcutDetails": { + "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.", + "properties": { + "targetId": { + "description": "The ID of the file that this shortcut points to.", + "type": "string" + }, + "targetMimeType": { + "description": "The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.", + "type": "string" + } + }, + "type": "object" + }, "spaces": { "description": "The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.", "items": { @@ -5241,7 +5323,7 @@ "type": "boolean" }, "inheritedFrom": { - "description": "The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.", + "description": "The ID of the item from which this permission is inherited. This is an output-only field.", "type": "string" }, "permissionType": { diff --git a/vendor/google.golang.org/api/drive/v2/drive-gen.go b/vendor/google.golang.org/api/drive/v2/drive-gen.go index 016e56f61..bca45e8fd 100644 --- a/vendor/google.golang.org/api/drive/v2/drive-gen.go +++ b/vendor/google.golang.org/api/drive/v2/drive-gen.go @@ -2102,6 +2102,11 @@ type File struct { // available. SharingUser *User `json:"sharingUser,omitempty"` + // ShortcutDetails: Shortcut file details. Only populated for shortcut + // files, which have the mimeType field set to + // application/vnd.google-apps.shortcut. + ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"` + // Spaces: The list of spaces which contain the file. Supported values // are 'drive', 'appDataFolder' and 'photos'. Spaces []string `json:"spaces,omitempty"` @@ -2198,6 +2203,11 @@ type FileCapabilities struct { // folder. This is always false when the item is not a folder. CanAddChildren bool `json:"canAddChildren,omitempty"` + // CanAddMyDriveParent: Whether the current user can add a parent for + // the item without removing an existing parent in the same request. Not + // populated for shared drive files. + CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"` + // CanChangeCopyRequiresWriterPermission: Whether the current user can // change the copyRequiresWriterPermission restriction of this file. CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"` @@ -2302,6 +2312,11 @@ type FileCapabilities struct { // instead. CanRemoveChildren bool `json:"canRemoveChildren,omitempty"` + // CanRemoveMyDriveParent: Whether the current user can remove a parent + // from the item without adding another parent in the same request. Not + // populated for shared drive files. + CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"` + // CanRename: Whether the current user can rename this file. CanRename bool `json:"canRename,omitempty"` @@ -2399,8 +2414,8 @@ type FileImageMediaMetadata struct { // MeteringMode: The metering mode used to create the photo. MeteringMode string `json:"meteringMode,omitempty"` - // Rotation: The rotation in clockwise degrees from the image's original - // orientation. + // Rotation: The number of clockwise 90 degree rotations applied from + // the image's original orientation. Rotation int64 `json:"rotation,omitempty"` // Sensor: The type of sensor used to create the photo. @@ -2587,6 +2602,41 @@ func (s *FileLabels) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FileShortcutDetails: Shortcut file details. Only populated for +// shortcut files, which have the mimeType field set to +// application/vnd.google-apps.shortcut. +type FileShortcutDetails struct { + // TargetId: The ID of the file that this shortcut points to. + TargetId string `json:"targetId,omitempty"` + + // TargetMimeType: The MIME type of the file that this shortcut points + // to. The value of this field is a snapshot of the target's MIME type, + // captured when the shortcut is created. + TargetMimeType string `json:"targetMimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileShortcutDetails) MarshalJSON() ([]byte, error) { + type NoMethod FileShortcutDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FileThumbnail: A thumbnail for the file. This will only be used if a // standard thumbnail cannot be generated. type FileThumbnail struct { @@ -2969,8 +3019,7 @@ type PermissionPermissionDetails struct { Inherited bool `json:"inherited,omitempty"` // InheritedFrom: The ID of the item from which this permission is - // inherited. This is an output-only field and is only populated for - // members of the shared drive. + // inherited. This is an output-only field. InheritedFrom string `json:"inheritedFrom,omitempty"` // PermissionType: The permission type for this user. While new values @@ -3905,7 +3954,7 @@ func (c *AboutGetCall) Header() http.Header { func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4060,7 +4109,7 @@ func (c *AppsGetCall) Header() http.Header { func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4236,7 +4285,7 @@ func (c *AppsListCall) Header() http.Header { func (c *AppsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4415,7 +4464,7 @@ func (c *ChangesGetCall) Header() http.Header { func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4617,7 +4666,7 @@ func (c *ChangesGetStartPageTokenCall) Header() http.Header { func (c *ChangesGetStartPageTokenCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4884,7 +4933,7 @@ func (c *ChangesListCall) Header() http.Header { func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5218,7 +5267,7 @@ func (c *ChangesWatchCall) Header() http.Header { func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5427,7 +5476,7 @@ func (c *ChannelsStopCall) Header() http.Header { func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5504,6 +5553,17 @@ func (r *ChildrenService) Delete(folderId string, childId string) *ChildrenDelet return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the item's +// last parent is removed, the item will be placed under its owner's +// root. +func (c *ChildrenDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenDeleteCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -5531,7 +5591,7 @@ func (c *ChildrenDeleteCall) Header() http.Header { func (c *ChildrenDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5580,6 +5640,12 @@ func (c *ChildrenDeleteCall) Do(opts ...googleapi.CallOption) error { // "required": true, // "type": "string" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root.", + // "location": "query", + // "type": "boolean" + // }, // "folderId": { // "description": "The ID of the folder.", // "location": "path", @@ -5653,7 +5719,7 @@ func (c *ChildrenGetCall) Header() http.Header { func (c *ChildrenGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5773,6 +5839,20 @@ func (r *ChildrenService) Insert(folderId string, childreference *ChildReference return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the child's +// owner makes the request, the child will be removed from all current +// folders and placed in the requested folder. Any other requests that +// increase the number of the child's parents will fail, except when the +// canAddMyDriveParent file capability is true and a single parent is +// being added. +func (c *ChildrenInsertCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenInsertCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // SupportsAllDrives sets the optional parameter "supportsAllDrives": // Deprecated - Whether the requesting application supports both My // Drives and shared drives. This parameter will only be effective until @@ -5817,7 +5897,7 @@ func (c *ChildrenInsertCall) Header() http.Header { func (c *ChildrenInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5888,6 +5968,12 @@ func (c *ChildrenInsertCall) Do(opts ...googleapi.CallOption) (*ChildReference, // "folderId" // ], // "parameters": { + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + // "location": "query", + // "type": "boolean" + // }, // "folderId": { // "description": "The ID of the folder.", // "location": "path", @@ -6013,7 +6099,7 @@ func (c *ChildrenListCall) Header() http.Header { func (c *ChildrenListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6196,7 +6282,7 @@ func (c *CommentsDeleteCall) Header() http.Header { func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6326,7 +6412,7 @@ func (c *CommentsGetCall) Header() http.Header { func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6475,7 +6561,7 @@ func (c *CommentsInsertCall) Header() http.Header { func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6655,7 +6741,7 @@ func (c *CommentsListCall) Header() http.Header { func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6838,7 +6924,7 @@ func (c *CommentsPatchCall) Header() http.Header { func (c *CommentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6987,7 +7073,7 @@ func (c *CommentsUpdateCall) Header() http.Header { func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7133,7 +7219,7 @@ func (c *DrivesDeleteCall) Header() http.Header { func (c *DrivesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7253,7 +7339,7 @@ func (c *DrivesGetCall) Header() http.Header { func (c *DrivesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7391,7 +7477,7 @@ func (c *DrivesHideCall) Header() http.Header { func (c *DrivesHideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7520,7 +7606,7 @@ func (c *DrivesInsertCall) Header() http.Header { func (c *DrivesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7692,7 +7778,7 @@ func (c *DrivesListCall) Header() http.Header { func (c *DrivesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7858,7 +7944,7 @@ func (c *DrivesUnhideCall) Header() http.Header { func (c *DrivesUnhideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7997,7 +8083,7 @@ func (c *DrivesUpdateCall) Header() http.Header { func (c *DrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8121,6 +8207,16 @@ func (c *FilesCopyCall) Convert(convert bool) *FilesCopyCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. Requests that +// specify more than one parent will fail. +func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopyCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // Ocr sets the optional parameter "ocr": Whether to attempt OCR on // .jpg, .png, .gif, or .pdf uploads. func (c *FilesCopyCall) Ocr(ocr bool) *FilesCopyCall { @@ -8214,7 +8310,7 @@ func (c *FilesCopyCall) Header() http.Header { func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8291,6 +8387,12 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file to copy.", // "location": "path", @@ -8432,7 +8534,7 @@ func (c *FilesDeleteCall) Header() http.Header { func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8544,7 +8646,7 @@ func (c *FilesEmptyTrashCall) Header() http.Header { func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8644,7 +8746,7 @@ func (c *FilesExportCall) Header() http.Header { func (c *FilesExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8798,7 +8900,7 @@ func (c *FilesGenerateIdsCall) Header() http.Header { func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8997,7 +9099,7 @@ func (c *FilesGetCall) Header() http.Header { func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9176,6 +9278,16 @@ func (c *FilesInsertCall) Convert(convert bool) *FilesInsertCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. Requests that +// specify more than one parent will fail. +func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParent bool) *FilesInsertCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // Ocr sets the optional parameter "ocr": Whether to attempt OCR on // .jpg, .png, .gif, or .pdf uploads. func (c *FilesInsertCall) Ocr(ocr bool) *FilesInsertCall { @@ -9315,7 +9427,7 @@ func (c *FilesInsertCall) Header() http.Header { func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9430,6 +9542,12 @@ func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + // "location": "query", + // "type": "boolean" + // }, // "ocr": { // "default": "false", // "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.", @@ -9686,7 +9804,7 @@ func (c *FilesListCall) Header() http.Header { func (c *FilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9916,6 +10034,20 @@ func (c *FilesPatchCall) Convert(convert bool) *FilesPatchCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the item's +// owner makes a request to add a single parent, the item will be +// removed from all current folders and placed in the requested folder. +// Other requests that increase the number of parents will fail, except +// when the canAddMyDriveParent file capability is true and a single +// parent is being added. +func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParent bool) *FilesPatchCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // ModifiedDateBehavior sets the optional parameter // "modifiedDateBehavior": Determines the behavior in which modifiedDate // is updated. This overrides setModifiedDate. @@ -10061,7 +10193,7 @@ func (c *FilesPatchCall) Header() http.Header { func (c *FilesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10143,6 +10275,12 @@ func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file to update.", // "location": "path", @@ -10319,7 +10457,7 @@ func (c *FilesTouchCall) Header() http.Header { func (c *FilesTouchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10482,7 +10620,7 @@ func (c *FilesTrashCall) Header() http.Header { func (c *FilesTrashCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10642,7 +10780,7 @@ func (c *FilesUntrashCall) Header() http.Header { func (c *FilesUntrashCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10775,6 +10913,20 @@ func (c *FilesUpdateCall) Convert(convert bool) *FilesUpdateCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the item's +// owner makes a request to add a single parent, the item will be +// removed from all current folders and placed in the requested folder. +// Other requests that increase the number of parents will fail, except +// when the canAddMyDriveParent file capability is true and a single +// parent is being added. +func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // ModifiedDateBehavior sets the optional parameter // "modifiedDateBehavior": Determines the behavior in which modifiedDate // is updated. This overrides setModifiedDate. @@ -10959,7 +11111,7 @@ func (c *FilesUpdateCall) Header() http.Header { func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11085,6 +11237,12 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file to update.", // "location": "path", @@ -11299,7 +11457,7 @@ func (c *FilesWatchCall) Header() http.Header { func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11478,6 +11636,17 @@ func (r *ParentsService) Delete(fileId string, parentId string) *ParentsDeleteCa return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the item's +// last parent is removed, the item will be placed under its owner's +// root. +func (c *ParentsDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ParentsDeleteCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11505,7 +11674,7 @@ func (c *ParentsDeleteCall) Header() http.Header { func (c *ParentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11548,6 +11717,12 @@ func (c *ParentsDeleteCall) Do(opts ...googleapi.CallOption) error { // "parentId" // ], // "parameters": { + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file.", // "location": "path", @@ -11627,7 +11802,7 @@ func (c *ParentsGetCall) Header() http.Header { func (c *ParentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11747,6 +11922,20 @@ func (r *ParentsService) Insert(fileId string, parentreference *ParentReference) return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the child's +// owner makes the request, the child will be removed from all current +// folders and placed in the requested folder. Any other requests that +// increase the number of the child's parents will fail, except when the +// canAddMyDriveParent file capability is true and a single parent is +// being added. +func (c *ParentsInsertCall) EnforceSingleParent(enforceSingleParent bool) *ParentsInsertCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // SupportsAllDrives sets the optional parameter "supportsAllDrives": // Deprecated - Whether the requesting application supports both My // Drives and shared drives. This parameter will only be effective until @@ -11791,7 +11980,7 @@ func (c *ParentsInsertCall) Header() http.Header { func (c *ParentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11862,6 +12051,12 @@ func (c *ParentsInsertCall) Do(opts ...googleapi.CallOption) (*ParentReference, // "fileId" // ], // "parameters": { + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file.", // "location": "path", @@ -11952,7 +12147,7 @@ func (c *ParentsListCall) Header() http.Header { func (c *ParentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12118,7 +12313,7 @@ func (c *PermissionsDeleteCall) Header() http.Header { func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12285,7 +12480,7 @@ func (c *PermissionsGetCall) Header() http.Header { func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12458,7 +12653,7 @@ func (c *PermissionsGetIdForEmailCall) Header() http.Header { func (c *PermissionsGetIdForEmailCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12578,6 +12773,31 @@ func (c *PermissionsInsertCall) EmailMessage(emailMessage string) *PermissionsIn return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. See +// moveToNewOwnersRoot for details. +func (c *PermissionsInsertCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsInsertCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + +// MoveToNewOwnersRoot sets the optional parameter +// "moveToNewOwnersRoot": This parameter will only take effect if the +// item is not in a shared drive and the request is attempting to +// transfer the ownership of the item. When set to true, the item will +// be moved to the new owner's My Drive root folder and all prior +// parents removed. If set to false, when enforceSingleParent=true, +// parents are not changed. If set to false, when +// enforceSingleParent=false, existing parents are not changed; however, +// the file will be added to the new owner's My Drive root folder, +// unless it is already in the new owner's My Drive. +func (c *PermissionsInsertCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsInsertCall { + c.urlParams_.Set("moveToNewOwnersRoot", fmt.Sprint(moveToNewOwnersRoot)) + return c +} + // SendNotificationEmails sets the optional parameter // "sendNotificationEmails": Whether to send notification emails when // sharing to users or groups. This parameter is ignored and an email is @@ -12641,7 +12861,7 @@ func (c *PermissionsInsertCall) Header() http.Header { func (c *PermissionsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12717,12 +12937,24 @@ func (c *PermissionsInsertCall) Do(opts ...googleapi.CallOption) (*Permission, e // "location": "query", // "type": "string" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID for the file or shared drive.", // "location": "path", // "required": true, // "type": "string" // }, + // "moveToNewOwnersRoot": { + // "default": "false", + // "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.", + // "location": "query", + // "type": "boolean" + // }, // "sendNotificationEmails": { // "default": "true", // "description": "Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.", @@ -12863,7 +13095,7 @@ func (c *PermissionsListCall) Header() http.Header { func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13097,7 +13329,7 @@ func (c *PermissionsPatchCall) Header() http.Header { func (c *PermissionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13318,7 +13550,7 @@ func (c *PermissionsUpdateCall) Header() http.Header { func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13502,7 +13734,7 @@ func (c *PropertiesDeleteCall) Header() http.Header { func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13639,7 +13871,7 @@ func (c *PropertiesGetCall) Header() http.Header { func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13793,7 +14025,7 @@ func (c *PropertiesInsertCall) Header() http.Header { func (c *PropertiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13943,7 +14175,7 @@ func (c *PropertiesListCall) Header() http.Header { func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14092,7 +14324,7 @@ func (c *PropertiesPatchCall) Header() http.Header { func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14257,7 +14489,7 @@ func (c *PropertiesUpdateCall) Header() http.Header { func (c *PropertiesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14414,7 +14646,7 @@ func (c *RepliesDeleteCall) Header() http.Header { func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14553,7 +14785,7 @@ func (c *RepliesGetCall) Header() http.Header { func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14712,7 +14944,7 @@ func (c *RepliesInsertCall) Header() http.Header { func (c *RepliesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -14894,7 +15126,7 @@ func (c *RepliesListCall) Header() http.Header { func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15082,7 +15314,7 @@ func (c *RepliesPatchCall) Header() http.Header { func (c *RepliesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15241,7 +15473,7 @@ func (c *RepliesUpdateCall) Header() http.Header { func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15399,7 +15631,7 @@ func (c *RevisionsDeleteCall) Header() http.Header { func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15522,7 +15754,7 @@ func (c *RevisionsGetCall) Header() http.Header { func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15693,7 +15925,7 @@ func (c *RevisionsListCall) Header() http.Header { func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -15869,7 +16101,7 @@ func (c *RevisionsPatchCall) Header() http.Header { func (c *RevisionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16019,7 +16251,7 @@ func (c *RevisionsUpdateCall) Header() http.Header { func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16165,7 +16397,7 @@ func (c *TeamdrivesDeleteCall) Header() http.Header { func (c *TeamdrivesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16285,7 +16517,7 @@ func (c *TeamdrivesGetCall) Header() http.Header { func (c *TeamdrivesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16424,7 +16656,7 @@ func (c *TeamdrivesInsertCall) Header() http.Header { func (c *TeamdrivesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16596,7 +16828,7 @@ func (c *TeamdrivesListCall) Header() http.Header { func (c *TeamdrivesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -16773,7 +17005,7 @@ func (c *TeamdrivesUpdateCall) Header() http.Header { func (c *TeamdrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/drive/v3/drive-api.json b/vendor/google.golang.org/api/drive/v3/drive-api.json index 1e4b42272..62b68dbb7 100644 --- a/vendor/google.golang.org/api/drive/v3/drive-api.json +++ b/vendor/google.golang.org/api/drive/v3/drive-api.json @@ -35,7 +35,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"F5McR9eEaw0XRpaO3M9gbIugkbs/PorHXWkzCl6hdMxMR0HVf8TWRb0\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/Gwpv0RWj7aub3RuREPPSzE4kDlg\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -770,6 +770,12 @@ "fileId" ], "parameters": { + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file.", "location": "path", @@ -841,6 +847,12 @@ } }, "parameters": { + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + "location": "query", + "type": "boolean" + }, "ignoreDefaultVisibility": { "default": "false", "description": "Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.", @@ -1177,6 +1189,12 @@ "location": "query", "type": "string" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file.", "location": "path", @@ -1305,12 +1323,24 @@ "location": "query", "type": "string" }, + "enforceSingleParent": { + "default": "false", + "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.", + "location": "query", + "type": "boolean" + }, "fileId": { "description": "The ID of the file or shared drive.", "location": "path", "required": true, "type": "string" }, + "moveToNewOwnersRoot": { + "default": "false", + "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.", + "location": "query", + "type": "boolean" + }, "sendNotificationEmail": { "description": "Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.", "location": "query", @@ -2096,7 +2126,7 @@ } } }, - "revision": "20191108", + "revision": "20200326", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -2675,6 +2705,10 @@ "description": "Whether the current user can add children to this folder. This is always false when the item is not a folder.", "type": "boolean" }, + "canAddMyDriveParent": { + "description": "Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.", + "type": "boolean" + }, "canChangeCopyRequiresWriterPermission": { "description": "Whether the current user can change the copyRequiresWriterPermission restriction of this file.", "type": "boolean" @@ -2771,6 +2805,10 @@ "description": "Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.", "type": "boolean" }, + "canRemoveMyDriveParent": { + "description": "Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.", + "type": "boolean" + }, "canRename": { "description": "Whether the current user can rename this file.", "type": "boolean" @@ -2968,7 +3006,7 @@ "type": "string" }, "rotation": { - "description": "The rotation in clockwise degrees from the image's original orientation.", + "description": "The number of clockwise 90 degree rotations applied from the image's original orientation.", "format": "int32", "type": "integer" }, @@ -3097,6 +3135,20 @@ "$ref": "User", "description": "The user who shared the file with the requesting user, if applicable." }, + "shortcutDetails": { + "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.", + "properties": { + "targetId": { + "description": "The ID of the file that this shortcut points to.", + "type": "string" + }, + "targetMimeType": { + "description": "The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.", + "type": "string" + } + }, + "type": "object" + }, "size": { "description": "The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.", "format": "int64", @@ -3290,7 +3342,7 @@ "type": "boolean" }, "inheritedFrom": { - "description": "The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.", + "description": "The ID of the item from which this permission is inherited. This is an output-only field.", "type": "string" }, "permissionType": { diff --git a/vendor/google.golang.org/api/drive/v3/drive-gen.go b/vendor/google.golang.org/api/drive/v3/drive-gen.go index ddc567817..75d3fb165 100644 --- a/vendor/google.golang.org/api/drive/v3/drive-gen.go +++ b/vendor/google.golang.org/api/drive/v3/drive-gen.go @@ -1319,6 +1319,11 @@ type File struct { // if applicable. SharingUser *User `json:"sharingUser,omitempty"` + // ShortcutDetails: Shortcut file details. Only populated for shortcut + // files, which have the mimeType field set to + // application/vnd.google-apps.shortcut. + ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"` + // Size: The size of the file's content in bytes. This is only // applicable to files with binary content in Google Drive. Size int64 `json:"size,omitempty,string"` @@ -1423,6 +1428,11 @@ type FileCapabilities struct { // folder. This is always false when the item is not a folder. CanAddChildren bool `json:"canAddChildren,omitempty"` + // CanAddMyDriveParent: Whether the current user can add a parent for + // the item without removing an existing parent in the same request. Not + // populated for shared drive files. + CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"` + // CanChangeCopyRequiresWriterPermission: Whether the current user can // change the copyRequiresWriterPermission restriction of this file. CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"` @@ -1527,6 +1537,11 @@ type FileCapabilities struct { // instead. CanRemoveChildren bool `json:"canRemoveChildren,omitempty"` + // CanRemoveMyDriveParent: Whether the current user can remove a parent + // from the item without adding another parent in the same request. Not + // populated for shared drive files. + CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"` + // CanRename: Whether the current user can rename this file. CanRename bool `json:"canRename,omitempty"` @@ -1688,8 +1703,8 @@ type FileImageMediaMetadata struct { // MeteringMode: The metering mode used to create the photo. MeteringMode string `json:"meteringMode,omitempty"` - // Rotation: The rotation in clockwise degrees from the image's original - // orientation. + // Rotation: The number of clockwise 90 degree rotations applied from + // the image's original orientation. Rotation int64 `json:"rotation,omitempty"` // Sensor: The type of sensor used to create the photo. @@ -1805,6 +1820,41 @@ func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error { return nil } +// FileShortcutDetails: Shortcut file details. Only populated for +// shortcut files, which have the mimeType field set to +// application/vnd.google-apps.shortcut. +type FileShortcutDetails struct { + // TargetId: The ID of the file that this shortcut points to. + TargetId string `json:"targetId,omitempty"` + + // TargetMimeType: The MIME type of the file that this shortcut points + // to. The value of this field is a snapshot of the target's MIME type, + // captured when the shortcut is created. + TargetMimeType string `json:"targetMimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileShortcutDetails) MarshalJSON() ([]byte, error) { + type NoMethod FileShortcutDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FileVideoMediaMetadata: Additional metadata about video media. This // may not be available immediately upon upload. type FileVideoMediaMetadata struct { @@ -2046,8 +2096,7 @@ type PermissionPermissionDetails struct { Inherited bool `json:"inherited,omitempty"` // InheritedFrom: The ID of the item from which this permission is - // inherited. This is an output-only field and is only populated for - // members of the shared drive. + // inherited. This is an output-only field. InheritedFrom string `json:"inheritedFrom,omitempty"` // PermissionType: The permission type for this user. While new values @@ -2884,7 +2933,7 @@ func (c *AboutGetCall) Header() http.Header { func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3049,7 +3098,7 @@ func (c *ChangesGetStartPageTokenCall) Header() http.Header { func (c *ChangesGetStartPageTokenCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3300,7 +3349,7 @@ func (c *ChangesListCall) Header() http.Header { func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3597,7 +3646,7 @@ func (c *ChangesWatchCall) Header() http.Header { func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3805,7 +3854,7 @@ func (c *ChannelsStopCall) Header() http.Header { func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3908,7 +3957,7 @@ func (c *CommentsCreateCall) Header() http.Header { func (c *CommentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4047,7 +4096,7 @@ func (c *CommentsDeleteCall) Header() http.Header { func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4177,7 +4226,7 @@ func (c *CommentsGetCall) Header() http.Header { func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4366,7 +4415,7 @@ func (c *CommentsListCall) Header() http.Header { func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4549,7 +4598,7 @@ func (c *CommentsUpdateCall) Header() http.Header { func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4695,7 +4744,7 @@ func (c *DrivesCreateCall) Header() http.Header { func (c *DrivesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4829,7 +4878,7 @@ func (c *DrivesDeleteCall) Header() http.Header { func (c *DrivesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4949,7 +4998,7 @@ func (c *DrivesGetCall) Header() http.Header { func (c *DrivesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5087,7 +5136,7 @@ func (c *DrivesHideCall) Header() http.Header { func (c *DrivesHideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5254,7 +5303,7 @@ func (c *DrivesListCall) Header() http.Header { func (c *DrivesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5420,7 +5469,7 @@ func (c *DrivesUnhideCall) Header() http.Header { func (c *DrivesUnhideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5559,7 +5608,7 @@ func (c *DrivesUpdateCall) Header() http.Header { func (c *DrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5677,6 +5726,16 @@ func (r *FilesService) Copy(fileId string, file *File) *FilesCopyCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. Requests that +// specify more than one parent will fail. +func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopyCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // IgnoreDefaultVisibility sets the optional parameter // "ignoreDefaultVisibility": Whether to ignore the domain's default // visibility settings for the created file. Domain administrators can @@ -5749,7 +5808,7 @@ func (c *FilesCopyCall) Header() http.Header { func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5820,6 +5879,12 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // "fileId" // ], // "parameters": { + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file.", // "location": "path", @@ -5891,6 +5956,16 @@ func (r *FilesService) Create(file *File) *FilesCreateCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. Requests that +// specify more than one parent will fail. +func (c *FilesCreateCall) EnforceSingleParent(enforceSingleParent bool) *FilesCreateCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // IgnoreDefaultVisibility sets the optional parameter // "ignoreDefaultVisibility": Whether to ignore the domain's default // visibility settings for the created file. Domain administrators can @@ -6010,7 +6085,7 @@ func (c *FilesCreateCall) Header() http.Header { func (c *FilesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6119,6 +6194,12 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // } // }, // "parameters": { + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail.", + // "location": "query", + // "type": "boolean" + // }, // "ignoreDefaultVisibility": { // "default": "false", // "description": "Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.", @@ -6237,7 +6318,7 @@ func (c *FilesDeleteCall) Header() http.Header { func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6349,7 +6430,7 @@ func (c *FilesEmptyTrashCall) Header() http.Header { func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6449,7 +6530,7 @@ func (c *FilesExportCall) Header() http.Header { func (c *FilesExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6603,7 +6684,7 @@ func (c *FilesGenerateIdsCall) Header() http.Header { func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6776,7 +6857,7 @@ func (c *FilesGetCall) Header() http.Header { func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7073,7 +7154,7 @@ func (c *FilesListCall) Header() http.Header { func (c *FilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7285,6 +7366,20 @@ func (c *FilesUpdateCall) AddParents(addParents string) *FilesUpdateCall { return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. If the item's +// owner makes a request to add a single parent, the item will be +// removed from all current folders and placed in the requested folder. +// Other requests that increase the number of parents will fail, except +// when the canAddMyDriveParent file capability is true and a single +// parent is being added. +func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + // KeepRevisionForever sets the optional parameter // "keepRevisionForever": Whether to set the 'keepForever' field in the // new head revision. This is only applicable to files with binary @@ -7400,7 +7495,7 @@ func (c *FilesUpdateCall) Header() http.Header { func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7520,6 +7615,12 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "string" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file.", // "location": "path", @@ -7652,7 +7753,7 @@ func (c *FilesWatchCall) Header() http.Header { func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7814,6 +7915,31 @@ func (c *PermissionsCreateCall) EmailMessage(emailMessage string) *PermissionsCr return c } +// EnforceSingleParent sets the optional parameter +// "enforceSingleParent": Set to true to opt in to API behavior that +// aims for all items to have exactly one parent. This parameter will +// only take effect if the item is not in a shared drive. See +// moveToNewOwnersRoot for details. +func (c *PermissionsCreateCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsCreateCall { + c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) + return c +} + +// MoveToNewOwnersRoot sets the optional parameter +// "moveToNewOwnersRoot": This parameter will only take effect if the +// item is not in a shared drive and the request is attempting to +// transfer the ownership of the item. When set to true, the item will +// be moved to the new owner's My Drive root folder and all prior +// parents removed. If set to false, when enforceSingleParent=true, +// parents are not changed. If set to false, when +// enforceSingleParent=false, existing parents are not changed; however, +// the file will be added to the new owner's My Drive root folder, +// unless it is already in the new owner's My Drive. +func (c *PermissionsCreateCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsCreateCall { + c.urlParams_.Set("moveToNewOwnersRoot", fmt.Sprint(moveToNewOwnersRoot)) + return c +} + // SendNotificationEmail sets the optional parameter // "sendNotificationEmail": Whether to send a notification email when // sharing to users or groups. This defaults to true for users and @@ -7887,7 +8013,7 @@ func (c *PermissionsCreateCall) Header() http.Header { func (c *PermissionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7963,12 +8089,24 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e // "location": "query", // "type": "string" // }, + // "enforceSingleParent": { + // "default": "false", + // "description": "Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.", + // "location": "query", + // "type": "boolean" + // }, // "fileId": { // "description": "The ID of the file or shared drive.", // "location": "path", // "required": true, // "type": "string" // }, + // "moveToNewOwnersRoot": { + // "default": "false", + // "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.", + // "location": "query", + // "type": "boolean" + // }, // "sendNotificationEmail": { // "description": "Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.", // "location": "query", @@ -8087,7 +8225,7 @@ func (c *PermissionsDeleteCall) Header() http.Header { func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8254,7 +8392,7 @@ func (c *PermissionsGetCall) Header() http.Header { func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8471,7 +8609,7 @@ func (c *PermissionsListCall) Header() http.Header { func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8706,7 +8844,7 @@ func (c *PermissionsUpdateCall) Header() http.Header { func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8885,7 +9023,7 @@ func (c *RepliesCreateCall) Header() http.Header { func (c *RepliesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9034,7 +9172,7 @@ func (c *RepliesDeleteCall) Header() http.Header { func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9174,7 +9312,7 @@ func (c *RepliesGetCall) Header() http.Header { func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9365,7 +9503,7 @@ func (c *RepliesListCall) Header() http.Header { func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9553,7 +9691,7 @@ func (c *RepliesUpdateCall) Header() http.Header { func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9711,7 +9849,7 @@ func (c *RevisionsDeleteCall) Header() http.Header { func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9843,7 +9981,7 @@ func (c *RevisionsGetCall) Header() http.Header { func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10038,7 +10176,7 @@ func (c *RevisionsListCall) Header() http.Header { func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10214,7 +10352,7 @@ func (c *RevisionsUpdateCall) Header() http.Header { func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10361,7 +10499,7 @@ func (c *TeamdrivesCreateCall) Header() http.Header { func (c *TeamdrivesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10494,7 +10632,7 @@ func (c *TeamdrivesDeleteCall) Header() http.Header { func (c *TeamdrivesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10614,7 +10752,7 @@ func (c *TeamdrivesGetCall) Header() http.Header { func (c *TeamdrivesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10791,7 +10929,7 @@ func (c *TeamdrivesListCall) Header() http.Header { func (c *TeamdrivesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10968,7 +11106,7 @@ func (c *TeamdrivesUpdateCall) Header() http.Header { func (c *TeamdrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/internal/gensupport/version.go b/vendor/google.golang.org/api/internal/gensupport/version.go new file mode 100644 index 000000000..23f6aa24e --- /dev/null +++ b/vendor/google.golang.org/api/internal/gensupport/version.go @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gensupport + +import ( + "runtime" + "strings" + "unicode" +) + +// GoVersion returns the Go runtime version. The returned string +// has no whitespace. +func GoVersion() string { + return goVersion +} + +var goVersion = goVer(runtime.Version()) + +const develPrefix = "devel +" + +func goVer(s string) string { + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "" +} + +func notSemverRune(r rune) bool { + return !strings.ContainsRune("0123456789.", r) +} diff --git a/vendor/google.golang.org/api/internal/pool.go b/vendor/google.golang.org/api/internal/pool.go deleted file mode 100644 index 908579fff..000000000 --- a/vendor/google.golang.org/api/internal/pool.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2016 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -import ( - "errors" - - "google.golang.org/grpc/naming" -) - -// TODO: move to transport/grpc package - -// PoolResolver provides a fixed list of addresses to load balance between -// and does not provide further updates. -type PoolResolver struct { - poolSize int - dialOpt *DialSettings - ch chan []*naming.Update -} - -// NewPoolResolver returns a PoolResolver -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func NewPoolResolver(size int, o *DialSettings) *PoolResolver { - return &PoolResolver{poolSize: size, dialOpt: o} -} - -// Resolve returns a Watcher for the endpoint defined by the DialSettings -// provided to NewPoolResolver. -func (r *PoolResolver) Resolve(target string) (naming.Watcher, error) { - if r.dialOpt.Endpoint == "" { - return nil, errors.New("no endpoint configured") - } - addrs := make([]*naming.Update, 0, r.poolSize) - for i := 0; i < r.poolSize; i++ { - addrs = append(addrs, &naming.Update{Op: naming.Add, Addr: r.dialOpt.Endpoint, Metadata: i}) - } - r.ch = make(chan []*naming.Update, 1) - r.ch <- addrs - return r, nil -} - -// Next returns a static list of updates on the first call, -// and blocks indefinitely until Close is called on subsequent calls. -func (r *PoolResolver) Next() ([]*naming.Update, error) { - return <-r.ch, nil -} - -// Close releases resources associated with the pool and causes Next to unblock. -func (r *PoolResolver) Close() { - close(r.ch) -} diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go index 5fd1e4cc7..b7c40d60a 100644 --- a/vendor/google.golang.org/api/option/option.go +++ b/vendor/google.golang.org/api/option/option.go @@ -143,6 +143,7 @@ func (w withGRPCDialOption) Apply(o *internal.DialSettings) { // WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC // connections that requests will be balanced between. +// // This is an EXPERIMENTAL API and may be changed or removed in the future. func WithGRPCConnectionPool(size int) ClientOption { return withGRPCConnectionPool(size) diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 161f09eee..b4797a484 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -26,7 +26,7 @@ "description": "Stores and retrieves potentially large, immutable data objects.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/1nXB4dbk0lw3Xe_A6xBKVeN3Y7U\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/Hs4LXeoJXbMtbcM0DbLgg3CHzL4\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -1826,6 +1826,11 @@ "required": true, "type": "string" }, + "destinationKmsKeyName": { + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "location": "query", + "type": "string" + }, "destinationObject": { "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", "location": "path", @@ -2310,6 +2315,11 @@ "location": "query", "type": "string" }, + "endOffset": { + "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query", + "type": "string" + }, "includeTrailingDelimiter": { "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", "location": "query", @@ -2351,6 +2361,11 @@ "location": "query", "type": "string" }, + "startOffset": { + "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query", + "type": "string" + }, "userProject": { "description": "The project to be billed for this request. Required for Requester Pays buckets.", "location": "query", @@ -2882,6 +2897,11 @@ "location": "query", "type": "string" }, + "endOffset": { + "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query", + "type": "string" + }, "includeTrailingDelimiter": { "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", "location": "query", @@ -2923,6 +2943,11 @@ "location": "query", "type": "string" }, + "startOffset": { + "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query", + "type": "string" + }, "userProject": { "description": "The project to be billed for this request. Required for Requester Pays buckets.", "location": "query", @@ -3204,7 +3229,7 @@ } } }, - "revision": "20191127", + "revision": "20200326", "rootUrl": "https://storage.googleapis.com/", "schemas": { "Bucket": { @@ -3527,6 +3552,17 @@ } }, "type": "object" + }, + "zoneAffinity": { + "description": "The zone or zones from which the bucket is intended to use zonal quota. Requests for data from outside the specified affinities are still allowed but won't be able to use zonal quota. The zone or zones need to be within the bucket location otherwise the requests will fail with a 400 Bad Request response.", + "items": { + "type": "string" + }, + "type": "array" + }, + "zoneSeparation": { + "description": "If set, objects placed in this bucket are required to be separated by disaster domain.", + "type": "boolean" } }, "type": "object" diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index 23be4135e..3fa8e7c78 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -393,6 +393,17 @@ type Bucket struct { // Static Website Examples for more information. Website *BucketWebsite `json:"website,omitempty"` + // ZoneAffinity: The zone or zones from which the bucket is intended to + // use zonal quota. Requests for data from outside the specified + // affinities are still allowed but won't be able to use zonal quota. + // The zone or zones need to be within the bucket location otherwise the + // requests will fail with a 400 Bad Request response. + ZoneAffinity []string `json:"zoneAffinity,omitempty"` + + // ZoneSeparation: If set, objects placed in this bucket are required to + // be separated by disaster domain. + ZoneSeparation bool `json:"zoneSeparation,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2404,7 +2415,7 @@ func (c *BucketAccessControlsDeleteCall) Header() http.Header { func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2552,7 +2563,7 @@ func (c *BucketAccessControlsGetCall) Header() http.Header { func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2719,7 +2730,7 @@ func (c *BucketAccessControlsInsertCall) Header() http.Header { func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2892,7 +2903,7 @@ func (c *BucketAccessControlsListCall) Header() http.Header { func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3053,7 +3064,7 @@ func (c *BucketAccessControlsPatchCall) Header() http.Header { func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3227,7 +3238,7 @@ func (c *BucketAccessControlsUpdateCall) Header() http.Header { func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3413,7 +3424,7 @@ func (c *BucketsDeleteCall) Header() http.Header { func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3592,7 +3603,7 @@ func (c *BucketsGetCall) Header() http.Header { func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3798,7 +3809,7 @@ func (c *BucketsGetIamPolicyCall) Header() http.Header { func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4015,7 +4026,7 @@ func (c *BucketsInsertCall) Header() http.Header { func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4272,7 +4283,7 @@ func (c *BucketsListCall) Header() http.Header { func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4482,7 +4493,7 @@ func (c *BucketsLockRetentionPolicyCall) Header() http.Header { func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4717,7 +4728,7 @@ func (c *BucketsPatchCall) Header() http.Header { func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4946,7 +4957,7 @@ func (c *BucketsSetIamPolicyCall) Header() http.Header { func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5121,7 +5132,7 @@ func (c *BucketsTestIamPermissionsCall) Header() http.Header { func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5361,7 +5372,7 @@ func (c *BucketsUpdateCall) Header() http.Header { func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5573,7 +5584,7 @@ func (c *ChannelsStopCall) Header() http.Header { func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5690,7 +5701,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header { func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5838,7 +5849,7 @@ func (c *DefaultObjectAccessControlsGetCall) Header() http.Header { func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6006,7 +6017,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header { func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6196,7 +6207,7 @@ func (c *DefaultObjectAccessControlsListCall) Header() http.Header { func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6369,7 +6380,7 @@ func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header { func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6543,7 +6554,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header { func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6715,7 +6726,7 @@ func (c *NotificationsDeleteCall) Header() http.Header { func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6863,7 +6874,7 @@ func (c *NotificationsGetCall) Header() http.Header { func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7033,7 +7044,7 @@ func (c *NotificationsInsertCall) Header() http.Header { func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7208,7 +7219,7 @@ func (c *NotificationsListCall) Header() http.Header { func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7381,7 +7392,7 @@ func (c *ObjectAccessControlsDeleteCall) Header() http.Header { func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7553,7 +7564,7 @@ func (c *ObjectAccessControlsGetCall) Header() http.Header { func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7744,7 +7755,7 @@ func (c *ObjectAccessControlsInsertCall) Header() http.Header { func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7941,7 +7952,7 @@ func (c *ObjectAccessControlsListCall) Header() http.Header { func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8126,7 +8137,7 @@ func (c *ObjectAccessControlsPatchCall) Header() http.Header { func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8324,7 +8335,7 @@ func (c *ObjectAccessControlsUpdateCall) Header() http.Header { func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8561,7 +8572,7 @@ func (c *ObjectsComposeCall) Header() http.Header { func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8737,6 +8748,17 @@ func (r *ObjectsService) Copy(sourceBucket string, sourceObject string, destinat return c } +// DestinationKmsKeyName sets the optional parameter +// "destinationKmsKeyName": Resource name of the Cloud KMS key, of the +// form +// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, +// that will be used to encrypt the object. Overrides the object +// metadata's kms_key_name value, if any. +func (c *ObjectsCopyCall) DestinationKmsKeyName(destinationKmsKeyName string) *ObjectsCopyCall { + c.urlParams_.Set("destinationKmsKeyName", destinationKmsKeyName) + return c +} + // DestinationPredefinedAcl sets the optional parameter // "destinationPredefinedAcl": Apply a predefined set of access controls // to the destination object. @@ -8893,7 +8915,7 @@ func (c *ObjectsCopyCall) Header() http.Header { func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8976,6 +8998,11 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "required": true, // "type": "string" // }, + // "destinationKmsKeyName": { + // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + // "location": "query", + // "type": "string" + // }, // "destinationObject": { // "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", // "location": "path", @@ -9216,7 +9243,7 @@ func (c *ObjectsDeleteCall) Header() http.Header { func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9449,7 +9476,7 @@ func (c *ObjectsGetCall) Header() http.Header { func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9699,7 +9726,7 @@ func (c *ObjectsGetIamPolicyCall) Header() http.Header { func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10016,7 +10043,7 @@ func (c *ObjectsInsertCall) Header() http.Header { func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10266,6 +10293,15 @@ func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall { return c } +// EndOffset sets the optional parameter "endOffset": Filter results to +// objects whose names are lexicographically before endOffset. If +// startOffset is also set, the objects listed will have names between +// startOffset (inclusive) and endOffset (exclusive). +func (c *ObjectsListCall) EndOffset(endOffset string) *ObjectsListCall { + c.urlParams_.Set("endOffset", endOffset) + return c +} + // IncludeTrailingDelimiter sets the optional parameter // "includeTrailingDelimiter": If true, objects that end in exactly one // instance of delimiter will have their metadata included in items in @@ -10319,6 +10355,15 @@ func (c *ObjectsListCall) ProvisionalUserProject(provisionalUserProject string) return c } +// StartOffset sets the optional parameter "startOffset": Filter results +// to objects whose names are lexicographically equal to or after +// startOffset. If endOffset is also set, the objects listed will have +// names between startOffset (inclusive) and endOffset (exclusive). +func (c *ObjectsListCall) StartOffset(startOffset string) *ObjectsListCall { + c.urlParams_.Set("startOffset", startOffset) + return c +} + // UserProject sets the optional parameter "userProject": The project to // be billed for this request. Required for Requester Pays buckets. func (c *ObjectsListCall) UserProject(userProject string) *ObjectsListCall { @@ -10371,7 +10416,7 @@ func (c *ObjectsListCall) Header() http.Header { func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10451,6 +10496,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { // "location": "query", // "type": "string" // }, + // "endOffset": { + // "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + // "location": "query", + // "type": "string" + // }, // "includeTrailingDelimiter": { // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", // "location": "query", @@ -10492,6 +10542,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { // "location": "query", // "type": "string" // }, + // "startOffset": { + // "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + // "location": "query", + // "type": "string" + // }, // "userProject": { // "description": "The project to be billed for this request. Required for Requester Pays buckets.", // "location": "query", @@ -10678,7 +10733,7 @@ func (c *ObjectsPatchCall) Header() http.Header { func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11070,7 +11125,7 @@ func (c *ObjectsRewriteCall) Header() http.Header { func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11373,7 +11428,7 @@ func (c *ObjectsSetIamPolicyCall) Header() http.Header { func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11573,7 +11628,7 @@ func (c *ObjectsTestIamPermissionsCall) Header() http.Header { func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11834,7 +11889,7 @@ func (c *ObjectsUpdateCall) Header() http.Header { func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12039,6 +12094,15 @@ func (c *ObjectsWatchAllCall) Delimiter(delimiter string) *ObjectsWatchAllCall { return c } +// EndOffset sets the optional parameter "endOffset": Filter results to +// objects whose names are lexicographically before endOffset. If +// startOffset is also set, the objects listed will have names between +// startOffset (inclusive) and endOffset (exclusive). +func (c *ObjectsWatchAllCall) EndOffset(endOffset string) *ObjectsWatchAllCall { + c.urlParams_.Set("endOffset", endOffset) + return c +} + // IncludeTrailingDelimiter sets the optional parameter // "includeTrailingDelimiter": If true, objects that end in exactly one // instance of delimiter will have their metadata included in items in @@ -12092,6 +12156,15 @@ func (c *ObjectsWatchAllCall) ProvisionalUserProject(provisionalUserProject stri return c } +// StartOffset sets the optional parameter "startOffset": Filter results +// to objects whose names are lexicographically equal to or after +// startOffset. If endOffset is also set, the objects listed will have +// names between startOffset (inclusive) and endOffset (exclusive). +func (c *ObjectsWatchAllCall) StartOffset(startOffset string) *ObjectsWatchAllCall { + c.urlParams_.Set("startOffset", startOffset) + return c +} + // UserProject sets the optional parameter "userProject": The project to // be billed for this request. Required for Requester Pays buckets. func (c *ObjectsWatchAllCall) UserProject(userProject string) *ObjectsWatchAllCall { @@ -12134,7 +12207,7 @@ func (c *ObjectsWatchAllCall) Header() http.Header { func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12216,6 +12289,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) // "location": "query", // "type": "string" // }, + // "endOffset": { + // "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + // "location": "query", + // "type": "string" + // }, // "includeTrailingDelimiter": { // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", // "location": "query", @@ -12257,6 +12335,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) // "location": "query", // "type": "string" // }, + // "startOffset": { + // "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + // "location": "query", + // "type": "string" + // }, // "userProject": { // "description": "The project to be billed for this request. Required for Requester Pays buckets.", // "location": "query", @@ -12340,7 +12423,7 @@ func (c *ProjectsHmacKeysCreateCall) Header() http.Header { func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12490,7 +12573,7 @@ func (c *ProjectsHmacKeysDeleteCall) Header() http.Header { func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12625,7 +12708,7 @@ func (c *ProjectsHmacKeysGetCall) Header() http.Header { func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12825,7 +12908,7 @@ func (c *ProjectsHmacKeysListCall) Header() http.Header { func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13020,7 +13103,7 @@ func (c *ProjectsHmacKeysUpdateCall) Header() http.Header { func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13197,7 +13280,7 @@ func (c *ProjectsServiceAccountGetCall) Header() http.Header { func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20200223") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index d0dcc75c1..4848698db 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -202,10 +202,19 @@ func addOCTransport(trans http.RoundTripper, settings *internal.DialSettings) ht // We would like to avoid introducing client-side logic that parses whether the // endpoint override is an mTLS url, since the url pattern may change at anytime. func getClientCertificateSource(settings *internal.DialSettings) (cert.Source, error) { - if settings.ClientCertSource != nil { - return settings.ClientCertSource, nil - } - return cert.DefaultSource() + return settings.ClientCertSource, nil + // TODO(andyzhao): Currently, many services including compute, storage, and bigquery + // do not have working mTLS endpoints, so we will disable the ADC for DCA logic + // until we can confirm that all services have working mTLS endpoints. + /* + if settings.HTTPClient != nil { + return nil, nil // HTTPClient is incompatible with ClientCertificateSource + } else if settings.ClientCertSource != nil { + return settings.ClientCertSource, nil + } else { + return cert.DefaultSoure() + } + */ } // getEndpoint returns the endpoint for the service, taking into account the diff --git a/vendor/modules.txt b/vendor/modules.txt index b702ffa48..449b7032b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -294,7 +294,7 @@ golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm # golang.org/x/time v0.0.0-20191024005414-555d28b269f0 golang.org/x/time/rate -# google.golang.org/api v0.18.0 +# google.golang.org/api v0.21.1-0.20200411000818-c8cf5cff125e google.golang.org/api/drive/v2 google.golang.org/api/drive/v3 google.golang.org/api/googleapi