diff --git a/components/image-builder-api/go/config/config.go b/components/image-builder-api/go/config/config.go index 19f68146549431..1aadfcf808a8d1 100644 --- a/components/image-builder-api/go/config/config.go +++ b/components/image-builder-api/go/config/config.go @@ -46,6 +46,11 @@ type Configuration struct { // This will attempt to add ECR auth for any ECR repo a user is // trying to access. EnableAdditionalECRAuth bool `json:"enableAdditionalECRAuth"` + + // SubassemblyBucketName configures the subassembly bucket + SubassemblyBucketName string `json:"subassemblyBucketName,omitempty"` + // SubassemblyBucketPrefix configures an optional key prefix used for locating subassemblies in the bucket + SubassemblyBucketPrefix string `json:"subassemblyBucketPrefix,omitempty"` } type TLS struct { diff --git a/components/image-builder-api/go/subassembly.pb.go b/components/image-builder-api/go/subassembly.pb.go new file mode 100644 index 00000000000000..897a9d9484e72d --- /dev/null +++ b/components/image-builder-api/go/subassembly.pb.go @@ -0,0 +1,527 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.20.1 +// source: subassembly.proto + +package api + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubassemblyPhase int32 + +const ( + SubassemblyPhase_SUBASSEMBLY_PHASE_UNSPECIFIED SubassemblyPhase = 0 + SubassemblyPhase_SUBASSEMBLY_PHASE_CREATING SubassemblyPhase = 1 + SubassemblyPhase_SUBASSEMBLY_PHASE_AVAILABLE SubassemblyPhase = 2 + SubassemblyPhase_SUBASSEMBLY_PHASE_UNAVAILABLE SubassemblyPhase = 3 +) + +// Enum value maps for SubassemblyPhase. +var ( + SubassemblyPhase_name = map[int32]string{ + 0: "SUBASSEMBLY_PHASE_UNSPECIFIED", + 1: "SUBASSEMBLY_PHASE_CREATING", + 2: "SUBASSEMBLY_PHASE_AVAILABLE", + 3: "SUBASSEMBLY_PHASE_UNAVAILABLE", + } + SubassemblyPhase_value = map[string]int32{ + "SUBASSEMBLY_PHASE_UNSPECIFIED": 0, + "SUBASSEMBLY_PHASE_CREATING": 1, + "SUBASSEMBLY_PHASE_AVAILABLE": 2, + "SUBASSEMBLY_PHASE_UNAVAILABLE": 3, + } +) + +func (x SubassemblyPhase) Enum() *SubassemblyPhase { + p := new(SubassemblyPhase) + *p = x + return p +} + +func (x SubassemblyPhase) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubassemblyPhase) Descriptor() protoreflect.EnumDescriptor { + return file_subassembly_proto_enumTypes[0].Descriptor() +} + +func (SubassemblyPhase) Type() protoreflect.EnumType { + return &file_subassembly_proto_enumTypes[0] +} + +func (x SubassemblyPhase) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubassemblyPhase.Descriptor instead. +func (SubassemblyPhase) EnumDescriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{0} +} + +type CreateSubassemblyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OciReference string `protobuf:"bytes,1,opt,name=oci_reference,json=ociReference,proto3" json:"oci_reference,omitempty"` +} + +func (x *CreateSubassemblyRequest) Reset() { + *x = CreateSubassemblyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subassembly_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubassemblyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubassemblyRequest) ProtoMessage() {} + +func (x *CreateSubassemblyRequest) ProtoReflect() protoreflect.Message { + mi := &file_subassembly_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubassemblyRequest.ProtoReflect.Descriptor instead. +func (*CreateSubassemblyRequest) Descriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateSubassemblyRequest) GetOciReference() string { + if x != nil { + return x.OciReference + } + return "" +} + +type CreateSubassemblyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *SubassemblyStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *CreateSubassemblyResponse) Reset() { + *x = CreateSubassemblyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subassembly_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubassemblyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubassemblyResponse) ProtoMessage() {} + +func (x *CreateSubassemblyResponse) ProtoReflect() protoreflect.Message { + mi := &file_subassembly_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubassemblyResponse.ProtoReflect.Descriptor instead. +func (*CreateSubassemblyResponse) Descriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateSubassemblyResponse) GetStatus() *SubassemblyStatus { + if x != nil { + return x.Status + } + return nil +} + +type GetSubassemblyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OciReference string `protobuf:"bytes,1,opt,name=oci_reference,json=ociReference,proto3" json:"oci_reference,omitempty"` +} + +func (x *GetSubassemblyRequest) Reset() { + *x = GetSubassemblyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subassembly_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubassemblyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubassemblyRequest) ProtoMessage() {} + +func (x *GetSubassemblyRequest) ProtoReflect() protoreflect.Message { + mi := &file_subassembly_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubassemblyRequest.ProtoReflect.Descriptor instead. +func (*GetSubassemblyRequest) Descriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{2} +} + +func (x *GetSubassemblyRequest) GetOciReference() string { + if x != nil { + return x.OciReference + } + return "" +} + +type GetSubassemblyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *SubassemblyStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *GetSubassemblyResponse) Reset() { + *x = GetSubassemblyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subassembly_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubassemblyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubassemblyResponse) ProtoMessage() {} + +func (x *GetSubassemblyResponse) ProtoReflect() protoreflect.Message { + mi := &file_subassembly_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubassemblyResponse.ProtoReflect.Descriptor instead. +func (*GetSubassemblyResponse) Descriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSubassemblyResponse) GetStatus() *SubassemblyStatus { + if x != nil { + return x.Status + } + return nil +} + +type SubassemblyStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // phase describes the state of the subassembly. + Phase SubassemblyPhase `protobuf:"varint,1,opt,name=phase,proto3,enum=builder.SubassemblyPhase" json:"phase,omitempty"` + // message details the subassembly's state + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // digest is the digest of the subassembly file + // Expect this field to only be present when the phase is "available". + Digest string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"` + // URL is a URL from which the subassembly can be downloaded. + // Expect this field to only be present when the phase is "available". + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *SubassemblyStatus) Reset() { + *x = SubassemblyStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_subassembly_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubassemblyStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubassemblyStatus) ProtoMessage() {} + +func (x *SubassemblyStatus) ProtoReflect() protoreflect.Message { + mi := &file_subassembly_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubassemblyStatus.ProtoReflect.Descriptor instead. +func (*SubassemblyStatus) Descriptor() ([]byte, []int) { + return file_subassembly_proto_rawDescGZIP(), []int{4} +} + +func (x *SubassemblyStatus) GetPhase() SubassemblyPhase { + if x != nil { + return x.Phase + } + return SubassemblyPhase_SUBASSEMBLY_PHASE_UNSPECIFIED +} + +func (x *SubassemblyStatus) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *SubassemblyStatus) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +func (x *SubassemblyStatus) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +var File_subassembly_proto protoreflect.FileDescriptor + +var file_subassembly_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x73, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x18, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x63, 0x69, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6f, 0x63, 0x69, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4f, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, + 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x63, 0x69, 0x5f, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6f, 0x63, 0x69, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, + 0x2e, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x11, 0x53, + 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x2f, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x19, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, + 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x2a, 0x99, 0x01, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, + 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x55, + 0x42, 0x41, 0x53, 0x53, 0x45, 0x4d, 0x42, 0x4c, 0x59, 0x5f, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x53, 0x55, 0x42, 0x41, 0x53, 0x53, 0x45, 0x4d, 0x42, 0x4c, 0x59, 0x5f, 0x50, 0x48, 0x41, + 0x53, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1f, 0x0a, + 0x1b, 0x53, 0x55, 0x42, 0x41, 0x53, 0x53, 0x45, 0x4d, 0x42, 0x4c, 0x59, 0x5f, 0x50, 0x48, 0x41, + 0x53, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x21, + 0x0a, 0x1d, 0x53, 0x55, 0x42, 0x41, 0x53, 0x53, 0x45, 0x4d, 0x42, 0x4c, 0x59, 0x5f, 0x50, 0x48, + 0x41, 0x53, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, + 0x03, 0x32, 0xc7, 0x01, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x12, 0x21, 0x2e, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x12, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x61, 0x73, 0x73, 0x65, 0x6d, 0x62, 0x6c, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, 0x5a, 0x2d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x2d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_subassembly_proto_rawDescOnce sync.Once + file_subassembly_proto_rawDescData = file_subassembly_proto_rawDesc +) + +func file_subassembly_proto_rawDescGZIP() []byte { + file_subassembly_proto_rawDescOnce.Do(func() { + file_subassembly_proto_rawDescData = protoimpl.X.CompressGZIP(file_subassembly_proto_rawDescData) + }) + return file_subassembly_proto_rawDescData +} + +var file_subassembly_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_subassembly_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_subassembly_proto_goTypes = []interface{}{ + (SubassemblyPhase)(0), // 0: builder.SubassemblyPhase + (*CreateSubassemblyRequest)(nil), // 1: builder.CreateSubassemblyRequest + (*CreateSubassemblyResponse)(nil), // 2: builder.CreateSubassemblyResponse + (*GetSubassemblyRequest)(nil), // 3: builder.GetSubassemblyRequest + (*GetSubassemblyResponse)(nil), // 4: builder.GetSubassemblyResponse + (*SubassemblyStatus)(nil), // 5: builder.SubassemblyStatus +} +var file_subassembly_proto_depIdxs = []int32{ + 5, // 0: builder.CreateSubassemblyResponse.status:type_name -> builder.SubassemblyStatus + 5, // 1: builder.GetSubassemblyResponse.status:type_name -> builder.SubassemblyStatus + 0, // 2: builder.SubassemblyStatus.phase:type_name -> builder.SubassemblyPhase + 1, // 3: builder.SubassemblyService.CreateSubassembly:input_type -> builder.CreateSubassemblyRequest + 3, // 4: builder.SubassemblyService.GetSubassembly:input_type -> builder.GetSubassemblyRequest + 2, // 5: builder.SubassemblyService.CreateSubassembly:output_type -> builder.CreateSubassemblyResponse + 4, // 6: builder.SubassemblyService.GetSubassembly:output_type -> builder.GetSubassemblyResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_subassembly_proto_init() } +func file_subassembly_proto_init() { + if File_subassembly_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_subassembly_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubassemblyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subassembly_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubassemblyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subassembly_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubassemblyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subassembly_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubassemblyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subassembly_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubassemblyStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_subassembly_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_subassembly_proto_goTypes, + DependencyIndexes: file_subassembly_proto_depIdxs, + EnumInfos: file_subassembly_proto_enumTypes, + MessageInfos: file_subassembly_proto_msgTypes, + }.Build() + File_subassembly_proto = out.File + file_subassembly_proto_rawDesc = nil + file_subassembly_proto_goTypes = nil + file_subassembly_proto_depIdxs = nil +} diff --git a/components/image-builder-api/go/subassembly_grpc.pb.go b/components/image-builder-api/go/subassembly_grpc.pb.go new file mode 100644 index 00000000000000..562478765b309a --- /dev/null +++ b/components/image-builder-api/go/subassembly_grpc.pb.go @@ -0,0 +1,149 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.20.1 +// source: subassembly.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SubassemblyServiceClient is the client API for SubassemblyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SubassemblyServiceClient interface { + // CreateSubassembly creates a subassembly from an OCI image + CreateSubassembly(ctx context.Context, in *CreateSubassemblyRequest, opts ...grpc.CallOption) (*CreateSubassemblyResponse, error) + // GetSubassembly returns the status and URL for a subassembly + GetSubassembly(ctx context.Context, in *GetSubassemblyRequest, opts ...grpc.CallOption) (*GetSubassemblyResponse, error) +} + +type subassemblyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSubassemblyServiceClient(cc grpc.ClientConnInterface) SubassemblyServiceClient { + return &subassemblyServiceClient{cc} +} + +func (c *subassemblyServiceClient) CreateSubassembly(ctx context.Context, in *CreateSubassemblyRequest, opts ...grpc.CallOption) (*CreateSubassemblyResponse, error) { + out := new(CreateSubassemblyResponse) + err := c.cc.Invoke(ctx, "/builder.SubassemblyService/CreateSubassembly", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subassemblyServiceClient) GetSubassembly(ctx context.Context, in *GetSubassemblyRequest, opts ...grpc.CallOption) (*GetSubassemblyResponse, error) { + out := new(GetSubassemblyResponse) + err := c.cc.Invoke(ctx, "/builder.SubassemblyService/GetSubassembly", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubassemblyServiceServer is the server API for SubassemblyService service. +// All implementations must embed UnimplementedSubassemblyServiceServer +// for forward compatibility +type SubassemblyServiceServer interface { + // CreateSubassembly creates a subassembly from an OCI image + CreateSubassembly(context.Context, *CreateSubassemblyRequest) (*CreateSubassemblyResponse, error) + // GetSubassembly returns the status and URL for a subassembly + GetSubassembly(context.Context, *GetSubassemblyRequest) (*GetSubassemblyResponse, error) + mustEmbedUnimplementedSubassemblyServiceServer() +} + +// UnimplementedSubassemblyServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSubassemblyServiceServer struct { +} + +func (UnimplementedSubassemblyServiceServer) CreateSubassembly(context.Context, *CreateSubassemblyRequest) (*CreateSubassemblyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSubassembly not implemented") +} +func (UnimplementedSubassemblyServiceServer) GetSubassembly(context.Context, *GetSubassemblyRequest) (*GetSubassemblyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSubassembly not implemented") +} +func (UnimplementedSubassemblyServiceServer) mustEmbedUnimplementedSubassemblyServiceServer() {} + +// UnsafeSubassemblyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SubassemblyServiceServer will +// result in compilation errors. +type UnsafeSubassemblyServiceServer interface { + mustEmbedUnimplementedSubassemblyServiceServer() +} + +func RegisterSubassemblyServiceServer(s grpc.ServiceRegistrar, srv SubassemblyServiceServer) { + s.RegisterService(&SubassemblyService_ServiceDesc, srv) +} + +func _SubassemblyService_CreateSubassembly_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSubassemblyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubassemblyServiceServer).CreateSubassembly(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/builder.SubassemblyService/CreateSubassembly", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubassemblyServiceServer).CreateSubassembly(ctx, req.(*CreateSubassemblyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubassemblyService_GetSubassembly_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubassemblyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubassemblyServiceServer).GetSubassembly(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/builder.SubassemblyService/GetSubassembly", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubassemblyServiceServer).GetSubassembly(ctx, req.(*GetSubassemblyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SubassemblyService_ServiceDesc is the grpc.ServiceDesc for SubassemblyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SubassemblyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "builder.SubassemblyService", + HandlerType: (*SubassemblyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateSubassembly", + Handler: _SubassemblyService_CreateSubassembly_Handler, + }, + { + MethodName: "GetSubassembly", + Handler: _SubassemblyService_GetSubassembly_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "subassembly.proto", +} diff --git a/components/image-builder-api/subassembly.proto b/components/image-builder-api/subassembly.proto new file mode 100644 index 00000000000000..81e7c3c410e802 --- /dev/null +++ b/components/image-builder-api/subassembly.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package builder; +option go_package = "github.com/gitpod-io/gitpod/image-builder/api"; + +service SubassemblyService { + // CreateSubassembly creates a subassembly from an OCI image + rpc CreateSubassembly(CreateSubassemblyRequest) returns (CreateSubassemblyResponse) {}; + + // GetSubassembly returns the status and URL for a subassembly + rpc GetSubassembly(GetSubassemblyRequest) returns (GetSubassemblyResponse) {}; +} + +message CreateSubassemblyRequest { + string oci_reference = 1; +} +message CreateSubassemblyResponse { + SubassemblyStatus status = 1; +} + +message GetSubassemblyRequest { + string oci_reference = 1; +} +message GetSubassemblyResponse { + SubassemblyStatus status = 1; +} + +message SubassemblyStatus { + // phase describes the state of the subassembly. + SubassemblyPhase phase = 1; + + // message details the subassembly's state + string message = 2; + + // digest is the digest of the subassembly file + // Expect this field to only be present when the phase is "available". + string digest = 3; + + // URL is a URL from which the subassembly can be downloaded. + // Expect this field to only be present when the phase is "available". + string url = 4; +} + +enum SubassemblyPhase { + SUBASSEMBLY_PHASE_UNSPECIFIED = 0; + SUBASSEMBLY_PHASE_CREATING = 1; + SUBASSEMBLY_PHASE_AVAILABLE = 2; + SUBASSEMBLY_PHASE_UNAVAILABLE = 3; +} diff --git a/components/image-builder-api/typescript/src/subassembly_grpc_pb.d.ts b/components/image-builder-api/typescript/src/subassembly_grpc_pb.d.ts new file mode 100644 index 00000000000000..f59184c0283376 --- /dev/null +++ b/components/image-builder-api/typescript/src/subassembly_grpc_pb.d.ts @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// package: builder +// file: subassembly.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as subassembly_pb from "./subassembly_pb"; + +interface ISubassemblyServiceService extends grpc.ServiceDefinition { + createSubassembly: ISubassemblyServiceService_ICreateSubassembly; + getSubassembly: ISubassemblyServiceService_IGetSubassembly; +} + +interface ISubassemblyServiceService_ICreateSubassembly extends grpc.MethodDefinition { + path: "/builder.SubassemblyService/CreateSubassembly"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISubassemblyServiceService_IGetSubassembly extends grpc.MethodDefinition { + path: "/builder.SubassemblyService/GetSubassembly"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const SubassemblyServiceService: ISubassemblyServiceService; + +export interface ISubassemblyServiceServer extends grpc.UntypedServiceImplementation { + createSubassembly: grpc.handleUnaryCall; + getSubassembly: grpc.handleUnaryCall; +} + +export interface ISubassemblyServiceClient { + createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + getSubassembly(request: subassembly_pb.GetSubassemblyRequest, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; + getSubassembly(request: subassembly_pb.GetSubassemblyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; + getSubassembly(request: subassembly_pb.GetSubassemblyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; +} + +export class SubassemblyServiceClient extends grpc.Client implements ISubassemblyServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + public createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + public createSubassembly(request: subassembly_pb.CreateSubassemblyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: subassembly_pb.CreateSubassemblyResponse) => void): grpc.ClientUnaryCall; + public getSubassembly(request: subassembly_pb.GetSubassemblyRequest, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; + public getSubassembly(request: subassembly_pb.GetSubassemblyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; + public getSubassembly(request: subassembly_pb.GetSubassemblyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: subassembly_pb.GetSubassemblyResponse) => void): grpc.ClientUnaryCall; +} diff --git a/components/image-builder-api/typescript/src/subassembly_grpc_pb.js b/components/image-builder-api/typescript/src/subassembly_grpc_pb.js new file mode 100644 index 00000000000000..69d996d62c9a56 --- /dev/null +++ b/components/image-builder-api/typescript/src/subassembly_grpc_pb.js @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var subassembly_pb = require('./subassembly_pb.js'); + +function serialize_builder_CreateSubassemblyRequest(arg) { + if (!(arg instanceof subassembly_pb.CreateSubassemblyRequest)) { + throw new Error('Expected argument of type builder.CreateSubassemblyRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_builder_CreateSubassemblyRequest(buffer_arg) { + return subassembly_pb.CreateSubassemblyRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_builder_CreateSubassemblyResponse(arg) { + if (!(arg instanceof subassembly_pb.CreateSubassemblyResponse)) { + throw new Error('Expected argument of type builder.CreateSubassemblyResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_builder_CreateSubassemblyResponse(buffer_arg) { + return subassembly_pb.CreateSubassemblyResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_builder_GetSubassemblyRequest(arg) { + if (!(arg instanceof subassembly_pb.GetSubassemblyRequest)) { + throw new Error('Expected argument of type builder.GetSubassemblyRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_builder_GetSubassemblyRequest(buffer_arg) { + return subassembly_pb.GetSubassemblyRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_builder_GetSubassemblyResponse(arg) { + if (!(arg instanceof subassembly_pb.GetSubassemblyResponse)) { + throw new Error('Expected argument of type builder.GetSubassemblyResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_builder_GetSubassemblyResponse(buffer_arg) { + return subassembly_pb.GetSubassemblyResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var SubassemblyServiceService = exports.SubassemblyServiceService = { + // CreateSubassembly creates a subassembly from an OCI image +createSubassembly: { + path: '/builder.SubassemblyService/CreateSubassembly', + requestStream: false, + responseStream: false, + requestType: subassembly_pb.CreateSubassemblyRequest, + responseType: subassembly_pb.CreateSubassemblyResponse, + requestSerialize: serialize_builder_CreateSubassemblyRequest, + requestDeserialize: deserialize_builder_CreateSubassemblyRequest, + responseSerialize: serialize_builder_CreateSubassemblyResponse, + responseDeserialize: deserialize_builder_CreateSubassemblyResponse, + }, + // GetSubassembly returns the status and URL for a subassembly +getSubassembly: { + path: '/builder.SubassemblyService/GetSubassembly', + requestStream: false, + responseStream: false, + requestType: subassembly_pb.GetSubassemblyRequest, + responseType: subassembly_pb.GetSubassemblyResponse, + requestSerialize: serialize_builder_GetSubassemblyRequest, + requestDeserialize: deserialize_builder_GetSubassemblyRequest, + responseSerialize: serialize_builder_GetSubassemblyResponse, + responseDeserialize: deserialize_builder_GetSubassemblyResponse, + }, +}; + +exports.SubassemblyServiceClient = grpc.makeGenericClientConstructor(SubassemblyServiceService); diff --git a/components/image-builder-api/typescript/src/subassembly_pb.d.ts b/components/image-builder-api/typescript/src/subassembly_pb.d.ts new file mode 100644 index 00000000000000..354c0c8b6ab943 --- /dev/null +++ b/components/image-builder-api/typescript/src/subassembly_pb.d.ts @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// package: builder +// file: subassembly.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class CreateSubassemblyRequest extends jspb.Message { + getOciReference(): string; + setOciReference(value: string): CreateSubassemblyRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSubassemblyRequest.AsObject; + static toObject(includeInstance: boolean, msg: CreateSubassemblyRequest): CreateSubassemblyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSubassemblyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSubassemblyRequest; + static deserializeBinaryFromReader(message: CreateSubassemblyRequest, reader: jspb.BinaryReader): CreateSubassemblyRequest; +} + +export namespace CreateSubassemblyRequest { + export type AsObject = { + ociReference: string, + } +} + +export class CreateSubassemblyResponse extends jspb.Message { + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): SubassemblyStatus | undefined; + setStatus(value?: SubassemblyStatus): CreateSubassemblyResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSubassemblyResponse.AsObject; + static toObject(includeInstance: boolean, msg: CreateSubassemblyResponse): CreateSubassemblyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSubassemblyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSubassemblyResponse; + static deserializeBinaryFromReader(message: CreateSubassemblyResponse, reader: jspb.BinaryReader): CreateSubassemblyResponse; +} + +export namespace CreateSubassemblyResponse { + export type AsObject = { + status?: SubassemblyStatus.AsObject, + } +} + +export class GetSubassemblyRequest extends jspb.Message { + getOciReference(): string; + setOciReference(value: string): GetSubassemblyRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSubassemblyRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSubassemblyRequest): GetSubassemblyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSubassemblyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSubassemblyRequest; + static deserializeBinaryFromReader(message: GetSubassemblyRequest, reader: jspb.BinaryReader): GetSubassemblyRequest; +} + +export namespace GetSubassemblyRequest { + export type AsObject = { + ociReference: string, + } +} + +export class GetSubassemblyResponse extends jspb.Message { + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): SubassemblyStatus | undefined; + setStatus(value?: SubassemblyStatus): GetSubassemblyResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSubassemblyResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSubassemblyResponse): GetSubassemblyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSubassemblyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSubassemblyResponse; + static deserializeBinaryFromReader(message: GetSubassemblyResponse, reader: jspb.BinaryReader): GetSubassemblyResponse; +} + +export namespace GetSubassemblyResponse { + export type AsObject = { + status?: SubassemblyStatus.AsObject, + } +} + +export class SubassemblyStatus extends jspb.Message { + getPhase(): SubassemblyPhase; + setPhase(value: SubassemblyPhase): SubassemblyStatus; + getMessage(): string; + setMessage(value: string): SubassemblyStatus; + getDigest(): string; + setDigest(value: string): SubassemblyStatus; + getUrl(): string; + setUrl(value: string): SubassemblyStatus; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubassemblyStatus.AsObject; + static toObject(includeInstance: boolean, msg: SubassemblyStatus): SubassemblyStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubassemblyStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubassemblyStatus; + static deserializeBinaryFromReader(message: SubassemblyStatus, reader: jspb.BinaryReader): SubassemblyStatus; +} + +export namespace SubassemblyStatus { + export type AsObject = { + phase: SubassemblyPhase, + message: string, + digest: string, + url: string, + } +} + +export enum SubassemblyPhase { + SUBASSEMBLY_PHASE_UNSPECIFIED = 0, + SUBASSEMBLY_PHASE_CREATING = 1, + SUBASSEMBLY_PHASE_AVAILABLE = 2, + SUBASSEMBLY_PHASE_UNAVAILABLE = 3, +} diff --git a/components/image-builder-api/typescript/src/subassembly_pb.js b/components/image-builder-api/typescript/src/subassembly_pb.js new file mode 100644 index 00000000000000..194d124f89eeeb --- /dev/null +++ b/components/image-builder-api/typescript/src/subassembly_pb.js @@ -0,0 +1,927 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// source: subassembly.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.builder.CreateSubassemblyRequest', null, global); +goog.exportSymbol('proto.builder.CreateSubassemblyResponse', null, global); +goog.exportSymbol('proto.builder.GetSubassemblyRequest', null, global); +goog.exportSymbol('proto.builder.GetSubassemblyResponse', null, global); +goog.exportSymbol('proto.builder.SubassemblyPhase', null, global); +goog.exportSymbol('proto.builder.SubassemblyStatus', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.builder.CreateSubassemblyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.builder.CreateSubassemblyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.builder.CreateSubassemblyRequest.displayName = 'proto.builder.CreateSubassemblyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.builder.CreateSubassemblyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.builder.CreateSubassemblyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.builder.CreateSubassemblyResponse.displayName = 'proto.builder.CreateSubassemblyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.builder.GetSubassemblyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.builder.GetSubassemblyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.builder.GetSubassemblyRequest.displayName = 'proto.builder.GetSubassemblyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.builder.GetSubassemblyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.builder.GetSubassemblyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.builder.GetSubassemblyResponse.displayName = 'proto.builder.GetSubassemblyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.builder.SubassemblyStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.builder.SubassemblyStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.builder.SubassemblyStatus.displayName = 'proto.builder.SubassemblyStatus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.builder.CreateSubassemblyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.builder.CreateSubassemblyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.builder.CreateSubassemblyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.CreateSubassemblyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + ociReference: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.builder.CreateSubassemblyRequest} + */ +proto.builder.CreateSubassemblyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.builder.CreateSubassemblyRequest; + return proto.builder.CreateSubassemblyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.builder.CreateSubassemblyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.builder.CreateSubassemblyRequest} + */ +proto.builder.CreateSubassemblyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOciReference(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.builder.CreateSubassemblyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.builder.CreateSubassemblyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.builder.CreateSubassemblyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.CreateSubassemblyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOciReference(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string oci_reference = 1; + * @return {string} + */ +proto.builder.CreateSubassemblyRequest.prototype.getOciReference = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.builder.CreateSubassemblyRequest} returns this + */ +proto.builder.CreateSubassemblyRequest.prototype.setOciReference = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.builder.CreateSubassemblyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.builder.CreateSubassemblyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.builder.CreateSubassemblyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.CreateSubassemblyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: (f = msg.getStatus()) && proto.builder.SubassemblyStatus.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.builder.CreateSubassemblyResponse} + */ +proto.builder.CreateSubassemblyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.builder.CreateSubassemblyResponse; + return proto.builder.CreateSubassemblyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.builder.CreateSubassemblyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.builder.CreateSubassemblyResponse} + */ +proto.builder.CreateSubassemblyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.builder.SubassemblyStatus; + reader.readMessage(value,proto.builder.SubassemblyStatus.deserializeBinaryFromReader); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.builder.CreateSubassemblyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.builder.CreateSubassemblyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.builder.CreateSubassemblyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.CreateSubassemblyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.builder.SubassemblyStatus.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SubassemblyStatus status = 1; + * @return {?proto.builder.SubassemblyStatus} + */ +proto.builder.CreateSubassemblyResponse.prototype.getStatus = function() { + return /** @type{?proto.builder.SubassemblyStatus} */ ( + jspb.Message.getWrapperField(this, proto.builder.SubassemblyStatus, 1)); +}; + + +/** + * @param {?proto.builder.SubassemblyStatus|undefined} value + * @return {!proto.builder.CreateSubassemblyResponse} returns this +*/ +proto.builder.CreateSubassemblyResponse.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.builder.CreateSubassemblyResponse} returns this + */ +proto.builder.CreateSubassemblyResponse.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.builder.CreateSubassemblyResponse.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.builder.GetSubassemblyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.builder.GetSubassemblyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.builder.GetSubassemblyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.GetSubassemblyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + ociReference: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.builder.GetSubassemblyRequest} + */ +proto.builder.GetSubassemblyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.builder.GetSubassemblyRequest; + return proto.builder.GetSubassemblyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.builder.GetSubassemblyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.builder.GetSubassemblyRequest} + */ +proto.builder.GetSubassemblyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOciReference(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.builder.GetSubassemblyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.builder.GetSubassemblyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.builder.GetSubassemblyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.GetSubassemblyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOciReference(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string oci_reference = 1; + * @return {string} + */ +proto.builder.GetSubassemblyRequest.prototype.getOciReference = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.builder.GetSubassemblyRequest} returns this + */ +proto.builder.GetSubassemblyRequest.prototype.setOciReference = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.builder.GetSubassemblyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.builder.GetSubassemblyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.builder.GetSubassemblyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.GetSubassemblyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: (f = msg.getStatus()) && proto.builder.SubassemblyStatus.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.builder.GetSubassemblyResponse} + */ +proto.builder.GetSubassemblyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.builder.GetSubassemblyResponse; + return proto.builder.GetSubassemblyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.builder.GetSubassemblyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.builder.GetSubassemblyResponse} + */ +proto.builder.GetSubassemblyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.builder.SubassemblyStatus; + reader.readMessage(value,proto.builder.SubassemblyStatus.deserializeBinaryFromReader); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.builder.GetSubassemblyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.builder.GetSubassemblyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.builder.GetSubassemblyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.GetSubassemblyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.builder.SubassemblyStatus.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SubassemblyStatus status = 1; + * @return {?proto.builder.SubassemblyStatus} + */ +proto.builder.GetSubassemblyResponse.prototype.getStatus = function() { + return /** @type{?proto.builder.SubassemblyStatus} */ ( + jspb.Message.getWrapperField(this, proto.builder.SubassemblyStatus, 1)); +}; + + +/** + * @param {?proto.builder.SubassemblyStatus|undefined} value + * @return {!proto.builder.GetSubassemblyResponse} returns this +*/ +proto.builder.GetSubassemblyResponse.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.builder.GetSubassemblyResponse} returns this + */ +proto.builder.GetSubassemblyResponse.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.builder.GetSubassemblyResponse.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.builder.SubassemblyStatus.prototype.toObject = function(opt_includeInstance) { + return proto.builder.SubassemblyStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.builder.SubassemblyStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.SubassemblyStatus.toObject = function(includeInstance, msg) { + var f, obj = { + phase: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + digest: jspb.Message.getFieldWithDefault(msg, 3, ""), + url: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.builder.SubassemblyStatus} + */ +proto.builder.SubassemblyStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.builder.SubassemblyStatus; + return proto.builder.SubassemblyStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.builder.SubassemblyStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.builder.SubassemblyStatus} + */ +proto.builder.SubassemblyStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.builder.SubassemblyPhase} */ (reader.readEnum()); + msg.setPhase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDigest(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.builder.SubassemblyStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.builder.SubassemblyStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.builder.SubassemblyStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.builder.SubassemblyStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPhase(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDigest(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional SubassemblyPhase phase = 1; + * @return {!proto.builder.SubassemblyPhase} + */ +proto.builder.SubassemblyStatus.prototype.getPhase = function() { + return /** @type {!proto.builder.SubassemblyPhase} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.builder.SubassemblyPhase} value + * @return {!proto.builder.SubassemblyStatus} returns this + */ +proto.builder.SubassemblyStatus.prototype.setPhase = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.builder.SubassemblyStatus.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.builder.SubassemblyStatus} returns this + */ +proto.builder.SubassemblyStatus.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string digest = 3; + * @return {string} + */ +proto.builder.SubassemblyStatus.prototype.getDigest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.builder.SubassemblyStatus} returns this + */ +proto.builder.SubassemblyStatus.prototype.setDigest = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string url = 4; + * @return {string} + */ +proto.builder.SubassemblyStatus.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.builder.SubassemblyStatus} returns this + */ +proto.builder.SubassemblyStatus.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.builder.SubassemblyPhase = { + SUBASSEMBLY_PHASE_UNSPECIFIED: 0, + SUBASSEMBLY_PHASE_CREATING: 1, + SUBASSEMBLY_PHASE_AVAILABLE: 2, + SUBASSEMBLY_PHASE_UNAVAILABLE: 3 +}; + +goog.object.extend(exports, proto.builder); diff --git a/components/ws-manager-api/go/config/config.go b/components/ws-manager-api/go/config/config.go index 470e272ff56b58..ded6eac1e5fbca 100644 --- a/components/ws-manager-api/go/config/config.go +++ b/components/ws-manager-api/go/config/config.go @@ -133,6 +133,8 @@ type Configuration struct { TimeoutMaxConcurrentReconciles int `json:"timeoutMaxConcurrentReconciles,omitempty"` // EnableCustomSSLCertificate controls if we need to support custom SSL certificates for git operations EnableCustomSSLCertificate bool `json:"enableCustomSSLCertificate"` + // WorkspacekitImage points to the default workspacekit image + WorkspacekitImage string `json:"workspacekitImage,omitempty"` } type WorkspaceClass struct {