diff --git a/go/api_spec/method.pb.go b/go/api_spec/method.pb.go index 9f4c9b7..de7278b 100644 --- a/go/api_spec/method.pb.go +++ b/go/api_spec/method.pb.go @@ -136,6 +136,69 @@ func (HTTPBody_ContentType) EnumDescriptor() ([]byte, []int) { return file_method_proto_rawDescGZIP(), []int{22, 0} } +// Defines the possible error states we can reach while trying to generate a witness (request+response pair) +type HTTPMethodErrorErrorType int32 + +const ( + // Represents the case where the agent timed out before it could create a complete witness. + HTTPMethodError_AGENT_TIMED_OUT HTTPMethodErrorErrorType = 0 + // Represents the case where the agent could not parse the packet as expected. + HTTPMethodError_AGENT_PARSING_ERROR HTTPMethodErrorErrorType = 1 + // Represents the case where the client closed the connection before the complete witness was generated. + // This could be due to a timeout, abrupt temination of the connection, etc. + HTTPMethodError_CLIENT_CLOSED HTTPMethodErrorErrorType = 2 + // Represents the case where the server closed the connection before the complete witness was generated. + // This could be due to a timeout, abrupt temination of the connection, etc. + HTTPMethodError_SERVER_CLOSED HTTPMethodErrorErrorType = 3 + // Other unknown error observed while generating a witness. + HTTPMethodError_OTHER HTTPMethodErrorErrorType = 5 +) + +// Enum value maps for HTTPMethodErrorErrorType. +var ( + HTTPMethodErrorErrorType_name = map[int32]string{ + 0: "AGENT_TIMED_OUT", + 1: "AGENT_PARSING_ERROR", + 2: "CLIENT_CLOSED", + 3: "SERVER_CLOSED", + 5: "OTHER", + } + HTTPMethodErrorErrorType_value = map[string]int32{ + "AGENT_TIMED_OUT": 0, + "AGENT_PARSING_ERROR": 1, + "CLIENT_CLOSED": 2, + "SERVER_CLOSED": 3, + "OTHER": 5, + } +) + +func (x HTTPMethodErrorErrorType) Enum() *HTTPMethodErrorErrorType { + p := new(HTTPMethodErrorErrorType) + *p = x + return p +} + +func (x HTTPMethodErrorErrorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HTTPMethodErrorErrorType) Descriptor() protoreflect.EnumDescriptor { + return file_method_proto_enumTypes[2].Descriptor() +} + +func (HTTPMethodErrorErrorType) Type() protoreflect.EnumType { + return &file_method_proto_enumTypes[2] +} + +func (x HTTPMethodErrorErrorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HTTPMethodErrorErrorType.Descriptor instead. +func (HTTPMethodErrorErrorType) EnumDescriptor() ([]byte, []int) { + return file_method_proto_rawDescGZIP(), []int{32, 0} +} + type Bool struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2274,6 +2337,61 @@ func (x *HTTPMethodMeta) GetProcessingLatency() float32 { return 0 } +type HTTPMethodError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type HTTPMethodErrorErrorType `protobuf:"varint,1,opt,name=type,proto3,enum=api_spec.HTTPMethodErrorErrorType" json:"type,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *HTTPMethodError) Reset() { + *x = HTTPMethodError{} + if protoimpl.UnsafeEnabled { + mi := &file_method_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPMethodError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPMethodError) ProtoMessage() {} + +func (x *HTTPMethodError) ProtoReflect() protoreflect.Message { + mi := &file_method_proto_msgTypes[32] + 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 HTTPMethodError.ProtoReflect.Descriptor instead. +func (*HTTPMethodError) Descriptor() ([]byte, []int) { + return file_method_proto_rawDescGZIP(), []int{32} +} + +func (x *HTTPMethodError) GetType() HTTPMethodErrorErrorType { + if x != nil { + return x.Type + } + return HTTPMethodError_AGENT_TIMED_OUT +} + +func (x *HTTPMethodError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + type MethodMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2282,13 +2400,14 @@ type MethodMeta struct { // Types that are assignable to Meta: // *MethodMeta_Grpc // *MethodMeta_Http - Meta isMethodMeta_Meta `protobuf_oneof:"meta"` + Meta isMethodMeta_Meta `protobuf_oneof:"meta"` + Errors []*HTTPMethodError `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` } func (x *MethodMeta) Reset() { *x = MethodMeta{} if protoimpl.UnsafeEnabled { - mi := &file_method_proto_msgTypes[32] + mi := &file_method_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2301,7 +2420,7 @@ func (x *MethodMeta) String() string { func (*MethodMeta) ProtoMessage() {} func (x *MethodMeta) ProtoReflect() protoreflect.Message { - mi := &file_method_proto_msgTypes[32] + mi := &file_method_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2314,7 +2433,7 @@ func (x *MethodMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use MethodMeta.ProtoReflect.Descriptor instead. func (*MethodMeta) Descriptor() ([]byte, []int) { - return file_method_proto_rawDescGZIP(), []int{32} + return file_method_proto_rawDescGZIP(), []int{33} } func (m *MethodMeta) GetMeta() isMethodMeta_Meta { @@ -2338,6 +2457,13 @@ func (x *MethodMeta) GetHttp() *HTTPMethodMeta { return nil } +func (x *MethodMeta) GetErrors() []*HTTPMethodError { + if x != nil { + return x.Errors + } + return nil +} + type isMethodMeta_Meta interface { isMethodMeta_Meta() } @@ -2372,7 +2498,7 @@ type Method struct { func (x *Method) Reset() { *x = Method{} if protoimpl.UnsafeEnabled { - mi := &file_method_proto_msgTypes[33] + mi := &file_method_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2385,7 +2511,7 @@ func (x *Method) String() string { func (*Method) ProtoMessage() {} func (x *Method) ProtoReflect() protoreflect.Message { - mi := &file_method_proto_msgTypes[33] + mi := &file_method_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2398,7 +2524,7 @@ func (x *Method) ProtoReflect() protoreflect.Message { // Deprecated: Use Method.ProtoReflect.Descriptor instead. func (*Method) Descriptor() ([]byte, []int) { - return file_method_proto_rawDescGZIP(), []int{33} + return file_method_proto_rawDescGZIP(), []int{34} } func (x *Method) GetId() *MethodID { @@ -2678,40 +2804,56 @@ var file_method_proto_rawDesc = []byte{ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x74, 0x0a, 0x0a, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x67, 0x72, - 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x2e, 0x0a, 0x04, 0x68, 0x74, - 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x22, 0xdc, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x44, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x47, 0x0a, 0x09, 0x41, 0x72, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x61, 0x6b, 0x69, 0x74, 0x61, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x73, 0x74, 0x61, 0x72, - 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0xd0, 0x01, 0x0a, + 0x0f, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, + 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x6a, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x44, 0x5f, + 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x50, + 0x41, 0x52, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, + 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x05, 0x22, + 0xa7, 0x01, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2e, + 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x2e, + 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x31, + 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xdc, 0x02, 0x0a, 0x06, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x1a, 0x47, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x61, 0x6b, 0x69, 0x74, + 0x61, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, + 0x70, 0x65, 0x72, 0x73, 0x74, 0x61, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2726,128 +2868,132 @@ func file_method_proto_rawDescGZIP() []byte { return file_method_proto_rawDescData } -var file_method_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_method_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_method_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_method_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_method_proto_goTypes = []interface{}{ - (HTTPAuth_HTTPAuthType)(0), // 0: api_spec.HTTPAuth.HTTPAuthType - (HTTPBody_ContentType)(0), // 1: api_spec.HTTPBody.ContentType - (*Bool)(nil), // 2: api_spec.Bool - (*Bytes)(nil), // 3: api_spec.Bytes - (*String)(nil), // 4: api_spec.String - (*Int32)(nil), // 5: api_spec.Int32 - (*Int64)(nil), // 6: api_spec.Int64 - (*Uint32)(nil), // 7: api_spec.Uint32 - (*Uint64)(nil), // 8: api_spec.Uint64 - (*Double)(nil), // 9: api_spec.Double - (*Float)(nil), // 10: api_spec.Float - (*Primitive)(nil), // 11: api_spec.Primitive - (*List)(nil), // 12: api_spec.List - (*Struct)(nil), // 13: api_spec.Struct - (*MapData)(nil), // 14: api_spec.MapData - (*None)(nil), // 15: api_spec.None - (*Optional)(nil), // 16: api_spec.Optional - (*OneOf)(nil), // 17: api_spec.OneOf - (*GRPCMeta)(nil), // 18: api_spec.GRPCMeta - (*HTTPPath)(nil), // 19: api_spec.HTTPPath - (*HTTPQuery)(nil), // 20: api_spec.HTTPQuery - (*HTTPHeader)(nil), // 21: api_spec.HTTPHeader - (*HTTPAuth)(nil), // 22: api_spec.HTTPAuth - (*HTTPCookie)(nil), // 23: api_spec.HTTPCookie - (*HTTPBody)(nil), // 24: api_spec.HTTPBody - (*HTTPMultipart)(nil), // 25: api_spec.HTTPMultipart - (*HTTPEmpty)(nil), // 26: api_spec.HTTPEmpty - (*HTTPMeta)(nil), // 27: api_spec.HTTPMeta - (*DataMeta)(nil), // 28: api_spec.DataMeta - (*ExampleValue)(nil), // 29: api_spec.ExampleValue - (*Data)(nil), // 30: api_spec.Data - (*MethodID)(nil), // 31: api_spec.MethodID - (*GRPCMethodMeta)(nil), // 32: api_spec.GRPCMethodMeta - (*HTTPMethodMeta)(nil), // 33: api_spec.HTTPMethodMeta - (*MethodMeta)(nil), // 34: api_spec.MethodMeta - (*Method)(nil), // 35: api_spec.Method - nil, // 36: api_spec.Primitive.FormatsEntry - nil, // 37: api_spec.Struct.FieldsEntry - nil, // 38: api_spec.OneOf.OptionsEntry - nil, // 39: api_spec.Data.ExampleValuesEntry - nil, // 40: api_spec.Method.ArgsEntry - nil, // 41: api_spec.Method.ResponsesEntry - (*BoolType)(nil), // 42: api_spec.BoolType - (*BytesType)(nil), // 43: api_spec.BytesType - (*StringType)(nil), // 44: api_spec.StringType - (*Int32Type)(nil), // 45: api_spec.Int32Type - (*Int64Type)(nil), // 46: api_spec.Int64Type - (*Uint32Type)(nil), // 47: api_spec.Uint32Type - (*Uint64Type)(nil), // 48: api_spec.Uint64Type - (*DoubleType)(nil), // 49: api_spec.DoubleType - (*FloatType)(nil), // 50: api_spec.FloatType - (*AkitaAnnotations)(nil), // 51: api_spec.AkitaAnnotations - (ApiType)(0), // 52: api_spec.ApiType + (HTTPAuth_HTTPAuthType)(0), // 0: api_spec.HTTPAuth.HTTPAuthType + (HTTPBody_ContentType)(0), // 1: api_spec.HTTPBody.ContentType + (HTTPMethodErrorErrorType)(0), // 2: api_spec.HTTPMethodError.errorType + (*Bool)(nil), // 3: api_spec.Bool + (*Bytes)(nil), // 4: api_spec.Bytes + (*String)(nil), // 5: api_spec.String + (*Int32)(nil), // 6: api_spec.Int32 + (*Int64)(nil), // 7: api_spec.Int64 + (*Uint32)(nil), // 8: api_spec.Uint32 + (*Uint64)(nil), // 9: api_spec.Uint64 + (*Double)(nil), // 10: api_spec.Double + (*Float)(nil), // 11: api_spec.Float + (*Primitive)(nil), // 12: api_spec.Primitive + (*List)(nil), // 13: api_spec.List + (*Struct)(nil), // 14: api_spec.Struct + (*MapData)(nil), // 15: api_spec.MapData + (*None)(nil), // 16: api_spec.None + (*Optional)(nil), // 17: api_spec.Optional + (*OneOf)(nil), // 18: api_spec.OneOf + (*GRPCMeta)(nil), // 19: api_spec.GRPCMeta + (*HTTPPath)(nil), // 20: api_spec.HTTPPath + (*HTTPQuery)(nil), // 21: api_spec.HTTPQuery + (*HTTPHeader)(nil), // 22: api_spec.HTTPHeader + (*HTTPAuth)(nil), // 23: api_spec.HTTPAuth + (*HTTPCookie)(nil), // 24: api_spec.HTTPCookie + (*HTTPBody)(nil), // 25: api_spec.HTTPBody + (*HTTPMultipart)(nil), // 26: api_spec.HTTPMultipart + (*HTTPEmpty)(nil), // 27: api_spec.HTTPEmpty + (*HTTPMeta)(nil), // 28: api_spec.HTTPMeta + (*DataMeta)(nil), // 29: api_spec.DataMeta + (*ExampleValue)(nil), // 30: api_spec.ExampleValue + (*Data)(nil), // 31: api_spec.Data + (*MethodID)(nil), // 32: api_spec.MethodID + (*GRPCMethodMeta)(nil), // 33: api_spec.GRPCMethodMeta + (*HTTPMethodMeta)(nil), // 34: api_spec.HTTPMethodMeta + (*HTTPMethodError)(nil), // 35: api_spec.HTTPMethodError + (*MethodMeta)(nil), // 36: api_spec.MethodMeta + (*Method)(nil), // 37: api_spec.Method + nil, // 38: api_spec.Primitive.FormatsEntry + nil, // 39: api_spec.Struct.FieldsEntry + nil, // 40: api_spec.OneOf.OptionsEntry + nil, // 41: api_spec.Data.ExampleValuesEntry + nil, // 42: api_spec.Method.ArgsEntry + nil, // 43: api_spec.Method.ResponsesEntry + (*BoolType)(nil), // 44: api_spec.BoolType + (*BytesType)(nil), // 45: api_spec.BytesType + (*StringType)(nil), // 46: api_spec.StringType + (*Int32Type)(nil), // 47: api_spec.Int32Type + (*Int64Type)(nil), // 48: api_spec.Int64Type + (*Uint32Type)(nil), // 49: api_spec.Uint32Type + (*Uint64Type)(nil), // 50: api_spec.Uint64Type + (*DoubleType)(nil), // 51: api_spec.DoubleType + (*FloatType)(nil), // 52: api_spec.FloatType + (*AkitaAnnotations)(nil), // 53: api_spec.AkitaAnnotations + (ApiType)(0), // 54: api_spec.ApiType } var file_method_proto_depIdxs = []int32{ - 42, // 0: api_spec.Bool.type:type_name -> api_spec.BoolType - 43, // 1: api_spec.Bytes.type:type_name -> api_spec.BytesType - 44, // 2: api_spec.String.type:type_name -> api_spec.StringType - 45, // 3: api_spec.Int32.type:type_name -> api_spec.Int32Type - 46, // 4: api_spec.Int64.type:type_name -> api_spec.Int64Type - 47, // 5: api_spec.Uint32.type:type_name -> api_spec.Uint32Type - 48, // 6: api_spec.Uint64.type:type_name -> api_spec.Uint64Type - 49, // 7: api_spec.Double.type:type_name -> api_spec.DoubleType - 50, // 8: api_spec.Float.type:type_name -> api_spec.FloatType - 2, // 9: api_spec.Primitive.bool_value:type_name -> api_spec.Bool - 3, // 10: api_spec.Primitive.bytes_value:type_name -> api_spec.Bytes - 4, // 11: api_spec.Primitive.string_value:type_name -> api_spec.String - 5, // 12: api_spec.Primitive.int32_value:type_name -> api_spec.Int32 - 6, // 13: api_spec.Primitive.int64_value:type_name -> api_spec.Int64 - 7, // 14: api_spec.Primitive.uint32_value:type_name -> api_spec.Uint32 - 8, // 15: api_spec.Primitive.uint64_value:type_name -> api_spec.Uint64 - 9, // 16: api_spec.Primitive.double_value:type_name -> api_spec.Double - 10, // 17: api_spec.Primitive.float_value:type_name -> api_spec.Float - 51, // 18: api_spec.Primitive.akita_annotations:type_name -> api_spec.AkitaAnnotations - 36, // 19: api_spec.Primitive.formats:type_name -> api_spec.Primitive.FormatsEntry - 30, // 20: api_spec.List.elems:type_name -> api_spec.Data - 37, // 21: api_spec.Struct.fields:type_name -> api_spec.Struct.FieldsEntry - 14, // 22: api_spec.Struct.map_type:type_name -> api_spec.MapData - 30, // 23: api_spec.MapData.key:type_name -> api_spec.Data - 30, // 24: api_spec.MapData.value:type_name -> api_spec.Data - 30, // 25: api_spec.Optional.data:type_name -> api_spec.Data - 15, // 26: api_spec.Optional.none:type_name -> api_spec.None - 38, // 27: api_spec.OneOf.options:type_name -> api_spec.OneOf.OptionsEntry + 44, // 0: api_spec.Bool.type:type_name -> api_spec.BoolType + 45, // 1: api_spec.Bytes.type:type_name -> api_spec.BytesType + 46, // 2: api_spec.String.type:type_name -> api_spec.StringType + 47, // 3: api_spec.Int32.type:type_name -> api_spec.Int32Type + 48, // 4: api_spec.Int64.type:type_name -> api_spec.Int64Type + 49, // 5: api_spec.Uint32.type:type_name -> api_spec.Uint32Type + 50, // 6: api_spec.Uint64.type:type_name -> api_spec.Uint64Type + 51, // 7: api_spec.Double.type:type_name -> api_spec.DoubleType + 52, // 8: api_spec.Float.type:type_name -> api_spec.FloatType + 3, // 9: api_spec.Primitive.bool_value:type_name -> api_spec.Bool + 4, // 10: api_spec.Primitive.bytes_value:type_name -> api_spec.Bytes + 5, // 11: api_spec.Primitive.string_value:type_name -> api_spec.String + 6, // 12: api_spec.Primitive.int32_value:type_name -> api_spec.Int32 + 7, // 13: api_spec.Primitive.int64_value:type_name -> api_spec.Int64 + 8, // 14: api_spec.Primitive.uint32_value:type_name -> api_spec.Uint32 + 9, // 15: api_spec.Primitive.uint64_value:type_name -> api_spec.Uint64 + 10, // 16: api_spec.Primitive.double_value:type_name -> api_spec.Double + 11, // 17: api_spec.Primitive.float_value:type_name -> api_spec.Float + 53, // 18: api_spec.Primitive.akita_annotations:type_name -> api_spec.AkitaAnnotations + 38, // 19: api_spec.Primitive.formats:type_name -> api_spec.Primitive.FormatsEntry + 31, // 20: api_spec.List.elems:type_name -> api_spec.Data + 39, // 21: api_spec.Struct.fields:type_name -> api_spec.Struct.FieldsEntry + 15, // 22: api_spec.Struct.map_type:type_name -> api_spec.MapData + 31, // 23: api_spec.MapData.key:type_name -> api_spec.Data + 31, // 24: api_spec.MapData.value:type_name -> api_spec.Data + 31, // 25: api_spec.Optional.data:type_name -> api_spec.Data + 16, // 26: api_spec.Optional.none:type_name -> api_spec.None + 40, // 27: api_spec.OneOf.options:type_name -> api_spec.OneOf.OptionsEntry 0, // 28: api_spec.HTTPAuth.type:type_name -> api_spec.HTTPAuth.HTTPAuthType 1, // 29: api_spec.HTTPBody.content_type:type_name -> api_spec.HTTPBody.ContentType - 19, // 30: api_spec.HTTPMeta.path:type_name -> api_spec.HTTPPath - 20, // 31: api_spec.HTTPMeta.query:type_name -> api_spec.HTTPQuery - 21, // 32: api_spec.HTTPMeta.header:type_name -> api_spec.HTTPHeader - 23, // 33: api_spec.HTTPMeta.cookie:type_name -> api_spec.HTTPCookie - 24, // 34: api_spec.HTTPMeta.body:type_name -> api_spec.HTTPBody - 26, // 35: api_spec.HTTPMeta.empty:type_name -> api_spec.HTTPEmpty - 22, // 36: api_spec.HTTPMeta.auth:type_name -> api_spec.HTTPAuth - 25, // 37: api_spec.HTTPMeta.multipart:type_name -> api_spec.HTTPMultipart - 18, // 38: api_spec.DataMeta.grpc:type_name -> api_spec.GRPCMeta - 27, // 39: api_spec.DataMeta.http:type_name -> api_spec.HTTPMeta - 11, // 40: api_spec.Data.primitive:type_name -> api_spec.Primitive - 13, // 41: api_spec.Data.struct:type_name -> api_spec.Struct - 12, // 42: api_spec.Data.list:type_name -> api_spec.List - 16, // 43: api_spec.Data.optional:type_name -> api_spec.Optional - 17, // 44: api_spec.Data.oneof:type_name -> api_spec.OneOf - 28, // 45: api_spec.Data.meta:type_name -> api_spec.DataMeta - 39, // 46: api_spec.Data.example_values:type_name -> api_spec.Data.ExampleValuesEntry - 52, // 47: api_spec.MethodID.api_type:type_name -> api_spec.ApiType - 32, // 48: api_spec.MethodMeta.grpc:type_name -> api_spec.GRPCMethodMeta - 33, // 49: api_spec.MethodMeta.http:type_name -> api_spec.HTTPMethodMeta - 31, // 50: api_spec.Method.id:type_name -> api_spec.MethodID - 40, // 51: api_spec.Method.args:type_name -> api_spec.Method.ArgsEntry - 41, // 52: api_spec.Method.responses:type_name -> api_spec.Method.ResponsesEntry - 34, // 53: api_spec.Method.meta:type_name -> api_spec.MethodMeta - 30, // 54: api_spec.Struct.FieldsEntry.value:type_name -> api_spec.Data - 30, // 55: api_spec.OneOf.OptionsEntry.value:type_name -> api_spec.Data - 29, // 56: api_spec.Data.ExampleValuesEntry.value:type_name -> api_spec.ExampleValue - 30, // 57: api_spec.Method.ArgsEntry.value:type_name -> api_spec.Data - 30, // 58: api_spec.Method.ResponsesEntry.value:type_name -> api_spec.Data - 59, // [59:59] is the sub-list for method output_type - 59, // [59:59] is the sub-list for method input_type - 59, // [59:59] is the sub-list for extension type_name - 59, // [59:59] is the sub-list for extension extendee - 0, // [0:59] is the sub-list for field type_name + 20, // 30: api_spec.HTTPMeta.path:type_name -> api_spec.HTTPPath + 21, // 31: api_spec.HTTPMeta.query:type_name -> api_spec.HTTPQuery + 22, // 32: api_spec.HTTPMeta.header:type_name -> api_spec.HTTPHeader + 24, // 33: api_spec.HTTPMeta.cookie:type_name -> api_spec.HTTPCookie + 25, // 34: api_spec.HTTPMeta.body:type_name -> api_spec.HTTPBody + 27, // 35: api_spec.HTTPMeta.empty:type_name -> api_spec.HTTPEmpty + 23, // 36: api_spec.HTTPMeta.auth:type_name -> api_spec.HTTPAuth + 26, // 37: api_spec.HTTPMeta.multipart:type_name -> api_spec.HTTPMultipart + 19, // 38: api_spec.DataMeta.grpc:type_name -> api_spec.GRPCMeta + 28, // 39: api_spec.DataMeta.http:type_name -> api_spec.HTTPMeta + 12, // 40: api_spec.Data.primitive:type_name -> api_spec.Primitive + 14, // 41: api_spec.Data.struct:type_name -> api_spec.Struct + 13, // 42: api_spec.Data.list:type_name -> api_spec.List + 17, // 43: api_spec.Data.optional:type_name -> api_spec.Optional + 18, // 44: api_spec.Data.oneof:type_name -> api_spec.OneOf + 29, // 45: api_spec.Data.meta:type_name -> api_spec.DataMeta + 41, // 46: api_spec.Data.example_values:type_name -> api_spec.Data.ExampleValuesEntry + 54, // 47: api_spec.MethodID.api_type:type_name -> api_spec.ApiType + 2, // 48: api_spec.HTTPMethodError.type:type_name -> api_spec.HTTPMethodError.errorType + 33, // 49: api_spec.MethodMeta.grpc:type_name -> api_spec.GRPCMethodMeta + 34, // 50: api_spec.MethodMeta.http:type_name -> api_spec.HTTPMethodMeta + 35, // 51: api_spec.MethodMeta.errors:type_name -> api_spec.HTTPMethodError + 32, // 52: api_spec.Method.id:type_name -> api_spec.MethodID + 42, // 53: api_spec.Method.args:type_name -> api_spec.Method.ArgsEntry + 43, // 54: api_spec.Method.responses:type_name -> api_spec.Method.ResponsesEntry + 36, // 55: api_spec.Method.meta:type_name -> api_spec.MethodMeta + 31, // 56: api_spec.Struct.FieldsEntry.value:type_name -> api_spec.Data + 31, // 57: api_spec.OneOf.OptionsEntry.value:type_name -> api_spec.Data + 30, // 58: api_spec.Data.ExampleValuesEntry.value:type_name -> api_spec.ExampleValue + 31, // 59: api_spec.Method.ArgsEntry.value:type_name -> api_spec.Data + 31, // 60: api_spec.Method.ResponsesEntry.value:type_name -> api_spec.Data + 61, // [61:61] is the sub-list for method output_type + 61, // [61:61] is the sub-list for method input_type + 61, // [61:61] is the sub-list for extension type_name + 61, // [61:61] is the sub-list for extension extendee + 0, // [0:61] is the sub-list for field type_name } func init() { file_method_proto_init() } @@ -3243,7 +3389,7 @@ func file_method_proto_init() { } } file_method_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodMeta); i { + switch v := v.(*HTTPMethodError); i { case 0: return &v.state case 1: @@ -3255,6 +3401,18 @@ func file_method_proto_init() { } } file_method_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_method_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Method); i { case 0: return &v.state @@ -3303,7 +3461,7 @@ func file_method_proto_init() { (*Data_Optional)(nil), (*Data_Oneof)(nil), } - file_method_proto_msgTypes[32].OneofWrappers = []interface{}{ + file_method_proto_msgTypes[33].OneofWrappers = []interface{}{ (*MethodMeta_Grpc)(nil), (*MethodMeta_Http)(nil), } @@ -3312,8 +3470,8 @@ func file_method_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_method_proto_rawDesc, - NumEnums: 2, - NumMessages: 40, + NumEnums: 3, + NumMessages: 41, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/api_spec/method.proto b/proto/api_spec/method.proto index c156c56..1242c0b 100644 --- a/proto/api_spec/method.proto +++ b/proto/api_spec/method.proto @@ -308,11 +308,37 @@ message HTTPMethodMeta { float processing_latency = 4; } +message HTTPMethodError { + // Defines the possible error states we can reach while trying to generate a witness (request+response pair) + enum errorType { + // Represents the case where the agent timed out before it could create a complete witness. + AGENT_TIMED_OUT = 0; + + // Represents the case where the agent could not parse the packet as expected. + AGENT_PARSING_ERROR = 1; + + // Represents the case where the client closed the connection before the complete witness was generated. + // This could be due to a timeout, abrupt temination of the connection, etc. + CLIENT_CLOSED = 2; + + // Represents the case where the server closed the connection before the complete witness was generated. + // This could be due to a timeout, abrupt temination of the connection, etc. + SERVER_CLOSED = 3; + + // Other unknown error observed while generating a witness. + OTHER = 5; + } + + errorType type = 1; + string message = 2; +} + message MethodMeta { oneof meta { GRPCMethodMeta grpc = 1; HTTPMethodMeta http = 2; } + repeated HTTPMethodError errors = 3; } message Method { diff --git a/py/api_spec/method_pb2.py b/py/api_spec/method_pb2.py index b4ae61c..0e4bb6a 100644 --- a/py/api_spec/method_pb2.py +++ b/py/api_spec/method_pb2.py @@ -21,7 +21,7 @@ syntax='proto3', serialized_options=b'Z*akitasoftware.com/superstar/pb/go/api_spec', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0cmethod.proto\x12\x08\x61pi_spec\x1a\x0e\x61pi_type.proto\x1a\x0btypes.proto\"7\n\x04\x42ool\x12 \n\x04type\x18\x01 \x01(\x0b\x32\x12.api_spec.BoolType\x12\r\n\x05value\x18\x02 \x01(\x08\"9\n\x05\x42ytes\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.BytesType\x12\r\n\x05value\x18\x02 \x01(\x0c\";\n\x06String\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.StringType\x12\r\n\x05value\x18\x02 \x01(\t\"9\n\x05Int32\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int32Type\x12\r\n\x05value\x18\x02 \x01(\x05\"9\n\x05Int64\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int64Type\x12\r\n\x05value\x18\x02 \x01(\x03\";\n\x06Uint32\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint32Type\x12\r\n\x05value\x18\x02 \x01(\r\";\n\x06Uint64\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint64Type\x12\r\n\x05value\x18\x02 \x01(\x04\";\n\x06\x44ouble\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.DoubleType\x12\r\n\x05value\x18\x02 \x01(\x01\"9\n\x05\x46loat\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.FloatType\x12\r\n\x05value\x18\x02 \x01(\x02\"\xe3\x04\n\tPrimitive\x12\x11\n\ttype_hint\x18\x01 \x01(\t\x12$\n\nbool_value\x18\x02 \x01(\x0b\x32\x0e.api_spec.BoolH\x00\x12&\n\x0b\x62ytes_value\x18\x03 \x01(\x0b\x32\x0f.api_spec.BytesH\x00\x12(\n\x0cstring_value\x18\x04 \x01(\x0b\x32\x10.api_spec.StringH\x00\x12&\n\x0bint32_value\x18\x05 \x01(\x0b\x32\x0f.api_spec.Int32H\x00\x12&\n\x0bint64_value\x18\x06 \x01(\x0b\x32\x0f.api_spec.Int64H\x00\x12(\n\x0cuint32_value\x18\x07 \x01(\x0b\x32\x10.api_spec.Uint32H\x00\x12(\n\x0cuint64_value\x18\x08 \x01(\x0b\x32\x10.api_spec.Uint64H\x00\x12(\n\x0c\x64ouble_value\x18\t \x01(\x0b\x32\x10.api_spec.DoubleH\x00\x12&\n\x0b\x66loat_value\x18\n \x01(\x0b\x32\x0f.api_spec.FloatH\x00\x12\x35\n\x11\x61kita_annotations\x18\x0b \x01(\x0b\x32\x1a.api_spec.AkitaAnnotations\x12\x1d\n\x15\x63ontains_random_value\x18\x0c \x01(\x08\x12\x31\n\x07\x66ormats\x18\r \x03(\x0b\x32 .api_spec.Primitive.FormatsEntry\x12\x13\n\x0b\x66ormat_kind\x18\x0e \x01(\t\x1a.\n\x0c\x46ormatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x42\x07\n\x05value\"%\n\x04List\x12\x1d\n\x05\x65lems\x18\x01 \x03(\x0b\x32\x0e.api_spec.Data\"\x9a\x01\n\x06Struct\x12,\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1c.api_spec.Struct.FieldsEntry\x12#\n\x08map_type\x18\x02 \x01(\x0b\x32\x11.api_spec.MapData\x1a=\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"E\n\x07MapData\x12\x1b\n\x03key\x18\x01 \x01(\x0b\x32\x0e.api_spec.Data\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data\"\x06\n\x04None\"S\n\x08Optional\x12\x1e\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x0e.api_spec.DataH\x00\x12\x1e\n\x04none\x18\x02 \x01(\x0b\x32\x0e.api_spec.NoneH\x00\x42\x07\n\x05value\"\x92\x01\n\x05OneOf\x12-\n\x07options\x18\x01 \x03(\x0b\x32\x1c.api_spec.OneOf.OptionsEntry\x12\x1a\n\x12potential_conflict\x18\x02 \x01(\x08\x1a>\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"\n\n\x08GRPCMeta\"\x17\n\x08HTTPPath\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x18\n\tHTTPQuery\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x19\n\nHTTPHeader\x12\x0b\n\x03key\x18\x01 \x01(\t\"m\n\x08HTTPAuth\x12-\n\x04type\x18\x01 \x01(\x0e\x32\x1f.api_spec.HTTPAuth.HTTPAuthType\"2\n\x0cHTTPAuthType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06\x42\x45\x41RER\x10\x02\"\x19\n\nHTTPCookie\x12\x0b\n\x03key\x18\x01 \x01(\t\"\xe0\x01\n\x08HTTPBody\x12\x34\n\x0c\x63ontent_type\x18\x01 \x01(\x0e\x32\x1e.api_spec.HTTPBody.ContentType\x12\x12\n\nother_type\x18\x02 \x01(\t\"\x89\x01\n\x0b\x43ontentType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x14\n\x10\x46ORM_URL_ENCODED\x10\x02\x12\x10\n\x0cOCTET_STREAM\x10\x03\x12\x07\n\x03PDF\x10\x04\x12\x0e\n\nTEXT_PLAIN\x10\x05\x12\x08\n\x04YAML\x10\x06\x12\r\n\tTEXT_HTML\x10\x07\x12\t\n\x05OTHER\x10\x08\"\x1d\n\rHTTPMultipart\x12\x0c\n\x04type\x18\x01 \x01(\t\"\x0b\n\tHTTPEmpty\"\xe3\x02\n\x08HTTPMeta\x12\"\n\x04path\x18\x01 \x01(\x0b\x32\x12.api_spec.HTTPPathH\x00\x12$\n\x05query\x18\x02 \x01(\x0b\x32\x13.api_spec.HTTPQueryH\x00\x12&\n\x06header\x18\x03 \x01(\x0b\x32\x14.api_spec.HTTPHeaderH\x00\x12&\n\x06\x63ookie\x18\x04 \x01(\x0b\x32\x14.api_spec.HTTPCookieH\x00\x12\"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x12.api_spec.HTTPBodyH\x00\x12$\n\x05\x65mpty\x18\x06 \x01(\x0b\x32\x13.api_spec.HTTPEmptyH\x00\x12\"\n\x04\x61uth\x18\x08 \x01(\x0b\x32\x12.api_spec.HTTPAuthH\x00\x12,\n\tmultipart\x18\t \x01(\x0b\x32\x17.api_spec.HTTPMultipartH\x00\x12\x15\n\rresponse_code\x18\x07 \x01(\x05\x42\n\n\x08location\"Z\n\x08\x44\x61taMeta\x12\"\n\x04grpc\x18\x01 \x01(\x0b\x32\x12.api_spec.GRPCMetaH\x00\x12\"\n\x04http\x18\x02 \x01(\x0b\x32\x12.api_spec.HTTPMetaH\x00\x42\x06\n\x04meta\"\x0e\n\x0c\x45xampleValue\"\x84\x03\n\x04\x44\x61ta\x12(\n\tprimitive\x18\x01 \x01(\x0b\x32\x13.api_spec.PrimitiveH\x00\x12\"\n\x06struct\x18\x02 \x01(\x0b\x32\x10.api_spec.StructH\x00\x12\x1e\n\x04list\x18\x03 \x01(\x0b\x32\x0e.api_spec.ListH\x00\x12&\n\x08optional\x18\x04 \x01(\x0b\x32\x12.api_spec.OptionalH\x00\x12 \n\x05oneof\x18\x06 \x01(\x0b\x32\x0f.api_spec.OneOfH\x00\x12 \n\x04meta\x18\x05 \x01(\x0b\x32\x12.api_spec.DataMeta\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x39\n\x0e\x65xample_values\x18\x08 \x03(\x0b\x32!.api_spec.Data.ExampleValuesEntry\x1aL\n\x12\x45xampleValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.api_spec.ExampleValue:\x02\x38\x01\x42\x07\n\x05value\"=\n\x08MethodID\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08\x61pi_type\x18\x02 \x01(\x0e\x32\x11.api_spec.ApiType\"\x10\n\x0eGRPCMethodMeta\"a\n\x0eHTTPMethodMeta\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x15\n\rpath_template\x18\x02 \x01(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x1a\n\x12processing_latency\x18\x04 \x01(\x02\"h\n\nMethodMeta\x12(\n\x04grpc\x18\x01 \x01(\x0b\x32\x18.api_spec.GRPCMethodMetaH\x00\x12(\n\x04http\x18\x02 \x01(\x0b\x32\x18.api_spec.HTTPMethodMetaH\x00\x42\x06\n\x04meta\"\xa9\x02\n\x06Method\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x12.api_spec.MethodID\x12(\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.api_spec.Method.ArgsEntry\x12\x32\n\tresponses\x18\x03 \x03(\x0b\x32\x1f.api_spec.Method.ResponsesEntry\x12\"\n\x04meta\x18\x04 \x01(\x0b\x32\x14.api_spec.MethodMeta\x1a;\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x1a@\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x42,Z*akitasoftware.com/superstar/pb/go/api_specb\x06proto3' + serialized_pb=b'\n\x0cmethod.proto\x12\x08\x61pi_spec\x1a\x0e\x61pi_type.proto\x1a\x0btypes.proto\"7\n\x04\x42ool\x12 \n\x04type\x18\x01 \x01(\x0b\x32\x12.api_spec.BoolType\x12\r\n\x05value\x18\x02 \x01(\x08\"9\n\x05\x42ytes\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.BytesType\x12\r\n\x05value\x18\x02 \x01(\x0c\";\n\x06String\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.StringType\x12\r\n\x05value\x18\x02 \x01(\t\"9\n\x05Int32\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int32Type\x12\r\n\x05value\x18\x02 \x01(\x05\"9\n\x05Int64\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int64Type\x12\r\n\x05value\x18\x02 \x01(\x03\";\n\x06Uint32\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint32Type\x12\r\n\x05value\x18\x02 \x01(\r\";\n\x06Uint64\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint64Type\x12\r\n\x05value\x18\x02 \x01(\x04\";\n\x06\x44ouble\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.DoubleType\x12\r\n\x05value\x18\x02 \x01(\x01\"9\n\x05\x46loat\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.FloatType\x12\r\n\x05value\x18\x02 \x01(\x02\"\xe3\x04\n\tPrimitive\x12\x11\n\ttype_hint\x18\x01 \x01(\t\x12$\n\nbool_value\x18\x02 \x01(\x0b\x32\x0e.api_spec.BoolH\x00\x12&\n\x0b\x62ytes_value\x18\x03 \x01(\x0b\x32\x0f.api_spec.BytesH\x00\x12(\n\x0cstring_value\x18\x04 \x01(\x0b\x32\x10.api_spec.StringH\x00\x12&\n\x0bint32_value\x18\x05 \x01(\x0b\x32\x0f.api_spec.Int32H\x00\x12&\n\x0bint64_value\x18\x06 \x01(\x0b\x32\x0f.api_spec.Int64H\x00\x12(\n\x0cuint32_value\x18\x07 \x01(\x0b\x32\x10.api_spec.Uint32H\x00\x12(\n\x0cuint64_value\x18\x08 \x01(\x0b\x32\x10.api_spec.Uint64H\x00\x12(\n\x0c\x64ouble_value\x18\t \x01(\x0b\x32\x10.api_spec.DoubleH\x00\x12&\n\x0b\x66loat_value\x18\n \x01(\x0b\x32\x0f.api_spec.FloatH\x00\x12\x35\n\x11\x61kita_annotations\x18\x0b \x01(\x0b\x32\x1a.api_spec.AkitaAnnotations\x12\x1d\n\x15\x63ontains_random_value\x18\x0c \x01(\x08\x12\x31\n\x07\x66ormats\x18\r \x03(\x0b\x32 .api_spec.Primitive.FormatsEntry\x12\x13\n\x0b\x66ormat_kind\x18\x0e \x01(\t\x1a.\n\x0c\x46ormatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x42\x07\n\x05value\"%\n\x04List\x12\x1d\n\x05\x65lems\x18\x01 \x03(\x0b\x32\x0e.api_spec.Data\"\x9a\x01\n\x06Struct\x12,\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1c.api_spec.Struct.FieldsEntry\x12#\n\x08map_type\x18\x02 \x01(\x0b\x32\x11.api_spec.MapData\x1a=\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"E\n\x07MapData\x12\x1b\n\x03key\x18\x01 \x01(\x0b\x32\x0e.api_spec.Data\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data\"\x06\n\x04None\"S\n\x08Optional\x12\x1e\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x0e.api_spec.DataH\x00\x12\x1e\n\x04none\x18\x02 \x01(\x0b\x32\x0e.api_spec.NoneH\x00\x42\x07\n\x05value\"\x92\x01\n\x05OneOf\x12-\n\x07options\x18\x01 \x03(\x0b\x32\x1c.api_spec.OneOf.OptionsEntry\x12\x1a\n\x12potential_conflict\x18\x02 \x01(\x08\x1a>\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"\n\n\x08GRPCMeta\"\x17\n\x08HTTPPath\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x18\n\tHTTPQuery\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x19\n\nHTTPHeader\x12\x0b\n\x03key\x18\x01 \x01(\t\"m\n\x08HTTPAuth\x12-\n\x04type\x18\x01 \x01(\x0e\x32\x1f.api_spec.HTTPAuth.HTTPAuthType\"2\n\x0cHTTPAuthType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06\x42\x45\x41RER\x10\x02\"\x19\n\nHTTPCookie\x12\x0b\n\x03key\x18\x01 \x01(\t\"\xe0\x01\n\x08HTTPBody\x12\x34\n\x0c\x63ontent_type\x18\x01 \x01(\x0e\x32\x1e.api_spec.HTTPBody.ContentType\x12\x12\n\nother_type\x18\x02 \x01(\t\"\x89\x01\n\x0b\x43ontentType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x14\n\x10\x46ORM_URL_ENCODED\x10\x02\x12\x10\n\x0cOCTET_STREAM\x10\x03\x12\x07\n\x03PDF\x10\x04\x12\x0e\n\nTEXT_PLAIN\x10\x05\x12\x08\n\x04YAML\x10\x06\x12\r\n\tTEXT_HTML\x10\x07\x12\t\n\x05OTHER\x10\x08\"\x1d\n\rHTTPMultipart\x12\x0c\n\x04type\x18\x01 \x01(\t\"\x0b\n\tHTTPEmpty\"\xe3\x02\n\x08HTTPMeta\x12\"\n\x04path\x18\x01 \x01(\x0b\x32\x12.api_spec.HTTPPathH\x00\x12$\n\x05query\x18\x02 \x01(\x0b\x32\x13.api_spec.HTTPQueryH\x00\x12&\n\x06header\x18\x03 \x01(\x0b\x32\x14.api_spec.HTTPHeaderH\x00\x12&\n\x06\x63ookie\x18\x04 \x01(\x0b\x32\x14.api_spec.HTTPCookieH\x00\x12\"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x12.api_spec.HTTPBodyH\x00\x12$\n\x05\x65mpty\x18\x06 \x01(\x0b\x32\x13.api_spec.HTTPEmptyH\x00\x12\"\n\x04\x61uth\x18\x08 \x01(\x0b\x32\x12.api_spec.HTTPAuthH\x00\x12,\n\tmultipart\x18\t \x01(\x0b\x32\x17.api_spec.HTTPMultipartH\x00\x12\x15\n\rresponse_code\x18\x07 \x01(\x05\x42\n\n\x08location\"Z\n\x08\x44\x61taMeta\x12\"\n\x04grpc\x18\x01 \x01(\x0b\x32\x12.api_spec.GRPCMetaH\x00\x12\"\n\x04http\x18\x02 \x01(\x0b\x32\x12.api_spec.HTTPMetaH\x00\x42\x06\n\x04meta\"\x0e\n\x0c\x45xampleValue\"\x84\x03\n\x04\x44\x61ta\x12(\n\tprimitive\x18\x01 \x01(\x0b\x32\x13.api_spec.PrimitiveH\x00\x12\"\n\x06struct\x18\x02 \x01(\x0b\x32\x10.api_spec.StructH\x00\x12\x1e\n\x04list\x18\x03 \x01(\x0b\x32\x0e.api_spec.ListH\x00\x12&\n\x08optional\x18\x04 \x01(\x0b\x32\x12.api_spec.OptionalH\x00\x12 \n\x05oneof\x18\x06 \x01(\x0b\x32\x0f.api_spec.OneOfH\x00\x12 \n\x04meta\x18\x05 \x01(\x0b\x32\x12.api_spec.DataMeta\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x39\n\x0e\x65xample_values\x18\x08 \x03(\x0b\x32!.api_spec.Data.ExampleValuesEntry\x1aL\n\x12\x45xampleValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.api_spec.ExampleValue:\x02\x38\x01\x42\x07\n\x05value\"=\n\x08MethodID\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08\x61pi_type\x18\x02 \x01(\x0e\x32\x11.api_spec.ApiType\"\x10\n\x0eGRPCMethodMeta\"a\n\x0eHTTPMethodMeta\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x15\n\rpath_template\x18\x02 \x01(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x1a\n\x12processing_latency\x18\x04 \x01(\x02\"\xc1\x01\n\x0fHTTPMethodError\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.api_spec.HTTPMethodError.errorType\x12\x0f\n\x07message\x18\x02 \x01(\t\"j\n\terrorType\x12\x13\n\x0f\x41GENT_TIMED_OUT\x10\x00\x12\x17\n\x13\x41GENT_PARSING_ERROR\x10\x01\x12\x11\n\rCLIENT_CLOSED\x10\x02\x12\x11\n\rSERVER_CLOSED\x10\x03\x12\t\n\x05OTHER\x10\x05\"\x93\x01\n\nMethodMeta\x12(\n\x04grpc\x18\x01 \x01(\x0b\x32\x18.api_spec.GRPCMethodMetaH\x00\x12(\n\x04http\x18\x02 \x01(\x0b\x32\x18.api_spec.HTTPMethodMetaH\x00\x12)\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x19.api_spec.HTTPMethodErrorB\x06\n\x04meta\"\xa9\x02\n\x06Method\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x12.api_spec.MethodID\x12(\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.api_spec.Method.ArgsEntry\x12\x32\n\tresponses\x18\x03 \x03(\x0b\x32\x1f.api_spec.Method.ResponsesEntry\x12\"\n\x04meta\x18\x04 \x01(\x0b\x32\x14.api_spec.MethodMeta\x1a;\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x1a@\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x42,Z*akitasoftware.com/superstar/pb/go/api_specb\x06proto3' , dependencies=[api__type__pb2.DESCRIPTOR,types__pb2.DESCRIPTOR,]) @@ -117,6 +117,46 @@ ) _sym_db.RegisterEnumDescriptor(_HTTPBODY_CONTENTTYPE) +_HTTPMETHODERROR_ERRORTYPE = _descriptor.EnumDescriptor( + name='errorType', + full_name='api_spec.HTTPMethodError.errorType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='AGENT_TIMED_OUT', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AGENT_PARSING_ERROR', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CLIENT_CLOSED', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SERVER_CLOSED', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='OTHER', index=4, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=3339, + serialized_end=3445, +) +_sym_db.RegisterEnumDescriptor(_HTTPMETHODERROR_ERRORTYPE) + _BOOL = _descriptor.Descriptor( name='Bool', @@ -1615,6 +1655,46 @@ ) +_HTTPMETHODERROR = _descriptor.Descriptor( + name='HTTPMethodError', + full_name='api_spec.HTTPMethodError', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='api_spec.HTTPMethodError.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='message', full_name='api_spec.HTTPMethodError.message', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _HTTPMETHODERROR_ERRORTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3252, + serialized_end=3445, +) + + _METHODMETA = _descriptor.Descriptor( name='MethodMeta', full_name='api_spec.MethodMeta', @@ -1637,6 +1717,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='errors', full_name='api_spec.MethodMeta.errors', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1654,8 +1741,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3251, - serialized_end=3355, + serialized_start=3448, + serialized_end=3595, ) @@ -1693,8 +1780,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3530, - serialized_end=3589, + serialized_start=3770, + serialized_end=3829, ) _METHOD_RESPONSESENTRY = _descriptor.Descriptor( @@ -1731,8 +1818,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3591, - serialized_end=3655, + serialized_start=3831, + serialized_end=3895, ) _METHOD = _descriptor.Descriptor( @@ -1783,8 +1870,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3358, - serialized_end=3655, + serialized_start=3598, + serialized_end=3895, ) _BOOL.fields_by_name['type'].message_type = types__pb2._BOOLTYPE @@ -1922,8 +2009,11 @@ _DATA.fields_by_name['oneof']) _DATA.fields_by_name['oneof'].containing_oneof = _DATA.oneofs_by_name['value'] _METHODID.fields_by_name['api_type'].enum_type = api__type__pb2._APITYPE +_HTTPMETHODERROR.fields_by_name['type'].enum_type = _HTTPMETHODERROR_ERRORTYPE +_HTTPMETHODERROR_ERRORTYPE.containing_type = _HTTPMETHODERROR _METHODMETA.fields_by_name['grpc'].message_type = _GRPCMETHODMETA _METHODMETA.fields_by_name['http'].message_type = _HTTPMETHODMETA +_METHODMETA.fields_by_name['errors'].message_type = _HTTPMETHODERROR _METHODMETA.oneofs_by_name['meta'].fields.append( _METHODMETA.fields_by_name['grpc']) _METHODMETA.fields_by_name['grpc'].containing_oneof = _METHODMETA.oneofs_by_name['meta'] @@ -1970,6 +2060,7 @@ DESCRIPTOR.message_types_by_name['MethodID'] = _METHODID DESCRIPTOR.message_types_by_name['GRPCMethodMeta'] = _GRPCMETHODMETA DESCRIPTOR.message_types_by_name['HTTPMethodMeta'] = _HTTPMETHODMETA +DESCRIPTOR.message_types_by_name['HTTPMethodError'] = _HTTPMETHODERROR DESCRIPTOR.message_types_by_name['MethodMeta'] = _METHODMETA DESCRIPTOR.message_types_by_name['Method'] = _METHOD _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -2230,6 +2321,13 @@ }) _sym_db.RegisterMessage(HTTPMethodMeta) +HTTPMethodError = _reflection.GeneratedProtocolMessageType('HTTPMethodError', (_message.Message,), { + 'DESCRIPTOR' : _HTTPMETHODERROR, + '__module__' : 'method_pb2' + # @@protoc_insertion_point(class_scope:api_spec.HTTPMethodError) + }) +_sym_db.RegisterMessage(HTTPMethodError) + MethodMeta = _reflection.GeneratedProtocolMessageType('MethodMeta', (_message.Message,), { 'DESCRIPTOR' : _METHODMETA, '__module__' : 'method_pb2' diff --git a/ts/api_spec/api_type_pb.js b/ts/api_spec/api_type_pb.js index 4919b98..b87502d 100644 --- a/ts/api_spec/api_type_pb.js +++ b/ts/api_spec/api_type_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); goog.exportSymbol('proto.api_spec.ApiType', null, global); /** diff --git a/ts/api_spec/method_pb.d.ts b/ts/api_spec/method_pb.d.ts index e4a1a03..1a0dfc3 100644 --- a/ts/api_spec/method_pb.d.ts +++ b/ts/api_spec/method_pb.d.ts @@ -987,6 +987,38 @@ export namespace HTTPMethodMeta { } } +export class HTTPMethodError extends jspb.Message { + getType(): HTTPMethodError.errorType; + setType(value: HTTPMethodError.errorType): HTTPMethodError; + getMessage(): string; + setMessage(value: string): HTTPMethodError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HTTPMethodError.AsObject; + static toObject(includeInstance: boolean, msg: HTTPMethodError): HTTPMethodError.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HTTPMethodError, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HTTPMethodError; + static deserializeBinaryFromReader(message: HTTPMethodError, reader: jspb.BinaryReader): HTTPMethodError; +} + +export namespace HTTPMethodError { + export type AsObject = { + type: HTTPMethodError.errorType, + message: string, + } + + export enum errorType { + AGENT_TIMED_OUT = 0, + AGENT_PARSING_ERROR = 1, + CLIENT_CLOSED = 2, + SERVER_CLOSED = 3, + OTHER = 5, + } + +} + export class MethodMeta extends jspb.Message { hasGrpc(): boolean; @@ -998,6 +1030,10 @@ export class MethodMeta extends jspb.Message { clearHttp(): void; getHttp(): HTTPMethodMeta | undefined; setHttp(value?: HTTPMethodMeta): MethodMeta; + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): MethodMeta; + addErrors(value?: HTTPMethodError, index?: number): HTTPMethodError; getMetaCase(): MethodMeta.MetaCase; @@ -1015,6 +1051,7 @@ export namespace MethodMeta { export type AsObject = { grpc?: GRPCMethodMeta.AsObject, http?: HTTPMethodMeta.AsObject, + errorsList: Array, } export enum MetaCase { diff --git a/ts/api_spec/method_pb.js b/ts/api_spec/method_pb.js index 85c5ef1..4e8016d 100644 --- a/ts/api_spec/method_pb.js +++ b/ts/api_spec/method_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var api_type_pb = require('./api_type_pb.js'); goog.object.extend(proto, api_type_pb); @@ -45,6 +45,8 @@ goog.exportSymbol('proto.api_spec.HTTPEmpty', null, global); goog.exportSymbol('proto.api_spec.HTTPHeader', null, global); goog.exportSymbol('proto.api_spec.HTTPMeta', null, global); goog.exportSymbol('proto.api_spec.HTTPMeta.LocationCase', null, global); +goog.exportSymbol('proto.api_spec.HTTPMethodError', null, global); +goog.exportSymbol('proto.api_spec.HTTPMethodError.errorType', null, global); goog.exportSymbol('proto.api_spec.HTTPMethodMeta', null, global); goog.exportSymbol('proto.api_spec.HTTPMultipart', null, global); goog.exportSymbol('proto.api_spec.HTTPPath', null, global); @@ -739,6 +741,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.api_spec.HTTPMethodMeta.displayName = 'proto.api_spec.HTTPMethodMeta'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.api_spec.HTTPMethodError = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.api_spec.HTTPMethodError, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.api_spec.HTTPMethodError.displayName = 'proto.api_spec.HTTPMethodError'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -750,7 +773,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.api_spec.MethodMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.api_spec.MethodMeta.oneofGroups_); + jspb.Message.initialize(this, opt_data, 0, -1, proto.api_spec.MethodMeta.repeatedFields_, proto.api_spec.MethodMeta.oneofGroups_); }; goog.inherits(proto.api_spec.MethodMeta, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -3179,7 +3202,8 @@ proto.api_spec.Primitive.prototype.getFormatsMap = function(opt_noLazyCreate) { */ proto.api_spec.Primitive.prototype.clearFormatsMap = function() { this.getFormatsMap().clear(); - return this;}; + return this; +}; /** @@ -3504,7 +3528,8 @@ proto.api_spec.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { */ proto.api_spec.Struct.prototype.clearFieldsMap = function() { this.getFieldsMap().clear(); - return this;}; + return this; +}; /** @@ -4217,7 +4242,8 @@ proto.api_spec.OneOf.prototype.getOptionsMap = function(opt_noLazyCreate) { */ proto.api_spec.OneOf.prototype.clearOptionsMap = function() { this.getOptionsMap().clear(); - return this;}; + return this; +}; /** @@ -6798,7 +6824,8 @@ proto.api_spec.Data.prototype.getExampleValuesMap = function(opt_noLazyCreate) { */ proto.api_spec.Data.prototype.clearExampleValuesMap = function() { this.getExampleValuesMap().clear(); - return this;}; + return this; +}; @@ -7283,6 +7310,184 @@ proto.api_spec.HTTPMethodMeta.prototype.setProcessingLatency = function(value) { + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.api_spec.HTTPMethodError.prototype.toObject = function(opt_includeInstance) { + return proto.api_spec.HTTPMethodError.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.api_spec.HTTPMethodError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_spec.HTTPMethodError.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.api_spec.HTTPMethodError} + */ +proto.api_spec.HTTPMethodError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.api_spec.HTTPMethodError; + return proto.api_spec.HTTPMethodError.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.api_spec.HTTPMethodError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.api_spec.HTTPMethodError} + */ +proto.api_spec.HTTPMethodError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.api_spec.HTTPMethodError.errorType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.api_spec.HTTPMethodError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.api_spec.HTTPMethodError.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.api_spec.HTTPMethodError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_spec.HTTPMethodError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.api_spec.HTTPMethodError.errorType = { + AGENT_TIMED_OUT: 0, + AGENT_PARSING_ERROR: 1, + CLIENT_CLOSED: 2, + SERVER_CLOSED: 3, + OTHER: 5 +}; + +/** + * optional errorType type = 1; + * @return {!proto.api_spec.HTTPMethodError.errorType} + */ +proto.api_spec.HTTPMethodError.prototype.getType = function() { + return /** @type {!proto.api_spec.HTTPMethodError.errorType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.api_spec.HTTPMethodError.errorType} value + * @return {!proto.api_spec.HTTPMethodError} returns this + */ +proto.api_spec.HTTPMethodError.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.api_spec.HTTPMethodError.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.api_spec.HTTPMethodError} returns this + */ +proto.api_spec.HTTPMethodError.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.api_spec.MethodMeta.repeatedFields_ = [3]; + /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all @@ -7341,7 +7546,9 @@ proto.api_spec.MethodMeta.prototype.toObject = function(opt_includeInstance) { proto.api_spec.MethodMeta.toObject = function(includeInstance, msg) { var f, obj = { grpc: (f = msg.getGrpc()) && proto.api_spec.GRPCMethodMeta.toObject(includeInstance, f), - http: (f = msg.getHttp()) && proto.api_spec.HTTPMethodMeta.toObject(includeInstance, f) + http: (f = msg.getHttp()) && proto.api_spec.HTTPMethodMeta.toObject(includeInstance, f), + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + proto.api_spec.HTTPMethodError.toObject, includeInstance) }; if (includeInstance) { @@ -7388,6 +7595,11 @@ proto.api_spec.MethodMeta.deserializeBinaryFromReader = function(msg, reader) { reader.readMessage(value,proto.api_spec.HTTPMethodMeta.deserializeBinaryFromReader); msg.setHttp(value); break; + case 3: + var value = new proto.api_spec.HTTPMethodError; + reader.readMessage(value,proto.api_spec.HTTPMethodError.deserializeBinaryFromReader); + msg.addErrors(value); + break; default: reader.skipField(); break; @@ -7433,6 +7645,14 @@ proto.api_spec.MethodMeta.serializeBinaryToWriter = function(message, writer) { proto.api_spec.HTTPMethodMeta.serializeBinaryToWriter ); } + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.api_spec.HTTPMethodError.serializeBinaryToWriter + ); + } }; @@ -7510,6 +7730,44 @@ proto.api_spec.MethodMeta.prototype.hasHttp = function() { }; +/** + * repeated HTTPMethodError errors = 3; + * @return {!Array} + */ +proto.api_spec.MethodMeta.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.api_spec.HTTPMethodError, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.api_spec.MethodMeta} returns this +*/ +proto.api_spec.MethodMeta.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.api_spec.HTTPMethodError=} opt_value + * @param {number=} opt_index + * @return {!proto.api_spec.HTTPMethodError} + */ +proto.api_spec.MethodMeta.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.api_spec.HTTPMethodError, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.api_spec.MethodMeta} returns this + */ +proto.api_spec.MethodMeta.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + @@ -7716,7 +7974,8 @@ proto.api_spec.Method.prototype.getArgsMap = function(opt_noLazyCreate) { */ proto.api_spec.Method.prototype.clearArgsMap = function() { this.getArgsMap().clear(); - return this;}; + return this; +}; /** @@ -7738,7 +7997,8 @@ proto.api_spec.Method.prototype.getResponsesMap = function(opt_noLazyCreate) { */ proto.api_spec.Method.prototype.clearResponsesMap = function() { this.getResponsesMap().clear(); - return this;}; + return this; +}; /** diff --git a/ts/api_spec/sequence_pb.js b/ts/api_spec/sequence_pb.js index 0500a62..faa75cb 100644 --- a/ts/api_spec/sequence_pb.js +++ b/ts/api_spec/sequence_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb); @@ -2714,7 +2714,8 @@ proto.api_spec.StructTemplate.prototype.getFieldTemplatesMap = function(opt_noLa */ proto.api_spec.StructTemplate.prototype.clearFieldTemplatesMap = function() { this.getFieldTemplatesMap().clear(); - return this;}; + return this; +}; @@ -3699,7 +3700,8 @@ proto.api_spec.MethodTemplate.prototype.getArgTemplatesMap = function(opt_noLazy */ proto.api_spec.MethodTemplate.prototype.clearArgTemplatesMap = function() { this.getArgTemplatesMap().clear(); - return this;}; + return this; +}; /** @@ -3721,7 +3723,8 @@ proto.api_spec.MethodTemplate.prototype.getResponsesMap = function(opt_noLazyCre */ proto.api_spec.MethodTemplate.prototype.clearResponsesMap = function() { this.getResponsesMap().clear(); - return this;}; + return this; +}; /** diff --git a/ts/api_spec/spec_pb.js b/ts/api_spec/spec_pb.js index 0eaf077..9bb0ef6 100644 --- a/ts/api_spec/spec_pb.js +++ b/ts/api_spec/spec_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb); @@ -257,7 +257,8 @@ proto.api_spec.APISpec.prototype.getTagsMap = function(opt_noLazyCreate) { */ proto.api_spec.APISpec.prototype.clearTagsMap = function() { this.getTagsMap().clear(); - return this;}; + return this; +}; diff --git a/ts/api_spec/types_pb.js b/ts/api_spec/types_pb.js index c8abebc..227a7db 100644 --- a/ts/api_spec/types_pb.js +++ b/ts/api_spec/types_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); diff --git a/ts/api_spec/witness_pb.js b/ts/api_spec/witness_pb.js index c5d4742..4810a9f 100644 --- a/ts/api_spec/witness_pb.js +++ b/ts/api_spec/witness_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb);