diff --git a/components/dashboard/src/data/prebuilds/prebuild-queries.ts b/components/dashboard/src/data/prebuilds/prebuild-queries.ts index 5ae9a86e733ba0..db15106239e76e 100644 --- a/components/dashboard/src/data/prebuilds/prebuild-queries.ts +++ b/components/dashboard/src/data/prebuilds/prebuild-queries.ts @@ -5,11 +5,9 @@ */ import { useMutation, useQuery } from "@tanstack/react-query"; -import { configurationClient, prebuildClient, stream } from "../../service/public-api"; +import { prebuildClient, stream } from "../../service/public-api"; import { Prebuild, PrebuildPhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/prebuild_pb"; import { ApplicationError, ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error"; -import { PlainMessage, toPlainMessage } from "@bufbuild/protobuf"; -import { GetConfigurationWebhookActivityStatusResponse } from "@gitpod/public-api/lib/gitpod/v1/configuration_pb"; export function usePrebuildQuery(prebuildId: string) { return useQuery( @@ -77,18 +75,3 @@ export function useTriggerPrebuildMutation(configurationId?: string, gitRef?: st }, }); } - -export function useWebhookActivityStatusQuery(configurationId: string) { - return useQuery, Error>( - ["webhookActivityStatus", configurationId], - async () => { - const resp = await configurationClient.getConfigurationWebhookActivityStatus({ configurationId }); - return toPlainMessage(resp); - }, - { - retry: false, - staleTime: 1000 * 60, // 1 minute - cacheTime: 1000 * 60 * 15, // 15 minutes - }, - ); -} diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index 497d387796b776..5e138830d3adb2 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -1282,6 +1282,10 @@ export interface Repository { // The direct parent of this fork parent: Repository; }; + /** + * Optional date when the repository was last pushed to. + */ + pushedAt?: string; } export interface RepositoryInfo { diff --git a/components/public-api/gitpod/v1/configuration.proto b/components/public-api/gitpod/v1/configuration.proto index f64532291ebcb4..f1b05dca293503 100644 --- a/components/public-api/gitpod/v1/configuration.proto +++ b/components/public-api/gitpod/v1/configuration.proto @@ -69,9 +69,6 @@ service ConfigurationService { // Deletes a configuration. rpc DeleteConfiguration(DeleteConfigurationRequest) returns (DeleteConfigurationResponse) {} - - // GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - rpc GetConfigurationWebhookActivityStatus(GetConfigurationWebhookActivityStatusRequest) returns (GetConfigurationWebhookActivityStatusResponse) {} } message CreateConfigurationRequest { @@ -150,20 +147,3 @@ message DeleteConfigurationRequest { } message DeleteConfigurationResponse {} - -message GetConfigurationWebhookActivityStatusRequest { - string configuration_id = 1; -} - -message GetConfigurationWebhookActivityStatusResponse { - message WebhookEvent { - string commit = 1; - google.protobuf.Timestamp creation_time = 2; - } - - // is_webhook_active determines whether the webhook is active or not for the configuration. - bool is_webhook_active = 1; - - // latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true. - WebhookEvent latest_webhook_event = 2; -} diff --git a/components/public-api/go/v1/configuration.pb.go b/components/public-api/go/v1/configuration.pb.go index a7fbb3f0306aa4..f493a960cc4259 100644 --- a/components/public-api/go/v1/configuration.pb.go +++ b/components/public-api/go/v1/configuration.pb.go @@ -969,110 +969,6 @@ func (*DeleteConfigurationResponse) Descriptor() ([]byte, []int) { return file_gitpod_v1_configuration_proto_rawDescGZIP(), []int{13} } -type GetConfigurationWebhookActivityStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigurationId string `protobuf:"bytes,1,opt,name=configuration_id,json=configurationId,proto3" json:"configuration_id,omitempty"` -} - -func (x *GetConfigurationWebhookActivityStatusRequest) Reset() { - *x = GetConfigurationWebhookActivityStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_configuration_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigurationWebhookActivityStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationWebhookActivityStatusRequest) ProtoMessage() {} - -func (x *GetConfigurationWebhookActivityStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_configuration_proto_msgTypes[14] - 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 GetConfigurationWebhookActivityStatusRequest.ProtoReflect.Descriptor instead. -func (*GetConfigurationWebhookActivityStatusRequest) Descriptor() ([]byte, []int) { - return file_gitpod_v1_configuration_proto_rawDescGZIP(), []int{14} -} - -func (x *GetConfigurationWebhookActivityStatusRequest) GetConfigurationId() string { - if x != nil { - return x.ConfigurationId - } - return "" -} - -type GetConfigurationWebhookActivityStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // is_webhook_active determines whether the webhook is active or not for the configuration. - IsWebhookActive bool `protobuf:"varint,1,opt,name=is_webhook_active,json=isWebhookActive,proto3" json:"is_webhook_active,omitempty"` - // latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true. - LatestWebhookEvent *GetConfigurationWebhookActivityStatusResponse_WebhookEvent `protobuf:"bytes,2,opt,name=latest_webhook_event,json=latestWebhookEvent,proto3" json:"latest_webhook_event,omitempty"` -} - -func (x *GetConfigurationWebhookActivityStatusResponse) Reset() { - *x = GetConfigurationWebhookActivityStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_configuration_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigurationWebhookActivityStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationWebhookActivityStatusResponse) ProtoMessage() {} - -func (x *GetConfigurationWebhookActivityStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_configuration_proto_msgTypes[15] - 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 GetConfigurationWebhookActivityStatusResponse.ProtoReflect.Descriptor instead. -func (*GetConfigurationWebhookActivityStatusResponse) Descriptor() ([]byte, []int) { - return file_gitpod_v1_configuration_proto_rawDescGZIP(), []int{15} -} - -func (x *GetConfigurationWebhookActivityStatusResponse) GetIsWebhookActive() bool { - if x != nil { - return x.IsWebhookActive - } - return false -} - -func (x *GetConfigurationWebhookActivityStatusResponse) GetLatestWebhookEvent() *GetConfigurationWebhookActivityStatusResponse_WebhookEvent { - if x != nil { - return x.LatestWebhookEvent - } - return nil -} - type UpdateConfigurationRequest_PrebuildSettings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1090,7 +986,7 @@ type UpdateConfigurationRequest_PrebuildSettings struct { func (x *UpdateConfigurationRequest_PrebuildSettings) Reset() { *x = UpdateConfigurationRequest_PrebuildSettings{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_configuration_proto_msgTypes[16] + mi := &file_gitpod_v1_configuration_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +999,7 @@ func (x *UpdateConfigurationRequest_PrebuildSettings) String() string { func (*UpdateConfigurationRequest_PrebuildSettings) ProtoMessage() {} func (x *UpdateConfigurationRequest_PrebuildSettings) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_configuration_proto_msgTypes[16] + mi := &file_gitpod_v1_configuration_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1191,7 +1087,7 @@ type UpdateConfigurationRequest_WorkspaceSettings struct { func (x *UpdateConfigurationRequest_WorkspaceSettings) Reset() { *x = UpdateConfigurationRequest_WorkspaceSettings{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_configuration_proto_msgTypes[17] + mi := &file_gitpod_v1_configuration_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1204,7 +1100,7 @@ func (x *UpdateConfigurationRequest_WorkspaceSettings) String() string { func (*UpdateConfigurationRequest_WorkspaceSettings) ProtoMessage() {} func (x *UpdateConfigurationRequest_WorkspaceSettings) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_configuration_proto_msgTypes[17] + mi := &file_gitpod_v1_configuration_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1255,61 +1151,6 @@ func (x *UpdateConfigurationRequest_WorkspaceSettings) GetUpdateRestrictedEditor return false } -type GetConfigurationWebhookActivityStatusResponse_WebhookEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"` - CreationTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` -} - -func (x *GetConfigurationWebhookActivityStatusResponse_WebhookEvent) Reset() { - *x = GetConfigurationWebhookActivityStatusResponse_WebhookEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_configuration_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigurationWebhookActivityStatusResponse_WebhookEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationWebhookActivityStatusResponse_WebhookEvent) ProtoMessage() {} - -func (x *GetConfigurationWebhookActivityStatusResponse_WebhookEvent) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_configuration_proto_msgTypes[18] - 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 GetConfigurationWebhookActivityStatusResponse_WebhookEvent.ProtoReflect.Descriptor instead. -func (*GetConfigurationWebhookActivityStatusResponse_WebhookEvent) Descriptor() ([]byte, []int) { - return file_gitpod_v1_configuration_proto_rawDescGZIP(), []int{15, 0} -} - -func (x *GetConfigurationWebhookActivityStatusResponse_WebhookEvent) GetCommit() string { - if x != nil { - return x.Commit - } - return "" -} - -func (x *GetConfigurationWebhookActivityStatusResponse_WebhookEvent) GetCreationTime() *timestamppb.Timestamp { - if x != nil { - return x.CreationTime - } - return nil -} - var File_gitpod_v1_configuration_proto protoreflect.FileDescriptor var file_gitpod_v1_configuration_proto_rawDesc = []byte{ @@ -1534,101 +1375,66 @@ var file_gitpod_v1_configuration_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x0a, 0x2c, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0xbd, 0x02, 0x0a, 0x2d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, - 0x69, 0x73, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, - 0x77, 0x0a, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, - 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, - 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x67, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x68, - 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, - 0x65, 0x2a, 0x72, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x29, 0x0a, 0x25, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x72, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x54, 0x52, + 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, - 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x50, 0x52, 0x45, 0x42, 0x55, - 0x49, 0x4c, 0x44, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x45, 0x47, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, - 0x53, 0x45, 0x44, 0x10, 0x01, 0x2a, 0xc9, 0x01, 0x0a, 0x16, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x12, 0x28, 0x0a, 0x24, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, - 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x52, - 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, - 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, - 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x42, 0x52, 0x41, 0x4e, 0x43, + 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, + 0x54, 0x59, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x44, 0x10, 0x01, 0x2a, 0xc9, 0x01, 0x0a, 0x16, 0x42, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, + 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, + 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x2b, 0x0a, 0x27, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, + 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, + 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, + 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x52, 0x41, + 0x4e, 0x43, 0x48, 0x45, 0x53, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, - 0x45, 0x47, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x45, 0x53, - 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, - 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x4d, - 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x45, 0x53, 0x10, - 0x03, 0x32, 0xb1, 0x05, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x63, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, - 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, - 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, - 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x45, 0x47, 0x59, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x42, 0x52, 0x41, 0x4e, + 0x43, 0x48, 0x45, 0x53, 0x10, 0x03, 0x32, 0x92, 0x04, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x66, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9c, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x37, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, - 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x51, 0x0a, 0x16, 0x69, 0x6f, 0x2e, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x5a, - 0x37, 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, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x61, - 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, + 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, + 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x51, 0x0a, 0x16, 0x69, + 0x6f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x5a, 0x37, 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, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1644,36 +1450,33 @@ func file_gitpod_v1_configuration_proto_rawDescGZIP() []byte { } var file_gitpod_v1_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_gitpod_v1_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_gitpod_v1_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_gitpod_v1_configuration_proto_goTypes = []interface{}{ - (PrebuildTriggerStrategy)(0), // 0: gitpod.v1.PrebuildTriggerStrategy - (BranchMatchingStrategy)(0), // 1: gitpod.v1.BranchMatchingStrategy - (*Configuration)(nil), // 2: gitpod.v1.Configuration - (*PrebuildSettings)(nil), // 3: gitpod.v1.PrebuildSettings - (*PrebuildCloneSettings)(nil), // 4: gitpod.v1.PrebuildCloneSettings - (*WorkspaceSettings)(nil), // 5: gitpod.v1.WorkspaceSettings - (*CreateConfigurationRequest)(nil), // 6: gitpod.v1.CreateConfigurationRequest - (*CreateConfigurationResponse)(nil), // 7: gitpod.v1.CreateConfigurationResponse - (*GetConfigurationRequest)(nil), // 8: gitpod.v1.GetConfigurationRequest - (*GetConfigurationResponse)(nil), // 9: gitpod.v1.GetConfigurationResponse - (*ListConfigurationsRequest)(nil), // 10: gitpod.v1.ListConfigurationsRequest - (*ListConfigurationsResponse)(nil), // 11: gitpod.v1.ListConfigurationsResponse - (*UpdateConfigurationRequest)(nil), // 12: gitpod.v1.UpdateConfigurationRequest - (*UpdateConfigurationResponse)(nil), // 13: gitpod.v1.UpdateConfigurationResponse - (*DeleteConfigurationRequest)(nil), // 14: gitpod.v1.DeleteConfigurationRequest - (*DeleteConfigurationResponse)(nil), // 15: gitpod.v1.DeleteConfigurationResponse - (*GetConfigurationWebhookActivityStatusRequest)(nil), // 16: gitpod.v1.GetConfigurationWebhookActivityStatusRequest - (*GetConfigurationWebhookActivityStatusResponse)(nil), // 17: gitpod.v1.GetConfigurationWebhookActivityStatusResponse - (*UpdateConfigurationRequest_PrebuildSettings)(nil), // 18: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings - (*UpdateConfigurationRequest_WorkspaceSettings)(nil), // 19: gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings - (*GetConfigurationWebhookActivityStatusResponse_WebhookEvent)(nil), // 20: gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp - (*PaginationRequest)(nil), // 22: gitpod.v1.PaginationRequest - (*Sort)(nil), // 23: gitpod.v1.Sort - (*PaginationResponse)(nil), // 24: gitpod.v1.PaginationResponse + (PrebuildTriggerStrategy)(0), // 0: gitpod.v1.PrebuildTriggerStrategy + (BranchMatchingStrategy)(0), // 1: gitpod.v1.BranchMatchingStrategy + (*Configuration)(nil), // 2: gitpod.v1.Configuration + (*PrebuildSettings)(nil), // 3: gitpod.v1.PrebuildSettings + (*PrebuildCloneSettings)(nil), // 4: gitpod.v1.PrebuildCloneSettings + (*WorkspaceSettings)(nil), // 5: gitpod.v1.WorkspaceSettings + (*CreateConfigurationRequest)(nil), // 6: gitpod.v1.CreateConfigurationRequest + (*CreateConfigurationResponse)(nil), // 7: gitpod.v1.CreateConfigurationResponse + (*GetConfigurationRequest)(nil), // 8: gitpod.v1.GetConfigurationRequest + (*GetConfigurationResponse)(nil), // 9: gitpod.v1.GetConfigurationResponse + (*ListConfigurationsRequest)(nil), // 10: gitpod.v1.ListConfigurationsRequest + (*ListConfigurationsResponse)(nil), // 11: gitpod.v1.ListConfigurationsResponse + (*UpdateConfigurationRequest)(nil), // 12: gitpod.v1.UpdateConfigurationRequest + (*UpdateConfigurationResponse)(nil), // 13: gitpod.v1.UpdateConfigurationResponse + (*DeleteConfigurationRequest)(nil), // 14: gitpod.v1.DeleteConfigurationRequest + (*DeleteConfigurationResponse)(nil), // 15: gitpod.v1.DeleteConfigurationResponse + (*UpdateConfigurationRequest_PrebuildSettings)(nil), // 16: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings + (*UpdateConfigurationRequest_WorkspaceSettings)(nil), // 17: gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*PaginationRequest)(nil), // 19: gitpod.v1.PaginationRequest + (*Sort)(nil), // 20: gitpod.v1.Sort + (*PaginationResponse)(nil), // 21: gitpod.v1.PaginationResponse } var file_gitpod_v1_configuration_proto_depIdxs = []int32{ - 21, // 0: gitpod.v1.Configuration.creation_time:type_name -> google.protobuf.Timestamp + 18, // 0: gitpod.v1.Configuration.creation_time:type_name -> google.protobuf.Timestamp 3, // 1: gitpod.v1.Configuration.prebuild_settings:type_name -> gitpod.v1.PrebuildSettings 5, // 2: gitpod.v1.Configuration.workspace_settings:type_name -> gitpod.v1.WorkspaceSettings 1, // 3: gitpod.v1.PrebuildSettings.branch_strategy:type_name -> gitpod.v1.BranchMatchingStrategy @@ -1681,35 +1484,31 @@ var file_gitpod_v1_configuration_proto_depIdxs = []int32{ 4, // 5: gitpod.v1.PrebuildSettings.clone_settings:type_name -> gitpod.v1.PrebuildCloneSettings 2, // 6: gitpod.v1.CreateConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration 2, // 7: gitpod.v1.GetConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration - 22, // 8: gitpod.v1.ListConfigurationsRequest.pagination:type_name -> gitpod.v1.PaginationRequest - 23, // 9: gitpod.v1.ListConfigurationsRequest.sort:type_name -> gitpod.v1.Sort + 19, // 8: gitpod.v1.ListConfigurationsRequest.pagination:type_name -> gitpod.v1.PaginationRequest + 20, // 9: gitpod.v1.ListConfigurationsRequest.sort:type_name -> gitpod.v1.Sort 2, // 10: gitpod.v1.ListConfigurationsResponse.configurations:type_name -> gitpod.v1.Configuration - 24, // 11: gitpod.v1.ListConfigurationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse - 18, // 12: gitpod.v1.UpdateConfigurationRequest.prebuild_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.PrebuildSettings - 19, // 13: gitpod.v1.UpdateConfigurationRequest.workspace_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings + 21, // 11: gitpod.v1.ListConfigurationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse + 16, // 12: gitpod.v1.UpdateConfigurationRequest.prebuild_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.PrebuildSettings + 17, // 13: gitpod.v1.UpdateConfigurationRequest.workspace_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings 2, // 14: gitpod.v1.UpdateConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration - 20, // 15: gitpod.v1.GetConfigurationWebhookActivityStatusResponse.latest_webhook_event:type_name -> gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent - 1, // 16: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.branch_strategy:type_name -> gitpod.v1.BranchMatchingStrategy - 0, // 17: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.trigger_strategy:type_name -> gitpod.v1.PrebuildTriggerStrategy - 4, // 18: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.clone_settings:type_name -> gitpod.v1.PrebuildCloneSettings - 21, // 19: gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.creation_time:type_name -> google.protobuf.Timestamp - 6, // 20: gitpod.v1.ConfigurationService.CreateConfiguration:input_type -> gitpod.v1.CreateConfigurationRequest - 8, // 21: gitpod.v1.ConfigurationService.GetConfiguration:input_type -> gitpod.v1.GetConfigurationRequest - 10, // 22: gitpod.v1.ConfigurationService.ListConfigurations:input_type -> gitpod.v1.ListConfigurationsRequest - 12, // 23: gitpod.v1.ConfigurationService.UpdateConfiguration:input_type -> gitpod.v1.UpdateConfigurationRequest - 14, // 24: gitpod.v1.ConfigurationService.DeleteConfiguration:input_type -> gitpod.v1.DeleteConfigurationRequest - 16, // 25: gitpod.v1.ConfigurationService.GetConfigurationWebhookActivityStatus:input_type -> gitpod.v1.GetConfigurationWebhookActivityStatusRequest - 7, // 26: gitpod.v1.ConfigurationService.CreateConfiguration:output_type -> gitpod.v1.CreateConfigurationResponse - 9, // 27: gitpod.v1.ConfigurationService.GetConfiguration:output_type -> gitpod.v1.GetConfigurationResponse - 11, // 28: gitpod.v1.ConfigurationService.ListConfigurations:output_type -> gitpod.v1.ListConfigurationsResponse - 13, // 29: gitpod.v1.ConfigurationService.UpdateConfiguration:output_type -> gitpod.v1.UpdateConfigurationResponse - 15, // 30: gitpod.v1.ConfigurationService.DeleteConfiguration:output_type -> gitpod.v1.DeleteConfigurationResponse - 17, // 31: gitpod.v1.ConfigurationService.GetConfigurationWebhookActivityStatus:output_type -> gitpod.v1.GetConfigurationWebhookActivityStatusResponse - 26, // [26:32] is the sub-list for method output_type - 20, // [20:26] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 1, // 15: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.branch_strategy:type_name -> gitpod.v1.BranchMatchingStrategy + 0, // 16: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.trigger_strategy:type_name -> gitpod.v1.PrebuildTriggerStrategy + 4, // 17: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.clone_settings:type_name -> gitpod.v1.PrebuildCloneSettings + 6, // 18: gitpod.v1.ConfigurationService.CreateConfiguration:input_type -> gitpod.v1.CreateConfigurationRequest + 8, // 19: gitpod.v1.ConfigurationService.GetConfiguration:input_type -> gitpod.v1.GetConfigurationRequest + 10, // 20: gitpod.v1.ConfigurationService.ListConfigurations:input_type -> gitpod.v1.ListConfigurationsRequest + 12, // 21: gitpod.v1.ConfigurationService.UpdateConfiguration:input_type -> gitpod.v1.UpdateConfigurationRequest + 14, // 22: gitpod.v1.ConfigurationService.DeleteConfiguration:input_type -> gitpod.v1.DeleteConfigurationRequest + 7, // 23: gitpod.v1.ConfigurationService.CreateConfiguration:output_type -> gitpod.v1.CreateConfigurationResponse + 9, // 24: gitpod.v1.ConfigurationService.GetConfiguration:output_type -> gitpod.v1.GetConfigurationResponse + 11, // 25: gitpod.v1.ConfigurationService.ListConfigurations:output_type -> gitpod.v1.ListConfigurationsResponse + 13, // 26: gitpod.v1.ConfigurationService.UpdateConfiguration:output_type -> gitpod.v1.UpdateConfigurationResponse + 15, // 27: gitpod.v1.ConfigurationService.DeleteConfiguration:output_type -> gitpod.v1.DeleteConfigurationResponse + 23, // [23:28] is the sub-list for method output_type + 18, // [18:23] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_gitpod_v1_configuration_proto_init() } @@ -1889,30 +1688,6 @@ func file_gitpod_v1_configuration_proto_init() { } } file_gitpod_v1_configuration_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigurationWebhookActivityStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gitpod_v1_configuration_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigurationWebhookActivityStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gitpod_v1_configuration_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateConfigurationRequest_PrebuildSettings); i { case 0: return &v.state @@ -1924,7 +1699,7 @@ func file_gitpod_v1_configuration_proto_init() { return nil } } - file_gitpod_v1_configuration_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_gitpod_v1_configuration_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateConfigurationRequest_WorkspaceSettings); i { case 0: return &v.state @@ -1936,30 +1711,18 @@ func file_gitpod_v1_configuration_proto_init() { return nil } } - file_gitpod_v1_configuration_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigurationWebhookActivityStatusResponse_WebhookEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_gitpod_v1_configuration_proto_msgTypes[8].OneofWrappers = []interface{}{} file_gitpod_v1_configuration_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_gitpod_v1_configuration_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_gitpod_v1_configuration_proto_msgTypes[17].OneofWrappers = []interface{}{} + file_gitpod_v1_configuration_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_gitpod_v1_configuration_proto_msgTypes[15].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gitpod_v1_configuration_proto_rawDesc, NumEnums: 2, - NumMessages: 19, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/components/public-api/go/v1/configuration_grpc.pb.go b/components/public-api/go/v1/configuration_grpc.pb.go index e1092b3cd68919..326bfb50d83776 100644 --- a/components/public-api/go/v1/configuration_grpc.pb.go +++ b/components/public-api/go/v1/configuration_grpc.pb.go @@ -36,8 +36,6 @@ type ConfigurationServiceClient interface { UpdateConfiguration(ctx context.Context, in *UpdateConfigurationRequest, opts ...grpc.CallOption) (*UpdateConfigurationResponse, error) // Deletes a configuration. DeleteConfiguration(ctx context.Context, in *DeleteConfigurationRequest, opts ...grpc.CallOption) (*DeleteConfigurationResponse, error) - // GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - GetConfigurationWebhookActivityStatus(ctx context.Context, in *GetConfigurationWebhookActivityStatusRequest, opts ...grpc.CallOption) (*GetConfigurationWebhookActivityStatusResponse, error) } type configurationServiceClient struct { @@ -93,15 +91,6 @@ func (c *configurationServiceClient) DeleteConfiguration(ctx context.Context, in return out, nil } -func (c *configurationServiceClient) GetConfigurationWebhookActivityStatus(ctx context.Context, in *GetConfigurationWebhookActivityStatusRequest, opts ...grpc.CallOption) (*GetConfigurationWebhookActivityStatusResponse, error) { - out := new(GetConfigurationWebhookActivityStatusResponse) - err := c.cc.Invoke(ctx, "/gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // ConfigurationServiceServer is the server API for ConfigurationService service. // All implementations must embed UnimplementedConfigurationServiceServer // for forward compatibility @@ -116,8 +105,6 @@ type ConfigurationServiceServer interface { UpdateConfiguration(context.Context, *UpdateConfigurationRequest) (*UpdateConfigurationResponse, error) // Deletes a configuration. DeleteConfiguration(context.Context, *DeleteConfigurationRequest) (*DeleteConfigurationResponse, error) - // GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - GetConfigurationWebhookActivityStatus(context.Context, *GetConfigurationWebhookActivityStatusRequest) (*GetConfigurationWebhookActivityStatusResponse, error) mustEmbedUnimplementedConfigurationServiceServer() } @@ -140,9 +127,6 @@ func (UnimplementedConfigurationServiceServer) UpdateConfiguration(context.Conte func (UnimplementedConfigurationServiceServer) DeleteConfiguration(context.Context, *DeleteConfigurationRequest) (*DeleteConfigurationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteConfiguration not implemented") } -func (UnimplementedConfigurationServiceServer) GetConfigurationWebhookActivityStatus(context.Context, *GetConfigurationWebhookActivityStatusRequest) (*GetConfigurationWebhookActivityStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfigurationWebhookActivityStatus not implemented") -} func (UnimplementedConfigurationServiceServer) mustEmbedUnimplementedConfigurationServiceServer() {} // UnsafeConfigurationServiceServer may be embedded to opt out of forward compatibility for this service. @@ -246,24 +230,6 @@ func _ConfigurationService_DeleteConfiguration_Handler(srv interface{}, ctx cont return interceptor(ctx, in, info, handler) } -func _ConfigurationService_GetConfigurationWebhookActivityStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigurationWebhookActivityStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigurationServiceServer).GetConfigurationWebhookActivityStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigurationServiceServer).GetConfigurationWebhookActivityStatus(ctx, req.(*GetConfigurationWebhookActivityStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - // ConfigurationService_ServiceDesc is the grpc.ServiceDesc for ConfigurationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -291,10 +257,6 @@ var ConfigurationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteConfiguration", Handler: _ConfigurationService_DeleteConfiguration_Handler, }, - { - MethodName: "GetConfigurationWebhookActivityStatus", - Handler: _ConfigurationService_GetConfigurationWebhookActivityStatus_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "gitpod/v1/configuration.proto", diff --git a/components/public-api/go/v1/v1connect/configuration.connect.go b/components/public-api/go/v1/v1connect/configuration.connect.go index cbf793bcc9f50f..260e8863c3a0e6 100644 --- a/components/public-api/go/v1/v1connect/configuration.connect.go +++ b/components/public-api/go/v1/v1connect/configuration.connect.go @@ -41,8 +41,6 @@ type ConfigurationServiceClient interface { UpdateConfiguration(context.Context, *connect_go.Request[v1.UpdateConfigurationRequest]) (*connect_go.Response[v1.UpdateConfigurationResponse], error) // Deletes a configuration. DeleteConfiguration(context.Context, *connect_go.Request[v1.DeleteConfigurationRequest]) (*connect_go.Response[v1.DeleteConfigurationResponse], error) - // GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - GetConfigurationWebhookActivityStatus(context.Context, *connect_go.Request[v1.GetConfigurationWebhookActivityStatusRequest]) (*connect_go.Response[v1.GetConfigurationWebhookActivityStatusResponse], error) } // NewConfigurationServiceClient constructs a client for the gitpod.v1.ConfigurationService service. @@ -80,22 +78,16 @@ func NewConfigurationServiceClient(httpClient connect_go.HTTPClient, baseURL str baseURL+"/gitpod.v1.ConfigurationService/DeleteConfiguration", opts..., ), - getConfigurationWebhookActivityStatus: connect_go.NewClient[v1.GetConfigurationWebhookActivityStatusRequest, v1.GetConfigurationWebhookActivityStatusResponse]( - httpClient, - baseURL+"/gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", - opts..., - ), } } // configurationServiceClient implements ConfigurationServiceClient. type configurationServiceClient struct { - createConfiguration *connect_go.Client[v1.CreateConfigurationRequest, v1.CreateConfigurationResponse] - getConfiguration *connect_go.Client[v1.GetConfigurationRequest, v1.GetConfigurationResponse] - listConfigurations *connect_go.Client[v1.ListConfigurationsRequest, v1.ListConfigurationsResponse] - updateConfiguration *connect_go.Client[v1.UpdateConfigurationRequest, v1.UpdateConfigurationResponse] - deleteConfiguration *connect_go.Client[v1.DeleteConfigurationRequest, v1.DeleteConfigurationResponse] - getConfigurationWebhookActivityStatus *connect_go.Client[v1.GetConfigurationWebhookActivityStatusRequest, v1.GetConfigurationWebhookActivityStatusResponse] + createConfiguration *connect_go.Client[v1.CreateConfigurationRequest, v1.CreateConfigurationResponse] + getConfiguration *connect_go.Client[v1.GetConfigurationRequest, v1.GetConfigurationResponse] + listConfigurations *connect_go.Client[v1.ListConfigurationsRequest, v1.ListConfigurationsResponse] + updateConfiguration *connect_go.Client[v1.UpdateConfigurationRequest, v1.UpdateConfigurationResponse] + deleteConfiguration *connect_go.Client[v1.DeleteConfigurationRequest, v1.DeleteConfigurationResponse] } // CreateConfiguration calls gitpod.v1.ConfigurationService.CreateConfiguration. @@ -123,12 +115,6 @@ func (c *configurationServiceClient) DeleteConfiguration(ctx context.Context, re return c.deleteConfiguration.CallUnary(ctx, req) } -// GetConfigurationWebhookActivityStatus calls -// gitpod.v1.ConfigurationService.GetConfigurationWebhookActivityStatus. -func (c *configurationServiceClient) GetConfigurationWebhookActivityStatus(ctx context.Context, req *connect_go.Request[v1.GetConfigurationWebhookActivityStatusRequest]) (*connect_go.Response[v1.GetConfigurationWebhookActivityStatusResponse], error) { - return c.getConfigurationWebhookActivityStatus.CallUnary(ctx, req) -} - // ConfigurationServiceHandler is an implementation of the gitpod.v1.ConfigurationService service. type ConfigurationServiceHandler interface { // Creates a new configuration. @@ -141,8 +127,6 @@ type ConfigurationServiceHandler interface { UpdateConfiguration(context.Context, *connect_go.Request[v1.UpdateConfigurationRequest]) (*connect_go.Response[v1.UpdateConfigurationResponse], error) // Deletes a configuration. DeleteConfiguration(context.Context, *connect_go.Request[v1.DeleteConfigurationRequest]) (*connect_go.Response[v1.DeleteConfigurationResponse], error) - // GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - GetConfigurationWebhookActivityStatus(context.Context, *connect_go.Request[v1.GetConfigurationWebhookActivityStatusRequest]) (*connect_go.Response[v1.GetConfigurationWebhookActivityStatusResponse], error) } // NewConfigurationServiceHandler builds an HTTP handler from the service implementation. It returns @@ -177,11 +161,6 @@ func NewConfigurationServiceHandler(svc ConfigurationServiceHandler, opts ...con svc.DeleteConfiguration, opts..., )) - mux.Handle("/gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", connect_go.NewUnaryHandler( - "/gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", - svc.GetConfigurationWebhookActivityStatus, - opts..., - )) return "/gitpod.v1.ConfigurationService/", mux } @@ -207,7 +186,3 @@ func (UnimplementedConfigurationServiceHandler) UpdateConfiguration(context.Cont func (UnimplementedConfigurationServiceHandler) DeleteConfiguration(context.Context, *connect_go.Request[v1.DeleteConfigurationRequest]) (*connect_go.Response[v1.DeleteConfigurationResponse], error) { return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.ConfigurationService.DeleteConfiguration is not implemented")) } - -func (UnimplementedConfigurationServiceHandler) GetConfigurationWebhookActivityStatus(context.Context, *connect_go.Request[v1.GetConfigurationWebhookActivityStatusRequest]) (*connect_go.Response[v1.GetConfigurationWebhookActivityStatusResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.ConfigurationService.GetConfigurationWebhookActivityStatus is not implemented")) -} diff --git a/components/public-api/go/v1/v1connect/configuration.proxy.connect.go b/components/public-api/go/v1/v1connect/configuration.proxy.connect.go index 48934ab762575a..2c6fcf4c900cb0 100644 --- a/components/public-api/go/v1/v1connect/configuration.proxy.connect.go +++ b/components/public-api/go/v1/v1connect/configuration.proxy.connect.go @@ -68,13 +68,3 @@ func (s *ProxyConfigurationServiceHandler) DeleteConfiguration(ctx context.Conte return connect_go.NewResponse(resp), nil } - -func (s *ProxyConfigurationServiceHandler) GetConfigurationWebhookActivityStatus(ctx context.Context, req *connect_go.Request[v1.GetConfigurationWebhookActivityStatusRequest]) (*connect_go.Response[v1.GetConfigurationWebhookActivityStatusResponse], error) { - resp, err := s.Client.GetConfigurationWebhookActivityStatus(ctx, req.Msg) - if err != nil { - // TODO(milan): Convert to correct status code - return nil, err - } - - return connect_go.NewResponse(resp), nil -} diff --git a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationOuterClass.java b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationOuterClass.java index 2379ead0201cdd..dd8de146ceb866 100644 --- a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationOuterClass.java +++ b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationOuterClass.java @@ -14706,1957 +14706,6 @@ public io.gitpod.publicapi.v1.ConfigurationOuterClass.DeleteConfigurationRespons } - public interface GetConfigurationWebhookActivityStatusRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:gitpod.v1.GetConfigurationWebhookActivityStatusRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The configurationId. - */ - java.lang.String getConfigurationId(); - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The bytes for configurationId. - */ - com.google.protobuf.ByteString - getConfigurationIdBytes(); - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusRequest} - */ - public static final class GetConfigurationWebhookActivityStatusRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:gitpod.v1.GetConfigurationWebhookActivityStatusRequest) - GetConfigurationWebhookActivityStatusRequestOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 27, - /* patch= */ 2, - /* suffix= */ "", - GetConfigurationWebhookActivityStatusRequest.class.getName()); - } - // Use GetConfigurationWebhookActivityStatusRequest.newBuilder() to construct. - private GetConfigurationWebhookActivityStatusRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GetConfigurationWebhookActivityStatusRequest() { - configurationId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.Builder.class); - } - - public static final int CONFIGURATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object configurationId_ = ""; - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The configurationId. - */ - @java.lang.Override - public java.lang.String getConfigurationId() { - java.lang.Object ref = configurationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configurationId_ = s; - return s; - } - } - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The bytes for configurationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConfigurationIdBytes() { - java.lang.Object ref = configurationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - configurationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(configurationId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, configurationId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(configurationId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, configurationId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest)) { - return super.equals(obj); - } - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest other = (io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest) obj; - - if (!getConfigurationId() - .equals(other.getConfigurationId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONFIGURATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConfigurationId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:gitpod.v1.GetConfigurationWebhookActivityStatusRequest) - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.Builder.class); - } - - // Construct using io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - configurationId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest getDefaultInstanceForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest build() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest buildPartial() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest result = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.configurationId_ = configurationId_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest) { - return mergeFrom((io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest other) { - if (other == io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest.getDefaultInstance()) return this; - if (!other.getConfigurationId().isEmpty()) { - configurationId_ = other.configurationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - configurationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object configurationId_ = ""; - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The configurationId. - */ - public java.lang.String getConfigurationId() { - java.lang.Object ref = configurationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configurationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return The bytes for configurationId. - */ - public com.google.protobuf.ByteString - getConfigurationIdBytes() { - java.lang.Object ref = configurationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - configurationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @param value The configurationId to set. - * @return This builder for chaining. - */ - public Builder setConfigurationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - configurationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @return This builder for chaining. - */ - public Builder clearConfigurationId() { - configurationId_ = getDefaultInstance().getConfigurationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string configuration_id = 1 [json_name = "configurationId"]; - * @param value The bytes for configurationId to set. - * @return This builder for chaining. - */ - public Builder setConfigurationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - configurationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:gitpod.v1.GetConfigurationWebhookActivityStatusRequest) - } - - // @@protoc_insertion_point(class_scope:gitpod.v1.GetConfigurationWebhookActivityStatusRequest) - private static final io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest(); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetConfigurationWebhookActivityStatusRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetConfigurationWebhookActivityStatusResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:gitpod.v1.GetConfigurationWebhookActivityStatusResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * is_webhook_active determines whether the webhook is active or not for the configuration.
-     * 
- * - * bool is_webhook_active = 1 [json_name = "isWebhookActive"]; - * @return The isWebhookActive. - */ - boolean getIsWebhookActive(); - - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return Whether the latestWebhookEvent field is set. - */ - boolean hasLatestWebhookEvent(); - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return The latestWebhookEvent. - */ - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getLatestWebhookEvent(); - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder getLatestWebhookEventOrBuilder(); - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusResponse} - */ - public static final class GetConfigurationWebhookActivityStatusResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:gitpod.v1.GetConfigurationWebhookActivityStatusResponse) - GetConfigurationWebhookActivityStatusResponseOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 27, - /* patch= */ 2, - /* suffix= */ "", - GetConfigurationWebhookActivityStatusResponse.class.getName()); - } - // Use GetConfigurationWebhookActivityStatusResponse.newBuilder() to construct. - private GetConfigurationWebhookActivityStatusResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GetConfigurationWebhookActivityStatusResponse() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.Builder.class); - } - - public interface WebhookEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) - com.google.protobuf.MessageOrBuilder { - - /** - * string commit = 1 [json_name = "commit"]; - * @return The commit. - */ - java.lang.String getCommit(); - /** - * string commit = 1 [json_name = "commit"]; - * @return The bytes for commit. - */ - com.google.protobuf.ByteString - getCommitBytes(); - - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return Whether the creationTime field is set. - */ - boolean hasCreationTime(); - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return The creationTime. - */ - com.google.protobuf.Timestamp getCreationTime(); - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder(); - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent} - */ - public static final class WebhookEvent extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) - WebhookEventOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 27, - /* patch= */ 2, - /* suffix= */ "", - WebhookEvent.class.getName()); - } - // Use WebhookEvent.newBuilder() to construct. - private WebhookEvent(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WebhookEvent() { - commit_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder.class); - } - - private int bitField0_; - public static final int COMMIT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object commit_ = ""; - /** - * string commit = 1 [json_name = "commit"]; - * @return The commit. - */ - @java.lang.Override - public java.lang.String getCommit() { - java.lang.Object ref = commit_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - commit_ = s; - return s; - } - } - /** - * string commit = 1 [json_name = "commit"]; - * @return The bytes for commit. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCommitBytes() { - java.lang.Object ref = commit_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - commit_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATION_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp creationTime_; - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return Whether the creationTime field is set. - */ - @java.lang.Override - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return The creationTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreationTime() { - return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { - return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(commit_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, commit_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getCreationTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(commit_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, commit_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCreationTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent)) { - return super.equals(obj); - } - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent other = (io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) obj; - - if (!getCommit() - .equals(other.getCommit())) return false; - if (hasCreationTime() != other.hasCreationTime()) return false; - if (hasCreationTime()) { - if (!getCreationTime() - .equals(other.getCreationTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COMMIT_FIELD_NUMBER; - hash = (53 * hash) + getCommit().hashCode(); - if (hasCreationTime()) { - hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreationTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder.class); - } - - // Construct using io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getCreationTimeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - commit_ = ""; - creationTime_ = null; - if (creationTimeBuilder_ != null) { - creationTimeBuilder_.dispose(); - creationTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getDefaultInstanceForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance(); - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent build() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent buildPartial() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent result = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.commit_ = commit_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.creationTime_ = creationTimeBuilder_ == null - ? creationTime_ - : creationTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) { - return mergeFrom((io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent other) { - if (other == io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance()) return this; - if (!other.getCommit().isEmpty()) { - commit_ = other.commit_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreationTime()) { - mergeCreationTime(other.getCreationTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - commit_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getCreationTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object commit_ = ""; - /** - * string commit = 1 [json_name = "commit"]; - * @return The commit. - */ - public java.lang.String getCommit() { - java.lang.Object ref = commit_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - commit_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string commit = 1 [json_name = "commit"]; - * @return The bytes for commit. - */ - public com.google.protobuf.ByteString - getCommitBytes() { - java.lang.Object ref = commit_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - commit_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string commit = 1 [json_name = "commit"]; - * @param value The commit to set. - * @return This builder for chaining. - */ - public Builder setCommit( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - commit_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string commit = 1 [json_name = "commit"]; - * @return This builder for chaining. - */ - public Builder clearCommit() { - commit_ = getDefaultInstance().getCommit(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string commit = 1 [json_name = "commit"]; - * @param value The bytes for commit to set. - * @return This builder for chaining. - */ - public Builder setCommitBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - commit_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp creationTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> creationTimeBuilder_; - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return Whether the creationTime field is set. - */ - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - * @return The creationTime. - */ - public com.google.protobuf.Timestamp getCreationTime() { - if (creationTimeBuilder_ == null) { - return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; - } else { - return creationTimeBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public Builder setCreationTime(com.google.protobuf.Timestamp value) { - if (creationTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - creationTime_ = value; - } else { - creationTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public Builder setCreationTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (creationTimeBuilder_ == null) { - creationTime_ = builderForValue.build(); - } else { - creationTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { - if (creationTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - creationTime_ != null && - creationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreationTimeBuilder().mergeFrom(value); - } else { - creationTime_ = value; - } - } else { - creationTimeBuilder_.mergeFrom(value); - } - if (creationTime_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public Builder clearCreationTime() { - bitField0_ = (bitField0_ & ~0x00000002); - creationTime_ = null; - if (creationTimeBuilder_ != null) { - creationTimeBuilder_.dispose(); - creationTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreationTimeFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { - if (creationTimeBuilder_ != null) { - return creationTimeBuilder_.getMessageOrBuilder(); - } else { - return creationTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; - } - } - /** - * .google.protobuf.Timestamp creation_time = 2 [json_name = "creationTime"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreationTimeFieldBuilder() { - if (creationTimeBuilder_ == null) { - creationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreationTime(), - getParentForChildren(), - isClean()); - creationTime_ = null; - } - return creationTimeBuilder_; - } - - // @@protoc_insertion_point(builder_scope:gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) - } - - // @@protoc_insertion_point(class_scope:gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent) - private static final io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent(); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebhookEvent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int IS_WEBHOOK_ACTIVE_FIELD_NUMBER = 1; - private boolean isWebhookActive_ = false; - /** - *
-     * is_webhook_active determines whether the webhook is active or not for the configuration.
-     * 
- * - * bool is_webhook_active = 1 [json_name = "isWebhookActive"]; - * @return The isWebhookActive. - */ - @java.lang.Override - public boolean getIsWebhookActive() { - return isWebhookActive_; - } - - public static final int LATEST_WEBHOOK_EVENT_FIELD_NUMBER = 2; - private io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latestWebhookEvent_; - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return Whether the latestWebhookEvent field is set. - */ - @java.lang.Override - public boolean hasLatestWebhookEvent() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return The latestWebhookEvent. - */ - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getLatestWebhookEvent() { - return latestWebhookEvent_ == null ? io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance() : latestWebhookEvent_; - } - /** - *
-     * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-     * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder getLatestWebhookEventOrBuilder() { - return latestWebhookEvent_ == null ? io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance() : latestWebhookEvent_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (isWebhookActive_ != false) { - output.writeBool(1, isWebhookActive_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getLatestWebhookEvent()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (isWebhookActive_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isWebhookActive_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLatestWebhookEvent()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse)) { - return super.equals(obj); - } - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse other = (io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse) obj; - - if (getIsWebhookActive() - != other.getIsWebhookActive()) return false; - if (hasLatestWebhookEvent() != other.hasLatestWebhookEvent()) return false; - if (hasLatestWebhookEvent()) { - if (!getLatestWebhookEvent() - .equals(other.getLatestWebhookEvent())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + IS_WEBHOOK_ACTIVE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsWebhookActive()); - if (hasLatestWebhookEvent()) { - hash = (37 * hash) + LATEST_WEBHOOK_EVENT_FIELD_NUMBER; - hash = (53 * hash) + getLatestWebhookEvent().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code gitpod.v1.GetConfigurationWebhookActivityStatusResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:gitpod.v1.GetConfigurationWebhookActivityStatusResponse) - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.class, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.Builder.class); - } - - // Construct using io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getLatestWebhookEventFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - isWebhookActive_ = false; - latestWebhookEvent_ = null; - if (latestWebhookEventBuilder_ != null) { - latestWebhookEventBuilder_.dispose(); - latestWebhookEventBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse getDefaultInstanceForType() { - return io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse build() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse buildPartial() { - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse result = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.isWebhookActive_ = isWebhookActive_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.latestWebhookEvent_ = latestWebhookEventBuilder_ == null - ? latestWebhookEvent_ - : latestWebhookEventBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse) { - return mergeFrom((io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse other) { - if (other == io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.getDefaultInstance()) return this; - if (other.getIsWebhookActive() != false) { - setIsWebhookActive(other.getIsWebhookActive()); - } - if (other.hasLatestWebhookEvent()) { - mergeLatestWebhookEvent(other.getLatestWebhookEvent()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - isWebhookActive_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - input.readMessage( - getLatestWebhookEventFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean isWebhookActive_ ; - /** - *
-       * is_webhook_active determines whether the webhook is active or not for the configuration.
-       * 
- * - * bool is_webhook_active = 1 [json_name = "isWebhookActive"]; - * @return The isWebhookActive. - */ - @java.lang.Override - public boolean getIsWebhookActive() { - return isWebhookActive_; - } - /** - *
-       * is_webhook_active determines whether the webhook is active or not for the configuration.
-       * 
- * - * bool is_webhook_active = 1 [json_name = "isWebhookActive"]; - * @param value The isWebhookActive to set. - * @return This builder for chaining. - */ - public Builder setIsWebhookActive(boolean value) { - - isWebhookActive_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * is_webhook_active determines whether the webhook is active or not for the configuration.
-       * 
- * - * bool is_webhook_active = 1 [json_name = "isWebhookActive"]; - * @return This builder for chaining. - */ - public Builder clearIsWebhookActive() { - bitField0_ = (bitField0_ & ~0x00000001); - isWebhookActive_ = false; - onChanged(); - return this; - } - - private io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latestWebhookEvent_; - private com.google.protobuf.SingleFieldBuilder< - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder> latestWebhookEventBuilder_; - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return Whether the latestWebhookEvent field is set. - */ - public boolean hasLatestWebhookEvent() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - * @return The latestWebhookEvent. - */ - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent getLatestWebhookEvent() { - if (latestWebhookEventBuilder_ == null) { - return latestWebhookEvent_ == null ? io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance() : latestWebhookEvent_; - } else { - return latestWebhookEventBuilder_.getMessage(); - } - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public Builder setLatestWebhookEvent(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent value) { - if (latestWebhookEventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latestWebhookEvent_ = value; - } else { - latestWebhookEventBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public Builder setLatestWebhookEvent( - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder builderForValue) { - if (latestWebhookEventBuilder_ == null) { - latestWebhookEvent_ = builderForValue.build(); - } else { - latestWebhookEventBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public Builder mergeLatestWebhookEvent(io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent value) { - if (latestWebhookEventBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - latestWebhookEvent_ != null && - latestWebhookEvent_ != io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance()) { - getLatestWebhookEventBuilder().mergeFrom(value); - } else { - latestWebhookEvent_ = value; - } - } else { - latestWebhookEventBuilder_.mergeFrom(value); - } - if (latestWebhookEvent_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public Builder clearLatestWebhookEvent() { - bitField0_ = (bitField0_ & ~0x00000002); - latestWebhookEvent_ = null; - if (latestWebhookEventBuilder_ != null) { - latestWebhookEventBuilder_.dispose(); - latestWebhookEventBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder getLatestWebhookEventBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getLatestWebhookEventFieldBuilder().getBuilder(); - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder getLatestWebhookEventOrBuilder() { - if (latestWebhookEventBuilder_ != null) { - return latestWebhookEventBuilder_.getMessageOrBuilder(); - } else { - return latestWebhookEvent_ == null ? - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.getDefaultInstance() : latestWebhookEvent_; - } - } - /** - *
-       * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true.
-       * 
- * - * .gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2 [json_name = "latestWebhookEvent"]; - */ - private com.google.protobuf.SingleFieldBuilder< - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder> - getLatestWebhookEventFieldBuilder() { - if (latestWebhookEventBuilder_ == null) { - latestWebhookEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEvent.Builder, io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse.WebhookEventOrBuilder>( - getLatestWebhookEvent(), - getParentForChildren(), - isClean()); - latestWebhookEvent_ = null; - } - return latestWebhookEventBuilder_; - } - - // @@protoc_insertion_point(builder_scope:gitpod.v1.GetConfigurationWebhookActivityStatusResponse) - } - - // @@protoc_insertion_point(class_scope:gitpod.v1.GetConfigurationWebhookActivityStatusResponse) - private static final io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse(); - } - - public static io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetConfigurationWebhookActivityStatusResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - private static final com.google.protobuf.Descriptors.Descriptor internal_static_gitpod_v1_Configuration_descriptor; private static final @@ -16737,21 +14786,6 @@ public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookAct private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_gitpod_v1_DeleteConfigurationResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -16849,45 +14883,31 @@ public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookAct "gitpod.v1.ConfigurationR\rconfiguration\"G" + "\n\032DeleteConfigurationRequest\022)\n\020configur" + "ation_id\030\001 \001(\tR\017configurationId\"\035\n\033Delet" + - "eConfigurationResponse\"Y\n,GetConfigurati" + - "onWebhookActivityStatusRequest\022)\n\020config" + - "uration_id\030\001 \001(\tR\017configurationId\"\275\002\n-Ge" + - "tConfigurationWebhookActivityStatusRespo" + - "nse\022*\n\021is_webhook_active\030\001 \001(\010R\017isWebhoo" + - "kActive\022w\n\024latest_webhook_event\030\002 \001(\0132E." + - "gitpod.v1.GetConfigurationWebhookActivit" + - "yStatusResponse.WebhookEventR\022latestWebh" + - "ookEvent\032g\n\014WebhookEvent\022\026\n\006commit\030\001 \001(\t" + - "R\006commit\022?\n\rcreation_time\030\002 \001(\0132\032.google" + - ".protobuf.TimestampR\014creationTime*r\n\027Pre" + - "buildTriggerStrategy\022)\n%PREBUILD_TRIGGER" + - "_STRATEGY_UNSPECIFIED\020\000\022,\n(PREBUILD_TRIG" + - "GER_STRATEGY_ACTIVITY_BASED\020\001*\311\001\n\026Branch" + - "MatchingStrategy\022(\n$BRANCH_MATCHING_STRA" + - "TEGY_UNSPECIFIED\020\000\022+\n\'BRANCH_MATCHING_ST" + - "RATEGY_DEFAULT_BRANCH\020\001\022)\n%BRANCH_MATCHI" + - "NG_STRATEGY_ALL_BRANCHES\020\002\022-\n)BRANCH_MAT" + - "CHING_STRATEGY_MATCHED_BRANCHES\020\0032\261\005\n\024Co" + - "nfigurationService\022f\n\023CreateConfiguratio" + - "n\022%.gitpod.v1.CreateConfigurationRequest" + - "\032&.gitpod.v1.CreateConfigurationResponse" + - "\"\000\022]\n\020GetConfiguration\022\".gitpod.v1.GetCo" + - "nfigurationRequest\032#.gitpod.v1.GetConfig" + - "urationResponse\"\000\022c\n\022ListConfigurations\022" + - "$.gitpod.v1.ListConfigurationsRequest\032%." + - "gitpod.v1.ListConfigurationsResponse\"\000\022f" + - "\n\023UpdateConfiguration\022%.gitpod.v1.Update" + - "ConfigurationRequest\032&.gitpod.v1.UpdateC" + - "onfigurationResponse\"\000\022f\n\023DeleteConfigur" + - "ation\022%.gitpod.v1.DeleteConfigurationReq" + - "uest\032&.gitpod.v1.DeleteConfigurationResp" + - "onse\"\000\022\234\001\n%GetConfigurationWebhookActivi" + - "tyStatus\0227.gitpod.v1.GetConfigurationWeb" + - "hookActivityStatusRequest\0328.gitpod.v1.Ge" + - "tConfigurationWebhookActivityStatusRespo" + - "nse\"\000BQ\n\026io.gitpod.publicapi.v1Z7github." + - "com/gitpod-io/gitpod/components/public-a" + - "pi/go/v1b\006proto3" + "eConfigurationResponse*r\n\027PrebuildTrigge" + + "rStrategy\022)\n%PREBUILD_TRIGGER_STRATEGY_U" + + "NSPECIFIED\020\000\022,\n(PREBUILD_TRIGGER_STRATEG" + + "Y_ACTIVITY_BASED\020\001*\311\001\n\026BranchMatchingStr" + + "ategy\022(\n$BRANCH_MATCHING_STRATEGY_UNSPEC" + + "IFIED\020\000\022+\n\'BRANCH_MATCHING_STRATEGY_DEFA" + + "ULT_BRANCH\020\001\022)\n%BRANCH_MATCHING_STRATEGY" + + "_ALL_BRANCHES\020\002\022-\n)BRANCH_MATCHING_STRAT" + + "EGY_MATCHED_BRANCHES\020\0032\222\004\n\024Configuration" + + "Service\022f\n\023CreateConfiguration\022%.gitpod." + + "v1.CreateConfigurationRequest\032&.gitpod.v" + + "1.CreateConfigurationResponse\"\000\022]\n\020GetCo" + + "nfiguration\022\".gitpod.v1.GetConfiguration" + + "Request\032#.gitpod.v1.GetConfigurationResp" + + "onse\"\000\022c\n\022ListConfigurations\022$.gitpod.v1" + + ".ListConfigurationsRequest\032%.gitpod.v1.L" + + "istConfigurationsResponse\"\000\022f\n\023UpdateCon" + + "figuration\022%.gitpod.v1.UpdateConfigurati" + + "onRequest\032&.gitpod.v1.UpdateConfiguratio" + + "nResponse\"\000\022f\n\023DeleteConfiguration\022%.git" + + "pod.v1.DeleteConfigurationRequest\032&.gitp" + + "od.v1.DeleteConfigurationResponse\"\000BQ\n\026i" + + "o.gitpod.publicapi.v1Z7github.com/gitpod" + + "-io/gitpod/components/public-api/go/v1b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -16992,24 +15012,6 @@ public io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookAct com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_gitpod_v1_DeleteConfigurationResponse_descriptor, new java.lang.String[] { }); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusRequest_descriptor, - new java.lang.String[] { "ConfigurationId", }); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor, - new java.lang.String[] { "IsWebhookActive", "LatestWebhookEvent", }); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor = - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_descriptor.getNestedTypes().get(0); - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_gitpod_v1_GetConfigurationWebhookActivityStatusResponse_WebhookEvent_descriptor, - new java.lang.String[] { "Commit", "CreationTime", }); descriptor.resolveAllFeaturesImmutable(); io.gitpod.publicapi.v1.Pagination.getDescriptor(); io.gitpod.publicapi.v1.Sorting.getDescriptor(); diff --git a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClient.kt b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClient.kt index 01ebe9f08b9255..fd817301197f61 100644 --- a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClient.kt +++ b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClient.kt @@ -105,24 +105,4 @@ public class ConfigurationServiceClient( ), ) - - /** - * GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild - * webhooks on the configuration - */ - override suspend - fun getConfigurationWebhookActivityStatus(request: ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest, - headers: Headers): - ResponseMessage = - client.unary( - request, - headers, - MethodSpec( - "gitpod.v1.ConfigurationService/GetConfigurationWebhookActivityStatus", - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest::class, - io.gitpod.publicapi.v1.ConfigurationOuterClass.GetConfigurationWebhookActivityStatusResponse::class, - StreamType.UNARY, - ), - ) - } diff --git a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClientInterface.kt b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClientInterface.kt index fb85f94a9eb648..1cd24d96c56786 100644 --- a/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClientInterface.kt +++ b/components/public-api/java/src/main/java/io/gitpod/publicapi/v1/ConfigurationServiceClientInterface.kt @@ -49,13 +49,4 @@ public interface ConfigurationServiceClientInterface { fun deleteConfiguration(request: ConfigurationOuterClass.DeleteConfigurationRequest, headers: Headers = emptyMap()): ResponseMessage - - /** - * GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild - * webhooks on the configuration - */ - public suspend - fun getConfigurationWebhookActivityStatus(request: ConfigurationOuterClass.GetConfigurationWebhookActivityStatusRequest, - headers: Headers = emptyMap()): - ResponseMessage } diff --git a/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts b/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts index b6be8d83e82c79..60e1c141d9a051 100644 --- a/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts +++ b/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts @@ -9,7 +9,7 @@ /* eslint-disable */ // @ts-nocheck -import { CreateConfigurationRequest, CreateConfigurationResponse, DeleteConfigurationRequest, DeleteConfigurationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConfigurationWebhookActivityStatusRequest, GetConfigurationWebhookActivityStatusResponse, ListConfigurationsRequest, ListConfigurationsResponse, UpdateConfigurationRequest, UpdateConfigurationResponse } from "./configuration_pb.js"; +import { CreateConfigurationRequest, CreateConfigurationResponse, DeleteConfigurationRequest, DeleteConfigurationResponse, GetConfigurationRequest, GetConfigurationResponse, ListConfigurationsRequest, ListConfigurationsResponse, UpdateConfigurationRequest, UpdateConfigurationResponse } from "./configuration_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -73,16 +73,5 @@ export const ConfigurationService = { O: DeleteConfigurationResponse, kind: MethodKind.Unary, }, - /** - * GetConfigurationWebhookActivityStatus returns the observed status of installed prebuild webhooks on the configuration - * - * @generated from rpc gitpod.v1.ConfigurationService.GetConfigurationWebhookActivityStatus - */ - getConfigurationWebhookActivityStatus: { - name: "GetConfigurationWebhookActivityStatus", - I: GetConfigurationWebhookActivityStatusRequest, - O: GetConfigurationWebhookActivityStatusResponse, - kind: MethodKind.Unary, - }, } } as const; diff --git a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts index 74fdf73f851f82..1e4fd811bc8bf5 100644 --- a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts @@ -877,130 +877,3 @@ export class DeleteConfigurationResponse extends Message { - /** - * @generated from field: string configuration_id = 1; - */ - configurationId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "gitpod.v1.GetConfigurationWebhookActivityStatusRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "configuration_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConfigurationWebhookActivityStatusRequest { - return new GetConfigurationWebhookActivityStatusRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConfigurationWebhookActivityStatusRequest { - return new GetConfigurationWebhookActivityStatusRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConfigurationWebhookActivityStatusRequest { - return new GetConfigurationWebhookActivityStatusRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConfigurationWebhookActivityStatusRequest | PlainMessage | undefined, b: GetConfigurationWebhookActivityStatusRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConfigurationWebhookActivityStatusRequest, a, b); - } -} - -/** - * @generated from message gitpod.v1.GetConfigurationWebhookActivityStatusResponse - */ -export class GetConfigurationWebhookActivityStatusResponse extends Message { - /** - * is_webhook_active determines whether the webhook is active or not for the configuration. - * - * @generated from field: bool is_webhook_active = 1; - */ - isWebhookActive = false; - - /** - * latest_webhook_event is the latest event that was observed by the webhook. Only set if is_webhook_active is true. - * - * @generated from field: gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent latest_webhook_event = 2; - */ - latestWebhookEvent?: GetConfigurationWebhookActivityStatusResponse_WebhookEvent; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "gitpod.v1.GetConfigurationWebhookActivityStatusResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_webhook_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "latest_webhook_event", kind: "message", T: GetConfigurationWebhookActivityStatusResponse_WebhookEvent }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConfigurationWebhookActivityStatusResponse { - return new GetConfigurationWebhookActivityStatusResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConfigurationWebhookActivityStatusResponse { - return new GetConfigurationWebhookActivityStatusResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConfigurationWebhookActivityStatusResponse { - return new GetConfigurationWebhookActivityStatusResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConfigurationWebhookActivityStatusResponse | PlainMessage | undefined, b: GetConfigurationWebhookActivityStatusResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConfigurationWebhookActivityStatusResponse, a, b); - } -} - -/** - * @generated from message gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent - */ -export class GetConfigurationWebhookActivityStatusResponse_WebhookEvent extends Message { - /** - * @generated from field: string commit = 1; - */ - commit = ""; - - /** - * @generated from field: google.protobuf.Timestamp creation_time = 2; - */ - creationTime?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "gitpod.v1.GetConfigurationWebhookActivityStatusResponse.WebhookEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "creation_time", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConfigurationWebhookActivityStatusResponse_WebhookEvent { - return new GetConfigurationWebhookActivityStatusResponse_WebhookEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConfigurationWebhookActivityStatusResponse_WebhookEvent { - return new GetConfigurationWebhookActivityStatusResponse_WebhookEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConfigurationWebhookActivityStatusResponse_WebhookEvent { - return new GetConfigurationWebhookActivityStatusResponse_WebhookEvent().fromJsonString(jsonString, options); - } - - static equals(a: GetConfigurationWebhookActivityStatusResponse_WebhookEvent | PlainMessage | undefined, b: GetConfigurationWebhookActivityStatusResponse_WebhookEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConfigurationWebhookActivityStatusResponse_WebhookEvent, a, b); - } -} diff --git a/components/server/src/api/configuration-service-api.ts b/components/server/src/api/configuration-service-api.ts index a2400c75897261..237898151c3008 100644 --- a/components/server/src/api/configuration-service-api.ts +++ b/components/server/src/api/configuration-service-api.ts @@ -15,8 +15,6 @@ import { DeleteConfigurationRequest, DeleteConfigurationResponse, GetConfigurationRequest, - GetConfigurationWebhookActivityStatusRequest, - GetConfigurationWebhookActivityStatusResponse, ListConfigurationsRequest, ListConfigurationsResponse, PrebuildSettings, @@ -32,7 +30,6 @@ import { SortOrder } from "@gitpod/public-api/lib/gitpod/v1/sorting_pb"; import { Project } from "@gitpod/gitpod-protocol"; import { DeepPartial } from "@gitpod/gitpod-protocol/lib/util/deep-partial"; import { ContextService } from "../workspace/context-service"; -import { Timestamp } from "@bufbuild/protobuf"; function buildUpdateObject>(obj: T): Partial { const update: Partial = {}; @@ -241,27 +238,4 @@ export class ConfigurationServiceAPI implements ServiceImpl { bind(RepositoryHost).toSelf().inSingletonScope(); @@ -32,4 +34,5 @@ export const githubContainerModule = new ContainerModule((bind, _unbind, _isBoun bind(GitHubTokenHelper).toSelf().inSingletonScope(); bind(GitHubTokenValidator).toSelf().inSingletonScope(); bind(IGitTokenValidator).toService(GitHubTokenValidator); + rebind(RepositoryService).to(GitHubService).inSingletonScope(); }); diff --git a/components/server/src/github/github-repository-provider.ts b/components/server/src/github/github-repository-provider.ts index 239ebd278e62a4..8395acd0e3a050 100644 --- a/components/server/src/github/github-repository-provider.ts +++ b/components/server/src/github/github-repository-provider.ts @@ -26,7 +26,8 @@ export class GithubRepositoryProvider implements RepositoryProvider { const avatarUrl = repository.owner.avatar_url; const webUrl = repository.html_url; const defaultBranch = repository.default_branch; - return { host, owner, name: repo, cloneUrl, description, avatarUrl, webUrl, defaultBranch }; + const pushedAt = repository.pushed_at; + return { host, owner, name: repo, cloneUrl, description, avatarUrl, webUrl, defaultBranch, pushedAt }; } async getBranch(user: User, owner: string, repo: string, branch: string): Promise { diff --git a/components/server/src/prebuilds/bitbucket-server-service.ts b/components/server/src/prebuilds/bitbucket-server-service.ts new file mode 100644 index 00000000000000..9d3f5eb8d977d5 --- /dev/null +++ b/components/server/src/prebuilds/bitbucket-server-service.ts @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2024 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. + */ + +import { RepositoryService } from "../repohost/repo-service"; +import { User } from "@gitpod/gitpod-protocol"; +import { inject, injectable } from "inversify"; +import { BitbucketServerApi } from "../bitbucket-server/bitbucket-server-api"; +import { BitbucketServerContextParser } from "../bitbucket-server/bitbucket-server-context-parser"; +import { Config } from "../config"; +import { BitbucketServerApp } from "./bitbucket-server-app"; + +@injectable() +export class BitbucketServerService extends RepositoryService { + constructor( + @inject(BitbucketServerApi) private readonly api: BitbucketServerApi, + @inject(Config) private readonly config: Config, + @inject(BitbucketServerContextParser) private readonly contextParser: BitbucketServerContextParser, + ) { + super(); + } + + public async isGitpodWebhookEnabled(user: User, cloneUrl: string): Promise { + try { + const { owner, repoName, repoKind } = await this.contextParser.parseURL(user, cloneUrl); + const existing = await this.api.getWebhooks(user, { + repoKind, + repositorySlug: repoName, + owner, + }); + if (!existing.values) { + return false; + } + const hookUrl = this.getHookUrl(); + + return existing.values.some((hook) => hook.url && hook.url.includes(hookUrl)); + } catch (error) { + console.error("Failed to check if Gitpod webhook is enabled.", error, { cloneUrl }); + + return false; + } + } + + protected getHookUrl() { + return this.config.hostUrl + .asPublicServices() + .with({ + pathname: BitbucketServerApp.path, + }) + .toString(); + } +} diff --git a/components/server/src/prebuilds/bitbucket-service.ts b/components/server/src/prebuilds/bitbucket-service.ts new file mode 100644 index 00000000000000..6a363b8515e849 --- /dev/null +++ b/components/server/src/prebuilds/bitbucket-service.ts @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2024 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. + */ + +import { RepositoryService } from "../repohost/repo-service"; +import { User } from "@gitpod/gitpod-protocol"; +import { inject, injectable } from "inversify"; +import { BitbucketApiFactory } from "../bitbucket/bitbucket-api-factory"; +import { BitbucketApp } from "./bitbucket-app"; +import { Config } from "../config"; +import { BitbucketContextParser } from "../bitbucket/bitbucket-context-parser"; + +@injectable() +export class BitbucketService extends RepositoryService { + constructor( + @inject(BitbucketApiFactory) private readonly api: BitbucketApiFactory, + @inject(Config) private readonly config: Config, + @inject(BitbucketContextParser) private readonly bitbucketContextParser: BitbucketContextParser, + ) { + super(); + } + + public async isGitpodWebhookEnabled(user: User, cloneUrl: string): Promise { + try { + const api = await this.api.create(user); + const { owner, repoName } = await this.bitbucketContextParser.parseURL(user, cloneUrl); + const hooks = await api.repositories.listWebhooks({ + repo_slug: repoName, + workspace: owner, + }); + if (!hooks.data.values) { + return false; + } + return hooks.data.values.some((hook) => hook.url === this.getHookUrl()); + } catch (error) { + console.error("Failed to check if Gitpod webhook is enabled.", error, { cloneUrl }); + + return false; + } + } + + protected getHookUrl() { + return this.config.hostUrl + .asPublicServices() + .with({ + pathname: BitbucketApp.path, + }) + .toString(); + } +} diff --git a/components/server/src/prebuilds/github-service.ts b/components/server/src/prebuilds/github-service.ts new file mode 100644 index 00000000000000..e6f5b7bc4d7c7a --- /dev/null +++ b/components/server/src/prebuilds/github-service.ts @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 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. + */ + +import { RepositoryService } from "../repohost/repo-service"; +import { inject, injectable } from "inversify"; +import { GitHubApiError, GitHubRestApi } from "../github/api"; +import { GitHubEnterpriseApp } from "./github-enterprise-app"; +import { GithubContextParser } from "../github/github-context-parser"; +import { User } from "@gitpod/gitpod-protocol"; +import { Config } from "../config"; +import { RepoURL } from "../repohost"; +import { UnauthorizedError } from "../errors"; +import { GitHubOAuthScopes } from "@gitpod/public-api-common/lib/auth-providers"; + +@injectable() +export class GitHubService extends RepositoryService { + constructor( + @inject(GitHubRestApi) protected readonly githubApi: GitHubRestApi, + @inject(Config) private readonly config: Config, + @inject(GithubContextParser) private readonly githubContextParser: GithubContextParser, + ) { + super(); + } + + async isGitpodWebhookEnabled(user: User, cloneUrl: string): Promise { + try { + const { owner, repoName: repo } = await this.githubContextParser.parseURL(user, cloneUrl); + const webhooks = (await this.githubApi.run(user, (gh) => gh.repos.listWebhooks({ owner, repo }))).data; + return webhooks.some((webhook) => webhook.config.url === this.getHookUrl()); + } catch (error) { + if (GitHubApiError.is(error)) { + throw UnauthorizedError.create({ + host: RepoURL.parseRepoUrl(cloneUrl)!.host, + providerType: "GitHub", + repoName: RepoURL.parseRepoUrl(cloneUrl)!.repo, + requiredScopes: GitHubOAuthScopes.Requirements.DEFAULT, + providerIsConnected: true, + }); + } + throw error; + } + } + + protected getHookUrl() { + return this.config.hostUrl + .asPublicServices() + .with({ + pathname: GitHubEnterpriseApp.path, + }) + .toString(); + } +} diff --git a/components/server/src/prebuilds/gitlab-service.ts b/components/server/src/prebuilds/gitlab-service.ts new file mode 100644 index 00000000000000..95f6bd0f8d394a --- /dev/null +++ b/components/server/src/prebuilds/gitlab-service.ts @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2024 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. + */ + +import { RepositoryService } from "../repohost/repo-service"; +import { User } from "@gitpod/gitpod-protocol"; +import { inject, injectable } from "inversify"; +import { GitLabApi, GitLab } from "../gitlab/api"; +import { GitLabApp } from "./gitlab-app"; +import { Config } from "../config"; +import { GitlabContextParser } from "../gitlab/gitlab-context-parser"; +import { RepoURL } from "../repohost"; +import { UnauthorizedError } from "../errors"; +import { GitLabOAuthScopes } from "@gitpod/public-api-common/lib/auth-providers"; + +@injectable() +export class GitlabService extends RepositoryService { + constructor( + @inject(GitLabApi) protected api: GitLabApi, + @inject(Config) private readonly config: Config, + @inject(GitlabContextParser) private readonly gitlabContextParser: GitlabContextParser, + ) { + super(); + } + + public async isGitpodWebhookEnabled(user: User, cloneUrl: string): Promise { + try { + const { owner, repoName } = await this.gitlabContextParser.parseURL(user, cloneUrl); + const hooks = (await this.api.run(user, (g) => + g.ProjectHooks.all(`${owner}/${repoName}`), + )) as unknown as GitLab.ProjectHook[]; + return hooks.some((hook) => hook.url === this.getHookUrl()); + } catch (error) { + if (GitLab.ApiError.is(error)) { + throw UnauthorizedError.create({ + host: RepoURL.parseRepoUrl(cloneUrl)!.host, + providerType: "GitLab", + repoName: RepoURL.parseRepoUrl(cloneUrl)!.repo, + requiredScopes: GitLabOAuthScopes.Requirements.REPO, + providerIsConnected: true, + }); + } + throw error; + } + } + + private getHookUrl() { + return this.config.hostUrl + .asPublicServices() + .with({ + pathname: GitLabApp.path, + }) + .toString(); + } +} diff --git a/components/server/src/projects/projects-service.ts b/components/server/src/projects/projects-service.ts index dab0cb6c75483d..98d2c79936bf20 100644 --- a/components/server/src/projects/projects-service.ts +++ b/components/server/src/projects/projects-service.ts @@ -13,8 +13,8 @@ import { FindPrebuildsParams, Project, User, - WebhookEvent, CommitContext, + WebhookEvent, } from "@gitpod/gitpod-protocol"; import { HostContextProvider } from "../auth/host-context-provider"; import { RepoURL } from "../repohost"; @@ -38,6 +38,7 @@ import { IDEService } from "../ide-service"; import type { PrebuildManager } from "../prebuilds/prebuild-manager"; import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing"; import { ContextParser } from "../workspace/context-parser-service"; +import { UnauthorizedError } from "../errors"; // to resolve circular dependency issues export const LazyPrebuildManager = Symbol("LazyPrebuildManager"); @@ -55,8 +56,8 @@ export class ProjectsService { @inject(Authorizer) private readonly auth: Authorizer, @inject(IDEService) private readonly ideService: IDEService, @inject(LazyPrebuildManager) private readonly prebuildManager: LazyPrebuildManager, + @inject(ContextParser) private readonly contextParser: ContextParser, @inject(WebhookEventDB) private readonly webhookEventDb: WebhookEventDB, - @inject(ContextParser) private contextParser: ContextParser, @inject(InstallationService) private readonly installationService: InstallationService, ) {} @@ -544,7 +545,7 @@ export class ProjectsService { } /** - * getRecentWebhookEvent checks if the webhook integration is active for the given user and project by querying the webhook event database and seeing if for the latest commit on the repository there exists a webhook event. + * getRecentWebhookEvent checks if the webhook integration is active for the given user and project by querying the webhook event database and seeing if for the latest commit on the repository there exists a webhook event. Additionally, if the necessary SCM permissions are given, the latest commit check is skipped and the most recent event is returned. */ public async getRecentWebhookEvent( ctx: TraceContext, @@ -554,21 +555,45 @@ export class ProjectsService { ): Promise { const context = (await this.contextParser.handle(ctx, user, project.cloneUrl)) as CommitContext; - const events = await this.webhookEventDb.findByCloneUrl(project.cloneUrl, 1); - if (events.length === 0) { - return undefined; - } - + // We fetch the most recent 50 events so to maximalize the propability + // of hitting a commit on the default branch and not just one on some + // separate feature branch. + const events = await this.webhookEventDb.findByCloneUrl(project.cloneUrl, 50); const hostContext = this.hostContextProvider.get(context.repository.host); - const repoProvider = hostContext?.services?.repositoryProvider; - if (!repoProvider) { - throw new ApplicationError(ErrorCodes.INTERNAL_SERVER_ERROR, `repo provider unavailable`); + const repoService = hostContext?.services?.repositoryService; + if (repoService) { + try { + const webhookEnabled = await repoService.isGitpodWebhookEnabled(user, project.cloneUrl); + return webhookEnabled + ? events[0] ?? { + commit: "n/a", + creationTime: "", + id: "initial_data", + type: "initial_data", + rawEvent: "{}", + status: "processed", + } + : undefined; + } catch (error) { + if (!UnauthorizedError.is(error) && error.message !== "unsupported") { + throw error; + } + } + 1; } + const matchingEvent = events.find((event) => { if (maxAge && Date.now() - new Date(event.creationTime).getTime() > maxAge) { return false; } + // If we know when the source repository was last pushed to, we can figure out if we received the push event after that + if (context.repository.pushedAt && new Date(event.creationTime) >= new Date(context.repository.pushedAt)) { + return true; + } + + // If we know the commit hash, we can check if latest commit in the event matches the one we know. + // We do this check second, because pushing to the non-default branch might throw this off. return context.revision === event.commit; }); diff --git a/components/server/src/repohost/repo-service.ts b/components/server/src/repohost/repo-service.ts new file mode 100644 index 00000000000000..016c318011931f --- /dev/null +++ b/components/server/src/repohost/repo-service.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2020 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. + */ + +import { User } from "@gitpod/gitpod-protocol"; +import { injectable } from "inversify"; + +@injectable() +export class RepositoryService { + async isGitpodWebhookEnabled(user: User, cloneUrl: string): Promise { + throw new Error("unsupported"); + } +} diff --git a/components/server/src/repohost/repository-host.ts b/components/server/src/repohost/repository-host.ts index e87752ab0d1655..eba852ee0bf488 100644 --- a/components/server/src/repohost/repository-host.ts +++ b/components/server/src/repohost/repository-host.ts @@ -8,9 +8,11 @@ import { inject, injectable } from "inversify"; import { FileProvider } from "./file-provider"; import { RepositoryProvider } from "./repository-provider"; +import { RepositoryService } from "./repo-service"; @injectable() export class RepositoryHost { @inject(FileProvider) fileProvider: FileProvider; @inject(RepositoryProvider) repositoryProvider: RepositoryProvider; + @inject(RepositoryService) repositoryService: RepositoryService; } diff --git a/components/server/src/workspace/workspace-service.ts b/components/server/src/workspace/workspace-service.ts index 9935374d4e2523..f437d31bf8aaf7 100644 --- a/components/server/src/workspace/workspace-service.ts +++ b/components/server/src/workspace/workspace-service.ts @@ -489,8 +489,7 @@ export class WorkspaceService { return; } - const logCtx = { userId: user.id, workspaceId: workspace.id }; - log.info(logCtx, "Workspace create event: Checking prebuild trigger strategy"); + const logCtx = { userId: user.id, workspaceId: workspace.id, projectId: project.id }; (async () => { const event = await this.projectsService.getRecentWebhookEvent(ctx, user, project);