Update dependencies
This commit is contained in:
parent
f3b49987f8
commit
fda563d606
926 changed files with 189726 additions and 98666 deletions
59
vendor/google.golang.org/api/storage/v1/storage-api.json
generated
vendored
59
vendor/google.golang.org/api/storage/v1/storage-api.json
generated
vendored
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-XlPsGE1eaKzlxWDtbwmuSaBoqc\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dkoYxqfGO2jaG60VA5h0K8BOG4k\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "storage:v1",
|
||||
"name": "storage",
|
||||
"version": "v1",
|
||||
"revision": "20170607",
|
||||
"revision": "20170824",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2176,7 +2179,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 +2538,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 +2618,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 +2642,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 +2741,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 +2805,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 +2933,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"
|
||||
},
|
||||
|
@ -3113,7 +3116,7 @@
|
|||
"id": "storage.objects.patch",
|
||||
"path": "b/{bucket}/o/{object}",
|
||||
"httpMethod": "PATCH",
|
||||
"description": "Updates an object's metadata. This method supports patch semantics.",
|
||||
"description": "Patches an object's metadata.",
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
|
@ -3129,13 +3132,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"
|
||||
},
|
||||
|
@ -3210,7 +3213,9 @@
|
|||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control"
|
||||
]
|
||||
],
|
||||
"supportsMediaDownload": true,
|
||||
"useMediaDownloadService": true
|
||||
},
|
||||
"rewrite": {
|
||||
"id": "storage.objects.rewrite",
|
||||
|
@ -3258,13 +3263,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 +3287,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 +3494,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,7 +3667,7 @@
|
|||
"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",
|
||||
|
|
235
vendor/google.golang.org/api/storage/v1/storage-gen.go
generated
vendored
235
vendor/google.golang.org/api/storage/v1/storage-gen.go
generated
vendored
|
@ -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
|
||||
|
@ -6103,7 +6105,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 +7209,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 +7386,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 +7475,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 +7485,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 +7513,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 +7521,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 +7722,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 +7746,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 +7855,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 +7864,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 +7974,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 +8048,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 +8058,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 +8233,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 +8478,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 +8508,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 +8517,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 +8612,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 +8627,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 +8636,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 +8681,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 +8726,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 +8789,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"
|
||||
|
@ -9183,8 +9164,7 @@ type ObjectsPatchCall struct {
|
|||
header_ http.Header
|
||||
}
|
||||
|
||||
// Patch: Updates an object's metadata. This method supports patch
|
||||
// semantics.
|
||||
// Patch: Patches an object's metadata.
|
||||
func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall {
|
||||
c := &ObjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.bucket = bucket
|
||||
|
@ -9203,7 +9183,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 +9192,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
|
||||
|
@ -9280,9 +9263,9 @@ func (c *ObjectsPatchCall) Fields(s ...googleapi.Field) *ObjectsPatchCall {
|
|||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
// Context sets the context to be used in this call's Do and Download
|
||||
// methods. Any pending HTTP request will be aborted if the provided
|
||||
// context is canceled.
|
||||
func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
|
@ -9321,6 +9304,22 @@ func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
|
|||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Download fetches the API endpoint's "media" value, instead of the normal
|
||||
// API response value. If the returned error is nil, the Response is guaranteed to
|
||||
// have a 2xx status code. Callers must close the Response.Body as usual.
|
||||
func (c *ObjectsPatchCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("media")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := googleapi.CheckMediaResponse(res); err != nil {
|
||||
res.Body.Close()
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// Do executes the "storage.objects.patch" call.
|
||||
// Exactly one of *Object or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
|
@ -9359,7 +9358,7 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
|||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Updates an object's metadata. This method supports patch semantics.",
|
||||
// "description": "Patches an object's metadata.",
|
||||
// "httpMethod": "PATCH",
|
||||
// "id": "storage.objects.patch",
|
||||
// "parameterOrder": [
|
||||
|
@ -9380,13 +9379,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"
|
||||
|
@ -9459,7 +9458,9 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
|||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/devstorage.full_control"
|
||||
// ]
|
||||
// ],
|
||||
// "supportsMediaDownload": true,
|
||||
// "useMediaDownloadService": true
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -9523,8 +9524,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 +9534,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 +9562,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 +9570,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 +9785,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 +9809,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 +10285,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 +10294,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 +10481,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,7 +10825,8 @@ 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
|
||||
|
@ -10920,7 +10927,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": [
|
||||
|
|
4
vendor/google.golang.org/api/storage/v1beta1/storage-api.json
generated
vendored
4
vendor/google.golang.org/api/storage/v1beta1/storage-api.json
generated
vendored
|
@ -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",
|
||||
|
|
70
vendor/google.golang.org/api/storage/v1beta1/storage-gen.go
generated
vendored
70
vendor/google.golang.org/api/storage/v1beta1/storage-gen.go
generated
vendored
|
@ -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()
|
||||
|
|
4
vendor/google.golang.org/api/storage/v1beta2/storage-api.json
generated
vendored
4
vendor/google.golang.org/api/storage/v1beta2/storage-api.json
generated
vendored
|
@ -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",
|
||||
|
|
70
vendor/google.golang.org/api/storage/v1beta2/storage-gen.go
generated
vendored
70
vendor/google.golang.org/api/storage/v1beta2/storage-gen.go
generated
vendored
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue