From de6d2c524430287c699aaa898c1325da6afea539 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Wed, 20 Jun 2018 22:39:07 +0100 Subject: Update dependencies --- .../api/storage/v1/storage-gen.go | 635 ++++++++++++++------- 1 file changed, 432 insertions(+), 203 deletions(-) (limited to 'vendor/google.golang.org/api/storage/v1/storage-gen.go') diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index e311c29..e7405c7 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -204,19 +204,34 @@ type Bucket struct { // configuration. Cors []*BucketCors `json:"cors,omitempty"` + // DefaultEventBasedHold: The default value for event-based hold on + // newly created objects in this bucket. Event-based hold is a way to + // retain objects indefinitely until an event occurs, signified by the + // hold's release. After being released, such objects will be subject to + // bucket-level retention (if any). One sample use case of this flag is + // for banks to hold loan documents for at least 3 years after loan is + // paid in full. Here, bucket-level retention is 3 years and the event + // is loan being paid in full. In this example, these objects will be + // held intact for any number of years until the event has occurred + // (event-based hold on the object is released) and then 3 more years + // after that. That means retention duration of the objects begins from + // the moment event-based hold transitioned from true to false. Objects + // under event-based hold cannot be deleted, overwritten or archived + // until the hold is removed. + DefaultEventBasedHold bool `json:"defaultEventBasedHold,omitempty"` + // DefaultObjectAcl: Default access controls to apply to new objects // when no ACL is provided. DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"` - // Encryption: Encryption configuration used by default for newly - // inserted objects, when no encryption config is specified. + // Encryption: Encryption configuration for a bucket. Encryption *BucketEncryption `json:"encryption,omitempty"` // Etag: HTTP 1.1 Entity tag for the bucket. Etag string `json:"etag,omitempty"` - // Id: The ID of the bucket. For buckets, the id and name properities - // are the same. + // Id: The ID of the bucket. For buckets, the id and name properties are + // the same. Id string `json:"id,omitempty"` // Kind: The kind of item this is. For buckets, this is always @@ -254,6 +269,18 @@ type Bucket struct { // to. ProjectNumber uint64 `json:"projectNumber,omitempty,string"` + // RetentionPolicy: The bucket's retention policy. The retention policy + // enforces a minimum retention time for all objects contained in the + // bucket, based on their creation time. Any attempt to overwrite or + // delete objects younger than the retention period will result in a + // PERMISSION_DENIED error. An unlocked retention policy can be modified + // or removed from the bucket via a storage.buckets.update operation. A + // locked retention policy cannot be removed or shortened in duration + // for the lifetime of the bucket. Attempting to remove or decrease + // period of a locked retention policy will result in a + // PERMISSION_DENIED error. + RetentionPolicy *BucketRetentionPolicy `json:"retentionPolicy,omitempty"` + // SelfLink: The URI of this bucket. SelfLink string `json:"selfLink,omitempty"` @@ -302,14 +329,15 @@ type Bucket struct { } func (s *Bucket) MarshalJSON() ([]byte, error) { - type noMethod Bucket - raw := noMethod(*s) + type NoMethod Bucket + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketBilling: The bucket's billing configuration. type BucketBilling struct { - // RequesterPays: When set to true, bucket is requester pays. + // RequesterPays: When set to true, Requester Pays is enabled for this + // bucket. RequesterPays bool `json:"requesterPays,omitempty"` // ForceSendFields is a list of field names (e.g. "RequesterPays") to @@ -330,8 +358,8 @@ type BucketBilling struct { } func (s *BucketBilling) MarshalJSON() ([]byte, error) { - type noMethod BucketBilling - raw := noMethod(*s) + type NoMethod BucketBilling + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -373,14 +401,16 @@ type BucketCors struct { } func (s *BucketCors) MarshalJSON() ([]byte, error) { - type noMethod BucketCors - raw := noMethod(*s) + type NoMethod BucketCors + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BucketEncryption: Encryption configuration used by default for newly -// inserted objects, when no encryption config is specified. +// BucketEncryption: Encryption configuration for a bucket. type BucketEncryption struct { + // DefaultKmsKeyName: A Cloud KMS key that will be used to encrypt + // objects inserted into this bucket, if no encryption method is + // specified. DefaultKmsKeyName string `json:"defaultKmsKeyName,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName") @@ -402,8 +432,8 @@ type BucketEncryption struct { } func (s *BucketEncryption) MarshalJSON() ([]byte, error) { - type noMethod BucketEncryption - raw := noMethod(*s) + type NoMethod BucketEncryption + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -432,8 +462,8 @@ type BucketLifecycle struct { } func (s *BucketLifecycle) MarshalJSON() ([]byte, error) { - type noMethod BucketLifecycle - raw := noMethod(*s) + type NoMethod BucketLifecycle + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -462,8 +492,8 @@ type BucketLifecycleRule struct { } func (s *BucketLifecycleRule) MarshalJSON() ([]byte, error) { - type noMethod BucketLifecycleRule - raw := noMethod(*s) + type NoMethod BucketLifecycleRule + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -495,8 +525,8 @@ type BucketLifecycleRuleAction struct { } func (s *BucketLifecycleRuleAction) MarshalJSON() ([]byte, error) { - type noMethod BucketLifecycleRuleAction - raw := noMethod(*s) + type NoMethod BucketLifecycleRuleAction + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -546,8 +576,8 @@ type BucketLifecycleRuleCondition struct { } func (s *BucketLifecycleRuleCondition) MarshalJSON() ([]byte, error) { - type noMethod BucketLifecycleRuleCondition - raw := noMethod(*s) + type NoMethod BucketLifecycleRuleCondition + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -580,8 +610,8 @@ type BucketLogging struct { } func (s *BucketLogging) MarshalJSON() ([]byte, error) { - type noMethod BucketLogging - raw := noMethod(*s) + type NoMethod BucketLogging + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -612,8 +642,57 @@ type BucketOwner struct { } func (s *BucketOwner) MarshalJSON() ([]byte, error) { - type noMethod BucketOwner - raw := noMethod(*s) + type NoMethod BucketOwner + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BucketRetentionPolicy: The bucket's retention policy. The retention +// policy enforces a minimum retention time for all objects contained in +// the bucket, based on their creation time. Any attempt to overwrite or +// delete objects younger than the retention period will result in a +// PERMISSION_DENIED error. An unlocked retention policy can be modified +// or removed from the bucket via a storage.buckets.update operation. A +// locked retention policy cannot be removed or shortened in duration +// for the lifetime of the bucket. Attempting to remove or decrease +// period of a locked retention policy will result in a +// PERMISSION_DENIED error. +type BucketRetentionPolicy struct { + // EffectiveTime: Server-determined value that indicates the time from + // which policy was enforced and effective. This value is in RFC 3339 + // format. + EffectiveTime string `json:"effectiveTime,omitempty"` + + // IsLocked: Once locked, an object retention policy cannot be modified. + IsLocked bool `json:"isLocked,omitempty"` + + // RetentionPeriod: The duration in seconds that objects need to be + // retained. Retention duration must be greater than zero and less than + // 100 years. Note that enforcement of retention periods less than a day + // is not guaranteed. Such periods should only be used for testing + // purposes. + RetentionPeriod int64 `json:"retentionPeriod,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EffectiveTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EffectiveTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BucketRetentionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BucketRetentionPolicy + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -641,8 +720,8 @@ type BucketVersioning struct { } func (s *BucketVersioning) MarshalJSON() ([]byte, error) { - type noMethod BucketVersioning - raw := noMethod(*s) + type NoMethod BucketVersioning + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -681,8 +760,8 @@ type BucketWebsite struct { } func (s *BucketWebsite) MarshalJSON() ([]byte, error) { - type noMethod BucketWebsite - raw := noMethod(*s) + type NoMethod BucketWebsite + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -758,8 +837,8 @@ type BucketAccessControl struct { } func (s *BucketAccessControl) MarshalJSON() ([]byte, error) { - type noMethod BucketAccessControl - raw := noMethod(*s) + type NoMethod BucketAccessControl + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -790,8 +869,8 @@ type BucketAccessControlProjectTeam struct { } func (s *BucketAccessControlProjectTeam) MarshalJSON() ([]byte, error) { - type noMethod BucketAccessControlProjectTeam - raw := noMethod(*s) + type NoMethod BucketAccessControlProjectTeam + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -826,8 +905,8 @@ type BucketAccessControls struct { } func (s *BucketAccessControls) MarshalJSON() ([]byte, error) { - type noMethod BucketAccessControls - raw := noMethod(*s) + type NoMethod BucketAccessControls + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -867,8 +946,8 @@ type Buckets struct { } func (s *Buckets) MarshalJSON() ([]byte, error) { - type noMethod Buckets - raw := noMethod(*s) + type NoMethod Buckets + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -933,8 +1012,8 @@ type Channel struct { } func (s *Channel) MarshalJSON() ([]byte, error) { - type noMethod Channel - raw := noMethod(*s) + type NoMethod Channel + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -968,8 +1047,8 @@ type ComposeRequest struct { } func (s *ComposeRequest) MarshalJSON() ([]byte, error) { - type noMethod ComposeRequest - raw := noMethod(*s) + type NoMethod ComposeRequest + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1003,8 +1082,8 @@ type ComposeRequestSourceObjects struct { } func (s *ComposeRequestSourceObjects) MarshalJSON() ([]byte, error) { - type noMethod ComposeRequestSourceObjects - raw := noMethod(*s) + type NoMethod ComposeRequestSourceObjects + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1036,8 +1115,8 @@ type ComposeRequestSourceObjectsObjectPreconditions struct { } func (s *ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON() ([]byte, error) { - type noMethod ComposeRequestSourceObjectsObjectPreconditions - raw := noMethod(*s) + type NoMethod ComposeRequestSourceObjectsObjectPreconditions + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1101,8 +1180,8 @@ type Notification struct { } func (s *Notification) MarshalJSON() ([]byte, error) { - type noMethod Notification - raw := noMethod(*s) + type NoMethod Notification + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1137,8 +1216,8 @@ type Notifications struct { } func (s *Notifications) MarshalJSON() ([]byte, error) { - type noMethod Notifications - raw := noMethod(*s) + type NoMethod Notifications + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1185,6 +1264,21 @@ type Object struct { // Etag: HTTP 1.1 Entity tag for the object. Etag string `json:"etag,omitempty"` + // EventBasedHold: Whether an object is under event-based hold. + // Event-based hold is a way to retain objects until an event occurs, + // which is signified by the hold's release (i.e. this value is set to + // false). After being released (set to false), such objects will be + // subject to bucket-level retention (if any). One sample use case of + // this flag is for banks to hold loan documents for at least 3 years + // after loan is paid in full. Here, bucket-level retention is 3 years + // and the event is the loan being paid in full. In this example, these + // objects will be held intact for any number of years until the event + // has occurred (event-based hold on the object is released) and then 3 + // more years after that. That means retention duration of the objects + // begins from the moment event-based hold transitioned from true to + // false. + EventBasedHold bool `json:"eventBasedHold,omitempty"` + // Generation: The content generation of this object. Used for object // versioning. Generation int64 `json:"generation,omitempty,string"` @@ -1198,7 +1292,8 @@ type Object struct { Kind string `json:"kind,omitempty"` // KmsKeyName: Cloud KMS Key used to encrypt this object, if the object - // is encrypted by such a key. + // is encrypted by such a key. Limited availability; usable only by + // enabled projects. KmsKeyName string `json:"kmsKeyName,omitempty"` // Md5Hash: MD5 hash of the data; encoded using base64. For more @@ -1226,6 +1321,15 @@ type Object struct { // the object. Owner *ObjectOwner `json:"owner,omitempty"` + // RetentionExpirationTime: A server-determined value that specifies the + // earliest time that the object's retention period expires. This value + // is in RFC 3339 format. Note 1: This field is not provided for objects + // with an active event-based hold, since retention expiration is + // unknown until the hold is removed. Note 2: This value can be provided + // even when temporary hold is set (so that the user can reason about + // policy without having to first unset the temporary hold). + RetentionExpirationTime string `json:"retentionExpirationTime,omitempty"` + // SelfLink: The link to this object. SelfLink string `json:"selfLink,omitempty"` @@ -1235,6 +1339,15 @@ type Object struct { // StorageClass: Storage class of the object. StorageClass string `json:"storageClass,omitempty"` + // TemporaryHold: Whether an object is under temporary hold. While this + // flag is set to true, the object is protected against deletion and + // overwrites. A common use case of this flag is regulatory + // investigations where objects need to be retained while the + // investigation is ongoing. Note that unlike event-based hold, + // temporary hold does not impact retention expiration time of an + // object. + TemporaryHold bool `json:"temporaryHold,omitempty"` + // TimeCreated: The creation time of the object in RFC 3339 format. TimeCreated string `json:"timeCreated,omitempty"` @@ -1274,8 +1387,8 @@ type Object struct { } func (s *Object) MarshalJSON() ([]byte, error) { - type noMethod Object - raw := noMethod(*s) + type NoMethod Object + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1307,8 +1420,8 @@ type ObjectCustomerEncryption struct { } func (s *ObjectCustomerEncryption) MarshalJSON() ([]byte, error) { - type noMethod ObjectCustomerEncryption - raw := noMethod(*s) + type NoMethod ObjectCustomerEncryption + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1339,8 +1452,8 @@ type ObjectOwner struct { } func (s *ObjectOwner) MarshalJSON() ([]byte, error) { - type noMethod ObjectOwner - raw := noMethod(*s) + type NoMethod ObjectOwner + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1423,8 +1536,8 @@ type ObjectAccessControl struct { } func (s *ObjectAccessControl) MarshalJSON() ([]byte, error) { - type noMethod ObjectAccessControl - raw := noMethod(*s) + type NoMethod ObjectAccessControl + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1455,8 +1568,8 @@ type ObjectAccessControlProjectTeam struct { } func (s *ObjectAccessControlProjectTeam) MarshalJSON() ([]byte, error) { - type noMethod ObjectAccessControlProjectTeam - raw := noMethod(*s) + type NoMethod ObjectAccessControlProjectTeam + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1491,8 +1604,8 @@ type ObjectAccessControls struct { } func (s *ObjectAccessControls) MarshalJSON() ([]byte, error) { - type noMethod ObjectAccessControls - raw := noMethod(*s) + type NoMethod ObjectAccessControls + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1536,8 +1649,8 @@ type Objects struct { } func (s *Objects) MarshalJSON() ([]byte, error) { - type noMethod Objects - raw := noMethod(*s) + type NoMethod Objects + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1585,8 +1698,8 @@ type Policy struct { } func (s *Policy) MarshalJSON() ([]byte, error) { - type noMethod Policy - raw := noMethod(*s) + type NoMethod Policy + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1668,8 +1781,8 @@ type PolicyBindings struct { } func (s *PolicyBindings) MarshalJSON() ([]byte, error) { - type noMethod PolicyBindings - raw := noMethod(*s) + type NoMethod PolicyBindings + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1723,8 +1836,8 @@ type RewriteResponse struct { } func (s *RewriteResponse) MarshalJSON() ([]byte, error) { - type noMethod RewriteResponse - raw := noMethod(*s) + type NoMethod RewriteResponse + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1760,8 +1873,8 @@ type ServiceAccount struct { } func (s *ServiceAccount) MarshalJSON() ([]byte, error) { - type noMethod ServiceAccount - raw := noMethod(*s) + type NoMethod ServiceAccount + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1813,8 +1926,8 @@ type TestIamPermissionsResponse struct { } func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type noMethod TestIamPermissionsResponse - raw := noMethod(*s) + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2055,7 +2168,7 @@ func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketA }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -2205,7 +2318,7 @@ func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Buck }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -2358,7 +2471,7 @@ func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Bucket }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -2406,8 +2519,7 @@ type BucketAccessControlsPatchCall struct { header_ http.Header } -// Patch: Updates an ACL entry on the specified bucket. This method -// supports patch semantics. +// Patch: Patches an ACL entry on the specified bucket. func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsPatchCall { c := &BucketAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -2505,12 +2617,12 @@ func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Bucke }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Updates an ACL entry on the specified bucket. This method supports patch semantics.", + // "description": "Patches an ACL entry on the specified bucket.", // "httpMethod": "PATCH", // "id": "storage.bucketAccessControls.patch", // "parameterOrder": [ @@ -2661,7 +2773,7 @@ func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Buck }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -2987,7 +3099,7 @@ func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -3165,7 +3277,7 @@ func (c *BucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -3275,7 +3387,7 @@ func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall { } // UserProject sets the optional parameter "userProject": The project to -// be billed for this request +// be billed for this request. func (c *BucketsInsertCall) UserProject(userProject string) *BucketsInsertCall { c.urlParams_.Set("userProject", userProject) return c @@ -3359,7 +3471,7 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -3431,7 +3543,7 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { // "type": "string" // }, // "userProject": { - // "description": "The project to be billed for this request", + // "description": "The project to be billed for this request.", // "location": "query", // "type": "string" // } @@ -3596,7 +3708,7 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -3687,6 +3799,152 @@ func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) err } } +// method id "storage.buckets.lockRetentionPolicy": + +type BucketsLockRetentionPolicyCall struct { + s *Service + bucket string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LockRetentionPolicy: Locks retention policy on a bucket. +func (r *BucketsService) LockRetentionPolicy(bucket string, ifMetagenerationMatch int64) *BucketsLockRetentionPolicyCall { + c := &BucketsLockRetentionPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.bucket = bucket + c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) + return c +} + +// UserProject sets the optional parameter "userProject": The project to +// be billed for this request. Required for Requester Pays buckets. +func (c *BucketsLockRetentionPolicyCall) UserProject(userProject string) *BucketsLockRetentionPolicyCall { + 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. +func (c *BucketsLockRetentionPolicyCall) Fields(s ...googleapi.Field) *BucketsLockRetentionPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + 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. +func (c *BucketsLockRetentionPolicyCall) Context(ctx context.Context) *BucketsLockRetentionPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsLockRetentionPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/lockRetentionPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "bucket": c.bucket, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.buckets.lockRetentionPolicy" call. +// Exactly one of *Bucket or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BucketsLockRetentionPolicyCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Bucket{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Locks retention policy on a bucket.", + // "httpMethod": "POST", + // "id": "storage.buckets.lockRetentionPolicy", + // "parameterOrder": [ + // "bucket", + // "ifMetagenerationMatch" + // ], + // "parameters": { + // "bucket": { + // "description": "Name of a bucket.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "ifMetagenerationMatch": { + // "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.", + // "format": "int64", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "userProject": { + // "description": "The project to be billed for this request. Required for Requester Pays buckets.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "b/{bucket}/lockRetentionPolicy", + // "response": { + // "$ref": "Bucket" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_write" + // ] + // } + +} + // method id "storage.buckets.patch": type BucketsPatchCall struct { @@ -3864,7 +4122,7 @@ func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -4075,7 +4333,7 @@ func (c *BucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -4231,7 +4489,7 @@ func (c *BucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -4455,7 +4713,7 @@ func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -4890,7 +5148,7 @@ func (c *DefaultObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (* }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -5041,7 +5299,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -5211,7 +5469,7 @@ func (c *DefaultObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) ( }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -5271,8 +5529,7 @@ type DefaultObjectAccessControlsPatchCall struct { header_ http.Header } -// Patch: Updates a default object ACL entry on the specified bucket. -// This method supports patch semantics. +// Patch: Patches a default object ACL entry on the specified bucket. func (r *DefaultObjectAccessControlsService) Patch(bucket string, entity string, objectaccesscontrol *ObjectAccessControl) *DefaultObjectAccessControlsPatchCall { c := &DefaultObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -5370,12 +5627,12 @@ func (c *DefaultObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Updates a default object ACL entry on the specified bucket. This method supports patch semantics.", + // "description": "Patches a default object ACL entry on the specified bucket.", // "httpMethod": "PATCH", // "id": "storage.defaultObjectAccessControls.patch", // "parameterOrder": [ @@ -5526,7 +5783,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -5808,7 +6065,7 @@ func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -5961,7 +6218,7 @@ func (c *NotificationsInsertCall) Do(opts ...googleapi.CallOption) (*Notificatio }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -6116,7 +6373,7 @@ func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -6427,7 +6684,7 @@ func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectA }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -6601,7 +6858,7 @@ func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Obje }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -6778,7 +7035,7 @@ func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Object }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -6840,8 +7097,7 @@ type ObjectAccessControlsPatchCall struct { header_ http.Header } -// Patch: Updates an ACL entry on the specified object. This method -// supports patch semantics. +// Patch: Patches an ACL entry on the specified object. func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall { c := &ObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -6949,12 +7205,12 @@ func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Objec }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Updates an ACL entry on the specified object. This method supports patch semantics.", + // "description": "Patches an ACL entry on the specified object.", // "httpMethod": "PATCH", // "id": "storage.objectAccessControls.patch", // "parameterOrder": [ @@ -7129,7 +7385,7 @@ func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Obje }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -7273,9 +7529,9 @@ func (c *ObjectsComposeCall) Fields(s ...googleapi.Field) *ObjectsComposeCall { return c } -// 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. +// 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. func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall { c.ctx_ = ctx return c @@ -7314,22 +7570,6 @@ func (c *ObjectsComposeCall) 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 *ObjectsComposeCall) 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.compose" call. // Exactly one of *Object or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either @@ -7363,7 +7603,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -7443,9 +7683,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/devstorage.full_control", // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsMediaDownload": true, - // "useMediaDownloadService": true + // ] // } } @@ -7605,9 +7843,9 @@ func (c *ObjectsCopyCall) Fields(s ...googleapi.Field) *ObjectsCopyCall { return c } -// 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. +// 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. func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall { c.ctx_ = ctx return c @@ -7648,22 +7886,6 @@ func (c *ObjectsCopyCall) 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 *ObjectsCopyCall) 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.copy" call. // Exactly one of *Object or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either @@ -7697,7 +7919,7 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -7841,9 +8063,7 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/devstorage.full_control", // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsMediaDownload": true, - // "useMediaDownloadService": true + // ] // } } @@ -8231,7 +8451,7 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -8447,7 +8667,7 @@ func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -8570,7 +8790,8 @@ func (c *ObjectsInsertCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in // the Cloud KMS key, of the form // projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, // that will be used to encrypt the object. Overrides the object -// metadata's kms_key_name value, if any. +// metadata's kms_key_name value, if any. Limited availability; usable +// only by enabled projects. func (c *ObjectsInsertCall) KmsKeyName(kmsKeyName string) *ObjectsInsertCall { c.urlParams_.Set("kmsKeyName", kmsKeyName) return c @@ -8713,11 +8934,12 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders + gensupport.SetGetBody(req, getBody) googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, }) @@ -8774,7 +8996,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -8837,7 +9059,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "kmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. Limited availability; usable only by enabled projects.", // "location": "query", // "type": "string" // }, @@ -8898,9 +9120,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "https://www.googleapis.com/auth/devstorage.full_control", // "https://www.googleapis.com/auth/devstorage.read_write" // ], - // "supportsMediaDownload": true, - // "supportsMediaUpload": true, - // "useMediaDownloadService": true + // "supportsMediaUpload": true // } } @@ -8934,6 +9154,15 @@ func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall { return c } +// IncludeTrailingDelimiter sets the optional parameter +// "includeTrailingDelimiter": If true, objects that end in exactly one +// instance of delimiter will have their metadata included in items in +// addition to prefixes. +func (c *ObjectsListCall) IncludeTrailingDelimiter(includeTrailingDelimiter bool) *ObjectsListCall { + c.urlParams_.Set("includeTrailingDelimiter", fmt.Sprint(includeTrailingDelimiter)) + return c +} + // MaxResults sets the optional parameter "maxResults": Maximum number // of items plus prefixes to return in a single page of responses. As // duplicate prefixes are omitted, fewer total results may be returned @@ -9074,7 +9303,7 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -9097,6 +9326,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { // "location": "query", // "type": "string" // }, + // "includeTrailingDelimiter": { + // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "1000", // "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", @@ -9188,8 +9422,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 @@ -9274,7 +9507,7 @@ func (c *ObjectsPatchCall) Projection(projection string) *ObjectsPatchCall { } // UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// be billed for this request, for Requester Pays buckets. func (c *ObjectsPatchCall) UserProject(userProject string) *ObjectsPatchCall { c.urlParams_.Set("userProject", userProject) return c @@ -9362,12 +9595,12 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } 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": [ @@ -9452,7 +9685,7 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", + // "description": "The project to be billed for this request, for Requester Pays buckets.", // "location": "query", // "type": "string" // } @@ -9738,7 +9971,7 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -10021,7 +10254,7 @@ func (c *ObjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -10201,7 +10434,7 @@ func (c *ObjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -10372,9 +10605,9 @@ func (c *ObjectsUpdateCall) Fields(s ...googleapi.Field) *ObjectsUpdateCall { return c } -// 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. +// 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. func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall { c.ctx_ = ctx return c @@ -10413,22 +10646,6 @@ func (c *ObjectsUpdateCall) 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 *ObjectsUpdateCall) 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.update" call. // Exactly one of *Object or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either @@ -10462,7 +10679,7 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -10567,9 +10784,7 @@ func (c *ObjectsUpdateCall) 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 + // ] // } } @@ -10604,6 +10819,15 @@ func (c *ObjectsWatchAllCall) Delimiter(delimiter string) *ObjectsWatchAllCall { return c } +// IncludeTrailingDelimiter sets the optional parameter +// "includeTrailingDelimiter": If true, objects that end in exactly one +// instance of delimiter will have their metadata included in items in +// addition to prefixes. +func (c *ObjectsWatchAllCall) IncludeTrailingDelimiter(includeTrailingDelimiter bool) *ObjectsWatchAllCall { + c.urlParams_.Set("includeTrailingDelimiter", fmt.Sprint(includeTrailingDelimiter)) + return c +} + // MaxResults sets the optional parameter "maxResults": Maximum number // of items plus prefixes to return in a single page of responses. As // duplicate prefixes are omitted, fewer total results may be returned @@ -10736,7 +10960,7 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -10759,6 +10983,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) // "location": "query", // "type": "string" // }, + // "includeTrailingDelimiter": { + // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "1000", // "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", @@ -10936,7 +11165,7 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil -- cgit v1.2.3