Skip to content

Commit 46fdf2d

Browse files
Google APIscopybara-github
authored andcommitted
fix: Update encryption_key fields to "bytes" type.
fix: Improve date/times and field name clarity in lifecycle conditions. Committer: @BrandonY PiperOrigin-RevId: 387204174
1 parent 2948f31 commit 46fdf2d

2 files changed

Lines changed: 25 additions & 28 deletions

File tree

google/storage/v2/BUILD.bazel

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ proto_library(
2929
"//google/api:resource_proto",
3030
"//google/iam/v1:iam_policy_proto",
3131
"//google/iam/v1:policy_proto",
32+
"//google/type:date_proto",
3233
"@com_google_protobuf//:empty_proto",
3334
"@com_google_protobuf//:field_mask_proto",
3435
"@com_google_protobuf//:timestamp_proto",
@@ -118,6 +119,7 @@ go_proto_library(
118119
deps = [
119120
"//google/api:annotations_go_proto",
120121
"//google/iam/v1:iam_go_proto",
122+
"//google/type:date_go_proto",
121123
],
122124
)
123125

@@ -303,18 +305,18 @@ ruby_gapic_assembly_pkg(
303305
# "csharp_grpc_library",
304306
# "csharp_proto_library",
305307
# )
306-
308+
#
307309
# csharp_proto_library(
308310
# name = "storage_csharp_proto",
309311
# deps = [":storage_proto"],
310312
# )
311-
313+
#
312314
# csharp_grpc_library(
313315
# name = "storage_csharp_grpc",
314316
# srcs = [":storage_proto"],
315317
# deps = [":storage_csharp_proto"],
316318
# )
317-
319+
#
318320
# csharp_gapic_library(
319321
# name = "storage_csharp_gapic",
320322
# srcs = [":storage_proto_with_info"],
@@ -325,7 +327,7 @@ ruby_gapic_assembly_pkg(
325327
# ":storage_csharp_proto",
326328
# ],
327329
# )
328-
330+
#
329331
# # Open Source Packages
330332
# csharp_gapic_assembly_pkg(
331333
# name = "google-cloud-storage-v2-csharp",

google/storage/v2/storage.proto

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/iam/v1/policy.proto";
2424
import "google/protobuf/empty.proto";
2525
import "google/protobuf/field_mask.proto";
2626
import "google/protobuf/timestamp.proto";
27+
import "google/type/date.proto";
2728

2829
option go_package = "google.golang.org/genproto/googleapis/storage/v2;storage";
2930
option java_multiple_files = true;
@@ -341,11 +342,12 @@ message CommonObjectRequestParams {
341342
string encryption_algorithm = 1;
342343

343344
// Encryption key used with Customer-Supplied Encryption Keys feature.
344-
string encryption_key = 2;
345+
// In raw bytes format (not base64-encoded).
346+
bytes encryption_key_bytes = 4;
345347

346348
// SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
347349
// feature.
348-
string encryption_key_sha256 = 3;
350+
bytes encryption_key_sha256_bytes = 5;
349351
}
350352

351353
// Parameters that can be passed to any request.
@@ -549,13 +551,13 @@ message Bucket {
549551
message Condition {
550552
// Age of an object (in days). This condition is satisfied when an
551553
// object reaches the specified age.
552-
int32 age_days = 1;
554+
// A value of 0 indicates that all objects immediately match this
555+
// condition.
556+
optional int32 age_days = 1;
553557

554-
// A date in [RFC 3339][1] format with only the date part (for
555-
// instance, "2013-01-15"). This condition is satisfied when an
556-
// object is created before midnight of the specified date in UTC.
557-
// [1]: https://tools.ietf.org/html/rfc3339
558-
google.protobuf.Timestamp created_before_time = 2;
558+
// This condition is satisfied when an object is created before midnight
559+
// of the specified date in UTC.
560+
google.type.Date created_before = 2;
559561

560562
// Relevant only for versioned objects. If the value is
561563
// `true`, this condition matches live objects; if the value
@@ -565,41 +567,34 @@ message Bucket {
565567
// Relevant only for versioned objects. If the value is N, this
566568
// condition is satisfied when there are at least N versions (including
567569
// the live version) newer than this version of the object.
568-
int32 num_newer_versions = 4;
570+
optional int32 num_newer_versions = 4;
569571

570572
// Objects having any of the storage classes specified by this condition
571573
// will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
572574
// `NEARLINE`, `COLDLINE`, `STANDARD`, and
573575
// `DURABLE_REDUCED_AVAILABILITY`.
574576
repeated string matches_storage_class = 5;
575577

576-
// A regular expression that satisfies the RE2 syntax. This condition is
577-
// satisfied when the name of the object matches the RE2 pattern. Note:
578-
// This feature is currently in the "Early Access" launch stage and is
579-
// only available to an allowlisted set of users; that means that this
580-
// feature may be changed in backward-incompatible ways and that it is
581-
// not guaranteed to be released.
582-
string matches_pattern = 6;
583-
584-
// Number of days that has elapsed since the custom timestamp set on an
578+
// Number of days that have elapsed since the custom timestamp set on an
585579
// object.
586-
int32 days_since_custom_time = 7;
580+
// The value of the field must be a nonnegative integer.
581+
optional int32 days_since_custom_time = 7;
587582

588583
// An object matches this condition if the custom timestamp set on the
589-
// object is before this timestamp.
590-
google.protobuf.Timestamp custom_time_before_time = 8;
584+
// object is before the specified date in UTC.
585+
google.type.Date custom_time_before = 8;
591586

592587
// This condition is relevant only for versioned objects. An object
593588
// version satisfies this condition only if these many days have been
594589
// passed since it became noncurrent. The value of the field must be a
595590
// nonnegative integer. If it's zero, the object version will become
596591
// eligible for Lifecycle action as soon as it becomes noncurrent.
597-
int32 days_since_noncurrent_time = 9;
592+
optional int32 days_since_noncurrent_time = 9;
598593

599594
// This condition is relevant only for versioned objects. An object
600595
// version satisfies this condition only if it became noncurrent before
601-
// the specified timestamp.
602-
google.protobuf.Timestamp noncurrent_time_before_time = 10;
596+
// the specified date in UTC.
597+
google.type.Date noncurrent_time_before = 10;
603598
}
604599

605600
// The action to take.

0 commit comments

Comments
 (0)