vendor: update all dependencies to latest versions
This commit is contained in:
+43
-25
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-XlPsGE1eaKzlxWDtbwmuSaBoqc\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/aAU6-GJtzQTwC546w_DsCPIRIUA\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "storage:v1",
|
||||
"name": "storage",
|
||||
"version": "v1",
|
||||
"revision": "20170607",
|
||||
"revision": "20170915",
|
||||
"title": "Cloud Storage JSON API",
|
||||
"description": "Stores and retrieves potentially large, immutable data objects.",
|
||||
"ownerDomain": "google.com",
|
||||
@@ -687,7 +687,7 @@
|
||||
},
|
||||
"contentType": {
|
||||
"type": "string",
|
||||
"description": "Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream."
|
||||
"description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream."
|
||||
},
|
||||
"crc32c": {
|
||||
"type": "string",
|
||||
@@ -946,6 +946,9 @@
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"condition": {
|
||||
"type": "any"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project",
|
||||
@@ -990,7 +993,7 @@
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input."
|
||||
"description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1471,6 +1474,11 @@
|
||||
"Omit owner, acl and defaultObjectAcl properties."
|
||||
],
|
||||
"location": "query"
|
||||
},
|
||||
"userProject": {
|
||||
"type": "string",
|
||||
"description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
@@ -1530,6 +1538,11 @@
|
||||
"Omit owner, acl and defaultObjectAcl properties."
|
||||
],
|
||||
"location": "query"
|
||||
},
|
||||
"userProject": {
|
||||
"type": "string",
|
||||
"description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
@@ -2176,7 +2189,7 @@
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
"description": "Name of a GCS bucket.",
|
||||
"description": "Name of a Google Cloud Storage bucket.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
@@ -2535,7 +2548,7 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -2615,13 +2628,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -2639,13 +2652,13 @@
|
||||
},
|
||||
"ifSourceGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the source object's generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifSourceGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the source object's generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -2738,13 +2751,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -2802,13 +2815,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -2930,13 +2943,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3129,13 +3142,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3258,13 +3271,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3282,13 +3295,13 @@
|
||||
},
|
||||
"ifSourceGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the source object's generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifSourceGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the source object's generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3489,13 +3502,13 @@
|
||||
},
|
||||
"ifGenerationMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
"ifGenerationNotMatch": {
|
||||
"type": "string",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3662,13 +3675,18 @@
|
||||
"id": "storage.projects.serviceAccount.get",
|
||||
"path": "projects/{projectId}/serviceAccount",
|
||||
"httpMethod": "GET",
|
||||
"description": "Get the email address of this project's GCS service account.",
|
||||
"description": "Get the email address of this project's Google Cloud Storage service account.",
|
||||
"parameters": {
|
||||
"projectId": {
|
||||
"type": "string",
|
||||
"description": "Project ID",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"userProject": {
|
||||
"type": "string",
|
||||
"description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
|
||||
+133
-107
@@ -1168,9 +1168,8 @@ type Object struct {
|
||||
// ContentLanguage: Content-Language of the object data.
|
||||
ContentLanguage string `json:"contentLanguage,omitempty"`
|
||||
|
||||
// ContentType: Content-Type of the object data. If contentType is not
|
||||
// specified, object downloads will be served as
|
||||
// application/octet-stream.
|
||||
// ContentType: Content-Type of the object data. If an object is stored
|
||||
// without a Content-Type, it is served as application/octet-stream.
|
||||
ContentType string `json:"contentType,omitempty"`
|
||||
|
||||
// Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B;
|
||||
@@ -1556,10 +1555,11 @@ type Policy struct {
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// ResourceId: The ID of the resource to which this policy belongs. Will
|
||||
// be of the form buckets/bucket for buckets, and
|
||||
// buckets/bucket/objects/object for objects. A specific generation may
|
||||
// be specified by appending #generationNumber to the end of the object
|
||||
// name, e.g. buckets/my-bucket/objects/data.txt#17. The current
|
||||
// be of the form projects/_/buckets/bucket for buckets, and
|
||||
// projects/_/buckets/bucket/objects/object for objects. A specific
|
||||
// generation may be specified by appending #generationNumber to the end
|
||||
// of the object name, e.g.
|
||||
// projects/_/buckets/my-bucket/objects/data.txt#17. The current
|
||||
// generation can be denoted with #0. This field is ignored on input.
|
||||
ResourceId string `json:"resourceId,omitempty"`
|
||||
|
||||
@@ -1591,6 +1591,8 @@ func (s *Policy) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
type PolicyBindings struct {
|
||||
Condition interface{} `json:"condition,omitempty"`
|
||||
|
||||
// Members: A collection of identifiers for members who may assume the
|
||||
// provided role. Recognized identifiers are as follows:
|
||||
// - allUsers — A special identifier that represents anyone on the
|
||||
@@ -1648,7 +1650,7 @@ type PolicyBindings struct {
|
||||
// an ACL entry on a bucket with the OWNER role.
|
||||
Role string `json:"role,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Members") to
|
||||
// ForceSendFields is a list of field names (e.g. "Condition") 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
|
||||
@@ -1656,7 +1658,7 @@ type PolicyBindings struct {
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Members") to include in
|
||||
// NullFields is a list of field names (e.g. "Condition") 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
|
||||
@@ -3272,6 +3274,13 @@ func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall {
|
||||
return c
|
||||
}
|
||||
|
||||
// UserProject sets the optional parameter "userProject": The project to
|
||||
// be billed for this request, for Requester Pays buckets.
|
||||
func (c *BucketsInsertCall) UserProject(userProject string) *BucketsInsertCall {
|
||||
c.urlParams_.Set("userProject", userProject)
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
@@ -3420,6 +3429,11 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
|
||||
// ],
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "userProject": {
|
||||
// "description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "b",
|
||||
@@ -3489,6 +3503,13 @@ func (c *BucketsListCall) Projection(projection string) *BucketsListCall {
|
||||
return c
|
||||
}
|
||||
|
||||
// UserProject sets the optional parameter "userProject": The project to
|
||||
// be billed for this request, for Requester Pays buckets.
|
||||
func (c *BucketsListCall) UserProject(userProject string) *BucketsListCall {
|
||||
c.urlParams_.Set("userProject", userProject)
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
@@ -3623,6 +3644,11 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) {
|
||||
// ],
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "userProject": {
|
||||
// "description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "b",
|
||||
@@ -6103,7 +6129,7 @@ func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "bucket": {
|
||||
// "description": "Name of a GCS bucket.",
|
||||
// "description": "Name of a Google Cloud Storage bucket.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
@@ -7207,7 +7233,8 @@ func (c *ObjectsComposeCall) DestinationPredefinedAcl(destinationPredefinedAcl s
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value.
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsComposeCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsComposeCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -7383,7 +7410,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -7472,7 +7499,8 @@ func (c *ObjectsCopyCall) DestinationPredefinedAcl(destinationPredefinedAcl stri
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the destination object's
|
||||
// current generation matches the given value.
|
||||
// current generation matches the given value. Setting to 0 makes the
|
||||
// operation succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsCopyCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsCopyCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -7481,7 +7509,9 @@ func (c *ObjectsCopyCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsCop
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the destination object's current generation does not match the given
|
||||
// value.
|
||||
// value. If no live object exists, the precondition fails. Setting to 0
|
||||
// makes the operation succeed only if there is a live version of the
|
||||
// object.
|
||||
func (c *ObjectsCopyCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsCopyCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -7507,7 +7537,7 @@ func (c *ObjectsCopyCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int6
|
||||
|
||||
// IfSourceGenerationMatch sets the optional parameter
|
||||
// "ifSourceGenerationMatch": Makes the operation conditional on whether
|
||||
// the source object's generation matches the given value.
|
||||
// the source object's current generation matches the given value.
|
||||
func (c *ObjectsCopyCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsCopyCall {
|
||||
c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch))
|
||||
return c
|
||||
@@ -7515,8 +7545,8 @@ func (c *ObjectsCopyCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64)
|
||||
|
||||
// IfSourceGenerationNotMatch sets the optional parameter
|
||||
// "ifSourceGenerationNotMatch": Makes the operation conditional on
|
||||
// whether the source object's generation does not match the given
|
||||
// value.
|
||||
// whether the source object's current generation does not match the
|
||||
// given value.
|
||||
func (c *ObjectsCopyCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsCopyCall {
|
||||
c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch))
|
||||
return c
|
||||
@@ -7716,13 +7746,13 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -7740,13 +7770,13 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifSourceGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the source object's generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifSourceGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the source object's generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -7849,7 +7879,8 @@ func (c *ObjectsDeleteCall) Generation(generation int64) *ObjectsDeleteCall {
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value.
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsDeleteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsDeleteCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -7857,7 +7888,9 @@ func (c *ObjectsDeleteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsD
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the object's current generation does not match the given value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsDeleteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsDeleteCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -7965,13 +7998,13 @@ func (c *ObjectsDeleteCall) Do(opts ...googleapi.CallOption) error {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -8039,8 +8072,9 @@ func (c *ObjectsGetCall) Generation(generation int64) *ObjectsGetCall {
|
||||
}
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's generation
|
||||
// matches the given value.
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsGetCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsGetCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -8048,7 +8082,9 @@ func (c *ObjectsGetCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsGetC
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the object's generation does not match the given value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsGetCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsGetCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -8221,13 +8257,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -8466,17 +8502,13 @@ func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err
|
||||
// method id "storage.objects.insert":
|
||||
|
||||
type ObjectsInsertCall struct {
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
media_ io.Reader
|
||||
mediaBuffer_ *gensupport.MediaBuffer
|
||||
mediaType_ string
|
||||
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
|
||||
progressUpdater_ googleapi.ProgressUpdater
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Insert: Stores a new object and metadata.
|
||||
@@ -8500,7 +8532,8 @@ func (c *ObjectsInsertCall) ContentEncoding(contentEncoding string) *ObjectsInse
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value.
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsInsertCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsInsertCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -8508,7 +8541,9 @@ func (c *ObjectsInsertCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsI
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the object's current generation does not match the given value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsInsertCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsInsertCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -8601,12 +8636,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
||||
if ct := c.object.ContentType; ct != "" {
|
||||
options = append([]googleapi.MediaOption{googleapi.ContentType(ct)}, options...)
|
||||
}
|
||||
opts := googleapi.ProcessMediaOptions(options)
|
||||
chunkSize := opts.ChunkSize
|
||||
if !opts.ForceEmptyContentType {
|
||||
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
|
||||
}
|
||||
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
|
||||
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -8621,11 +8651,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
|
||||
c.ctx_ = ctx
|
||||
rdr := gensupport.ReaderAtToReader(r, size)
|
||||
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
|
||||
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
|
||||
c.media_ = nil
|
||||
c.mediaSize_ = size
|
||||
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -8634,7 +8660,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -8679,27 +8705,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o")
|
||||
if c.media_ != nil || c.mediaBuffer_ != nil {
|
||||
if c.mediaInfo_ != nil {
|
||||
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
|
||||
protocol := "multipart"
|
||||
if c.mediaBuffer_ != nil {
|
||||
protocol = "resumable"
|
||||
}
|
||||
c.urlParams_.Set("uploadType", protocol)
|
||||
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
|
||||
}
|
||||
if body == nil {
|
||||
body = new(bytes.Buffer)
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
}
|
||||
if c.media_ != nil {
|
||||
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
|
||||
defer combined.Close()
|
||||
reqHeaders.Set("Content-Type", ctype)
|
||||
body = combined
|
||||
}
|
||||
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
|
||||
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
|
||||
}
|
||||
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
|
||||
defer cleanup()
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
@@ -8735,20 +8750,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c.mediaBuffer_ != nil {
|
||||
loc := res.Header.Get("Location")
|
||||
rx := &gensupport.ResumableUpload{
|
||||
Client: c.s.client,
|
||||
UserAgent: c.s.userAgent(),
|
||||
URI: loc,
|
||||
Media: c.mediaBuffer_,
|
||||
MediaType: c.mediaType_,
|
||||
Callback: func(curr int64) {
|
||||
if c.progressUpdater_ != nil {
|
||||
c.progressUpdater_(curr, c.mediaSize_)
|
||||
}
|
||||
},
|
||||
}
|
||||
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
|
||||
if rx != nil {
|
||||
rx.Client = c.s.client
|
||||
rx.UserAgent = c.s.userAgent()
|
||||
ctx := c.ctx_
|
||||
if ctx == nil {
|
||||
ctx = context.TODO()
|
||||
@@ -8808,13 +8813,13 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -9203,7 +9208,8 @@ func (c *ObjectsPatchCall) Generation(generation int64) *ObjectsPatchCall {
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value.
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsPatchCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsPatchCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -9211,7 +9217,9 @@ func (c *ObjectsPatchCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsPa
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the object's current generation does not match the given value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsPatchCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsPatchCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -9380,13 +9388,13 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -9523,8 +9531,9 @@ func (c *ObjectsRewriteCall) DestinationPredefinedAcl(destinationPredefinedAcl s
|
||||
}
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the destination object's
|
||||
// current generation matches the given value.
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsRewriteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsRewriteCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -9532,8 +9541,9 @@ func (c *ObjectsRewriteCall) IfGenerationMatch(ifGenerationMatch int64) *Objects
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the destination object's current generation does not match the given
|
||||
// value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsRewriteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsRewriteCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -9559,7 +9569,7 @@ func (c *ObjectsRewriteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch i
|
||||
|
||||
// IfSourceGenerationMatch sets the optional parameter
|
||||
// "ifSourceGenerationMatch": Makes the operation conditional on whether
|
||||
// the source object's generation matches the given value.
|
||||
// the source object's current generation matches the given value.
|
||||
func (c *ObjectsRewriteCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsRewriteCall {
|
||||
c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch))
|
||||
return c
|
||||
@@ -9567,8 +9577,8 @@ func (c *ObjectsRewriteCall) IfSourceGenerationMatch(ifSourceGenerationMatch int
|
||||
|
||||
// IfSourceGenerationNotMatch sets the optional parameter
|
||||
// "ifSourceGenerationNotMatch": Makes the operation conditional on
|
||||
// whether the source object's generation does not match the given
|
||||
// value.
|
||||
// whether the source object's current generation does not match the
|
||||
// given value.
|
||||
func (c *ObjectsRewriteCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsRewriteCall {
|
||||
c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch))
|
||||
return c
|
||||
@@ -9782,13 +9792,13 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -9806,13 +9816,13 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifSourceGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the source object's generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifSourceGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the source object's generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -10282,7 +10292,8 @@ func (c *ObjectsUpdateCall) Generation(generation int64) *ObjectsUpdateCall {
|
||||
|
||||
// IfGenerationMatch sets the optional parameter "ifGenerationMatch":
|
||||
// Makes the operation conditional on whether the object's current
|
||||
// generation matches the given value.
|
||||
// generation matches the given value. Setting to 0 makes the operation
|
||||
// succeed only if there are no live versions of the object.
|
||||
func (c *ObjectsUpdateCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsUpdateCall {
|
||||
c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch))
|
||||
return c
|
||||
@@ -10290,7 +10301,9 @@ func (c *ObjectsUpdateCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsU
|
||||
|
||||
// IfGenerationNotMatch sets the optional parameter
|
||||
// "ifGenerationNotMatch": Makes the operation conditional on whether
|
||||
// the object's current generation does not match the given value.
|
||||
// the object's current generation does not match the given value. If no
|
||||
// live object exists, the precondition fails. Setting to 0 makes the
|
||||
// operation succeed only if there is a live version of the object.
|
||||
func (c *ObjectsUpdateCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsUpdateCall {
|
||||
c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch))
|
||||
return c
|
||||
@@ -10475,13 +10488,13 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "ifGenerationNotMatch": {
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value.",
|
||||
// "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -10819,13 +10832,21 @@ type ProjectsServiceAccountGetCall struct {
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Get: Get the email address of this project's GCS service account.
|
||||
// Get: Get the email address of this project's Google Cloud Storage
|
||||
// service account.
|
||||
func (r *ProjectsServiceAccountService) Get(projectId string) *ProjectsServiceAccountGetCall {
|
||||
c := &ProjectsServiceAccountGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.projectId = projectId
|
||||
return c
|
||||
}
|
||||
|
||||
// UserProject sets the optional parameter "userProject": The project to
|
||||
// be billed for this request, for Requester Pays buckets.
|
||||
func (c *ProjectsServiceAccountGetCall) UserProject(userProject string) *ProjectsServiceAccountGetCall {
|
||||
c.urlParams_.Set("userProject", userProject)
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
@@ -10920,7 +10941,7 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Get the email address of this project's GCS service account.",
|
||||
// "description": "Get the email address of this project's Google Cloud Storage service account.",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "storage.projects.serviceAccount.get",
|
||||
// "parameterOrder": [
|
||||
@@ -10932,6 +10953,11 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "userProject": {
|
||||
// "description": "The project to be billed for this request, for Requester Pays buckets.",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{projectId}/serviceAccount",
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/wVmEVFf4wXjiNgtW0Pw6QJgdrGk\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/bcRJYHI3-5nsBo04628_tSK-f84\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "storage:v1beta1",
|
||||
"name": "storage",
|
||||
"version": "v1beta1",
|
||||
"revision": "20170510",
|
||||
"revision": "20170830",
|
||||
"title": "Cloud Storage JSON API",
|
||||
"description": "Lets you store and retrieve potentially-large, immutable data objects.",
|
||||
"ownerDomain": "google.com",
|
||||
|
||||
+18
-52
@@ -3624,17 +3624,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// method id "storage.objects.insert":
|
||||
|
||||
type ObjectsInsertCall struct {
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
media_ io.Reader
|
||||
mediaBuffer_ *gensupport.MediaBuffer
|
||||
mediaType_ string
|
||||
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
|
||||
progressUpdater_ googleapi.ProgressUpdater
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Insert: Stores new data blobs and associated metadata.
|
||||
@@ -3674,12 +3670,7 @@ func (c *ObjectsInsertCall) Projection(projection string) *ObjectsInsertCall {
|
||||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ObjectsInsertCall {
|
||||
opts := googleapi.ProcessMediaOptions(options)
|
||||
chunkSize := opts.ChunkSize
|
||||
if !opts.ForceEmptyContentType {
|
||||
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
|
||||
}
|
||||
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
|
||||
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -3694,11 +3685,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
|
||||
c.ctx_ = ctx
|
||||
rdr := gensupport.ReaderAtToReader(r, size)
|
||||
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
|
||||
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
|
||||
c.media_ = nil
|
||||
c.mediaSize_ = size
|
||||
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -3707,7 +3694,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -3752,27 +3739,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o")
|
||||
if c.media_ != nil || c.mediaBuffer_ != nil {
|
||||
if c.mediaInfo_ != nil {
|
||||
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
|
||||
protocol := "multipart"
|
||||
if c.mediaBuffer_ != nil {
|
||||
protocol = "resumable"
|
||||
}
|
||||
c.urlParams_.Set("uploadType", protocol)
|
||||
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
|
||||
}
|
||||
if body == nil {
|
||||
body = new(bytes.Buffer)
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
}
|
||||
if c.media_ != nil {
|
||||
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
|
||||
defer combined.Close()
|
||||
reqHeaders.Set("Content-Type", ctype)
|
||||
body = combined
|
||||
}
|
||||
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
|
||||
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
|
||||
}
|
||||
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
|
||||
defer cleanup()
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
@@ -3808,20 +3784,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c.mediaBuffer_ != nil {
|
||||
loc := res.Header.Get("Location")
|
||||
rx := &gensupport.ResumableUpload{
|
||||
Client: c.s.client,
|
||||
UserAgent: c.s.userAgent(),
|
||||
URI: loc,
|
||||
Media: c.mediaBuffer_,
|
||||
MediaType: c.mediaType_,
|
||||
Callback: func(curr int64) {
|
||||
if c.progressUpdater_ != nil {
|
||||
c.progressUpdater_(curr, c.mediaSize_)
|
||||
}
|
||||
},
|
||||
}
|
||||
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
|
||||
if rx != nil {
|
||||
rx.Client = c.s.client
|
||||
rx.UserAgent = c.s.userAgent()
|
||||
ctx := c.ctx_
|
||||
if ctx == nil {
|
||||
ctx = context.TODO()
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/SKlmkaW_3NYm4HYEgVwULKXigs8\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-kx4VTo0WtGqkEZqxSfkCE_3vyg\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "storage:v1beta2",
|
||||
"name": "storage",
|
||||
"version": "v1beta2",
|
||||
"revision": "20170510",
|
||||
"revision": "20170830",
|
||||
"title": "Cloud Storage JSON API",
|
||||
"description": "Lets you store and retrieve potentially-large, immutable data objects.",
|
||||
"ownerDomain": "google.com",
|
||||
|
||||
+18
-52
@@ -5901,17 +5901,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
// method id "storage.objects.insert":
|
||||
|
||||
type ObjectsInsertCall struct {
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
media_ io.Reader
|
||||
mediaBuffer_ *gensupport.MediaBuffer
|
||||
mediaType_ string
|
||||
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
|
||||
progressUpdater_ googleapi.ProgressUpdater
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
s *Service
|
||||
bucket string
|
||||
object *Object
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Insert: Stores new data blobs and associated metadata.
|
||||
@@ -5987,12 +5983,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
||||
if ct := c.object.ContentType; ct != "" {
|
||||
options = append([]googleapi.MediaOption{googleapi.ContentType(ct)}, options...)
|
||||
}
|
||||
opts := googleapi.ProcessMediaOptions(options)
|
||||
chunkSize := opts.ChunkSize
|
||||
if !opts.ForceEmptyContentType {
|
||||
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
|
||||
}
|
||||
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
|
||||
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -6007,11 +5998,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
|
||||
c.ctx_ = ctx
|
||||
rdr := gensupport.ReaderAtToReader(r, size)
|
||||
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
|
||||
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
|
||||
c.media_ = nil
|
||||
c.mediaSize_ = size
|
||||
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -6020,7 +6007,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -6065,27 +6052,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o")
|
||||
if c.media_ != nil || c.mediaBuffer_ != nil {
|
||||
if c.mediaInfo_ != nil {
|
||||
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
|
||||
protocol := "multipart"
|
||||
if c.mediaBuffer_ != nil {
|
||||
protocol = "resumable"
|
||||
}
|
||||
c.urlParams_.Set("uploadType", protocol)
|
||||
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
|
||||
}
|
||||
if body == nil {
|
||||
body = new(bytes.Buffer)
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
}
|
||||
if c.media_ != nil {
|
||||
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
|
||||
defer combined.Close()
|
||||
reqHeaders.Set("Content-Type", ctype)
|
||||
body = combined
|
||||
}
|
||||
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
|
||||
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
|
||||
}
|
||||
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
|
||||
defer cleanup()
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
@@ -6121,20 +6097,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c.mediaBuffer_ != nil {
|
||||
loc := res.Header.Get("Location")
|
||||
rx := &gensupport.ResumableUpload{
|
||||
Client: c.s.client,
|
||||
UserAgent: c.s.userAgent(),
|
||||
URI: loc,
|
||||
Media: c.mediaBuffer_,
|
||||
MediaType: c.mediaType_,
|
||||
Callback: func(curr int64) {
|
||||
if c.progressUpdater_ != nil {
|
||||
c.progressUpdater_(curr, c.mediaSize_)
|
||||
}
|
||||
},
|
||||
}
|
||||
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
|
||||
if rx != nil {
|
||||
rx.Client = c.s.client
|
||||
rx.UserAgent = c.s.userAgent()
|
||||
ctx := c.ctx_
|
||||
if ctx == nil {
|
||||
ctx = context.TODO()
|
||||
|
||||
Reference in New Issue
Block a user