-
Notifications
You must be signed in to change notification settings - Fork 22
/
data.proto
150 lines (115 loc) · 5.18 KB
/
data.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.events.cloud.storage.v1;
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Events.Protobuf.Cloud.Storage.V1";
option php_namespace = "Google\\Events\\Cloud\\Storage\\V1";
option ruby_package = "Google::Events::Cloud::Storage::V1";
// An object within Google Cloud Storage.
message StorageObjectData {
// Describes the customer-specified mechanism used to store the data at rest.
message CustomerEncryption {
// The encryption algorithm.
string encryption_algorithm = 1;
// SHA256 hash value of the encryption key.
string key_sha256 = 2;
}
// Content-Encoding of the object data, matching
// [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
string content_encoding = 1;
// Content-Disposition of the object data, matching
// [https://tools.ietf.org/html/rfc6266][RFC 6266].
string content_disposition = 2;
// Cache-Control directive for the object data, matching
// [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
string cache_control = 3;
// Content-Language of the object data, matching
// [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
string content_language = 5;
// The version of the metadata for this object at this generation. Used for
// preconditions and for detecting changes in metadata. A metageneration
// number is only meaningful in the context of a particular generation of a
// particular object.
int64 metageneration = 6;
// The deletion time of the object. Will be returned if and only if this
// version of the object has been deleted.
google.protobuf.Timestamp time_deleted = 7;
// Content-Type of the object data, matching
// [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
// If an object is stored without a Content-Type, it is served as
// `application/octet-stream`.
string content_type = 8;
// Content-Length of the object data in bytes, matching
// [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
int64 size = 9;
// The creation time of the object.
// Attempting to set this field will result in an error.
google.protobuf.Timestamp time_created = 10;
// CRC32c checksum. For more information about using the CRC32c
// checksum, see
// [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
// ETags: Best Practices].
string crc32c = 11;
// Number of underlying components that make up this object. Components are
// accumulated by compose operations.
// Attempting to set this field will result in an error.
int32 component_count = 12;
// MD5 hash of the data; encoded using base64 as per
// [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
// information about using the MD5 hash, see
// [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
// ETags: Best Practices].
string md5_hash = 13;
// HTTP 1.1 Entity tag for the object. See
// [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
string etag = 14;
// The modification time of the object metadata.
google.protobuf.Timestamp updated = 15;
// Storage class of the object.
string storage_class = 16;
// Cloud KMS Key used to encrypt this object, if the object is encrypted by
// such a key.
string kms_key_name = 17;
// The time at which the object's storage class was last changed.
google.protobuf.Timestamp time_storage_class_updated = 18;
// Whether an object is under temporary hold.
bool temporary_hold = 19;
// A server-determined value that specifies the earliest time that the
// object's retention period expires.
google.protobuf.Timestamp retention_expiration_time = 20;
// User-provided metadata, in key/value pairs.
map<string, string> metadata = 21;
// Whether an object is under event-based hold.
bool event_based_hold = 29;
// The name of the object.
string name = 23;
// The ID of the object, including the bucket name, object name, and
// generation number.
string id = 24;
// The name of the bucket containing this object.
string bucket = 25;
// The content generation of this object. Used for object versioning.
// Attempting to set this field will result in an error.
int64 generation = 26;
// Metadata of customer-supplied encryption key, if the object is encrypted by
// such a key.
CustomerEncryption customer_encryption = 28;
// Media download link.
string media_link = 100;
// The link to this object.
string self_link = 101;
// The kind of item this is. For objects, this is always "storage#object".
string kind = 102;
}