go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/buildbucket/proto/notification.pb.go (about) 1 // Copyright 2018 The Swarming Authors. All rights reserved. 2 // Use of this source code is governed by the Apache v2.0 license that can be 3 // found in the LICENSE file. 4 5 // Code generated by protoc-gen-go. DO NOT EDIT. 6 // versions: 7 // protoc-gen-go v1.32.0 8 // protoc v3.21.7 9 // source: go.chromium.org/luci/buildbucket/proto/notification.proto 10 11 package buildbucketpb 12 13 import ( 14 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 15 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 16 reflect "reflect" 17 sync "sync" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 // Configuration for per-build notification. It's usually set by the caller on 28 // each ScheduleBuild request. 29 type NotificationConfig struct { 30 state protoimpl.MessageState 31 sizeCache protoimpl.SizeCache 32 unknownFields protoimpl.UnknownFields 33 34 // Target Cloud PubSub topic. 35 // Usually has format "projects/{cloud project}/topics/{topic name}". 36 // 37 // The PubSub message data schema is defined in `PubSubCallBack` in this file. 38 // 39 // The legacy schema is: 40 // 41 // { 42 // 'build': ${BuildMessage}, 43 // 'user_data': ${NotificationConfig.user_data} 44 // 'hostname': 'cr-buildbucket.appspot.com', 45 // } 46 // 47 // where the BuildMessage is 48 // https://chromium.googlesource.com/infra/infra.git/+/b3204748243a9e4bf815a7024e921be46e3e1747/appengine/cr-buildbucket/legacy/api_common.py#94 49 // 50 // Note: The legacy data schema is deprecated. Only a few old users are using 51 // it and will be migrated soon. 52 // 53 // <buildbucket-app-id>@appspot.gserviceaccount.com must have 54 // "pubsub.topics.publish" and "pubsub.topics.get" permissions on the topic, 55 // where <buildbucket-app-id> is usually "cr-buildbucket." 56 PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"` 57 // Will be available in PubSubCallBack.user_data. 58 // Max length: 4096. 59 UserData []byte `protobuf:"bytes,2,opt,name=user_data,json=userData,proto3" json:"user_data,omitempty"` 60 } 61 62 func (x *NotificationConfig) Reset() { 63 *x = NotificationConfig{} 64 if protoimpl.UnsafeEnabled { 65 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[0] 66 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 67 ms.StoreMessageInfo(mi) 68 } 69 } 70 71 func (x *NotificationConfig) String() string { 72 return protoimpl.X.MessageStringOf(x) 73 } 74 75 func (*NotificationConfig) ProtoMessage() {} 76 77 func (x *NotificationConfig) ProtoReflect() protoreflect.Message { 78 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[0] 79 if protoimpl.UnsafeEnabled && x != nil { 80 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 81 if ms.LoadMessageInfo() == nil { 82 ms.StoreMessageInfo(mi) 83 } 84 return ms 85 } 86 return mi.MessageOf(x) 87 } 88 89 // Deprecated: Use NotificationConfig.ProtoReflect.Descriptor instead. 90 func (*NotificationConfig) Descriptor() ([]byte, []int) { 91 return file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescGZIP(), []int{0} 92 } 93 94 func (x *NotificationConfig) GetPubsubTopic() string { 95 if x != nil { 96 return x.PubsubTopic 97 } 98 return "" 99 } 100 101 func (x *NotificationConfig) GetUserData() []byte { 102 if x != nil { 103 return x.UserData 104 } 105 return nil 106 } 107 108 // BuildsV2PubSub is the "builds_v2" pubsub topic message data schema. 109 // Attributes of this pubsub message: 110 // - "project" 111 // - "bucket" 112 // - "builder" 113 // - "is_completed" (The value is either "true" or "false" in string.) 114 // - "version" (The value is "v2". To help distinguish messages from the old `builds` topic) 115 type BuildsV2PubSub struct { 116 state protoimpl.MessageState 117 sizeCache protoimpl.SizeCache 118 unknownFields protoimpl.UnknownFields 119 120 // Contains all field except large fields 121 Build *Build `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"` 122 // A Compressed bytes in proto binary format of buildbucket.v2.Build where 123 // it only contains the large build fields - build.input.properties, 124 // build.output.properties and build.steps. 125 BuildLargeFields []byte `protobuf:"bytes,2,opt,name=build_large_fields,json=buildLargeFields,proto3" json:"build_large_fields,omitempty"` 126 // The compression method the above `build_large_fields` uses. By default, it 127 // is ZLIB as this is the most common one and is the built-in lib in many 128 // programming languages. 129 Compression Compression `protobuf:"varint,3,opt,name=compression,proto3,enum=buildbucket.v2.Compression" json:"compression,omitempty"` 130 } 131 132 func (x *BuildsV2PubSub) Reset() { 133 *x = BuildsV2PubSub{} 134 if protoimpl.UnsafeEnabled { 135 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[1] 136 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 137 ms.StoreMessageInfo(mi) 138 } 139 } 140 141 func (x *BuildsV2PubSub) String() string { 142 return protoimpl.X.MessageStringOf(x) 143 } 144 145 func (*BuildsV2PubSub) ProtoMessage() {} 146 147 func (x *BuildsV2PubSub) ProtoReflect() protoreflect.Message { 148 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[1] 149 if protoimpl.UnsafeEnabled && x != nil { 150 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 151 if ms.LoadMessageInfo() == nil { 152 ms.StoreMessageInfo(mi) 153 } 154 return ms 155 } 156 return mi.MessageOf(x) 157 } 158 159 // Deprecated: Use BuildsV2PubSub.ProtoReflect.Descriptor instead. 160 func (*BuildsV2PubSub) Descriptor() ([]byte, []int) { 161 return file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescGZIP(), []int{1} 162 } 163 164 func (x *BuildsV2PubSub) GetBuild() *Build { 165 if x != nil { 166 return x.Build 167 } 168 return nil 169 } 170 171 func (x *BuildsV2PubSub) GetBuildLargeFields() []byte { 172 if x != nil { 173 return x.BuildLargeFields 174 } 175 return nil 176 } 177 178 func (x *BuildsV2PubSub) GetCompression() Compression { 179 if x != nil { 180 return x.Compression 181 } 182 return Compression_ZLIB 183 } 184 185 // PubSubCallBack is the message data schema for the ad-hoc pubsub notification 186 // specified per ScheduleBuild request level. 187 // Attributes of this pubsub message: 188 // - "project" 189 // - "bucket" 190 // - "builder" 191 // - "is_completed" (The value is either "true" or "false" in string.) 192 // - "version" (The value is "v2". To help distinguish messages from the old `builds` topic) 193 type PubSubCallBack struct { 194 state protoimpl.MessageState 195 sizeCache protoimpl.SizeCache 196 unknownFields protoimpl.UnknownFields 197 198 // Buildbucket build 199 BuildPubsub *BuildsV2PubSub `protobuf:"bytes,1,opt,name=build_pubsub,json=buildPubsub,proto3" json:"build_pubsub,omitempty"` 200 // User-defined opaque blob specified in NotificationConfig.user_data. 201 UserData []byte `protobuf:"bytes,2,opt,name=user_data,json=userData,proto3" json:"user_data,omitempty"` 202 } 203 204 func (x *PubSubCallBack) Reset() { 205 *x = PubSubCallBack{} 206 if protoimpl.UnsafeEnabled { 207 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[2] 208 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 209 ms.StoreMessageInfo(mi) 210 } 211 } 212 213 func (x *PubSubCallBack) String() string { 214 return protoimpl.X.MessageStringOf(x) 215 } 216 217 func (*PubSubCallBack) ProtoMessage() {} 218 219 func (x *PubSubCallBack) ProtoReflect() protoreflect.Message { 220 mi := &file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[2] 221 if protoimpl.UnsafeEnabled && x != nil { 222 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 223 if ms.LoadMessageInfo() == nil { 224 ms.StoreMessageInfo(mi) 225 } 226 return ms 227 } 228 return mi.MessageOf(x) 229 } 230 231 // Deprecated: Use PubSubCallBack.ProtoReflect.Descriptor instead. 232 func (*PubSubCallBack) Descriptor() ([]byte, []int) { 233 return file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescGZIP(), []int{2} 234 } 235 236 func (x *PubSubCallBack) GetBuildPubsub() *BuildsV2PubSub { 237 if x != nil { 238 return x.BuildPubsub 239 } 240 return nil 241 } 242 243 func (x *PubSubCallBack) GetUserData() []byte { 244 if x != nil { 245 return x.UserData 246 } 247 return nil 248 } 249 250 var File_go_chromium_org_luci_buildbucket_proto_notification_proto protoreflect.FileDescriptor 251 252 var file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDesc = []byte{ 253 0x0a, 0x39, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 254 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 255 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 256 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x75, 0x69, 257 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x32, 0x1a, 0x32, 0x67, 0x6f, 0x2e, 258 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 259 0x69, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 260 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 261 0x33, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 262 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 263 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 264 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x12, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 265 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x75, 266 0x62, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 267 0x52, 0x0b, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x1b, 0x0a, 268 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 269 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x42, 270 0x75, 0x69, 0x6c, 0x64, 0x73, 0x56, 0x32, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x12, 0x2b, 0x0a, 271 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 272 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 273 0x69, 0x6c, 0x64, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x75, 274 0x69, 0x6c, 0x64, 0x5f, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 275 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4c, 0x61, 0x72, 276 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 277 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 278 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x43, 279 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 280 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x53, 0x75, 281 0x62, 0x43, 0x61, 0x6c, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x12, 0x41, 0x0a, 0x0c, 0x62, 0x75, 0x69, 282 0x6c, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 283 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x32, 284 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x56, 0x32, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x52, 285 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x12, 0x1b, 0x0a, 0x09, 286 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 287 0x08, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x6f, 0x2e, 288 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 289 0x69, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 290 0x6f, 0x74, 0x6f, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x70, 291 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 292 } 293 294 var ( 295 file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescOnce sync.Once 296 file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescData = file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDesc 297 ) 298 299 func file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescGZIP() []byte { 300 file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescOnce.Do(func() { 301 file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescData) 302 }) 303 return file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDescData 304 } 305 306 var file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 307 var file_go_chromium_org_luci_buildbucket_proto_notification_proto_goTypes = []interface{}{ 308 (*NotificationConfig)(nil), // 0: buildbucket.v2.NotificationConfig 309 (*BuildsV2PubSub)(nil), // 1: buildbucket.v2.BuildsV2PubSub 310 (*PubSubCallBack)(nil), // 2: buildbucket.v2.PubSubCallBack 311 (*Build)(nil), // 3: buildbucket.v2.Build 312 (Compression)(0), // 4: buildbucket.v2.Compression 313 } 314 var file_go_chromium_org_luci_buildbucket_proto_notification_proto_depIdxs = []int32{ 315 3, // 0: buildbucket.v2.BuildsV2PubSub.build:type_name -> buildbucket.v2.Build 316 4, // 1: buildbucket.v2.BuildsV2PubSub.compression:type_name -> buildbucket.v2.Compression 317 1, // 2: buildbucket.v2.PubSubCallBack.build_pubsub:type_name -> buildbucket.v2.BuildsV2PubSub 318 3, // [3:3] is the sub-list for method output_type 319 3, // [3:3] is the sub-list for method input_type 320 3, // [3:3] is the sub-list for extension type_name 321 3, // [3:3] is the sub-list for extension extendee 322 0, // [0:3] is the sub-list for field type_name 323 } 324 325 func init() { file_go_chromium_org_luci_buildbucket_proto_notification_proto_init() } 326 func file_go_chromium_org_luci_buildbucket_proto_notification_proto_init() { 327 if File_go_chromium_org_luci_buildbucket_proto_notification_proto != nil { 328 return 329 } 330 file_go_chromium_org_luci_buildbucket_proto_build_proto_init() 331 file_go_chromium_org_luci_buildbucket_proto_common_proto_init() 332 if !protoimpl.UnsafeEnabled { 333 file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 334 switch v := v.(*NotificationConfig); i { 335 case 0: 336 return &v.state 337 case 1: 338 return &v.sizeCache 339 case 2: 340 return &v.unknownFields 341 default: 342 return nil 343 } 344 } 345 file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 346 switch v := v.(*BuildsV2PubSub); i { 347 case 0: 348 return &v.state 349 case 1: 350 return &v.sizeCache 351 case 2: 352 return &v.unknownFields 353 default: 354 return nil 355 } 356 } 357 file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 358 switch v := v.(*PubSubCallBack); i { 359 case 0: 360 return &v.state 361 case 1: 362 return &v.sizeCache 363 case 2: 364 return &v.unknownFields 365 default: 366 return nil 367 } 368 } 369 } 370 type x struct{} 371 out := protoimpl.TypeBuilder{ 372 File: protoimpl.DescBuilder{ 373 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 374 RawDescriptor: file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDesc, 375 NumEnums: 0, 376 NumMessages: 3, 377 NumExtensions: 0, 378 NumServices: 0, 379 }, 380 GoTypes: file_go_chromium_org_luci_buildbucket_proto_notification_proto_goTypes, 381 DependencyIndexes: file_go_chromium_org_luci_buildbucket_proto_notification_proto_depIdxs, 382 MessageInfos: file_go_chromium_org_luci_buildbucket_proto_notification_proto_msgTypes, 383 }.Build() 384 File_go_chromium_org_luci_buildbucket_proto_notification_proto = out.File 385 file_go_chromium_org_luci_buildbucket_proto_notification_proto_rawDesc = nil 386 file_go_chromium_org_luci_buildbucket_proto_notification_proto_goTypes = nil 387 file_go_chromium_org_luci_buildbucket_proto_notification_proto_depIdxs = nil 388 }