From 9ea025dcfe9b67a95e08f4ec94ed4fb6a9767b8c Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 17 Aug 2022 12:08:13 -0700 Subject: [PATCH] fix(storage): *int64 instead of int64 for Age cond (#1598) Towards unblocking: googleapis/google-cloud-go#6230 Change Storage OLM Age condition type from int64 to *int64 to allow for existence of check Co-authored-by: Chris Cotter --- google-api-go-generator/gen.go | 1 + storage/v1/storage-gen.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/google-api-go-generator/gen.go b/google-api-go-generator/gen.go index 6860232c19e..f2ed63f6e37 100644 --- a/google-api-go-generator/gen.go +++ b/google-api-go-generator/gen.go @@ -1014,6 +1014,7 @@ var pointerFields = []fieldName{ {api: "sqladmin:v1beta4", schema: "Settings", field: "StorageAutoResize"}, {api: "sqladmin:v1", schema: "Settings", field: "StorageAutoResize"}, {api: "storage:v1", schema: "BucketLifecycleRuleCondition", field: "IsLive"}, + {api: "storage:v1", schema: "BucketLifecycleRuleCondition", field: "Age"}, {api: "storage:v1beta2", schema: "BucketLifecycleRuleCondition", field: "IsLive"}, {api: "tasks:v1", schema: "Task", field: "Completed"}, {api: "youtube:v3", schema: "ChannelSectionSnippet", field: "Position"}, diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index b0ab7276dff..35cea853eb1 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -822,7 +822,7 @@ func (s *BucketLifecycleRuleAction) MarshalJSON() ([]byte, error) { type BucketLifecycleRuleCondition struct { // Age: Age of an object (in days). This condition is satisfied when an // object reaches the specified age. - Age int64 `json:"age,omitempty"` + Age *int64 `json:"age,omitempty"` // CreatedBefore: A date in RFC 3339 format with only the date part (for // instance, "2013-01-15"). This condition is satisfied when an object